holoscan-sdk
holoscan-sdk copied to clipboard
bayer_demosaic operator incorrectly expects RGB/RGBA input image
In holoscan SDK 2.1.0, code was added in to ensure the input image has rank 3:
auto in_rank = in_tensor_gxf.rank();
if (in_rank != 3) {
throw std::runtime_error(
fmt::format("Input tensor has {} dimensions. Expected a tensor with 3 dimensions "
"(corresponding to an RGB or RGBA image).",
in_rank));
}
But this makes no sense. The input to a demosaic operator is a single-channel bayer image (rank 2).
Consequently, this check breaks the entirety of Holoscan Sensor Bridge, which relies on the demosaic operator in every example.