关于调用D455双目相机拍照报错

错误: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, file C:\build\master_winpack-build-win64-vc14\opencv\modules\core\src\matrix.cpp, line 528

在使用双目相机D455进行拍照时,代码报异常,错误如上,想问一下有没有人知道怎么修改,麻烦了