Ask Your Question

Marcelo's profile - activity

2020-05-13 19:22:28 -0600 received badge  Popular Question (source)
2014-07-06 16:07:09 -0600 commented answer L2 relative error

Hello berak,

The preprocessing in training images and the input image are the same?

In my work, I use graysacale, CLAVE and Bilateral Filter, in the training images (100 images) and also on input image (webcam) but I'm getting bad results.

Have a suggestion?

Regards and sorry my english. Marcelo Porto Alegre/Brasil

2014-07-02 14:50:20 -0600 commented answer L2 relative error

ok...Thanks

2014-07-02 13:29:47 -0600 commented answer L2 relative error

Thank you so much berak,

I finally understand these functions.

If you can help me a little more, can you talk what the best metric for face recognize, because de confidence and the L2 error and cannot work properly.

Thanks, Marcelo

2014-07-02 10:46:27 -0600 commented answer L2 relative error

Thanks berak!

Could you explain, in mathematical words, Confidence and Prediction. These values use K-Nearest Neighbors, Euclidean Distance? If yes...How work?

Thanks, Marcelo

2014-06-30 23:16:29 -0600 received badge  Editor (source)
2014-06-30 23:15:16 -0600 answered a question L2 relative error

The code is this:

// Compare two images by getting the L2 error (square-root of sum of squared error).
double getSimilarity(const Mat A, const Mat B)
{
    if (A.rows > 0 && A.rows == B.rows && A.cols > 0 && A.cols == B.cols) {
        // Calculate the L2 relative error between the 2 images.
        double errorL2 = norm(A, B, CV_L2);
        // Convert to a reasonable scale, since L2 error is summed across all pixels of the image.
        double similarity = errorL2 / (double)(A.rows * A.cols);
        return similarity;
    }
    else {
        //cout << "WARNING: Images have a different size in 'getSimilarity()'." << endl;
        return 100000000.0;  // Return a bad value
    }
}

If L2 relative error is a Euclidean Distance, what is this "Predict" and "Confidence" in opencv FaceRecognizer class?

Regards, Marcelo

2014-06-30 23:11:06 -0600 commented question L2 relative error

Thanks for help.

I can't a link to download, only a github page: https://github.com/MasteringOpenCV/code/blob/master/Chapter8_FaceRecognition/recognition.cpp

2014-06-26 01:19:23 -0600 asked a question L2 relative error

Hello,

I'm studying opencv for facial recognition and I read about L2 relative error in "Mastering OpenCV book". What is L2 relative error? Is classical formula or a new proposed formula?

Regards, Marcelo