holoscan-sdk icon indicating copy to clipboard operation
holoscan-sdk copied to clipboard

bayer_demosaic operator incorrectly expects RGB/RGBA input image

Open jaydcarlson opened this issue 7 months ago • 2 comments

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.

jaydcarlson avatar Jul 25 '24 16:07 jaydcarlson