opencvsharp

Recognizing visio shapes in an image

感情迁移 提交于 2019-12-03 21:16:09
Delivering SCADA solutions, we often get the our end user specifications specified in Structured Control Diagram (visio like flow diagrams seen below) that are often submitted in PDF format or as images. In order to access these in C#, I was hoping to use one of the OpenCV libraries. I was looking at template recognition, but it seems a wrong fit to start feeding into a machine learning algorithm to teach it to recognize the preknown specific shape of boxes and arrows. The libraries I've looked at have some polyedge functions. However, as can be seen from the example below there is the danger

OpenCv: Finding multiple matches

心不动则不痛 提交于 2019-12-03 20:42:36
I have the following, but I can't figure out how to find ALL the matches in a source image. static void Main() { using (var template = Cv.LoadImage(@"images\logo.png", LoadMode.GrayScale)) using (var source = Cv.LoadImage(@"images\manyLogos.png", LoadMode.GrayScale)) using (var sourceColour = Cv.LoadImage(@"images\manyLogos.png", LoadMode.Color)) { var width = source.Width - template.Width + 1; var height = source.Height - template.Height + 1; using (var result = Cv.CreateImage(Cv.Size(width, height), BitDepth.F32, 1)) { Cv.MatchTemplate(source, template, result, MatchTemplateMethod.SqDiff);

Multiple results in OpenCVSharp3 MatchTemplate

元气小坏坏 提交于 2019-11-30 23:13:44
I am trying to find image occurences inside an image. I have written the following code to get a single match using OpenCVSharp3: Mat src = OpenCvSharp.Extensions.BitmapConverter.ToMat(Resources.all); Mat template = OpenCvSharp.Extensions.BitmapConverter.ToMat(Resources.img); Mat result = src.MatchTemplate(template, TemplateMatchModes.CCoeffNormed); double minVal, maxVal; OpenCvSharp.Point minLoc, maxLoc; result.MinMaxLoc(out minVal, out maxVal, out minLoc, out maxLoc); Console.WriteLine("maxLoc: {0}, maxVal: {1}", maxLoc, maxVal); How can I get more matches based on a threshold value? Thank

OpenCV (EMGUCV wrapper) integration in Unity

给你一囗甜甜゛ 提交于 2019-11-28 05:04:17
As you know OpenCV is very useful library that let you do amazing and powerful things in Computer vision. So I passed a good time to figure out how to use it in Unity3d, I had many problems, and searching in the Net, I have found several suggestions but not one worked for me. I’m using a Unity Pro 4.0 This version of Emgu CV (emgucv-windows-universal-gpu 2.4.9.1847) My target for unity project is: windows and not web player jam This is what I did for everyone who want to use it: Install this version of EmguCV, which creates a folder EMGU in C: In this folder you will have a single folder named