Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror

OpenCV Error: Unknown error code -10 (Raw image encoder error: Empty JPEG image (DNL not supported)) in throwOnEror, file /home/program/opencv-3.2.0/modules/imgcodecs/src/grfmt_base.cpp, line 139
terminate called after throwing an instance of 'cv::Exception'
  what():  /home/program/opencv-3.2.0/modules/imgcodecs/src/grfmt_base.cpp:139: error: (-10) Raw image encoder error: Empty JPEG image (DNL not supported) in function throwOnEror

cv::Mat img = cv::imread("background0.jpg");
 
获取图像后未能判断是Mat否为空,导致传递给后面处理的数据为null导致、。
posted @ 2019-12-03 11:19  hbg-rohens  阅读(1686)  评论(0编辑  收藏  举报