opencvdotnet

Problems with dllimport in c# under Windows 7 x32

拈花ヽ惹草 提交于 2019-12-25 02:19:53
问题 Iam having problems with dll import in c#. I created library under windows xp x32 and tried to use it on windows 7 x32. My library is using another libraries called opnecvsharp which uses dllimport to opencv libraries for c++. Iam sure i added opencv.dlls to the same folder as executable file. I tried to run exe as admin, disable UAC, add path to dll in PATH variable, but none of those helped me. How I can make my program see dlls ? The error in picture shows that program doesnt see opencv

Working with real-time data, bypassing CvloadImage

醉酒当歌 提交于 2019-12-23 06:10:45
问题 This is how we display and process an Image using Opencv: int _tmain(int argc, _TCHAR* argv[]) { IplImage* img = cvLoadImage( "MGC.jpg" ); cvThreshold( img, img, 200, 255, CV_THRESH_BINARY ); cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE ); cvShowImage("Example1", img); cvWaitKey(0); cvReleaseImage( &img ); cvDestroyWindow( "Example1" ); return 0; } Now can you help me to achieve my goal as outlined below: int _tmain(int argc, _TCHAR* argv[]) { Some code here (using some API other than OpenCv

Weird output while finding entropy of frames of a video in opencv

夙愿已清 提交于 2019-12-21 15:40:22
问题 #include <cv.h> #include <highgui.h> #include <iostream> #include <cmath> #include <cstdlib> #include <fstream> using namespace std; typedef struct histBundle { double rCh[256]; double gCh[256]; double bCh[256]; }bundleForHist; bundleForHist getHistFromImage (IplImage* img, int numBins) { float range[] = { 0, numBins }; float *ranges[] = { range }; bundleForHist bfh; CvHistogram *hist = cvCreateHist (1, &numBins, CV_HIST_ARRAY, ranges, 1); cvClearHist (hist); IplImage* imgRed = cvCreateImage

CvMat and Imread Vs IpImage and CvLoadImage

我的未来我决定 提交于 2019-12-21 09:23:43
问题 Using OpenCv 2.4 I have two options to load images: 1- CvMat and Imread 2- IpImage and CvLoadImage Which one is better to use? I tried mixing the two and end up in seg fault. 回答1: imread returns a Mat , not CvMat . They are the two different interfaces ( Mat / imread for C++ and Ipl... and Cv.. for C interface). The C++ interface is nicer, safer and easier to use. It automatically handles memory for you, and allows you to write less code for the same task. The OpenCV guys advocate for the

OpenCV: Merging two images using OpenCV

大憨熊 提交于 2019-12-11 19:16:01
问题 What is the best way to make the size of box 2 equal to Box 1 so that CvCopy(); can be applied: EDIT: Perhaps I did not put the question properly. So I am re-phrasing it. Given an Image 2 (as shown above), I want to convert it as shown below: Basically I have to add a black border across it. resize will not work as my image will get distorted. Putting in other words, I have to add zeros in a define thikness around the image. Also although shown empty, these images(boxes) may have some objects

OpenCV: Error in cvHoughCircles usage

守給你的承諾、 提交于 2019-12-11 01:01:04
问题 I am using cvHoughCircles to find the two white ovals in the following image: I first used thresholding for locating the white regions and then used Hough Transforms. But the output is not coming correct as shown below: I am not able to understand what is happening? Why it is detecting 3 circles and why only one is being detected correctly? Any suggestions? Below is my code: #include "opencv2/highgui/highgui.hpp" #include "opencv2/imgproc/imgproc.hpp" #include <iostream> #include <stdio.h>

Error in loading cascade classifier in Opencv using cascade.load()!

不羁岁月 提交于 2019-12-08 09:31:22
问题 I am using the facedetect.cpp code given in opencv samples. But the after building and running an error comes up because cascade.load(cascadeName) given an error i.e. returns zero. It was working a few days ago. Suddenly this error started to come. I also the full path of the XML file,but it did not work! This command was used to run the executable of the code : `objectDetect --cascade="Full path to haarcascade_frontalface_alt.xml" --scale=1.3 %1` The path of the XML file is correct!! Kindly

How to get Confidence value in face recognition using EMGU CV?

眉间皱痕 提交于 2019-12-06 04:54:49
问题 I am working on a project in which i should design an application which can detect all the faces of the persons passing by...I have a very large database comprising of several known people...I have used the EigenObjectRecognizer to recognize the image frame captured by the webcam...But the problem is sometimes it recognizes some persons wrongly....So if get the confidence value of this facial match...Then i can write a conditional loop so that if it is greater than 75%, then only detect him

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

How to get Confidence value in face recognition using EMGU CV?

回眸只為那壹抹淺笑 提交于 2019-12-04 11:31:59
I am working on a project in which i should design an application which can detect all the faces of the persons passing by...I have a very large database comprising of several known people...I have used the EigenObjectRecognizer to recognize the image frame captured by the webcam...But the problem is sometimes it recognizes some persons wrongly....So if get the confidence value of this facial match...Then i can write a conditional loop so that if it is greater than 75%, then only detect him otherwise don't.Also I know that PCA based recognition is basic,I ll definitely move on to other new