I am trying to use ORB descriptors with LshMatcher for a faster matching.
I have found somewhere LSH implementations (example: https://code.ros.org/trac/wg-ros-pkg/browser/branches/trunk_diamondback/stacks/object_recognition_experimental/rbrief/src/lsh.cpp)
But it seems it is not implemented yet in opencv 2.4.2.
Do you have any hint how to include LshMatcher within opencv?
I have asked the same question on the OpenCV dev forum, without a good answer.
http://answers.opencv.org/question/503/how-to-use-the-lshindexparams/
Yet, I hope for some more docs. You can just check it again in a few days to see whether there is a new answer.
BTW, if you try to use it with SIFT/SURF/ORB, which are float descriptors, as I know, it will not work LSH are for binary descriptors only.
Edit
It seems to be a bug in OpenCV (2.4.2), as stated in the accepted answer here
http://answers.opencv.org/question/503/how-to-use-the-lshindexparams/
Related
I'm learning orb-slam and opencv source code, and inside the orb.cpp which lies on modules/features2d/src/ directory I see a bit pattern named as
bit_pattern_31_[256*4]
But I really don't know what's its usage. I search the google and bing long time without any answer given.
So any one know the usage or reference of this majic bit pattern?
Since I came across this on google and eventually found what I think is the answer, I'll give it a shot:
bit_pattern_31_[]
is a pre-computed set of points P1(x,y) and P2(x,y).
I believe it to be the set of points obtained by the greedy search described in section 4.3 Learning Good Binary Features of the original orb paper (ORB: an efficient alternative to SIFT or SURF)
I'm using Stereo SGBM of openCV to generate disparity map from a couple of images satellite,
the result is very bad even when I change the parameters. what should I do ?
I developped a tool similar to the one given in Robst's answer, but a little more convenient, and cross-platform. You can find it here.
SGBM parameter tuner based on vmarquet's great QT GUI for BM:
https://github.com/hitimo/opencv-disparity-map-tuner
Might be helpful to find the correct parameter set.
You could try StereoBM to see if you can get better results. You could use the tool developed by Martin Peris found here to modify the parameters. It will be much easier with the GUI provided. You could do something similar for StereoSGBM. Make sure your images are properly rectified.
Regards
I have seen multiple haarcascade xmls in opencv for face detection, eye detection , ear detection, Human body detection etc., But couldnt see proper documentation or explanation for these xmls.
For example in a application if I need to detect side faces which xml should I use and what are the parameters to be passed for detectMultiScale?
In some cases if I vary the parameters to detectMultiScale the false detections get reduced, but I did all the tests with trial and error method. I couldnt find any definite articles on explaining the use of each xml and parameters.
Can some one provide the documents on this if any, else some explanation on this would be grateful.
OpenCV has a built-in profile face classifier xml under "..\data\haarcascades". If you want to create your own cascade classifier, you should follow this procedure. Here is another link regarding that.
To learn about the detectMultiScale method, check out the documentation. To understand the how the classifier and its parameters work, check out the viola-jones (2001) article or its explanation.
Here is a paper by Vadim Pisarevsky, one of the OpenCV developers, which may be helpful, in understanding some of the parameters.
On the other hand, if using OpenCV is not a hard requirement, please take a look at vision.CascadeObjectDetector in the Computer Vision System Toolbox for Matlab, which provides the same functionality. It also saves you the trouble of figuring out which xml file to use for profile faces.
OpenCV provides SVD decomposition, but I cannot find general QR decomposition in its library. Is there any alternative to achieve this?
This is an old question, but for the sake of completeness (and because google took me here), here's the answer using OpenCV --
OpenCV has the solve() function, which can be invoked with a flag specifying the matrix inversion method to be used. Use the flag DECOMP_QR to perform a QR decomposition.
As someone mentioned 3 years ago, this is an old question (lolz)
But QR decomposition is very much possible in OpenCV. In 3.2 it can be done using cv::decomposeProjectionMatrix, as documented here: http://docs.opencv.org/trunk/d9/d0c/group__calib3d.html#gaaae5a7899faa1ffdf268cd9088940248
Note: I recognize I'm really answering for a specific case of QR decomposition (that on a projection matrix), but that doc page says that this function is based on RQDecomp3x3, which could be used for the generic RQ decomposition.
I'm answering this now as all of the answers that pop up when googling this are wrong in saying that it's not possible.
You can use a matrix library like Newmat11 http://www.robertnz.net/nm11.htm#qr
I'm trying to cluster a really large dataset - 3030764x162 into 4000 clusters using the cvKmeans2 function in OpenCV 2.1.
I would like to see which iteration the K-means algorithm is currently in (similar to what is displayed in Matlab), but I don't see any documentation that points to how I can do this.
It's kind of frustrating seeing a blank screen and not knowing when the code is going to terminate!
Thank you.
Unfortunate as it seems, the answer is No, you cannot. There are no debugging/informative statements anywhere in the kmeans function as provided by OpenCV. However, you may edit and add statements to the method as you deem appropriate.
#Sau,
May be you need some other way of doing it. Though my answer is not relevant to OpenCV.
I have not tried in OpenCV, I had once done KMeans clustering for a extremely large data set and it was more a option better than OpenCV as it worked in a distributed mode. Though very lengthy, but still you might be interested. Its Kmeans clustering using Mahout
Check it out