emgucv

Bitmap class in WPF

随声附和 提交于 2019-12-04 12:27:14
I'm working with Emgu Cv in Winforms to do face recognition using Kinect. Now, i want to move to WPF. However, the EmguCv library support only Bitmap class. Can i use the Bitmap class (used in Winforms) in WPF ? if not, is there an other method to use Emgu cv with kinect in WPF? Thanks. Paolo Moretti System.Drawing.Bitmap can not be used directly as image source for WPF, so you have to convert it to System.Windows.Media.Imaging.BitmapSource . The best way to do it is by using Imaging.CreateBitmapSourceFromHBitmap . You can use an extension method: [DllImport("gdi32")] private static extern int

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

EmguCV Cut Face+Neck Skin Only And Save New Image

那年仲夏 提交于 2019-12-04 11:05:53
In my app, I will input a human image and I want to get the face and neck only of that person as output in separate image. Example: Below image as input:(Source: http://www.fremantlepress.com.au ) And I want to get the up image as output: I want to perform the following algorithm: 1. Detect face 2. Select (face region * 2) area 3. Detect skin and neck 4. Cut the skin region of the selected image 5. Save that cut region into a new image As going through the EmguCV wiki and other online resources, I am confident to perform the step 1 and 2. But I am not sure how can I accomplish step 3 and 4.

what is the function to find otsu threshold in emgu cv?

空扰寡人 提交于 2019-12-04 08:20:16
I don't need the thresholded image. I want the threshold. I found this in OpenCV. cv::threshold( orig_img, thres_img, 0, 255, CV_THRESH_BINARY+CV_THRESH_OTSU ); Is there an equivalent in EmguCv. Thanks in advance. PS. I need to use this threshold for canny edge detector You can refer this code for Auto Canny Edge detector! Image<Gray, byte> Img_Source_Gray = Img_Org_Gray.Copy(); Image<Gray, byte> Img_Egde_Gray = Img_Source_Gray.CopyBlank(); Image<Gray, byte> Img_SourceSmoothed_Gray = Img_Source_Gray.CopyBlank(); Image<Gray, byte> Img_Otsu_Gray = Img_Org_Gray.CopyBlank(); Img_SourceSmoothed

How to implicitly convert type 'Emgu.CV.Structure.MCvObjectDetection[]' to 'System.Drawing.Rectangle[]'?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 06:50:18
问题 I got that code from emgu's site, I fixed some bugs, but there is 2 more, which I can understand: Rectangle[] regions; regions = des.DetectMultiScale(gpuBgra); Cannot implicitly convert type 'Emgu.CV.Structure.MCvObjectDetection[]' to 'System.Drawing.Rectangle[]' How do I solve the problem? 回答1: You can try this: MCvObjectDetection[] results = hog.DetectMultiScale(gpuBgra); Rectangle[] regions = new Rectangle[results.Length]; for (int i = 0; i < results.Length; i++) regions[i] = results[i]

Resizing the image in C# and sending it to OpenCV results in distorted image

一世执手 提交于 2019-12-04 06:46:39
问题 This is a follow-up question related to this one. Basically, I have a DLL which uses OpenCV to do image manipulation. There are two methods, one accepting an image-Path , and the other one accepting a cv::Mat . The one working with image-path works fine. The one that accepts an image is problematic. Here is the method which accepts the filename (DLL): CDLL2_API void Classify(const char * img_path, char* out_result, int* length_of_out_result, int N) { auto classifier = reinterpret_cast

Getting Emgu CV Motion Detection sample working: Unable to load DLL 'opencv_legacy249'

為{幸葍}努か 提交于 2019-12-04 06:22:34
问题 I'm trying to get the Motion Detection Emgu CV example mentioned in the answer to "Looking for a function for motion detection on emgucv" working. To get the example code working I first needed to add references to the Emgu CV DLLs Emgu.CV , Emgu.CV.UI , and Emgu.Util to the project make sure that the relevant Open CV DLLs (listed on the EMGU wiki and found in C:\Emgu\emgucv-windows-universal-gpu 2.4.9.1847\bin\x86 ) are copied always to the output executable directory of the project change

Emgu CV Unable to load DLL 'cvextern' in deployed project

£可爱£侵袭症+ 提交于 2019-12-04 05:54:41
问题 I'm using EmguCV for face detection in my ASP.NET project. When I run the project from Visual Studio, everything works correct. Then I published release build via Folder profile and then just uploaded this published build to smarterasp.net. Application is working in general. But when the application is trying to detect faces in images, an exception is throwed: System.AggregateException: One or more errors occurred. ---> System.TypeInitializationException: The type initializer for 'Emgu.CV

Color Image Quantization in .NET

心不动则不痛 提交于 2019-12-04 04:21:07
问题 I want to reduce the number of unique colors of a bitmap in c#. The reason I want to do this is that an image which is initially created with three color but due to many factors (including compression) has now more than three colors (i.e neighbour pixels has affected each other) Any idea of how to do that? The solution maybe something to convert the whole bitmap from RGB to Indexed color system or some function that can be applied to a single pixel. Any GDI+ or Emgu (opencv) solutions are

How do I choose an image interpolation method? (Emgu/OpenCV)

非 Y 不嫁゛ 提交于 2019-12-04 00:02:24
The image resizing function provided by Emgu (a .net wrapper for OpenCV) can use any one of four interpolation methods : CV_INTER_NN (default) CV_INTER_LINEAR CV_INTER_CUBIC CV_INTER_AREA I roughly understand linear interpolation, but can only guess what cubic or area do. I suspect NN stands for nearest neighbour, but I could be wrong. The reason I'm resizing an image is to reduce the amount of pixels (they will be iterated over at some point) whilst keeping them representative. I mention this because it seems to me that interpolation is central to this purpose - getting the right type ought