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

[cv_bridge] Is it correct check for color format? #431

Open
standmit opened this issue Apr 1, 2022 · 2 comments
Open

[cv_bridge] Is it correct check for color format? #431

standmit opened this issue Apr 1, 2022 · 2 comments

Comments

@standmit
Copy link

standmit commented Apr 1, 2022

bool is_src_color_format = enc::isColor(src_encoding) || enc::isMono(src_encoding) ||
enc::isBayer(src_encoding) || (src_encoding == enc::YUV422);
bool is_dst_color_format = enc::isColor(dst_encoding) || enc::isMono(dst_encoding) ||
enc::isBayer(dst_encoding) || (dst_encoding == enc::YUV422);

There are both checks for color format and mono format in the same place. Is it a bug?

@ijnek
Copy link
Member

ijnek commented Sep 12, 2022

I belive what its doing here, is it's checking whether the source and destination encoding is a valid ("known") encoding type, rather than checking whether the source and destination is a "color" (ie. not grey) format. So I don't think it's a bug.

@galou
Copy link

galou commented May 6, 2024

I also stumbled upon this. @ijnek Are you sure about this?

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

3 participants