Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

face: bif outputs NaN values #802

Closed
berak opened this issue Oct 6, 2016 · 3 comments · Fixed by #803 or #837
Closed

face: bif outputs NaN values #802

berak opened this issue Oct 6, 2016 · 3 comments · Fixed by #803 or #837

Comments

@berak
Copy link
Contributor

berak commented Oct 6, 2016

  • OpenCV => 3.1
  • Operating System / Platform => Windows 64 Bit
  • Compiler => mingw64
    cv::Mat fea;
    cv::Ptr<cv::face::BIF> bif = cv::face::createBIF();
    cv::Mat image(20, 20, CV_32F);
    cv::theRNG().fill(image, cv::RNG::UNIFORM, 0, 1);
    bif->compute(image, fea);
    cout << "fea = " << endl << " " << fea << endl << endl;

results in:

fea =
 [nan;
 0.042399365;
 0.03043396;
 nan;
 0.028167048;
 nan;
 nan;
 nan;
 nan;
 0.027863333;
 nan;
 0.022367189;
 nan;
 nan;
 0.03827234;
 nan;
 0.021351714;
 ...

see also: http://answers.opencv.org/question/103728/bio-inspired-features-returns-nans/

@savuor
Copy link
Contributor

savuor commented Oct 6, 2016

Moreover, on Linux x64 it breaks the test CV_Face_BIF.can_compute of face module.

@berak
Copy link
Contributor Author

berak commented Oct 6, 2016

oh, i'll sure check that (missed, that it has tests at all)

hmm, test passes on my box (fea.size() == [1, 13188])

  • anything i can do ?
  • why did the buildbot not yell at me ?

@berak
Copy link
Contributor Author

berak commented Oct 11, 2016

i would like to reopen this issue (is this possible ?), since there are still coming NaN's out of it, this time from here

ex. image
with real images, it happens, that sd/area < mean*mean , so we get neg numbers, and the sqrt yields nan.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants