Ask Your Question

arthur.sw's profile - activity

2014-04-07 09:39:36 -0600 answered a question Custom SIFT detector in OpenCV

It is possible to create a custom SIFT descriptor extractor:

SIFT siftDetectorExtractor = SIFT(200, 3, 0.04, 15, 1.6);

Mat logo = imread("logoName.jpg");

vector<KeyPoint> keyPoints;
Mat sifts;
siftDetectorExtractor(logo, Mat(), keyPoints, sifts);

or use the detector-class:

Ptr<FeatureDetector> detector = Ptr<FeatureDetector>( new SIFT( <your arguments> ) );
2014-03-31 11:56:34 -0600 asked a question Custom SIFT detector in OpenCV

Is there a way to specify custom SIFT detector parameters in OpenCV?

It seems that the FeatureDetector constructor does not take any parameter, whereas it seems possible to specify those parameters in the SIFT constructor.

I am working on logo detection. Some of the logos have very low texture information, so I would like to detect more keypoints when there are too few (I could increase the edgeThreshold of SIFT?).

Answer:

It is possible to create a custom SIFT descriptor extractor:

SIFT siftDetectorExtractor = SIFT(200, 3, 0.04, 15, 1.6);

Mat logo = imread("logoName.jpg");

vector<KeyPoint> keyPoints;
Mat sifts;
siftDetectorExtractor(logo, Mat(), keyPoints, sifts);
2014-01-13 04:05:40 -0600 answered a question Impossible to create SIFT detector and extractor

I forgot to call cv::initModule_nonfree(); before doing anything else.

2014-01-13 04:00:11 -0600 received badge  Editor (source)
2014-01-13 03:59:55 -0600 asked a question Install Opencv in custom directory?

How to install OpenCV in a custom directory on linux? I would like to install from the latest source code (version 3.0), but without touching the current version (4.6.0) installed on my computer.

I know I can use CMAKE_INSTALL_PREFIX to specify a custom dir, but how will pkg-config handle the two versions then?

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
2014-01-13 03:38:57 -0600 commented answer Install different OpenCV versions.

How can I specify to pkg-config which version I want to use, and where it is installed?

2014-01-08 21:47:18 -0600 received badge  Student (source)
2014-01-07 11:04:48 -0600 asked a question Matrix element-wise division: C = A/B when B != 0, 0 otherwise.

I want C = A/B when B != 0, 0 otherwise. My test showed that the / operator does exactly what I want (with CV_32S mat).

It would be nice if this behavior were documented. How is divide() different from the / operator?

2013-11-18 08:46:58 -0600 commented question Impossible to create SIFT detector and extractor

I forgot to call cv::initModule_nonfree(); before doing anything else.

2013-11-18 08:29:47 -0600 asked a question Impossible to create SIFT detector and extractor

I'm trying to detect SIFT keypoints, using this code:

#include "opencv2/features2d/features2d.hpp"
#include "opencv2/nonfree/nonfree.hpp"
#include "opencv2/nonfree/features2d.hpp"

[...]

Ptr<FeatureDetector> detector = FeatureDetector::create( "SIFT" );
vector<KeyPoint> keyPoints;
detector->detect( image, keyPoints );

The problem is that my detector pointer points to nowhere after that last line, and no error is shown in the console.

I'm using QtCreator and my .pro file contains:

LIBS += -lopencv_nonfree
CONFIG += link_pkgconfig
PKGCONFIG += opencv

so my makefile contains:

LIBS          = $(SUBLIBS) -lopencv_nonfree [...]  /usr/local/lib/libopencv_nonfree.so [...]

There is no error when loading the libraries.

I've installed opencv using those instructions.

2013-02-26 02:07:04 -0600 received badge  Supporter (source)