OpenCV resize fails on large image with “error: (-215) ssize.area() > 0 in function cv::resize”

后端 未结 13 2226
醉酒成梦
醉酒成梦 2021-01-01 10:08

I\'m using OpenCV 3.0.0 and Python 3.4.3 to process a very large RGB image (107162,79553,3). While I\'m trying to resize it using the following code:

import         


        
13条回答
  •  余生分开走
    2021-01-01 10:19

    I am having OpenCV version 3.4.3 on MacOS. I was getting the same error as above.

    I changed my code from

    frame = cv2.resize(frame, (0,0), fx=0.5, fy=0.5)   
    

    to

    frame = cv2.resize(frame, None, fx=0.5, fy=0.5)    
    

    Now its working fine for me.

提交回复
热议问题