Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

opencv 4.2 roi error in ubuntu 20 #31

Open
THARUN-V opened this issue Feb 22, 2022 · 1 comment
Open

opencv 4.2 roi error in ubuntu 20 #31

THARUN-V opened this issue Feb 22, 2022 · 1 comment

Comments

@THARUN-V
Copy link

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

@sgodowt
Copy link

sgodowt commented Feb 23, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants