C# OpenCvSharp corn kernel counting

Effect Project Code using OpenCvSharp; using System; using System.Drawing; using System.Text; using System.Windows.Forms; namespace OpenCvSharp_Demo { public partial class frmMain : Form { public frmMain() { InitializeComponent(); } string fileFilter = “*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png”; string image_path = “”; DateTime dt1 = DateTime.Now; DateTime dt2 = DateTime.Now; Mat image; Mat result_image; StringBuilder sb = new StringBuilder(); private void […]

C# OpenCvSharp DNN HybridNets simultaneously handles vehicle detection, drivable area segmentation, and lane line segmentation

Table of Contents Effect Model information project code download Effect Simultaneously handles vehicle detection, drivable area segmentation, and lane line segmentation Model information Inputs ———————– name: input tensor: Float[1, 3, 256, 384] ————————————————– ————- Outputs ———————– name:regression tensor: Float[1, 18414, 4] name:classification tensor: Float[1, 18414, 1] name:segmentation tensor: Float[1, 3, 256, 384] ————————————————– ————- project […]

C# OpenCvSharp DNN HybridNets simultaneously handles vehicle detection, drivable area segmentation, and lane line segmentation

Effect Project Code using OpenCvSharp; using OpenCvSharp.Dnn; using System; using System.Collections.Generic; using System.Drawing; using System.IO; using System.Linq; using System.Numerics; using System.Text; using System.Windows.Forms; namespace OpenCvSharp_DNN_Demo { public partial class frmMain : Form { public frmMain() { InitializeComponent(); } string fileFilter = “*.*|*.bmp;*.jpg;*.jpeg;*.tiff;*.tiff;*.png”; string image_path = “”; DateTime dt1 = DateTime.Now; DateTime dt2 = DateTime.Now; float […]

OpenCV+OpenCvSharp implements image feature vector extraction and similarity calculation

The image feature vector is a mathematical representation used to describe the content of the image. It can reflect the color, texture, shape and other information of the image. Image feature vectors can be used to do many things, such as image retrieval, classification, recognition, etc. This article will introduce the extraction of image feature […]

C# OpenCvSharp Yolov8 Face Landmarks facial feature detection

Table of Contents introduce Effect Model information project code download Introduction Github address: https://github.com/derronqi/yolov8-face yolov8 face detection with landmark Effect Model information Model Properties ———————– description: Ultralytics YOLOv8-lite-t-pose model trained on widerface.yaml author:Ultralytics kpt_shape:[5, 3] task:pose license: AGPL-3.0 https://ultralytics.com/license version:8.0.85 stride: 32 batch: 1 imgsz:[640, 640] names: {0: ‘face’} ————————————————– ————- Inputs ———————– name:images tensor: […]

In c#, use opencvSharp4 and ssim algorithm in webapi to complete face detection and realize image search.

In c#, use opencvSharp4 and ssim algorithm in webapi to complete face detection and realize image search. Cut out the faces of the people in the uploaded pictures and compare them with the gallery Finally, compare it with the similarity and filter out the ones that match. optimization 1. The ssim algorithm consumes too much […]

C# OpenCvSharp uses Lab space to change the spring scene to autumn

Table of Contents Effect project code download Effect project VS2022 .net framework 4.8 OpenCvSharp 4.8 code Lab color space is a color model that contains three components: brightness (L), red and green channels (a), and blue and yellow channels (b). By converting the image from BGR to Lab, the color information can be separated into […]

C# OpenCvSharp Yolov8 Pose gesture recognition

Table of Contents Effect project Model information code download Effect project VS2022 .net framework 4.8 OpenCvSharp 4.8 Microsoft.ML.OnnxRuntime 1.16.2 Model information Model Properties ———————– date:2023-09-07T17:11:43.091306 description: Ultralytics YOLOv8n-pose model trained on /usr/src/app/ultralytics/datasets/coco-pose.yaml author:Ultralytics kpt_shape:[17, 3] task: pose license: AGPL-3.0 https://ultralytics.com/license version:8.0.172 stride: 32 batch: 1 imgsz:[640, 640] names: {0: ‘person’} ————————————————– ————- Inputs ———————– name:images […]

OpenCvSharp-contour matching/template search 1.0 (with source code)

Table of Contents Foreword: 1. Function explanation: Image threshold processing: Cv2.Threshold() Find contours Cv2.FindContours() Minimum bounding rectangle Cv2.BoundingRect(); Draw contours Cv2.DrawContours() Calculate silhouette similarity Cv2.MatchShapes() 2. Code (detailed teaching notes, read carefully) 3. Summary of the coding process: Foreword: Contour matching is a computer vision technique used to find and compare the similarity between target […]

OpenCvSharp – Gaussian/mean filtering, erosion and expansion, opening/closing operations (source code attached)

Table of Contents Core knowledge: Core functions: CV2.Blur() mean filtering Cv2.GaussianBlue() Gaussian filter Cv2.GetStructuringElement() creates structuring elements for morphological operations Cv2.Erode() corrosion Cv2.Dilate() dilation Cv2.MorphologyEx() Morphological operations (corrosion expansion, opening and closing operations) Example: Source code: Core knowledge: Mean filter: A commonly used image smoothing method, which reduces the noise in the image by averaging […]