解决-215:Assertion failed ) !_src.empty() in function 'cv::cvtColor'(java opencv)

Exception in thread "main" CvException [org.opencv.core.CvException: cv::Exception: OpenCV(4.5.4) C:\build\mas
ter_winpack-bindings-win64-vc14-static\opencv\modules\imgproc\src\color.cpp:182: error: (-215:Assertion failed
) !_src.empty() in function 'cv::cvtColor'
]
    at org.opencv.imgproc.Imgproc.cvtColor_1(Native Method)
    at org.opencv.imgproc.Imgproc.cvtColor(Imgproc.java:7021)
    at reyo.sdk.utils.img.Test.compareHist_2(Test.java:75)
    at reyo.sdk.utils.img.Test.main(Test.java:38)

出现这个问题,一般是路径上面的错误,仔细查看自己输入的图片路径是否正确

posted @ 2021-10-21 18:35  锐洋智能  阅读(1598)  评论(0编辑  收藏  举报