I am wondering about the parameter for the orb feature detector. I am using it as keypoint extractor and descriptor. As matcher I use the BFMatcher.
At the moment I use it like this:
ORB orb(25, 1.0f, 2, 10, 0, 2, 0, 10);
Because I am looking at small images and fast performance I reduced the number of features to about 25. Which seems to still work fine with my application. And the problem start with the second parameter. Its default value is 1.2. I set it to 1 a while ago but found out that it is much fast with a higher value there. The thing is, I am starting to get this problem:
OpenCV Error: Assertion failed ((type == CV8U && dtype == CV_32S) ||dtype == CV_32F) in cv_batchDistance, file..........stat.cpp, line 2480
Then up next is the parameter for pyramid levels. Default is 8. I set it to 2 which gave me another great performance improvement. But if I set it to 1 it will throw the same error as above.
Since I am working with small pictures I tried to set it to a lower value. But it does not seem to change anything. The same applies to the last parameter (patchSize). It states that these parameters should roughly match.
I am not interested in the remaining parameters.
As I have explained in other questions already I am trying to track an object in a video. For that I am extracting for every bounding box its features and try to match it with a bounding box from the next feature. By doing this I am trying to build relationships between frames. And so far it is working well. But I need to be faster. If there are more than a handful of bounding boxes it takes too long since I want to have it real time @ 30FPS.
If anyone could help me with these parameter I'd appreciate it.
too close to 1 scale factor will mean that to cover certain scale range you will need more pyramid levels and so the speed will suffer.
So put it greater than 1 and check it again. – Abid Rahman K