Site Tools


pw:pw

http://gitlab.fjfi.cvut.cz/culikzde/pw-16-2025 Letošní příklady

http://gitlab.fjfi.cvut.cz/culikzde/pw-18-2025

http://gitlab.fjfi.cvut.cz/culikzde/pw-2024 Loňské příklady

http://gitlab.fjfi.cvut.cz/culikzde/pw-2023 Starší příklady

http://gitlab.fjfi.cvut.cz/culikzde/pw

http://gitlab.fjfi.cvut.cz/culikzde/pw-sharpdevelop

Vývojová prostředí

Literatura

  • Charles Petzold, Programování Microsoft Windows Forms v jazyce C#, Computer Press

Spouštíme Visual Studio

Několik ovládacích prvků

několik ovládacích prvků

CheckBox, NumericUpDown, TextBox

Jednoduchý kreslící program

jednoduchý kreslící program - první část

prozatím umíme nakreslit úsečku od místa stisknutí myši do místa uvolnění myši

Pen, Brush, Graphics

Jednoduchý kreslící program - obdélník a elipsa

Jednoduchý kreslící program - výběr barev

jednoduchý kreslící program - třetí část

Menu, ColorDialog, přetypování

panely pro výběr barev, které můžeme průběžně přidávat

Jednoduchý kreslící program - ukládání do souboru, změna velikosti okna, štětec s barevým přechodem, editace parametrů pro kreslení čar

jednoduchý kreslící program - čtvrtá část

OpenFileDialog, SaveFileDialog, PropertyGrid, LinearGradientBrush

Jednoduchý kreslící program - dialog s parametry barevné výplně

Pohyblivé panely

pohyblivé panely

user control, context menu

Další druhy panelů

další druhy panelů

čtení textu ze soubotu, HTML, tabulky, grafy

Strom se soubory

strom se soubory

DriveInfo, DirectoryInfo, FileInfo, postupné přidávání větví

strom se soubory 2021

tabulky

Reflexe, typové informace

Preklad

Rozpoznavani obrazu

ONNX examples https://onnxruntime.ai/docs/tutorials/api-basics.html

C# example https://onnxruntime.ai/docs/tutorials/csharp/resnet50_csharp.html

C# example source https://github.com/microsoft/onnxruntime/tree/main/csharp/sample/Microsoft.ML.OnnxRuntime.ResNet50v2Sample

git clone https://github.com/microsoft/onnxruntime 

download model https://github.com/onnx/models/blob/main/validated/vision/classification/resnet/model/resnet50-v2-7.onnx

display model … Netron https://netron.app

Visual Studio - open solution - onnxruntime\csharp\sample\Microsoft.ML.OnnxRuntime.ResNet50v2Sample

In Solution Explorer, right-click Dependencies and select Manage NuGet packages….
In the NuGet package manager, select the Browse tab. Add following packages:

Microsoft.ML.OnnxRuntime
System.Numerics.Tensors

Edit Program.cs

            if (args.Length < 2) {
                // Console.WriteLine("Usage: prog <model.onnx> <image.jpg>");
                // return;
            }
 
            // Read paths
            string modelFilePath = "../../../resnet50-v2-7.onnx";
            string imageFilePath = "../../../dog.jpeg";

Druhy priklad

C# example source https://github.com/microsoft/onnxruntime/tree/main/csharp/sample/Microsoft.ML.OnnxRuntime.FasterRcnnSample

Download model https://github.com/onnx/models/blob/main/validated/vision/object_detection_segmentation/faster-rcnn/model/FasterRCNN-12.onnx

FasterRCNN-10.onnx not working

Download image https://onnxruntime.ai/images/demo.jpg

Open solution onnxruntime/csharp/sample/Microsoft.ML.OnnxRuntime.FasterRcnnSample

In Solution Explorer, right-click Properties
Set Target framework to .NET 9.0

     string modelFilePath = "..\\..\\..\\FasterRCNN-12.onnx";
     string imageFilePath = "../../../demo.jpg";
     string outImageFilePath = "../../../output.jpg";

Poznámky

http://gitlab.fjfi.cvut.cz/culikzde/pw-builder/-/tree/master/Builder

http://gitlab.fjfi.cvut.cz/culikzde/pw-sharpdevelop/-/tree/master/Compiler

http://stackoverflow.com/questions/32769630/how-to-compile-a-c-sharp-file-with-roslyn-programmatically

https://stackoverflow.com/questions/4181668/execute-c-sharp-code-at-runtime-from-code-file

https://www.linkedin.com/pulse/load-compile-run-c-code-dynamically-munib-butt

http://www.codeproject.com/Articles/60175/The-DesignSurface-Extended-Class-is-Back-Together

http://roslynpad.net

http://sharplab.io

http://github.com/dajuric/dot-imaging

http://github.com/mini-software/MiniExcel

http://discoverdot.net/projects/cs-script

https://github.com/quozd/awesome-dotnet

https://discoverdot.net/

https://www.programmingalgorithms.com/algorithm/emboss-laplacian/

PropertyGrid, ICustomTypeDescriptor, TypeDescriptionProvider, TypeDescriptor

http://www.codeproject.com/Articles/13342/Filtering-properties-in-a-PropertyGrid

http://www.codeproject.com/Articles/189521/Dynamic-Properties-for-PropertyGrid

http://www.codeproject.com/Articles/9280/Add-Remove-Items-to-from-PropertyGrid-at-Runtime

http://www.codeproject.com/Articles/13630/Add-Custom-Properties-to-a-PropertyGrid

http://www.codeproject.com/Articles/24332/Creating-a-Custom-Collection-for-Use-in-a-Property

http://www.codeproject.com/Tips/1073110/Dynamically-Display-the-Properties-Using-Csharp-Pr

http://www.codeproject.com/Articles/26992/Using-a-TypeDescriptionProvider-to-support-dynamic

http://blog.differentpla.net/blog/2005/02/26/using-propertygrid-with-a-dictionary-object/

https://stackoverflow.com/questions/1831732/c-sharp-picturebox-memory-releasing-problem

http://accord-framework.net/ Machine learning

pw/pw.txt · Last modified: 2025/10/28 10:55 by 2a00:1028:8390:729e:6ef0:49ff:fe04:18aa