Ask Your Question

MattiasR's profile - activity

2018-12-31 00:19:49 -0600 received badge  Popular Question (source)
2018-06-08 06:35:07 -0600 received badge  Popular Question (source)
2017-04-05 21:14:37 -0600 received badge  Notable Question (source)
2016-09-09 04:54:15 -0600 received badge  Notable Question (source)
2015-07-24 02:38:03 -0600 received badge  Popular Question (source)
2015-04-24 03:04:04 -0600 received badge  Popular Question (source)
2014-12-09 13:51:59 -0600 marked best answer Why compile the opencv libraries by myself?

That's a question I've had for a couple of weeks now, actually since day one when I started to use and learn to use opencv.

What is the advantage of compiling the cv libraries on my own computer? Thanks.

2014-10-14 12:42:21 -0600 marked best answer Max camera resolution for opencv?

My 640x480px camera is not enough and I need to increase the resolution. I'm planning to buy the Microsoft Lifecam Studio (1920x1080) but can I use the maximum resolution on the cam together with opencv? Is there any limit for the "videoDevice >>" when capturing frames from the webcam?

As soon as the frame is grabbed the system will only use the ROI, so my question is mostly about the frame grabbing. Can opencv grab frames that big?

edit:

(real time, >10fps)

Computer: win7, 64bit, mem:3GB, usb2

edit 2: extra question

I've searched google about web cam with ROI, but I guess that ROI is a term used only when talking about opencv, because i Couldnt find anything.

Is there anyone that knows which cameras there is that has some kind of ROI - function built into the hardware so that the amount of data to grab is less for the software?

Thanks!

2013-09-20 05:33:02 -0600 commented question Training haar classifier.

Thank you! yeah, i used 4 mill, just to have a number that where much much greater than the first alternative.

2013-09-20 04:57:50 -0600 asked a question Training haar classifier.

A question about creating my own .xml file.

I've read that as many photos (positive and negative) should be used do increase the accuracy of the trained haar classifier.

But. Lets say, that I have a collection of 1000 pos.3000 neg. photos, and create my file. And compare that with a collection of about 1 000 000 pos, 3 000 000 negative. (yes, it will take some time :) ) Isnt the last xml file going to be so huge that it is impossible to use it for face tracking?

Or. I can ask the question in anoter way: The size of the final classifier file, does it depend on the amount of photos used during traing?

Thanks for reading!

2013-08-27 07:40:46 -0600 commented answer Should I blur the template used in matchTemplate()?

I dont use the template matching method to detect/recognition. With the method I analyze movements & behaviour of the face. It works perfect but I wanted some understanding about the method. Thanks anyway for telling me! And thanks for the answer!

2013-08-27 04:23:13 -0600 commented question Should I blur the template used in matchTemplate()?

I'm sorry about that. I guess that you mean tags with a '#'?? Didn't know what that meant so I just used that. But now I know :D, thanks for telling me!

2013-08-24 17:09:30 -0600 asked a question Should I blur the template used in matchTemplate()?

When I create a template to use wiuth matchTemplate, should I blur the template a bit, or should I use a nice and clean image?

I am matching a template containing parts of the face, could be a nose, mouth, eye or similar. Grayscale. Before I run the matchTemplate method I use a gaussianBlur on the original cam frame.

Do the "matchTemplate" blur the image & template? if not, then blur the template might be better?

Thanks!

2013-08-14 08:22:37 -0600 asked a question store cv::Mat data in object?

I have 2 questions. 1. Can I get the cv::Mat data from an image? The image is about 10x10 pixels, and grayscale. and I want to store it in a class like the array below.

2. With the data form question 1. how do I create an cv::mat object from data that is stored like:

{34, 6, 23, 67, 45 .............};

Why? I want to store the images in code, instead of having a lot of small images. Don't know if it is the best, but it fits my project really well :D

Thanks!

2013-08-02 01:18:19 -0600 asked a question Having trouble detecting iris/pupil of person with dark skin color.

I am having trouble finding the pupil/iris of a person with dark skin color. It seems like a simple threshold does not work for this. Me and my friend, even though the pupil seem to have about the same dark color (gray scale) for the pupil, the thresholding value, for an accurate pupil detection, is 30 for dark guy, 100 for me.

Ive been playing around with infra red light, and it is possible to make the skin a bit less dark, but there is still no accurate way of detecting the pupil.

This is image with infra red: image description

After some gaussian: image description

One can se a darker spot in the image. But I cant get the houghcircles to return any circles on that image. And I still don't know if this will work (accurately enough) during streamin video. This is just One image that I work on, trying to find good parameters to detect the pupil.

Anyone that knows how to accurate detect pupil that has about the same color as the skin?

Edit: The image is not only infra red. I've removed the IR-blocking finter, and use IR leds to illuminate. But at this moment I dont use any visible-light-blocking-filter. But I will use it when I have one. Thanks!

2013-07-31 11:00:38 -0600 asked a question Fastest, and most accurate eye finding algorithm available in opencv?

Is there any other way, than using haar, to find the eyes within the face box?

I used Haar, but the position jitter to much. Changed to flandmarks, which works great (still jitter, but iris is always inside the "box". But then I found that flandmarks is licensed under GNU GPL. Which doesn't work for me unfortunately :/

What methods is available, in opencv, to find the position of the eyes? Speed is important (real time), and accuracy. Jitter is OK, as long as the pupil is inside the resulting "rect".

I need to find the position of the eyes with eyes both open and closed.

Please give me a hint!

Thanks!

2013-07-29 16:23:02 -0600 commented question Eye detection is "jumping".

It seems like the cvGetTickCount() is not as accurate as GetTickCount() from <windows.h>?!. When I changed to use GetTickCount() also the first project took about 47ms to find the landmard in every picture.. not 0 ms as I wrote earlier.

2013-07-29 11:33:46 -0600 asked a question Best way to detect that eyes are closed.

What is the best way to detect that eyes are closed or open? I currently use haar to detect face. second step i flandmark to find "exact" position of one of the eyes.

When I have the position of the eye I extract it and use some nice opencv methods.

The results:

Open eye:

image description

closed eye:

image description

The images are enlarged (3x), and are not that blurry in reality.

Is there any nice way to continue from here to distinguish between an open eye and closed eye?

Thanks!

2013-07-29 11:21:47 -0600 commented question Eye detection is "jumping".

I've been working with flandmark a couple of hours now. Unfortunately in my project the flandmark method takes about 47-61ms, for each cam frame. But with the empty new project, only checking one image it took less than 15 ms (time: 0ms). (even when I used photos from the webcam). It jitter a bit, but less than Haar. I am satisfied with the result using flandmarks. even though I am a bit disappointed that it took almost 4 times longer to calculate the landmarks when I used it in my program :/

2013-07-29 05:59:16 -0600 commented question Eye detection is "jumping".

berak>>> After trying to include it into my old project it seems like it didn't work again. After I created a new empty project, and used main() instead of _tmain() like you wrote it worked :)

2013-07-20 08:01:22 -0600 commented question Eye detection is "jumping".

I will continue the work within a couple of days, and I can write a comment here about the result, after trying it with the webcam.

2013-07-19 15:46:50 -0600 commented question Eye detection is "jumping".

I have not tried it yet on webcam. But i tried about 10 photos. And the result were perfect!

2013-07-19 02:02:42 -0600 commented question Eye detection is "jumping".

I asked on stackoverflow.com. A guy there found that I didn't include the files in my project (add->existing files). WHen I did that everything works great. Thanks for helping me!

About the performance: With one (perfect image) when I measure the time for only the detect method, i get 0 ms. On my computer i thing I have a resolution of 15ms. So 1 detect (without the Haar-part) takes less than 15 ms. which is really really good!

Thank you everyone.

2013-07-18 10:36:42 -0600 commented question Eye detection is "jumping".

I tried it again. Empty project. In the configuration manager I change to x64, (and copy from x86). I add the 5 files from the folder libflandmark. I add in C/C++ additional directories, opencv/build/include, -opencv & -opencv2. In the linker I add opencv/build/x64/vc10/lib/ and in linker-input I add all opencv_.....d.lib files. (debug files). Thats the only thing. Opencv works, And I still got a linker error from flandmarks... :(

2013-07-18 07:57:38 -0600 commented question Eye detection is "jumping".

Could it be because I use the debug-files from opencv? (with a 'd' at the end of each filename.

2013-07-18 07:54:16 -0600 commented question Eye detection is "jumping".

By adding it manually, should I create an empty propertysheet and add the opencvstuff? or do you mean by copy all the files into the project folder?

2013-07-18 07:36:04 -0600 commented question Eye detection is "jumping".

This is strange... Too bad there isn't much information available on the internet about flandmark. Thanks for your help!

2013-07-18 07:22:02 -0600 commented question Eye detection is "jumping".

I created an empty project. copied the files mentioned before. And used the code you wrote. I also included the propertysheey I use so that I can use opencv. But the same error. could it be the propertysheet? Just to be clear. I dont have to run this cmake-thing??!!

2013-07-18 07:06:55 -0600 commented question Eye detection is "jumping".

This is the only thing I do:

include "stdafx.h"

include "flandmark_detector.h"

int _tmain(int argc, _TCHAR* argv[]) { FLANDMARK_Model * model = flandmark_init("flandmark_model.dat"); return 0; }

2013-07-18 06:43:00 -0600 commented question Eye detection is "jumping".

Error LNK2001, and Error LNK1120.

2013-07-18 06:25:43 -0600 commented question Eye detection is "jumping".

There is no cpp folder, but I copied the files from libflandmark into my project. stdint.h isnt there, but a file called msvc-compat.h. I copied 5 files. I include the dlandmark_detecter.h into my main file. I am able to "FLANDMARK * model;", but when I try to do "model = flandmark_init("file"); I get the unresolved external symbol. Where shall I start to look for the error? Thanks for helping me!

2013-07-18 06:09:11 -0600 commented question Eye detection is "jumping".

i cant get the flandmarks to work. unresolved external symbol during FLANDMARK_init(); :(

2013-07-18 04:20:19 -0600 commented question Eye detection is "jumping".

I took a look at the flandmarks stuff, after your recommendation, and it sounds really good. Is it possible to use it in real - time you think? Haar vs flandmarks -computation time? Thanks! I will try flandmarks

2013-07-17 18:51:01 -0600 commented question Eye detection is "jumping".

No filtering of the position yet. Do you think that is necessary?, I mean... The cv::Rect output from detection algorithm misses the eye abou 1/3 of all the times. Half the pupil is inside the rectangle. It feels wrong. Head is still, image is good.

2013-07-17 18:23:38 -0600 asked a question Eye detection is "jumping".

I am working on a system that tracks the eye and log data like eye blinks, rate, etc. But I have a problem that the cv::Rect, returned after eye detection (haar detection), is jumping around so that the iris of the person appear on different positions in the matrix. in a 640x480 web cam frame, where the face is about 200px height the cv::Rect of the eye can jum about 40px each time I do the tracking. It jumps so far out that the eye sometimes is outside the rectangle representing the eye!

I am running this detection about 2 times per second, and in between I trace the eye by template mathcing. The template matching works great but sometimes the template slides of and after that keep track on the wrong position of the face. For example during a fast movement of the face the template can get stuck on the nose, or mouth.

I've tried 3 of the four eye classsifiers, (_eye, _mcs, _lefteye_2split). These three, according to the book "Master openCV..." is the best. But I cant se any big difference (more than the _mcs classifier is much slower)

It doesnt matter which one I use, So i was thinking that I might do something wrong!

Someone that is running eye detection multiple times with a good result?

My detector: eyeCascade.detectMultiScale(webcamFrame(ROI), detEye, 1.1, 3, CV_HAAR_FIND_BIGGEST_OBJECT|CV_HAAR_DO_CANNY_PRUNING|CV_HAAR_SCALE_IMAGE, cv::Size(20,20

ROI = centerpoint of last eye position, double width, double height. (4x sixe of cv::Rect( eye position))

edit: There are different classifiers for left and right eye. I force the system to find only one eye. (persons right, on the screen the left one.) Which classifier is the right one?

2013-07-10 05:32:47 -0600 commented question What computer to choose?

Okay, thanks. I'll close the question.

2013-07-10 05:01:29 -0600 asked a question What computer to choose?

I'm working on a facetracking/eyetracking software. And as probably all of you know, this is eating up my cpu, totally! I need to do all calculations in real time, and I also had to use directshow to increase the resolution of the camera, (the built in functions in opencv didnt work).

I am running this on a quite old laptop (couple of years). And I am thinking that maybe its time to buy a new one to make it possible to increase the performance of the system.

What are the most important parameters of the computer if I want to use it with opencv & C++?

The computer now: 64bit, 1.3GHz, 3GB ram. dual core. Graphics (motherboard).

For example, my stationary computer, could I increase the performace with a 3GHz, 32 bit single core 4GB?

What do you think?

Thanks!

2013-05-16 06:58:17 -0600 commented answer Get AOI/ROI of image/frame from Byte* buffer?

Please take a look at my question againg. the thing is that I am using directshow, and it works great. both when configuring the cam (resolution etc) and when capturing frames. What I have problem with is get ROI/AOI of a BYTE buffer. is "frame" a BYTE buffer?

2013-05-16 02:26:35 -0600 commented answer Get AOI/ROI of image/frame from Byte* buffer?

Logitech HD Webcam C510

2013-05-15 09:03:52 -0600 commented answer Get AOI/ROI of image/frame from Byte* buffer?

yes it might fit my needs. But! With directshow I am able to change the resolution of the cam. With only opencv i cant. Can I use this together with directshow?