Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I am resizing a one-D array using opencv resize function but this give me the following error

\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)
like image 503
Nasir Ali Avatar asked Aug 25 '26 11:08

Nasir Ali


1 Answers

The first parameter of cv.resize should be numpy uint8-typed array:

array = np.array(array, dtype='uint8')
cv.resize(array, (1, 10000), interpolation=cv.INTER_LINEAR)
like image 88
Black Cat Avatar answered Aug 28 '26 08:08

Black Cat



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!