opencvsharp

OpenCvSharp installed using NUGET PAckage Manager not detecting a CUDA Device

旧时模样 提交于 2019-12-25 05:44:15
问题 I am trying to include GPU using OpenCvSharp . I installed the OpenCvSharp by using Nuget Package Manager in Microsoft Visual Studio 2013. I have included these lines already using OpenCvSharp; using OpenCvSharp.CPlusPlus; using OpenCvSharp.CPlusPlus.Gpu; but when i check the device count //GPU int count = Cv2Gpu.GetCudaEnabledDeviceCount(); //int count = Cv2Gpu.ge Console.WriteLine("The GPU Device count is " + count.ToString()); it always returns 0. Now it also says if OpenCv is not compiled

OpenCvSharp installed using NUGET PAckage Manager not detecting a CUDA Device

我们两清 提交于 2019-12-25 05:44:10
问题 I am trying to include GPU using OpenCvSharp . I installed the OpenCvSharp by using Nuget Package Manager in Microsoft Visual Studio 2013. I have included these lines already using OpenCvSharp; using OpenCvSharp.CPlusPlus; using OpenCvSharp.CPlusPlus.Gpu; but when i check the device count //GPU int count = Cv2Gpu.GetCudaEnabledDeviceCount(); //int count = Cv2Gpu.ge Console.WriteLine("The GPU Device count is " + count.ToString()); it always returns 0. Now it also says if OpenCv is not compiled

Multiple results in OpenCVSharp3 MatchTemplate

寵の児 提交于 2019-12-12 07:20:13
问题 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(

How to call OpenCV's MatchTemplate method from C#

夙愿已清 提交于 2019-12-12 06:01:05
问题 I'm trying to get the template's position on the image using OpenCVSharp library from NuGet. Here is the code I've wrote: var image = Cv.LoadImage("Image.png"); var template = Cv.LoadImage("Template.png"); var w = (image.Width - template.Width) + 1; var h = (image.Height - template.Height) + 1; IplImage result = new IplImage(w, h, BitDepth.F32, 1); Console.WriteLine("Image: {0} {1}", image.GetSize(), image.ElemType); Console.WriteLine("Template: {0} {1}", template.GetSize(), template.ElemType

Exception in cvConvertScale in OpenCV calling solvePnP

半城伤御伤魂 提交于 2019-12-11 11:46:30
问题 I'm trying to use solvePnP from OpenCV (through OpenCvSharp) but I get an exception that I don't understand. An unhandled exception of type 'OpenCvSharp.OpenCVException' occurred in OpenCvSharp.dll Additional information: src.size == dst.size && src.channels() == dst.channels() After some searching, I found that it comes from cvConvertScale in convert.cpp Here is how I use it: var objectPoints = new OpenCvSharp.CPlusPlus.Point3f[4] { o1, o2, o3, o4 }; var imagePoints = new OpenCvSharp

Is Face recognition possible in windows phone

倾然丶 夕夏残阳落幕 提交于 2019-12-10 23:39:37
问题 I want to develop an app for Face detection and recognition from a given photo based on the photos in trained set. Will it possible to do it on windows phone 7 ? Could you please tell me the Open CV support for windows? Please help me 回答1: For the Face recognition, Microsoft and Nokia have develop a Beta "Face SDK" You can try this. You've more Information in the Nokia developper website. For The Open Cv request, I don't understsand wath you want :) But maybe this answer response to your

Correct way to extract Translation from Essential Matrix through SVD

与世无争的帅哥 提交于 2019-12-09 16:39:03
问题 I calibrated my camera and found the intrinsic parameters(K). Also I have calculated the Fundamental Matrix (F). Now E= K_T* F * K . So far so good. Now we pass the Essential Matrix(E) to the SVD to use the decomposition values (U,W,V) to extract the Rotation and Translation: essentialMatrix = K.Transpose().Mul(fund).Mul(K); CvInvoke.cvSVD(essentialMatrix, wMatrix, uMatrix, vMatrix, Emgu.CV.CvEnum.SVD_TYPE.CV_SVD_DEFAULT); ** Question) At this point, two methods have been proposed, and it has

OpenCvSharp4初探

梦想的初衷 提交于 2019-12-09 15:53:38
1. 背景 C#(C Sharp)是一款windows上的开发语言,其优势是开发窗口程序比较简单快捷。 OpenCV是一款常用的图像处理库,但是官方支持C++和Python。 OpenCvSharp是一款使得OpenCV支持C#开发的一个库。基于Visual Studio开发。 以下跟着本文,建立一个OpenCvSharp的hello world. 2. 环境 Win10 + Visual Studio 2019 + OpenCvSharp4 3. 准备Visual Studio 2019 下载页面是 https://visualstudio.microsoft.com/vs/ 。社区版,注册一下即可免费使用。另外需要使用VIsual Studio Installer安装"通用Windows平台开发",让我们可以使用C#开发桌面程序。 4. 安装好(Windows) Visual C++ 2019 Redistributable Package 这是因为官方说明[1]需要这个运行包。 5. Hello world 5.1 新建工程,输入工程名字。 5.2 为工程添加OpenCvSharp的dll 工具->NuGet包管理器->管理解决方案的NuGet程序包->分别安装OpenCvSharp4和OpenCvSharp4.runtime.win 5.3 添加核心代码 5.3.1

OpenCv: Finding multiple matches

丶灬走出姿态 提交于 2019-12-09 13:59:59
问题 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,

Recognizing visio shapes in an image

偶尔善良 提交于 2019-12-05 04:23:57
问题 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