Ask Your Question

charlottepel's profile - activity

2018-01-29 03:40:03 -0600 received badge  Popular Question (source)
2018-01-01 22:24:47 -0600 received badge  Popular Question (source)
2015-03-09 22:03:20 -0600 received badge  Student (source)
2013-08-23 01:57:07 -0600 commented answer How to use createsamples utility?

@StevenPuttermans Thanks a lot, after 10 days of work, my classifier was created. Performances are not so good but in increasing my number of images and in settings correctly traincascade classifier, it should be better.

2013-08-21 01:23:17 -0600 commented answer onCameraFrame: receive image from camera without addings

Thanks a lot, it seems that it was exactly what I needed. The function clone is also correct in Java.

2013-08-21 01:21:43 -0600 received badge  Scholar (source)
2013-08-21 00:11:39 -0600 asked a question onCameraFrame: receive image from camera without addings

Hello,

I am realizing an Android application. I have used face-detection samples given my OpenCV to create a face tracking application.

In my Mat tmp, I want to save the inputFrame without red rectangles around faces. If I'm testing the code below on a device, where I return tmp and add rectangles around faces only in rgb, I received though an image where faces are detected (red rectangles). Can someone explain me why I don't receive only the frame delivering by the camera?

@Override
public Mat onCameraFrame(CvCameraViewFrame inputFrame){
        gray = inputFrame.gray();
        rgb = inputFrame.rgba();
        tmp=inputFrame.rgba();

        int height = gray.rows();
        if (height > 0){
            absoluteFaceSize = Math.round(height * relativeFaceSize);
            classifierFace.detectMultiScale(gray, faceDetections, 1.1, 3, 2, new Size(absoluteFaceSize,absoluteFaceSize), new Size());
            for (Rect rect : faceDetections.toArray())
            Core.rectangle(rgb, new Point(rect.x, rect.y), new Point(rect.x + rect.width, rect.y + rect.height), new Scalar(255,0,0), 5);
        return tmp;
}

Charlotte.

2013-08-13 03:55:03 -0600 commented answer How to use createsamples utility?

Thanks it's clear now. I will try to do it by this way and hope that it will work.

2013-08-13 03:36:45 -0600 commented answer How to use createsamples utility?

Sorry, I don't know if it is because of my poor English or my poor skills or both but I'm not sure to understand. If I try to resume, you advice me to create my own createsamples.exe in writing code under Visual Studio?

2013-08-13 03:11:54 -0600 commented answer How to use createsamples utility?

The link doesn't seem to be correct :s I have already use Visual Studio and OpenCV to make a face trackin application on a Webcam. Can I also use it to create my vec file ?

2013-08-13 02:39:13 -0600 commented answer How to use createsamples utility?

Yes, application crashed down and I don't know how to debug it. I have searching some information about this message error on Internet. If I'm to precise (speaking about OpenCV), I don't find anything and if I just mentionned the message error, solutions don't seem to be appropriate to my problem. Maybe, I can have some information with the stackdump file but I'm not sure.

I have choose to use Cygwin to simplify my following of a tutorial which was using Cygwin, now I have some doubts about it :)

2013-08-13 02:23:20 -0600 commented answer How to use createsamples utility?

Thanks a lot, I have understand what you mean and I tried it. (Even if it's not the good approach for my application, I just want to be sure that createsamples utility is working well). If, I tried once, I have a message error > Illegal instruction (core dumped) and a file opencv_createsamples.exe.stackdump is created. Back to the start ... I have posted a comment for this problem, I thought I have fixed it in reinstalling Cygwin and OpenCV.

2013-08-13 02:06:53 -0600 commented answer How to use createsamples utility?

In this case, I think I have also to add name of negative picture in my nega.txt file. For example, neg/img1.bmpneg/img2.bmpneg/img3.bmp...neg/img1000.bmp to have 1000 backgroung pictures. Is this right or wrong ?

2013-08-13 01:44:15 -0600 asked a question How to use createsamples utility?

Hello,

I'm trying to use createsamples utility (OpenCV 2.4.6.1 on Cygwin 1.7.23). My main folder is called Photos, on it I have one folder neg with one picture img1.bmp (480 by 640 pixels), two file img.bmp (face image 92 by 112 pixels) and nega.txt: neg/img1.bmp

Command line:

$ opencv_createsamples -bgcolor 0 -bgthresh 0 -maxxangle 1.1 -maxyangle 0 -maxzangle 0.5 -maxidev 40 -vec samples.vec -img img.bmp -bg nega.txt -w 20 -h 20 -num 1

Info file name: (NULL)

Img file name: img.bmp

Vec file name: samples.vec

BG file name: nega.txt

Num: 1

BG color: 0

BG threshold: 0

Invert: FALSE

Max intensity deviation: 40

Max x angle: 1.1

Max y angle: 0

Max z angle: 0.5

Show samples: FALSE

Width: 20

Height: 20

Create training samples from single image applying distortions...

I don't receive a Done message and no vec file is created.

However, if I try to create a vec file from a positive descriptive, it works well. The vec file is created anf if I check with -show option, I can see all my picture.

find positive/ -name '*.bmp' -exec echo {} 1 0 0 20 20 \; > samplesdescription.dat

opencv_createsamples -info samplesdescription.dat -vec test.vec -w 92 -h 112

Thanks for further help. Charlotte

2013-08-07 21:07:31 -0600 commented answer Generate a xml file: error with createsamples

I have also noticed that if I'm adding -show option in using opencv_createsamples, a window is opened and the closed immediately. I don't know if it can help.

2013-08-07 00:57:05 -0600 answered a question Generate a xml file: error with createsamples

Hello,

So I have continued my installation and finished it (I corrected the problem mentioned above in adding "DEFINE_GUID" line).

Now, I'm trying to reuse opencv_createsamples file and this time I have another problem (that's the one from my first post). (I don't know if I should better open new topic for each new question but I will continue with this one).

I use this command on Cygwin :

opencv_createsamples -img 1a000.pgm -num 2 -bg negative.dat -vec samples.vec -maxxangle 0.6 -maxyangle 0 -maxzangle 0.3 -maxidev 100 -bgcolor 0 -bgthresh 0 -w 20 -h 20

I also read :

Info file name: (NULL)

Img file name: 1a000.pgm

Vec file name: samples.vec

BG file name: negative.dat

Num: 2

BG color: 0

BG threshold: 0

Invert: FALSE

Max intensity deviation: 100

Max x angle: 0.6

Max y angle: 0

Max z angle: 0.3

Show samples: FALSE

Width: 20

Height: 20

Create training samples from single image applying distortions...

And so, a .vec file is created but it is empty - its size is 0 byte. I have find on some other forums people with same kind of problem but unfortunately with no solutions.

For your information, the negative.dat is only composed of three pictures (this file is only to test, I have in fact more pictures) :

negative/neg-0002.jpgnegative/neg-0004.jpgnegative/neg-0005.jpg

And I have tried with two other configurations as :

negative\neg-0002.jpgnegative\neg-0004.jpgnegative\neg-0005.jpg

Or

./negative/neg-0002.jpg./negative/neg-0004.jpg./negative/neg-0005.jpg

With still same result.

Thanks in advance for your help.

Charlotte.

2013-08-06 21:21:08 -0600 commented question Generate a xml file: error with createsamples

So, I have reinstalled openCV, a more recent version 2.4.6, on Cygwin. I didn't resolve the problem for the undefined reference to IID_ISpecifyPropertyPages (see the post below), I just did again what I explain on the post.

Even if I have still the same problem using opencv_createsamples, this time I succeed to create facedetect.exe. And so, I tried to use it :

./facedetect --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3 1a000.pgm

But I'm not sure about the result, a window "result" opened and closed. Should I see something on it? Because it's not the case.

2013-08-06 03:58:52 -0600 answered a question Generate a xml file: error with createsamples

Hello,

So I have tried to reinstall openCV on Cygwin with update versions of ffmpeg-2.0 and openCV-2.4.6.1. I have followed all this tutorial http://hvrl.ics.keio.ac.jp/kimura/opencv/

But during the 4th step, when I did

make install

I had this error

CMakeFiles/opencv_highgui.dir/src/cap_dshow.cpp.o:cap_dshow.cpp:(.text$_ZN10videoInput23ShowFilterPropertyPagesEP11IBaseFilter+0x37): undefined reference to `IID_ISpecifyPropertyPages'

First time, I tried install OpenCV on Cygwin, I had this error too. I fixed it by adding the following line on cap_dshow.cpp :

DEFINE_GUID(IID_ISpecifyPropertyPages,0xb196b28b,0xbab4,0x101a,0xb6,0x9c,0,0xaa,0,0x34,0x1d,0x7);

Maybe, it was not a good idea and it is for this reason that my installation of openCV was not good.

Does anyone know this kind of error and how to fix it more properly?

Thanks for your help.

Charlotte.

2013-07-14 20:49:28 -0600 commented question Generate a xml file: error with createsamples

Also this time, I have first using absolute path of opencv.pc

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/

And then, I tried

$ g++ pkg-config --cflags --libs opencv -o facedetect facedetect.cpp

And I received :

/tmp/cce6bQUu.o:facedetect.cpp:(.text+0x1f2): undefined reference to cv::CascadeClassifier::CascadeClassifier()' /tmp/cce6bQUu.o:facedetect.cpp:(.text+0x200): undefined reference tocv::CascadeClassifier::CascadeClassifier()' /tmp/cce6bQUu.o:facedetect.cpp:(.text+0x3d2): undefined reference to `cv::CascadeClassifier::load(std::string const&)'

...

It seems, indeed I have a problem with the installation of opencv.. Do you have any idea to fix it?

2013-07-11 22:42:07 -0600 commented question Generate a xml file: error with createsamples

So if I used : echo $PKG_CONFIG_PATH, I received : ../../../../usr/local/lib/pkgconfig/. I think the path is good but if I'm trying to compile with your command, I have :

g++: error: pkg-config: No such file or directory

g++: error: unrecognized command line option ‘--cflags’

g++: error: unrecognized command line option ‘--libs’

g++: error: opencv: No such file or directory

And, so it didn't seem ok. When I export PKG_CONFIG_PATH, I should give the path where is opencv.pc?

2013-07-11 20:33:58 -0600 commented question Generate a xml file: error with createsamples

So, I have a file facedetect.cpp but no file facedetect.exe. Just in case, I have followed this kind of website to build my version of opencv on Cygwin : http://hvrl.ics.keio.ac.jp/kimura/opencv/ (but for my versions, I cannot find the website link).

So, i'm trying to compile it with this two commands : $ export PKG_CONFIG_PATH=../../../../../usr/local/lib/pkgconfig/ $ g++ pkg-config --cflags opencv pkg-config --libs opencv -o facedetect facedetect.cpp

And I have these kind of errors : /tmp/cctiJam4.o:facedetect.cpp:(.text+0x1f2): undefined reference to cv::CascadeClassifier::CascadeClassifier()'

I know that I probably forget something like linking libraries to compile facedetect.cpp but I thought my first command line with 'export' was enough.

2013-07-09 20:18:56 -0600 commented question Generate a xml file: error with createsamples

I think I don't answer to your question but I don't know what you mean by "samples like facedetect". I have 5 executable files in cygwin/usr/local/bin directory which are opencv_createsamples.exe opencv_haartraining.exe opencv_mergevec.exe (that I added) opencv_performance.exe opencv_trainascade.exe

Do you mean, that I can try to run one of this .exe file on Cygwin ?

2013-07-09 20:16:11 -0600 commented question Generate a xml file: error with createsamples

Hey, I search for some facedetect files and I found one which is called facedetect.cmd, so I opened cmd.exe and run : facedetect.cmd --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3 %1

Something happened but I stopped it (^C) because it was always the same things : C:\cygwin\tmp\opencv-2.4.5\samples\c>facedetect --cascade="../../data/haarcascades/haarcascade_frontalface_alt.xml" --nested-cascade="../../data/haarcascades/haarcascade_eye.xml" --scale=1.3 %1 --cascade

C:\cygwin\tmp\opencv-2.4.5\samples\c>REM an example of using haar cascade recognition for face and eye detection

2013-07-09 02:35:31 -0600 received badge  Editor (source)
2013-07-09 02:18:31 -0600 asked a question Generate a xml file: error with createsamples

Hello,

I'm trying to follow this tutorial: http://note.sonots.com/SciSoftware/haartraining.html#notefoot_1 since several days.

I'm working on Cygwin (version 2.774) and the version 2.4.5 of opencv.

The aim of my project is to generate a xml file for face detection as in the tutorial. I don't manage to create several training samples with one positive images and some negative images.

First of all, I have created two description files, one for negative images (negatives.dat) and second one for positive images (postives.dat).

And after, I have typed this command:

perl createtrainsamples.pl positives.dat negatives.dat Sample

With Sample the name of the folder where I want to store the different vec files. But nothing was created, so I have just tried to create 10 training samples from one positive images with the following command:

opencv_createsamples -img ./Positive/1a000.jpg -num 10 -bg negatives.dat -vec samples.vec

And I have this result:

Info file name: (NULL)

Img file name: ./Positive/1a000.jpg

Vec file name: samples.vec

BG file name: negatives.dat

Num: 10

BG color: 0

BG threshold: 80

Invert: FALSE

Max intensity deviation: 40

Max x angle: 1.1

Max y angle: 1.1

Max z angle: 0.5

Show samples: FALSE

Width: 24

Height: 24

Create training samples from single image applying distortions...

Illegal instruction (core dumped)

I don't understand this error message but maybe someone have an explanation.

For information, I have 3001 negative images in Negative folder and 571 positive images (92*112 pixels) in Positive folder.

Charlotte.

PS : Sorry for my poor english, this is not my mothertongue.