Updated by Alexander Shishkov about 13 years ago
Hi,
I encounter systematic error when using the OpponentSIFT [[OpponentSIFT]] descriptor when using a Dense grid analysis.
Note, it does not fail when using the OpponentSURF [[OpponentSURF]] descriptor or when using a simple SIFT descriptor
The code and error report are below.
I also have a question regarding SIFT and SURF : how do these implementations differentiate from the official research libraries : are there any difference from precision and/or computation efficiency considerations ?
Once again, thanks a lot for all the contributors of this wonderful library !
From the code side, here is how i setup the dense grid:
// dense grid setup
_featureDetector = new cv::DenseFeatureDetector(cv::DenseFeatureDetector::Params(1.f, 1, 2.5f, 9));
// descriptor setup
_descExtractor = cv::DescriptorExtractor::create( _ddmParams.descriptorType ); // where _ddmParams.descriptorType is the String "OpponentSIFT", "OpponentSURF", "SIFT" or any other compatible
// when running analysis
_descExtractor->compute( colorImage, imageKeypoints, currentImageDescriptors);
Here is the valgrind report at the error place:
==> grabbing from colorImage input (h,w,channels,elemnSize1 => nbKeypoints): 240, 320, 3, 1=> 69
==31790== Invalid read of size 4
==31790== at 0x5D45DE5: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)
==31790== Address 0x193ac4f8 is 0 bytes after a block of size 264 alloc'd
==31790== at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
==31790== by 0x4EC95DD: std::vector<int, std::allocator<int> >::_M_fill_insert(+gnu_cxx::+normal_iterator<int*, std::vector<int, std::allocator<int> > >, unsigned long, int const&) (in /usr/local/lib/libopencv_core.so.2.3.2)
==31790== by 0x5D4678C: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer]]::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)
==31790==
==31790== Invalid read of size 4
==31790== at 0x5D45DF8: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)
I encounter systematic error when using the OpponentSIFT [[OpponentSIFT]] descriptor when using a Dense grid analysis.
Note, it does not fail when using the OpponentSURF [[OpponentSURF]] descriptor or when using a simple SIFT descriptor
The code and error report are below.
I also have a question regarding SIFT and SURF : how do these implementations differentiate from the official research libraries : are there any difference from precision and/or computation efficiency considerations ?
Once again, thanks a lot for all the contributors of this wonderful library !
From the code side, here is how i setup the dense grid:
// dense grid setup
_featureDetector = new cv::DenseFeatureDetector(cv::DenseFeatureDetector::Params(1.f, 1, 2.5f, 9));
// descriptor setup
_descExtractor = cv::DescriptorExtractor::create( _ddmParams.descriptorType ); // where _ddmParams.descriptorType is the String "OpponentSIFT", "OpponentSURF", "SIFT" or any other compatible
// when running analysis
_descExtractor->compute( colorImage, imageKeypoints, currentImageDescriptors);
Here is the valgrind report at the error place:
==> grabbing from colorImage input (h,w,channels,elemnSize1 => nbKeypoints): 240, 320, 3, 1=> 69
==31790== Invalid read of size 4
==31790== at 0x5D45DE5: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)
==31790== Address 0x193ac4f8 is 0 bytes after a block of size 264 alloc'd
==31790== at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
==31790== by 0x4EC95DD: std::vector<int, std::allocator<int> >::_M_fill_insert(+gnu_cxx::+normal_iterator<int*, std::vector<int, std::allocator<int> > >, unsigned long, int const&) (in /usr/local/lib/libopencv_core.so.2.3.2)
==31790== by 0x5D4678C: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer]]::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)
==31790==
==31790== Invalid read of size 4
==31790== at 0x5D45DF8: cv::OpponentColorDescriptorExtractor::computeImpl(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x5D4008A: cv::DescriptorExtractor::compute(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) const (in /usr/local/lib/libopencv_features2d.so.2.3.2)
==31790== by 0x4179ED: TrecVidBOWsystem::_grabbDescriptors(cv::Mat [[TrecVidBOWsystem]]::_grabbDescriptors(cv::Mat const&, std::vector<cv::KeyPoint, std::allocator<cv::KeyPoint> >&, cv::Mat&) (TrecVidBOWsystem.h:484)
==31790== by 0x41BCED: TrecVidBOWtrainer_Experimetal::processSubshotList_SingleFrame(cv::Mat [[TrecVidBOWtrainer]]_Experimetal::processSubshotList_SingleFrame(cv::Mat const&, Subshot const&, int const&) (TrecVidBOWtrainer_Experimetal.h:75)
==31790== by 0x40CE50: TrecVidSubshotListProcessor::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) [[TrecVidSubshotListProcessor]]::processSubshotList(TrecVidSubshotListProcessor::SUBSHOTLISTFAILUREPROCESS) (TrecVidSubshotListProcessor.cpp:216)
==31790== by 0x419640: TrecVidBOWtrainer::trainVocabulary(int, [[TrecVidBOWtrainer]]::trainVocabulary(int, char**) (TrecVidBOWtrainer.h:132)
==31790== by 0x410188: main (buildVocabulary.cpp:29)