emgucv

C# - Emgu Cv - Face Recognition- Loading training sets of Faces saved to Access database as a binary in to EigenObjectRecognizer for Face recognition

半城伤御伤魂 提交于 2019-12-10 12:19:13
问题 I was having a hard time loading training set from Ms Access database in to the main form that does the Face Recognition. I saved the training sets with their names and ID in to the database as a binary data with an OLE Object format.The method i used to change, save and read the data from the database and in to the training sets is private static byte[] ConvertImageToBytes(Image InputImage) { using (Bitmap BmpImage = new Bitmap(InputImage)) { using (MemoryStream MyStream = new MemoryStream()

EmguCv TypeInitializationException Thrown by EmguCv.CV.CvInvoke

笑着哭i 提交于 2019-12-10 11:37:40
问题 Let me start off by saying that I have indeed followed many tutorials such as the one located on EmguCv's main site in their entirety but get a TypeInitializationException thrown. Now, listen closely because here comes the extremely weird part. I'll start by saying that there are three "levels" of my problem, however, the code in all "levels" is EXACTLY the same without even the slightest of change. This would naturally point to that I have a reference or linkage problem, but again I've

Color tracking using EMGUcv

 ̄綄美尐妖づ 提交于 2019-12-10 09:45:59
问题 I am trying to make an colored object tracker which uses a binary image and blob detector to follow the target sort of like this: https://www.youtube.com/watch?v=9qky6g8NRmI . However I can not figure out how the ThresholdBinary() method work and if it is even the right one. Here is a relevant bit of the code: cam._SmoothGaussian(3); blobDetector.Update(cam); Image<Bgr,byte> binaryImage = cam.ThresholdBinary(new Bgr(145,0,145),new Bgr(0,0,0)); Image<Gray,byte> binaryImageGray = binaryImage

How to convert Bitmap to Mat structur in EmguCV & How to detect two images shift

廉价感情. 提交于 2019-12-10 02:38:44
问题 Hello Dear Forum Members ! I am working on a project to detect change view from security camera. I mean, when someone try to move camera (some kind of sabotage...) I have to notice this. My idea is: capture images from camera every 10 sec and compare this two pictures ( Old and actual picture). There are almost 70 cameras which I need to control, so I can't use live streaming because it could occupy my internet connection. I use Emgu CV library to make this task, but during my work I stuck

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

Is it possible to find the edge of a “spotty” region in emgucv?

一世执手 提交于 2019-12-08 23:50:16
问题 I have an image that looks like this: and I want to find the edges of the dark part so like this (the red lines are what I am looking for): I have tried a few approaches and none have worked so I am hoping there is an emgu guru out there willing to help me... Approach 1 Convert the image to grayscale Remove noise and invert Remove anything that is not really bright Get the canny and the polygons Code for this (I know that I should be disposing of things properly but I am keeping the code

Converting WriteableBitmap to Bitmap for use in EmguCV

感情迁移 提交于 2019-12-08 17:51:45
问题 In my code, I'm receiving WriteableBitmaps from a byte array (in turn from a Kinect) and I'd like to turn them into bitmaps for use with EmguCV. Currently this is the code I have: // Copy the pixel data from the image to a temporary array colorFrame.CopyPixelDataTo(this.colorPixels); // Write the pixel data into our bitmap this.colorBitmap.WritePixels( new Int32Rect(0, 0, this.colorBitmap.PixelWidth, this.colorBitmap.PixelHeight), this.colorPixels, this.colorBitmap.PixelWidth * colorFrame

Emgu.CV.CvInvoke threw an exception

会有一股神秘感。 提交于 2019-12-08 11:14:55
问题 Im using emgu in my project. I get this exceptit: Here the details of the exception: The opencv_core242 is in the folder project,and platform target set to x86. Any idea what might cause the exception and how to solve it? 回答1: You can use Dependency Walker on cvextern.dll to see if opencv_core242.dll is depending on another dll like nvcuda.dll or if you have a 32/64-bits mismatch. Take a look at this other question. 回答2: In .../windows/system32 I pasted cudart32_42_9.dll file.It's helped me

OpenCv & EmguCv equavalent method?

僤鯓⒐⒋嵵緔 提交于 2019-12-08 10:07:06
问题 As berak said in the comments, it seems this code is deprecated In Opencv there is a method "cvmget", the sample usage is: bool niceHomography(const CvMat * H) { const double det = cvmGet(H, 0, 0) * cvmGet(H, 1, 1) - cvmGet(H, 1, 0) * cvmGet(H, 0, 1); if (det < 0) return false; const double N1 = sqrt(cvmGet(H, 0, 0) * cvmGet(H, 0, 0) + cvmGet(H, 1, 0) * cvmGet(H, 1, 0)); if (N1 > 4 || N1 < 0.1) return false; const double N2 = sqrt(cvmGet(H, 0, 1) * cvmGet(H, 0, 1) + cvmGet(H, 1, 1) * cvmGet(H

How to detect black Bullets in Image?

梦想的初衷 提交于 2019-12-08 08:12:53
问题 Given the following image, How can I detect black bullets (90 bullet) in this image using C#, EmguCV or AForge? I tried to use GetPixel(x,y) method but it checks only pixel by pixel, it is very slow and I need to detect the bullets not pixels. 回答1: Algorithm/Idea 1 You can divide your image in squares as shown in this sample: With this logic you only have to check every 20th pixel. As soon as you know where the first dot is, you will know that every other dot have to be in the same horizontal