Ask Your Question

Lailton's profile - activity

2016-05-23 12:36:45 -0600 asked a question Face Position

Hello Everyone,

I am working in faceRecognition project, I would like to know if exist a procedure to check what is the current possiton face, if person is looking to front or to sides. I need allow to register faces only looking to front.

Someone can help me?

2016-05-23 12:28:24 -0600 received badge  Autobiographer
2016-05-21 09:45:57 -0600 commented question imread jpeg

Thank you. I will to try

2016-05-20 23:15:06 -0600 asked a question imread jpeg

Hello Everyone,

I have my first project with opencv, and I have a idea to save faces To database with encode base64

Now my question, How can I read image direct from content raw/memory.

I am using now Mat IMG = imread( fileName );

I want: Mat IMG = imdecore64(fileBase64);

Someone can help me?

2016-04-28 11:38:53 -0600 asked a question FaceDetection

Hello Everyone,

My question today is:

How can us know the alignment face from a image. I would like to know if person is looking to sides or front.

Other question.

Can us check level light with opencv ?

Regards, Lailton Fernando Mariano

2016-03-25 21:15:27 -0600 received badge  Enthusiast
2016-03-23 14:46:31 -0600 received badge  Editor (source)
2016-03-23 14:32:20 -0600 answered a question FaceRecognizer

I continue with problem with facereconizer: Please see the code:

I have this variables where is the faces

vector<Mat> images;
vector<int> labels;

... here I load the files to vectors

int img_width  = images[0].cols; // 197
int img_height = images[0].rows; // 197

CascadeClassifier face_cascade;
string classifier = "haarcascade_frontalface_alt.xml";

face_cascade.load(classifier);

I am not sure if createEigenFaceRecognizer is better to use, but I am using it

Ptr<FaceRecognizer> model = createEigenFaceRecognizer();
model->train(images, labels);

Here is vector to store faces if exist

vector<Rect> faces;
Mat frame;
Mat cropImg;
cap >> frame;

Here I call the face_cascade to check if exist faces

face_cascade.detectMultiScale(frame, faces, 1.1, 3, 0, cv::Size(190, 190), cv::Size(200, 200));

cv::Rect roi;
for (int i = 0; i < faces.size(); i++)
{

Well, now I crop the face like the faces stored, that I am using to try reconizer

     roi.x = faces[i].x; roi.width = faces[i].width;
     roi.y = faces[i].y; roi.height = faces[i].height;
     cropImg = frame(roi);
     cvtColor(cropImg, cropImg, CV_BGR2GRAY);

And finally now I try to identify

     int label = model->predict(cropImg);
     string text;
     if(label>=0 ){
        text = format("Label = %d", label);
     }else{
        text = "Unknow";
     }
     putText(frame, text, Point(faces[i].x, faces[i].y), FONT_HERSHEY_COMPLEX_SMALL, 1.0, CV_RGB(0, 255, 0), 1.0);
}

I not know why it not work, it is exactly how is samples, maybe I am losing something, if a person that is not in my database go to camera, it identify the face with a wrong entrie.

Someone can help me?

2016-03-21 17:09:44 -0600 commented question FaceRecognizer

The pictures I need save to gray and facecroped to reconize ? I am using files salved from webcam default color and size. is it wrong ?

2016-03-21 15:14:26 -0600 commented question FaceRecognizer

Thanks for reply but, I add 10 photo by person ( 2 persons ) and the problem is the same... No, I dont know how LDA work.

Can you help me?

What is better/correct to use: createEigenFaceRecognizer createFisherFaceRecognizer createLBPHFaceRecognizer

Note, I am working using openCV from GIT repository (version 3.1.0).

Thanks.

2016-03-21 14:16:21 -0600 asked a question FaceRecognizer

I continue with problem with facereconizer: Please see the code:

I have this variables where is the faces

vector<Mat> images;
vector<int> labels;

... here I load the files to vectors

int img_width  = images[0].cols; // 197
int img_height = images[0].rows; // 197

CascadeClassifier face_cascade;
string classifier = "haarcascade_frontalface_alt.xml";

face_cascade.load(classifier);

I am not sure if createEigenFaceRecognizer is better to use, but I am using it

Ptr<FaceRecognizer> model = createEigenFaceRecognizer();
model->train(images, labels);

Here is vector to store faces if exist

vector<Rect> faces;
Mat frame;
Mat cropImg;
cap >> frame;

Here I call the face_cascade to check if exist faces

face_cascade.detectMultiScale(frame, faces, 1.1, 3, 0, cv::Size(190, 190), cv::Size(200, 200));

cv::Rect roi;
for (int i = 0; i < faces.size(); i++)
{

Well, now I crop the face like the faces stored, that I am using to try reconizer

     roi.x = faces[i].x; roi.width = faces[i].width;
     roi.y = faces[i].y; roi.height = faces[i].height;
     cropImg = frame(roi);
     cvtColor(cropImg, cropImg, CV_BGR2GRAY);

And finally now I try to identify

     int label = model->predict(cropImg);
     string text;
     if(label>=0 ){
        text = format("Label = %d", label);
     }else{
        text = "Unknow";
     }
     putText(frame, text, Point(faces[i].x, faces[i].y), FONT_HERSHEY_COMPLEX_SMALL, 1.0, CV_RGB(0, 255, 0), 1.0);
}

I not know why it not work, it is exactly how is samples, maybe I am losing something, if a person that is not in my database go to camera, it identify the face with a wrong entrie.

Someone can help me?

2016-03-15 03:04:13 -0600 asked a question Facerecognizer C/C++

Hello, Someone can help me, I would like to do a ./facerecognizer file1 file2 and it check if the face is match.

It can be a .CPP or .c

thanks.