Nasir Ali
Nasir Ali

Reputation: 93

\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)

Upvotes: 6

Views: 14308

Answers (1)

Black Cat
Black Cat

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

Related Questions