ros-perception/vision_opencv

[cv_bridge] Is it correct check for color format?

standmit opened this issue · 2 comments

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 commented

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.