Ask Your Question
0

cv::log issue ?

asked 2018-07-11 08:47:40 -0600

zazarb gravatar image

Hello, I have issues with the cv::log function. The documentations says that the cv::log function takes the natural logarithm of each element when the element value is not null and a constant C set to -700 otherwise. However, when I apply cv::log to a 3X1 null array (that is v = [0;0;0]), cv::log(v,answer); returns answer = [-1.#INF, -1.#INF, -1.#INF]. Shouldn't it return answer = [C, C, C] instead ? Thanks if someone can clarify !

edit retag flag offensive close merge delete

Comments

from docs:

Output on zero, negative and special (NaN, Inf) values is undefined.

where did you find "a constant C set to -700" ?

berak gravatar imageberak ( 2018-07-11 08:54:36 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-07-11 10:15:20 -0600

Eduardo gravatar image

Related pull request: Update cv::log documentation #6771.

Please remember that you can access up-to-date documentation or a specific documentation version matching your OpenCV version at this url: https://docs.opencv.org/.

edit flag offensive delete link more

Comments

Thanks, I was indeed using v3.1 of OpenCV where the documentation seemed to be incorrect. Best,

zazarb gravatar imagezazarb ( 2018-07-12 03:53:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2018-07-11 08:47:40 -0600

Seen: 552 times

Last updated: Jul 11 '18