Weird issue: Output of running same code on Android & OSx differs
I've written some simple snippet in C++ and ran that on Android as well on OSx with same inputs and the result I got is different on both platform. Now the only thing I could think of is, the way I'm assuming to test the output is wrong, so here is the snippet..
string file = "imgage.jpg"; // trust me, files on both machines are same
Mat inputFrame = imread(file);
OrbFeatureDetector detector(500);
std::vector<KeyPoint> keypoints;
Mat image;
cvtColor(inputFrame, image, CV_RGB2GRAY);
detector.detect(image, keypoints);
cout << keypoints.size() << endl; //
Problem
cout << keypoints.size() << endl; // this gives different ouput running for same image on Android and OSx.
I ran this test on 8 different types of images and it runs fine except for the following image. Please ignore commenting on kind of image, this is just some random test.
Running provided test on Android gives 176 keypoints while running on OSx gives 172 keypoints.