Skip to content

Commit 8aac9f7

Browse files
committed
Updated ColorCamera docs (wrt ISP, sensor scaling, etc)
1 parent 65f95bb commit 8aac9f7

File tree

2 files changed

+41
-8
lines changed

2 files changed

+41
-8
lines changed
-253 KB
Binary file not shown.

docs/source/components/nodes/color_camera.rst

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ It interacts with the 3A algorithms: **auto-focus**, **auto-exposure**, and **au
5757
adjustments such as exposure time, sensitivity (ISO), and lens position (if the camera module has a motorized lens) at runtime.
5858
Click `here <https://en.wikipedia.org/wiki/Image_processor>`__ for more information.
5959

60-
**Image Post-Processing** converts YUV420 planar frames from the **ISP** into :code:`video`/:code:`preview`/:code:`still` frames.
60+
**Image Post-Processing** converts YUV420 planar frames from the **ISP** into ``video``/ ``preview``/ ``still`` frames.
6161

6262
``still`` (when a capture is triggered) and ``isp`` work at the max camera resolution, while ``video`` and ``preview`` are
6363
limited to max 4K (3840 x 2160) resolution, which is cropped from ``isp``.
@@ -69,13 +69,46 @@ For IMX378 (12MP), the **post-processing** works like this:
6969
│ ISP ├────────────────►│ video ├───────────────►│ preview │
7070
└─────┘ max 3840x2160 └─────────┘ and cropping └──────────┘
7171
72-
.. image:: /_static/images/tutorials/isp.jpg
73-
74-
The image above is the ``isp`` output from the ColorCamera (12MP resolution from IMX378). If you aren't downscaling ISP,
75-
the ``video`` output is cropped to 4k (max 3840x2160 due to the limitation of the ``video`` output) as represented by
76-
the blue rectangle. The Yellow rectangle represents a cropped ``preview`` output when the preview size is set to a 1:1 aspect
77-
ratio (eg. when using a 300x300 preview size for the MobileNet-SSD NN model) because the ``preview`` output is derived from
78-
the ``video`` output.
72+
If resolution was set to 12MP, and we were to use ``video``, we'd get a 4K frame (3840x2160) cropped from the center of the 12MP frame.
73+
74+
Full FOV
75+
########
76+
77+
Some sensors (let's take IXM378 for an example) will, by default, have 1080P resolution set, which is a crop from the full sensor resolution.
78+
You can print sensor features to see how FOV is affected by the selected sensor resolution:
79+
80+
.. code-block:: python
81+
82+
import depthai as dai
83+
84+
with dai.Device() as device:
85+
for cam in dev.getConnectedCameraFeatures():
86+
print(cam)
87+
#continue # uncomment for less verbosity
88+
for cfg in cam.configs:
89+
print(" ", cfg)
90+
91+
```
92+
Running on OAK-D-S2 will print:
93+
94+
{socket: CAM_A, sensorName: IMX378, width: 4056, height: 3040, orientation: AUTO, supportedTypes: [COLOR], hasAutofocus: 1, hasAutofocusIC: 1, name: color}
95+
{width: 1920, height: 1080, minFps: 2.03, maxFps: 60, type: COLOR, fov: {x:108, y: 440, width: 3840, height: 2160}}
96+
{width: 3840, height: 2160, minFps: 1.42, maxFps: 42, type: COLOR, fov: {x:108, y: 440, width: 3840, height: 2160}}
97+
{width: 4056, height: 3040, minFps: 1.42, maxFps: 30, type: COLOR, fov: {x:0, y: 0, width: 4056, height: 3040}}
98+
{width: 1352, height: 1012, minFps: 1.25, maxFps: 52, type: COLOR, fov: {x:0, y: 0, width: 4056, height: 3036}}
99+
{width: 2024, height: 1520, minFps: 2.03, maxFps: 85, type: COLOR, fov: {x:4, y: 0, width: 4048, height: 3040}}
100+
{socket: CAM_B, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: left}
101+
{width: 1280, height: 720, minFps: 1.687, maxFps: 143.1, type: MONO, fov: {x:0, y: 40, width: 1280, height: 720}}
102+
{width: 1280, height: 800, minFps: 1.687, maxFps: 129.6, type: MONO, fov: {x:0, y: 0, width: 1280, height: 800}}
103+
{width: 640, height: 400, minFps: 1.687, maxFps: 255.7, type: MONO, fov: {x:0, y: 0, width: 1280, height: 800}}
104+
{socket: CAM_C, sensorName: OV9282, width: 1280, height: 800, orientation: AUTO, supportedTypes: [MONO], hasAutofocus: 0, hasAutofocusIC: 0, name: right}
105+
{width: 1280, height: 720, minFps: 1.687, maxFps: 143.1, type: MONO, fov: {x:0, y: 40, width: 1280, height: 720}}
106+
{width: 1280, height: 800, minFps: 1.687, maxFps: 129.6, type: MONO, fov: {x:0, y: 0, width: 1280, height: 800}}
107+
{width: 640, height: 400, minFps: 1.687, maxFps: 255.7, type: MONO, fov: {x:0, y: 0, width: 1280, height: 800}}
108+
```
109+
110+
So for IMX378, if we select 4K or 1080P resolution, FOV will be cropped ~5% horizontally and ~29% vertically. So we can either select ``THE_12_MP``,
111+
``THE_1352X1012``, or ``THE_2024X1520`` resolution to get the full sensor FOV.
79112

80113
Usage
81114
#####

0 commit comments

Comments
 (0)