Quantcast
Channel: OpenCV Q&A Forum - Latest question feed
Viewing all articles
Browse latest Browse all 19555

Bio-inspired features returns NaNs

$
0
0
Hello, I am using bif function (bif.cpp) from the extra module 'face' of Opencv-3.0.1. When I run the function for a test image, the returned feature vector includes many NaN values. Could you please help me understand why this is happening? #include "opencv2/opencv.hpp" #include "opencv2/face/bif.hpp" #include using namespace cv; using namespace std; int main(int argc, char** argv) { cv::Mat fea; cv::Ptr bif = cv::face::createBIF(); cv::Mat image(60, 60, CV_32F); cv::theRNG().fill(image, cv::RNG::UNIFORM, 0, 1); bif->compute(image, fea); cout << "fea = " << endl << " " << fea << endl << endl; return 0; } Thank you in advance. **EDIT:** Sorry for my delayed edit, but please let me ask something more. I have made the changes you suggested and for most of the images the `NaN` value disappeared. However, the problem for some images is not fixed. I am giving an example below. Could you please provide some extra help on this? ![image description](/upfiles/14761319156247417.png)

Viewing all articles
Browse latest Browse all 19555

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>