logo       

Re: facedetect.c: msg#00733

lib.opencv

Subject: Re: facedetect.c

Ok. Here is a simple change in the source code:

In the 34th line:
Make your input name equal to the picture file.
const char* input_name = "face.jpeg";
Else, make it equal to 0.
const char* input_name = 0;

Then remove the If-Else statement following that. Like this:

=====================================================================
/* if( argc > 1 && strncmp( argv[1], "--cascade=", optlen ) == 0 )
{
cascade_name = argv[1] + optlen;
input_name = argc > 2 ? argv[2] : 0;
}
else
{
fprintf( stderr,
"Usage: facedetect --cascade=\"<cascade_path>\"
[filename|camera_index]\n" );
return -1;
/*input_name = argc > 1 ? argv[1] : 0;*/
//}
=====================================================================

After this, you have to copy the file: haarcascade_frontalface_alt.xml
to the current directory of your application.
THIS is very very important.

Now, the you can compile and execute, and it will work well.

Regards, :D
Paramesh.
--- In OpenCV@xxxxxxxxxxxxxxx, simona fabbro <simyrm03@xxxx> wrote:
>
> Hi all,
> I want to use facedect.c source code in my application but when I
run my programme :
>
> "Usage: facedetect --cascade=\"<cascade_path>\"
[filename|camera_index]\n" );
>
> How I solve this problem??
>
> thanks a lot
>
>
> ---------------------------------
> Yahoo! Messenger with Voice: chiama da PC a telefono a tariffe esclusive
>
> [Non-text portions of this message have been removed]
>







Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise