opencv_contrib
opencv_contrib copied to clipboard
[ML] randGaussMixture not defined
The cv::ml::randGaussMixture
function is declared in ml.hpp
header file, but not defined anywhere!
I get a linking error if I try to use it in my code... I tested on OpenCV 3.0.0, but it looks like it is also missing in master
as well.
That is indeed true, as you can see, added a PR to remove the declaration, since there is not a single function or module out there using it. If someone need it later on, they will need to provide an implementation.
Those functions were available in the 2.4 branch, but for some reason removed when the ML module was rewritten when OpenCV moved to 3.0:
https://github.com/Itseez/opencv/blob/2.4/modules/ml/src/inner_functions.cpp#L213
It shouldn't be hard to re-add that code (preferably using the modern C++ interface instead).
I am guessing that there is a reason for the removal. Probably the functionality is available in another form...
So according to issue opencv/opencv#5472, the functionality is removed from header. Should I take an initiative by adding the 2.4 source to Master (In C++ form)?
@aman11dhanpat please do! I for one can see a use for the function (think about quickly generating clustering data for Kmeans or EM).
Also people porting code from MATLAB would want an equivalent function to gmdistribution.