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

ROSCvMatContainer assumes encoding string for cv::Mat type CV_8UC3 #504

Closed
Yadunund opened this issue Feb 1, 2023 · 0 comments · Fixed by #505
Closed

ROSCvMatContainer assumes encoding string for cv::Mat type CV_8UC3 #504

Yadunund opened this issue Feb 1, 2023 · 0 comments · Fixed by #505

Comments

@Yadunund
Copy link
Contributor

Yadunund commented Feb 1, 2023

The implementation of convert_to_ros_message sets the encoding string to bgr8 if the cv::Mat is of type CV_8UC3. But in reality the same type, ie 8bit 3 channel, could also be used for rgb8 encodings.

This is acknowledged in encoding2mat_type(..) where both bgr8 and rgb8 return type CV_8UC3.

When implementing camera drivers using this type adapter, the choice of encoding should be left to the user. The auto-inference of the encoding based on cv::Mat type is useful but having an override in the ROSCvMatContainer API would be ideal.

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

Successfully merging a pull request may close this issue.

1 participant