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)