gpt4 book ai didi

python-3.x -\resize.cpp :3787: error: (-215:Assertion failed) func ! = 0 在函数 'cv::hal::resize'

转载 作者:行者123 更新时间:2023-12-03 18:58:54 27 4
gpt4 key购买 nike

我正在使用 opencv resize 函数调整一维数组的大小,但这给了我以下错误

\resize.cpp:3787: error: (-215:Assertion failed) func != 0 in function 'cv::hal::resize'

array=cv.resize(np.array(array),(1,10000), interpolation = cv.INTER_LINEAR)

最佳答案

cv.resize 的第一个参数应该是 numpy uint8 类型的数组:

数组 = np.array(array, dtype='uint8')
cv.resize(array, (1, 10000), 插值=cv.INTER_LINEAR)

关于python-3.x -\resize.cpp :3787: error: (-215:Assertion failed) func ! = 0 在函数 'cv::hal::resize',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55087860/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com