error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'
时间: 2023-12-10 07:04:23 浏览: 228
opencv显示 rtion failed) size.width>0 && size.height>0 in function ‘cv::imshow’的解决方案vscode
This error occurs when the width of an image or video frame is reported as zero or negative. It is typically caused by passing an empty or invalid image or video frame to a function that requires a valid frame with positive dimensions.
To fix this error, you should check the input data and ensure that it is valid before passing it to any function that requires a valid frame or image. This may involve adding error handling code to your application to detect and handle invalid input data, or modifying your code to generate valid input data.
阅读全文