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...
- Write app that will capture the 1920x1080 NV12 color frame from the sensor
color_frame->setType(dai::ImgFrame::Type::RGB888i);
- Inspect the frame's
bytesPP
Result
bytesPP = 1
Expected
bytesPP = 3 because RGB888i uses 3 bytes per pixel to represent the color