Ask Your Question

cv::filter2D opencv 3.4.1 vs 4.2.0

asked 2020-06-25 09:51:04 -0500

Hauke gravatar image

updated 2020-06-26 04:52:15 -0500


I upgraded the opencv-version from 3.4.1 to 4.2.0, but the function cv::filter2D seems to be different now. I use Visual Studio 2019 64, OpenCV 4.2.0.

The kernel size is larger 11x11.

Is there a known problem or difference?

Best regards

edit retag flag offensive close merge delete


but the function cv::filter2D seems to be differnt now.

explain, show code, results

berak gravatar imageberak ( 2020-06-25 13:55:19 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2020-06-29 02:09:02 -0500

Hauke gravatar image

I found the difference. It was related to the kernel I used. The kernel was based on a division with 2 floating matrices.

cv::divide changed it's behaviour for floating point division. 3.4.1 sets results with Zero-points in the divisor to "0", 4.2.0 to "NaN" (Not a number).

Doku 3.4.1

Doku 4.2.0

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2020-06-25 09:51:04 -0500

Seen: 55 times

Last updated: Jun 29