This entry was posted on Montag, Juli 18th, 2011 at %H:%M and is filed under OpenCV.
You can follow any comments to this entry through the RSS 2.0 feed.
Both comments and pings are currently closed.
Thank you for your wonderful articles and in particular for your simple demo sources. This helped me a lot to get a brief insight into “bag of words” of OpenCV. Unfortunately I wasted some time to look into the example from the samples folder in OpenCV (the “bagofwords_classification.cpp”) which I think is a much worse example than yours, because it has over 2500 lines of code with much file handling overhead, actually not necessary to understand the basics of BOW implementation in OpenCV.
I think it would be of huge value for other people if you could contribute the sources directly into the OpenCV repository (resp. community).
Thanks for your useful topic. After detector->detect(img, keypoint); detects keypoints, when i want to clean keypoints using keypoint.clear(); or when the function wants to return the following error will be appeared.
“Unhandled exception at 0x011f45bb in BOW.exe: 0xC0000005: Access violation reading location 0x42ebe098.”
and also detected keypoints have bizarre points coordinates like cv::Point_ pt{x=-1.5883997e+038y=-1.5883997e+038 }
Thank you for your wonderful articles and in particular for your simple demo sources. This helped me a lot to get a brief insight into “bag of words” of OpenCV. Unfortunately I wasted some time to look into the example from the samples folder in OpenCV (the “bagofwords_classification.cpp”) which I think is a much worse example than yours, because it has over 2500 lines of code with much file handling overhead, actually not necessary to understand the basics of BOW implementation in OpenCV.
I think it would be of huge value for other people if you could contribute the sources directly into the OpenCV repository (resp. community).
Thanks for your useful topic. After detector->detect(img, keypoint); detects keypoints, when i want to clean keypoints using keypoint.clear(); or when the function wants to return the following error will be appeared.
“Unhandled exception at 0x011f45bb in BOW.exe: 0xC0000005: Access violation reading location 0x42ebe098.”
and also detected keypoints have bizarre points coordinates like cv::Point_ pt{x=-1.5883997e+038y=-1.5883997e+038 }
Part of the code
Ptr matcher = DescriptorMatcher::create(“FlannBased”);
Ptr extractor = new SurfDescriptorExtractor();
Ptr detector = new SurfFeatureDetector(2000);
void extractTrainingVocabulary() {
IplImage *img;
int i,j;
CvSeq *imageKeypoints = 0;
for(j=1;j<=60;j++)
for(i=1;i<=60;i++){
sprintf( ch,"%d%s%d%s",j," (",i,").jpg");
const char* imageName = ch;
Mat img = imread(ch);
vector keypoint;
detector->detect(img, keypoint);
Mat features;
extractor->compute(img, keypoint, features);
bowTrainer.add(features);
keypoint.clear();//problem
}
return;
}