본문 바로가기

CS/Error

cv2.error: OpenCV(4.5.5) /io/opencv/modules/core/src/copy.cpp:1026: error: (-215:Assertion failed) top >= 0 && bottom >= 0 && left >= 0 && right >= 0 && _src.dims() <= 2 in function 'copyMakeBorder'

cv2.error: OpenCV(4.5.5) /io/opencv/modules/core/src/copy.cpp:1026: error: (-215:Assertion failed) 

 


 

"error: (-215)" means that an assertion failed. In this case, cv::imshow asserts that the given image is non-empty:

 

Check to make sure that the file actually exists at the specified path. If it does, it might be that the image is corrupted, or is an empty image.

 

 

 

This error shows when either,

  1. path of the image is wrong.
  2. name of the image is wrong.

 

지정한 이미지 경로, 이미지 이름 확인해주기!!

 

 

 

 

https://stackoverflow.com/questions/43572387/error-215-size-width0-size-height0-occurred-when-attempting-to-display-a

 

Error (-215) size.width>0 && size.height>0 occurred when attempting to display an image using OpenCV

I am trying to run a simple program that reads an image from OpenCV. However, I am getting this error: error: ......\modules\highgui\src\window.cpp:281: error: (-215) size.width>0 && size.

stackoverflow.com

 

 


 

 

 

top >= 0 && bottom >= 0 && left >= 0 && right >= 0 && _src.dims() <= 2 in function 'copyMakeBorder'

 


  1. The cv2.copyMakeBorder happen error because there are negative number in the top, bottom, left, right.

 

top, bottom, left, right 에 음수 들어갔는지 확인해주기!!

 

 

 

 

https://github.com/ultralytics/yolov3/issues/983

 

Problem in test loader when training the model. · Issue #983 · ultralytics/yolov3

🐛 Bug A clear and concise description of what the bug is. I use the simple coco data to learn how to training the custom data. In the train part is work and no problem. After the first epoch, I get...

github.com

 

 

 

 

 


Tiny Star