opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

[ML] randGaussMixture not defined

Open amroamroamro opened this issue 9 years ago • 5 comments

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.

amroamroamro avatar Oct 07 '15 15:10 amroamroamro

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.

StevenPuttemans avatar Oct 08 '15 09:10 StevenPuttemans

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).

amroamroamro avatar Oct 08 '15 18:10 amroamroamro

I am guessing that there is a reason for the removal. Probably the functionality is available in another form...

StevenPuttemans avatar Oct 08 '15 18:10 StevenPuttemans

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 avatar Oct 12 '15 15:10 aman11dhanpat

@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.

amroamroamro avatar Jan 14 '16 14:01 amroamroamro