问题原因:

You are probably working outside of the image dimensions. Does any of the values you pass to the cvSetImageROI function lay outside the image boudaries?

图像的ROI区域超过了图像的尺寸,即roi.x + roi.width > m.cols && roi.y + roi.height > m.rows

解决办法:

判断截取的ROI尺寸是否在图像内

error: 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的更多相关文章

  1. [error]OpenCV Error: Assertion failed (ssize.width > 0 && ssize.height > 0) in resize, file modules/imgproc/src/resize.cpp, line 3289

    error OpenCV Error: Assertion failed (ssize.width > && ssize.height > ) terminate call ...

  2. error: (-215:Assertion failed) size.width>0 && size.height>0 in function 'cv::imshow'

    用Python打开图像始终提示错误 error: OpenCV(4.1.1) C:\projects\opencv-python\opencv\modules\highgui\src\window.c ...

  3. line 352 Error: Assertion failed (size.width>0 && size.height>0) in cv::imshow

    OpenCV 使用 createtrackerbar()报错问题 Error Error: Assertion failed (size.width>0 && size.heig ...

  4. OpenCV Error: Assertion failed (src.size == dst.size && src.channels() == dst.channels()) in cvConvertScale

    发现问题:在做kinect采集的深度图去噪的时候遇到了cvConvertScale格式转换的问题. OpenCV Error: Assertion failed (src.size == dst.si ...

  5. 报错:OpenCV Error: Assertion failed (src.size() == dst.size() && src.type() == dst.ty pe()) in unknown function, file ..……

    在用cvDilate函数的时候,老是导致程序中断,报错如下: OpenCV Error: Assertion failed (src.size() == dst.size() && s ...

  6. Solve Error Debug Assertion Failed Expression vector iterators incompatible Using PCL in Release Mode of VS2010

    When using PCL 1.4.0 in the release mode building under VS2010, we might sometime get the error &quo ...

  7. (C++) Assertion failed: !"Bad error code", file VMem.c, line 715

    (C++) Assertion failed: !"Bad error code", file VMem.c, line 715 Misc error. myInterface F ...

  8. Failed to register: Error: fabric-ca request register failed with errors [[{"code":0,"message":"No identity type provided. Please provide identity type"}]]解决方案

    I try to run sample application as stated here : http://hyperledger-fabric.readthedocs.io/en/release ...

  9. android webview 报 [ERROR:in_process_view_renderer.cc(189)] Failed to request GL process. Deadlock likely: 0 问题

    工作中遇到 使用webview中加载含有audio标签的页面时提示[ERROR:in_process_view_renderer.cc(189)] Failed to request GL proce ...

随机推荐

  1. 移动端Web Meta标签

    原文  http://blog.segmentfault.com/jianjian_532633/1190000000654839 添加到推刊   在介绍移动端特有 meta 标签之前,先简单说一下 ...

  2. sublime text2 注册码

    近终于找到  sublime Text2 升级到 2.0.2 build 2221 64位 的破破解 输入注册码就成了 ----- BEGIN LICENSE ----- Andrew Weber S ...

  3. 原 java调整数据顺序是奇数位于偶数的前面(思路与实现)

    题目描述 输入一个整数数组,实现一个函数来调整该数组中数字的顺序,使得所有的奇数位于数组的前半部分,所有的偶数位于位于数组的后半部分,并保证奇数和奇数,偶数和偶数之间的相对位置不变. 思路一: 首先这 ...

  4. Jquery插件网站持续添加。。。

    Look Fro Less,Do More www.jq22.com

  5. linux_kernel_uaf漏洞利用实战

    前言 好像是国赛的一道题.一个 linux 的内核题目.漏洞比较简单,可以作为入门. 题目链接: 在这里 正文 题目给了3个文件 分配是 根文件系统 , 内核镜像, 启动脚本.解压运行 boot.sh ...

  6. 观察者设计模式( Observable类Observer接口)

    如果要想实现观察者模式,则必须依靠Java.util包中提供的Observable类和Observer接口. class House extends Observable{ // 表示房子可以被观察  ...

  7. request对象方法

    1.html <html> <head> <meta http-equiv="Content-Type" content="text/htm ...

  8. Pig sample用法举例

    some = sample data 0.1   遍历整个数据集,获取指定比例的行数的数据,获取的数据不确定,条数也不准确.   内部重写为filter data by random() <= ...

  9. ReactJS表单handleChange

    handleInputChange = (event) => { const target = event.target; const type = target.type; const val ...

  10. 1 Java程序文件中函数起始行和终止行在程序文件位置中的判定__抽象语法树方法

    应用需求: 实现对BigCloneBench中函数体的克隆检测,必须标注出起始行号和终止行号. 问题: 给定一个Java文件,从中提取出每个函数的起始行和终止行. 难点: 这个问题的难点在于,对于Ja ...