mxochicale / tools

:octocat: :hammer_and_wrench: My Collection Of Scientific/Engineering Tools
Apache License 2.0
5 stars 2 forks source link

v4l2 (Color Spaces in Video) #32

Open mxochicale opened 9 months ago

mxochicale commented 9 months ago

Streamed video to your host computer is in the format RGBA32 for V4L2VideoCaptureOp in holoscan-sdk [1], meaning that video has four channels stored in 32 bits [2]. So, you might need to drop alpha channels to match the usual three channel input and this can be done definitng your destination data type e.g. "rgb888" or "rgba8888") [3]. Maybe you would to refresh your memory on color space, chroma subsampling, bit depth and more [4]

[1] https://github.com/nvidia-holoscan/holoscan-sdk/blob/main/python/holoscan/operators/v4l2_video_capture/pydoc.hpp
[2] https://en.wikipedia.org/wiki/RGBA_color_model [3] https://github.com/nvidia-holoscan/holoscan-sdk/blob/main/python/holoscan/operators/format_converter/pydoc.hpp
[4] https://video.matrox.com/en/media/guides-articles/introduction-color-spaces-video

extras