Is the openCV doc wrong about getGaussianKernel and getGaborKernel?

asked 2018-06-23 03:47:46 -0500

feraudyh gravatar image

The documentation says that these functions return coefficients. They can not do so because the coefficients are passed by value, not by reference. The documentation should say they return kernels. When I try to submit a bug report I get a "Bad Gateway error".

By the way, I'd be happy to contribute to the documentation, which is full of English grammar mistakes.

edit retag flag offensive close merge delete

Comments

can you show us, what you're trying, and where you think, the error is ?

When I try to submit a bug report I get a "Bad Gateway error".

issues were moved to github several years ago already.

They can not do so because the coefficients are passed by value, not by reference.

both functions return a cv::Mat, so where is the problem ?

maybe you misunderstand the nature of cv::Mat (which is a refcounted smartpointer). but again, show us, what you're up too !

berak gravatar imageberak ( 2018-06-23 04:11:41 -0500 )edit

I'm up to this: I've got a hand done Gabor filter implementation in a piece of code I got from someone. It's trying to smooth a fingerprint image using the Gabor Filter. I want to replace it all by OpenCV code. The openCV doc says "Returns Gabor filter coefficients." That's not the same thing as what you are saying. Please read the doc.

feraudyh gravatar imageferaudyh ( 2018-06-23 04:58:09 -0500 )edit

sorry, but i don't quite understand your issue now.

because the coefficients are passed by value, not by reference

where do you see that ? it's simply not true.

docs say, it returns a kernel, and the code for sure does so. can you try again, to explain your problem with it ?

(besides that, docs can always be improved, and any help there is for sure much appreciated from the devs !)

berak gravatar imageberak ( 2018-06-23 05:01:51 -0500 )edit
1

We are probably not reading the same doc. I was reading link text

feraudyh gravatar imageferaudyh ( 2018-06-23 07:10:48 -0500 )edit

^^ true. 3.0.beta is like 3years old. avoid it, and use https://docs.opencv.org/3.4/d7/dbd/gr...

oook, i misunderstood you.

i would also say, that the coefficients are lambda, sigma, ksize, and such (or "params" if you want so, the input to the algorithm), and that it returns a kernel (1d in the gaussian, 2d in the gabor case).

is that, what you meant ?

berak gravatar imageberak ( 2018-06-23 07:43:01 -0500 )edit

Thank you so much for your time. By the way, the new doc still says that the functions return the coefficients. Yes, I agree about your definition of the "coefficients" and the return is a kernel. The doc is still wrong!!

feraudyh gravatar imageferaudyh ( 2018-06-23 14:43:40 -0500 )edit