binarization operation opencv opencv error: (-209)

error: (-209) The operation is neither 'array op array' (where arrays have the same size and type),
              nor 'array op scalar', nor 'scalar op array' in function cv::binary_op

Solution: input data into np.uint8 type, such as

img = img.astype(np.uint8)

 

Published 38 original articles · 98 won praise · views 360 000 +

Guess you like

Origin blog.csdn.net/xijuezhu8128/article/details/88555424