문제

I am using opencv 2.4.8. Declaring orb as such:

int patchSize = 31;
ORB orb(1000,1.0f,1,patchSize,0,2,ORB::HARRIS_SCORE,patchSize);

Doesn't the patch size mean that there should be (patchsize-1)/2 space around the keypoint?

I am providing keypoints at coordinates with 15 pixels margins vertically and horizontally, but such positions fail to produce descriptors.

For example, for an image 240x320 the point (15,15) fails to be described, even though there are enough pixels ( 0,1,....14 -> 15 pixels).

도움이 되었습니까?

해결책

OpenCV uses KeyPointsFilter::runByImageBorder with the selected edgeThreshold (which is your patchSize) to eliminate keypoints close to the image border for the ORB computation (the file is modules/features2d/src/orb.cpp, if you want to have a look; line 669 in computeKeyPoints).

So your margin is actually 31, and not 15.

Hope that helps!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top