gpu::Orb is not determinist (Bug #2208)
gpu::orb is not always giving the same result for the same image on the same card in the same run.
I did some code to show it, it uses a window 7 public image.
I'm using the version 2.4.2 rebuilt with Ipp, Cuda 4.2 and Qt in visual 10 pro 64 bits on win 7 64.
I tested it on a quadro NVS 295, Quadro 2000 and Tesla C1060. If you run it several times you will see that the diffs are not always the same.
Some keypoints disappear, some appear.
Thank's for your work,
I did some more tests.
In the previous code I did:
gpuOrb1(gpuImg, gpuVide, gpuVkp[i], gpuVDesc[i]);
as the const GpuMat& mask (gpuVide) is referred as optionnal in the doc, I let it empty like in the cpu orb.
Now I fill it with:
Mat mask = Mat::ones(img1.rows, img1.cols, CV_8U);
And now there are 0 diff on the 2 Quadros, but still diffs on the tesla....???!!!
It's not actually a bug.
The algorithm performs sorting of points according to their response. Some points have equal responses, but their position in initial array differs for different launches due to detector's asynchronous work. So after sorting their final position in result will be different (sorting algorithm is not stable).
- Assignee changed from Anatoly Baksheev to Vladislav Vinogradov
Continuing my tests:
I tried to see if keypoints are more consistent between cpu and gpu if a filled mask is given as a parameter.
But I found another bug (or strange behaviour) in both cpu and gpu orb.
I created a mask of CV_8U filled up with 1 and with the same size as the image.
Then both functions return only the first octave keypoints. The mask has to be filled up with 0xFF.
When I fill it up with 0xFF I've got the good number of keypoints and all the octaves.
They are approximately consistent for the first octave, but after that ... no relation.
ORB uses FAST detector for keypoint position.
FAST detector always returns the same points for the same image, but their position in output array differs.
ORB performs sorting on FAST output and leaves only the first n points.
Keypoints appear and disappear due to this filtration.
- Status changed from Open to Cancelled