python opencv TypeError: Layout of the output array incompatible with cv::Mat

前端 未结 5 1117
温柔的废话
温柔的废话 2021-01-02 01:54

I\'m using the selective search here: http://koen.me/research/selectivesearch/ This gives possible regions of interest where an object might be. I want to do some processing

5条回答
  •  夕颜
    夕颜 (楼主)
    2021-01-02 02:20

    Another reason may be that the array is not contiguous. Making it contiguous would also solve the issue

    image = np.ascontiguousarray(image, dtype=np.uint8)

提交回复
热议问题