.cpp:3930: error: (-215:Assertion failed) func != 0 in function 'cv::hal::resize'
解决:不管是打开一个图像或者是接收矩阵生成一个图像他们都应为dtype=“uint8”,所以需要转换
image = image.astype("uint8")
本文介绍了在使用OpenCV处理图像时遇到的错误‘(-215:Assertion failed) func!=0 in function 'cv::hal::resize''的解决方案。问题在于图像数据类型不正确,需要将图像数据类型转换为'uint8'。通过调用astype()函数,可以将图像转换为合适的格式,从而避免此类错误。
.cpp:3930: error: (-215:Assertion failed) func != 0 in function 'cv::hal::resize'
解决:不管是打开一个图像或者是接收矩阵生成一个图像他们都应为dtype=“uint8”,所以需要转换
image = image.astype("uint8")

被折叠的 条评论
为什么被折叠?