MSER Features with SURF Descriptor Bug (Bug #423)


Added by Jens Krupp over 14 years ago. Updated over 14 years ago.


Status:Done Start date:
Priority:Blocker Due date:
Assignee:Maria Dimashova % Done:

0%

Category:imgproc, video
Target version:-
Affected version: Operating System:
Difficulty: HW Platform:
Pull request:

Description

Hi,

i am working in image processing with OpenCV (trunk Version 3268) and extracted some MSER features from a image.
Now i want to compute from these keypoints a surf descriptor but i get an error in descriptors.cpp at line 205 (void SurfDescriptorExtractor::compute)

assert( (int)_descriptors.size() == descriptors.rows * descriptors.cols );

The reason for the problem is in the "surf" function two lines before.
There are some lines to delete some keypoints (in file surf.cpp line 771 to 783).

/* remove keypoints that were marked for deletion */
for ( i = 0; i < N; i++ ) {
CvSURFPoint* kp = (CvSURFPoint*)cvGetSeqElem( keypoints, i );
if ( kp->size == -1 ) {
cvSeqRemove( keypoints, i );
if ( _descriptors )
cvSeqRemove( descriptors, i );
i--;
N--;
}
}

This is okay but one line before the assert fuction a new output matrix is created from the keypoints and the descriptor size. Then the assert function check the matrix size between the new created matrix and the calculated matrix size. But they are different because some keypoints in the calculated matrix are deleted and i get the error.


Associated revisions

Revision cb3711d5
Added by Maria Dimashova over 14 years ago

fixed SURF::operator() (#423)

History

Updated by Victor Eruhimov over 14 years ago

  • Status deleted (Open)

Updated by Maria Dimashova over 14 years ago

Seems the problem is fixed in r3901. Bug was in SURF::operator().
Please, check the fix on your sample and reopen the ticket if the problem persists.

  • Status set to Done
  • (deleted custom field) set to fixed

Also available in: Atom PDF