Skip to content

dai::RawImgFrame::Specs::bytesPP doesn't contain 3 for RGB888i and several other types #113

@diablodale

Description

@diablodale

the function dai::RawImgFrame::typeToBpp() returns unexpected values for common image types. Here are seven examples, they may be more...

type result expected
RGB888i 1 3
BGR888i 1 3
RGB888p 1 3
BGR888p 1 3
RGBA8888 1 4
YUV444p 1 3
YUV422p 1 2

Setup

  • depthai-shared v2.17.0 and continues to main

Repro

A quick hack...

  1. Write app that will capture the 1920x1080 NV12 color frame from the sensor
  2. color_frame->setType(dai::ImgFrame::Type::RGB888i);
  3. Inspect the frame's bytesPP

Result

bytesPP = 1

Expected

bytesPP = 3 because RGB888i uses 3 bytes per pixel to represent the color

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions