OpenCV 和 numpy 对待 width height 不一致

这种考虑不全面的话,会导致 长、宽的值的大小出现颠倒
在用来处理特别是长宽不等的情况时特别注意

https://stackoverflow.com/questions/21248245/opencv-image-resize-flips-dimensions

  • cv2.anything() ---> (width, height)
  • image.anything() ---> (height, width)
  • numpy.anything() ---> (height, width)

anything()代表一个任意的function

你可能感兴趣的:(OpenCV 和 numpy 对待 width height 不一致)