问题解决:OpenCV报-210:Unsupported format or combination of formats
在进行中值滤波时,出现-210错误print(img1.dtype)img2 = cv2.medianBlur(img1,3)print(img2)float64error: (-210:Unsupported format or combination of formats)in function 'cv::opt_AVX2::medianBlur'发现是格式的问题修改后:img2 = cv2.
·
在进行中值滤波时,出现-210错误
print(img1.dtype)
img2 = cv2.medianBlur(img1,3)
print(img2)
float64
error: (-210:Unsupported format or combination of formats) in function 'cv::opt_AVX2::medianBlur'
发现是格式的问题
修改后:
img2 = cv2.medianBlur(np.uint8(img1),3)
print(img2)
将浮点型转化为uint8类型即可
更多推荐
已为社区贡献1条内容
所有评论(0)