opencv - confusion over functions "FindHomography" and "cvFindHomography" - c++

I am a bit new to opencv. It seems that there are two functions "FindHomography" and "cvFindHomography" that perform exactly the same functionality. So I am quite confused over the difference between them.
Links to documentation are provided:
FindHomography, cvFindHomography
Thanks for the any help or clarification.

The difference in this case is that FindHomography belongs to the Python interface of OpenCV, and cvFindHomography belongs to the C interface.

Related

equivalent of wavedec (matlab function) in opencv

I am trying to rewrite a matlab code to cpp and I still blocked with this line :
[c, l]=wavedec(S,4,'Dmey');
Is there something like that in opencv ?
if someone have an idea about it try to share it with and thanks in advance.
Maybe if you would integrate your codes with Python, then PyWavelet might be an option.
I'm seeing the function that you're looking for is in there. That function is called Discrete Meyer (Dmey). Not sure what you're planning to do with that though, maybe you're processing some images or something, but Dmey is OK, not very widely used. You might want to just find some GitHub codes and integrate to whatever you're doing to see if it would work first, and based on those you can also change the details of your currently posted function (might find something more efficient).
1-D wavelet decomposition (wavedec)
In your code, c and l stand for coefficients and level. You're passing level four with a Dmey function. If you'd have one dimensional data, the following map is how your decomposition would look like, roughly I guess:
There are usually two types of decomposition models that are being used in Wavelets, one is called packet which is similar to a Full Binary Tree, from architecture standpoint:
The other one, which is the one you're most likely using, is less computationally expensive, because it does not decompose both branches of a tree, if you will. It'd just do the mathematical decomposition in one branch of the tree. Maybe, these images would shed some lights:
1 D
2 D
Notes:
If you have a working model in MatLab, you might want to see the C/C++ Code Generation in MatLab, will automatically convert MatLab codes to C++.
References:
Images are from Wikipedia or mathworks.com
Wiki
mathworks
Wavelet 2D

OpenCV SVM - object does not belong to any of trained classes

I'm using OpenCV (3.1) SVM with 3 classes. Is there any way how to handle input data, which does not belong to any of these classes? Is there posibility to get probability from the prediciton?
I just simply want to mark data from unknown class as "Does not belong to any of trained classes".
Thank you
Looking at the SVM docs(the predict function, in particular), it seems that the best you can do is get the distance from the support vector, and it looks like you can only even get that from a binary classifier.
Not sure how constrained to OpenCV you are, but if you can use scikit learn for your problem, their SVM has a predict_proba function that should be helpful. There is also a predict_log_proba function, if that's your preference. Also, note that you'll need to set probability=true when calling the fit function if you go this route.
If you're contrained to C/C++, you might look into LibSVM, as they also have the ability to give the probabilities, although I'm not as familiar with their api. Also note that the OpenCV and scikit learn implementations are both based on LibSVM
Hope one of these works for you!

Ordinary Differencial Equation in Clojure

I have spent the last few days looking for ODE solver in Clojure, and need some help.
Specifically, I was hoping to find one that does the same thing as the popular lsoda() function in the R package deSolve. (originally written in Fortran, I believe)
My search has been for either a Clojure library with these capabilities, or a Clojure library with the ability to call the original Fortran version from inside clojure.
I was hoping someone would already have experience on this topic and would be willing to help.
Thanks in advance!
EDIT: I have very little knowledge of ODEs in general so maybe I am entirely off base. I hope to model planetary orbiting in clojure. In my time with R, I used lsoda() to pass the initial positions and velocities of planets/stars, and ended up with predictions of the planets some amount of time later. Hope this helps explain what I am looking for.

How to write gaussian mixture model in c++ and Opencv

I want to track an object in a video. So i suppose that I could use "Gaussian Mixture Models" in Opencv and C++ . I want to know how to write Gaussian Mixture Models in C++ . Are there any better algorithms for this than GMM?
Sorry to not answer the question directly but:
Reading research papers is a great thing to do, but to be honest, you will get much more knowledge at this point by trying your own ideas on your specific data and getting a better understanding of the problem.
If you know the shapes, it's probably better to use a generalized Hough transform or matched filter for position estimates, combined with a Kalman filter for tracking. These will be relatively easy to implement. Or maybe you can find existing implementations.
Also, I'd prototype your idea in Matlab or Octave instead of C++ if you are not a very good C++ programmer as you'll wind up wasting most of your time with problems in C++ when the problem itself is what you really want to focus on.
As I said in the comment, I'd skip out on using GMM's for now until you get a better understanding of the problem and how you are going to use them. (Unless of course you already have a good idea of how you will use them.)

c++ petsc matrix inversion

can any one share with me a few different example of dense matrix inversion's with Petsc. I searched the web and could only find algorithm's and no solid examples with code. Thank you
In their documentation. They seems to say which function to call when.
You can find it here.
Also, I found a manual that provides multiples code example that you might want to look at.
Hope it helps!