您的位置:首页 > 大数据 > 人工智能

OpenCV Error: Assertion failed

2016-12-14 09:53 836 查看
OpenCV越界问题:
OpenCV Error: Assertion failed (0 <= roi.x && 0 <= roi.width && roi.x + roi.width <= m.cols &&
 0 <= roi.y && 0 <= roi.height && roi.y + roi.height <= m.rows) in cv::Mat::Mat(const cv::Mat&, const cv::Rect&),
 file C:/build/2_4_PackSlave-win32-vc11-shared/opencv/modules/core/src/matrix.cpp, line 323
出现问题的原因是:
图像的ROI区域超过了图像的尺寸,即 roi.x + roi.width > m.cols  && roi.y + roi.height > m.rows

                                            
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  opencv Assertion 越界