You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`sensor`|`string` in format `width:height`| desired raw sensor format resolution [default: auto]|
126
127
127
128
128
129
The configuration is done in the following order:
129
130
1. select camera via `camera`
130
131
2. configure camera stream via `role`
131
132
3. set the pixel format for the stream via `format`
132
133
4. set the image resolution for the stream via `width` and `height`
134
+
5. set the sensor mode resolution for the raw feed from camera to GPU
133
135
134
136
Each stream role only supports a discrete set of data stream configurations as a combination of the image resolution and pixel format. The selected stream configuration is validated at the end of this sequence and adjusted to the closest valid stream configuration.
135
137
136
138
By default, the node will select the first available camera and configures it with the default pixel format and image resolution. If a parameter has not been set, the node will print the available options and inform the user about the default choice.
137
139
138
140
The node avoids memory copies of the image data by directly mapping from a camera pixel format to a ROS image format, with the exception of converting between "raw" and "compressed" image formats when requested by the user. As an effect, not all pixel formats that are supported by the camera may be supported by the ROS image message. Hence, the options for `format` are limited to pixel formats that are supported by the camera and the raw ROS image message.
139
141
142
+
#### Sensor Modes and Cropping
143
+
144
+
Some camera modules (e.g. Raspberry Pi Camera Modules) provides different sensor modes, some of which have a limited field-of-view, e.g. by allowing for the selection of a 3:2 image from a 16:9 sensor, a more native 'zoom' function etc. Unless we specify the sensor mode we want to use libcamera will automatically select one, and it is not guaranteed that this will be a full sensor mode, leading to cropping (which provides a zooming effect) of the picture.
145
+
146
+
As an example: Picking the commonly used 640x480 resolution with the Raspberry Pi Camera Module v2 gives a zooming effect of ~2.5x, greatly reducing the FoV. With the v1 Module there is no such zooming effect as the v1 camera only offers full FoV modes in the 4:3 aspect ratio.
147
+
148
+
With the Camera Module v2 it is suggested to use a sensor resolution of 1640x1232 when one needs lower resolution 4:3 images (e.g. 640x480, 480x320 etc.), and 1640x922 for lower resolution 16:9 images.
149
+
150
+
See the [PiCamera Documentation](https://picamera.readthedocs.io/en/release-1.13/fov.html#sensor-modes) for a visualization of the issue, and [section 4.2.2.3 in the PiCamera2 Documentation](https://datasheets.raspberrypi.com/camera/picamera2-manual.pdf) for further explanations.
151
+
140
152
### Dynamic Frame Configuration (controls)
141
153
142
154
The dynamic parameters are created at runtime by inspecting the [controls](https://libcamera.org/api-html/namespacelibcamera_1_1controls.html) that are exposed by the camera. The set of exposed controls is camera-dependent. The ROS parameters are directly formatted from the exposed controls, hence the parameter names match the control names.
0 commit comments