-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Mismatch between code and documentation in anisotropicDifussion funciton #1970
Copy link
Copy link
Closed
Labels
category: documentationDocumentation fix or update, does not affect codeDocumentation fix or update, does not affect codecategory: ximgprocgood first issue
Description
System information (version)
- OpenCV => 4.0.0
- Operating System / Platform => Debian on Windows 10(WSL)
- Compiler => python3 interpreter
Detailed description
Hi,
There appears to be mismatch between the official documentation here and the anisotropicDiffusion function defined here. The document mentions that source image should be grayscale but the assert statement in line 251 checks if the source image has 3 channels.
Steps to reproduce
import cv2
image = cv2.imread('image.png')
grayscale = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
filtered_image = cv2.ximgprox.anisotropicDiffusion(grascale, 0.25, 10, 1000)
I get the following error:
cv2.error: OpenCV(4.0.0) /io/opencv_contrib/modules/ximgproc/src/anisodiff.cpp:251: error: (-215:Assertion failed) src_.dims() == 2 && type == CV_8UC3 in function 'anisotropicDiffusion'
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
category: documentationDocumentation fix or update, does not affect codeDocumentation fix or update, does not affect codecategory: ximgprocgood first issue