error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'什么意思
时间: 2023-12-10 15:03:56 浏览: 166
JAVA OpenCV Error: Assertion failed (!empty()) in cv::CascadeClassifier::detectMultiScale….
This error message is related to OpenCV and it usually occurs when an image or video frame with an invalid size (width or height is zero or negative) is passed as input to a function that expects a valid size. To fix this error, you need to check the dimensions of your image or video frames before passing them as input to any OpenCV function that requires a valid size. You can use the `shape` attribute of numpy arrays or the `size()` method of OpenCV `Mat` objects to check the dimensions of your input data. Also, make sure that your video capture device or file is properly initialized and that you are reading valid frames from it.
阅读全文