How to get video bit depth

I have the following code:
videofile = "motion-detection.mpg";
v_object = VideoReader(videofile);
vframe_1 = read(v_object, vframe_index);
vframe_2 = read(v_object, vframe_index+1);
And I was thinking of using BitsPerPixel (v_object.BitsPerPixel), but then I'm stuck. How do I get the bit depth using the BitsPerPixel-command?

1 件のコメント

Kshitij Chhabra
Kshitij Chhabra 2022 年 1 月 13 日
Bit depth of a pixel is defined as the number of bits required to represent each color of the pixel, hence, the BitsPerPixel property should give you the bit depth directly.

サインインしてコメントする。

回答 (0 件)

質問済み:

2021 年 11 月 30 日

コメント済み:

2022 年 1 月 13 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by