Layout of the output array image is incompatible with cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)

解决办法:

1. copy of original array   

    image=image.copy()

 

2.数组可能不连续,那就使他连续:

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

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2021-05-01
  • 2021-10-01
  • 2021-07-08
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-12-29
  • 2022-12-23
  • 2021-08-10
  • 2022-12-23
  • 2021-09-14
相关资源
相似解决方案