zed_cpu_ros icon indicating copy to clipboard operation
zed_cpu_ros copied to clipboard

opencv 4.2 roi error in ubuntu 20

Open THARUN-V opened this issue 3 years ago • 1 comments

Hi , i am not able run this package in ubuntu 20 with openCV 4.2.0 when i launch , it fails with cv::Exception displaying some roi error. like 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 function Mat

THARUN-V avatar Feb 22 '22 14:02 THARUN-V

I have the same problem. I find it is caused by cv::Rect left_rect(0, 0,width_, height_); cv::Rect right_rect(width_ / 2, 0, width_ / 2, height_); in bool getImages() func of zed_cpu_ros.cpp. I changed them to cv::Rect left_rect(0, 0, raw.size().width/2, raw.size().height); cv::Rect right_rect(raw.size().width / 2, 0, raw.size().width / 2, raw.size().height); and it's now working well for me.

sgodowt avatar Feb 23 '22 10:02 sgodowt