Reputation: 93
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)
Upvotes: 6
Views: 14308
Reputation: 316
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)
Upvotes: 20