Ask Your Question

davidshen's profile - activity

2018-06-07 02:43:09 -0600 received badge  Notable Question (source)
2017-06-27 05:29:54 -0600 received badge  Popular Question (source)
2016-07-25 22:36:07 -0600 received badge  Popular Question (source)
2015-04-08 22:34:17 -0600 commented answer What happens if there's not enough key points to match?

@FooBar, can you please explain more about your c options? It sounds good for me. I looked at FlannBasedMatcher but I could not find a way to add constraints.

2015-04-08 22:25:03 -0600 received badge  Enthusiast
2015-04-07 19:48:11 -0600 asked a question What happens if there's not enough key points to match?

Given two mat: mat1 and mat2, I extracted SIFT key points: kps1 and kps2, then I computed the descriptors: desc1 and desc2.

I want to know if I do a Flann match against these two descriptors, what will happen if they have different number of descriptors in them?

For what I experienced, it seems the number of matches will always be the same as the number of descriptors in desc1, the query descriptor.

2015-03-05 06:15:28 -0600 received badge  Student (source)
2015-03-05 04:12:25 -0600 asked a question Where is CV_CAP_PROP_POS_FRAMES in java?

In cpp code, CV_CAP_PROP_POS_FRAMES is defined Highgui file. But in Java, it is not defined? Or it is in some other place?

2015-03-04 18:47:14 -0600 asked a question How to build opencv so it statically link to ffmpeg?

I want to do two things:

  • A static opencv version that when my program link to it, my executable can run independently
  • A dynamic opencv version that I do not need to worry about dependencies like ffmpeg

I know I can use

cmake -DBUILD_SHARED_LIBS=OFF

to build a static version. But how do I specify using static link with ffmpeg?

2015-03-02 21:09:30 -0600 commented question OpenCV 2.4 static lib relies on opencv_ffmpeg*.dll on Windows

So, I need to:

  • Build static ffmpeg
  • Build static opencv and static link to ffmpeg
  • Build my program and static link to opencv & ffmpeg

That means I need to build everything from scratch...correct?

2015-03-02 21:06:44 -0600 received badge  Scholar (source)
2015-03-02 03:55:13 -0600 asked a question OpenCV 2.4 static lib relies on opencv_ffmpeg*.dll on Windows

I want to compile a simple C program which I would like to statically link to opencv*.lib files. I am doing thin on Windows 64bit, with VS 2013.

I have included the include directory, the opencv\build\x64\vc12\staticlib directory, and all the necessary .lib files. The compilation went smoothly, but the program won't execute. More specifically,

VideoCapture::open(*filename*)

will fail, and

VideoCapture::isOpened()

will return false. But no exception of any kind is thrown.

I noticed if I put my executable under opencv\build\x64\vc12\bin, the program will work as expected. So I tried the combination of the DLLs and my program, and I found opencv_ffmpeg*.dll is the one causing my problem.

It seems to me that the static lib is dynamically linking to this ffmpeg DLL. So even my program can run without DLLs from opencv, I still need to satisfy the dependencies of the static lib, which is a dynamic lib...so complicate.

2014-04-15 02:44:37 -0600 asked a question How to create SurfFeatureDetector using FeatureDetector::create?

From the tutorial, I know how to SurfFeatureDetector with minHessian parameter. But when I create the detector with FeatureDetector::create, it does not provide me a way to set the parameter. I tried to call

FeatureDetector->setInt("minHessian", 100);

But I got no parameter name "minHessian" error in debug mode.

2014-04-15 02:37:06 -0600 received badge  Supporter (source)
2014-04-15 00:07:37 -0600 commented question How to cluster a batch of images?
2014-04-14 23:44:51 -0600 asked a question How to cluster a batch of images?

I have a batch of images, say the frontal photo of dogs and cats. I want to find a way to cluster these images into different classes. I don't want to use Cascade classifier, because some of the objects are unknown, and Cascade will only tell me it is unknown, but cannot help me to put them into categories.

I tried to use kmeans, but I don't know how to create my sample data set. I tried to reshape an image into a row, each element is the grey scale of a pixel. Then I created a Mat with each row filled the image as before. So, it looks like:

p1, p2, p3...pn  <= image1
p1, p2, p3...pn  <= image2
....             <= imagen

I fed this Mat to kmeans,

kmeans(sampleMat, 3, labels, TermCriteria(CV_TERMCRIT_EPS | CV_TERMCRIT_ITER, 10, 10.0), 50, KMEANS_PP_CENTERS, centers);

The output labels.size() is same as my input sample numbers...:( Apparently it doesn't work. Am I working at the wrong direction?