Line 215: |
Line 215: |
| |} | | |} |
| Also, we provide tool software in order to convert these special data formats to standard formats: https://github.com/veyeimaging/pixel_layer_convert. | | Also, we provide tool software in order to convert these special data formats to standard formats: https://github.com/veyeimaging/pixel_layer_convert. |
| + | |
| + | We recommend using [https://www.offminor.de/ vooya] as the player. |
| | | |
| ===== Support for trigger mode ===== | | ===== Support for trigger mode ===== |
Line 249: |
Line 251: |
| In gstreamer, v4l2src can access different cameras by specifying device=/dev/videoX. | | In gstreamer, v4l2src can access different cameras by specifying device=/dev/videoX. |
| | | |
| + | === v4l2-ctl Application Examples === |
| + | |
| + | =====Install v4l2-utils===== |
| + | <code>sudo apt-get install v4l-utils</code> |
| + | =====Install yavta===== |
| + | <code>git clone <nowiki>git://git.ideasonboard.org/yavta.git</nowiki></code> |
| + | |
| + | <code>cd yavta;make</code> |
| + | =====Configure parameters using v4l2-ctl===== |
| + | ======List the data formats supported by the camera====== |
| + | <code>v4l2-ctl --list-formats-ext</code> |
| + | |
| + | The following is an example in the XAVIER system: |
| + | |
| + | <code>ioctl: VIDIOC_ENUM_FMT</code> |
| + | |
| + | <code> Index : 0</code> |
| + | |
| + | <code> Type : Video Capture</code> |
| + | |
| + | <code> Pixel Format: 'UYVY'</code> |
| + | |
| + | <code> Name : UYVY 4:2:2</code> |
| + | |
| + | <code> Size: Discrete 3088x2064</code> |
| + | |
| + | <code> Interval: Discrete 0.045s (22.000 fps)</code> |
| + | |
| + | <code> Index : 1</code> |
| + | |
| + | <code> Type : Video Capture</code> |
| + | |
| + | <code> Pixel Format: 'NV16'</code> |
| + | |
| + | <code> Name : Y/CbCr 4:2:2</code> |
| + | |
| + | <code> Size: Discrete 3088x2064</code> |
| + | |
| + | <code> Interval: Discrete 0.045s (22.000 fps)</code> |
| + | |
| + | <code> Index : 2</code> |
| + | |
| + | <code> Type : Video Capture</code> |
| + | |
| + | <code> Pixel Format: 'GREY'</code> |
| + | |
| + | <code> Name : 8-bit Greyscale</code> |
| + | |
| + | <code> Size: Discrete 3088x2064</code> |
| + | |
| + | <code> Interval: Discrete 0.045s (22.000 fps)</code> |
| + | |
| + | <code> Index : 3</code> |
| + | |
| + | <code> Type : Video Capture</code> |
| + | |
| + | <code> Pixel Format: 'XY10'</code> |
| + | |
| + | <code> Name : XAVIER 10-bit/16-bit Greyscale</code> |
| + | |
| + | <code> Size: Discrete 3088x2064</code> |
| + | |
| + | <code> Interval: Discrete 0.045s (22.000 fps)</code> |
| + | |
| + | <code> Index : 4</code> |
| + | |
| + | <code> Type : Video Capture</code> |
| + | |
| + | <code> Pixel Format: 'XY12'</code> |
| + | |
| + | <code> Name : XAVIER 12-bit/16-bit Greyscale</code> |
| + | |
| + | <code> Size: Discrete 3088x2064</code> |
| + | |
| + | <code>Interval: Discrete 0.045s (22.000 fps)</code> |
| + | |
| + | It should be noted that the UYVY and NV16 modes provided by the MV series cameras are for debugging purposes only and the maximum width cannot exceed 2880. |
| + | |
| + | ====== List the configurable parameters of the camera implemented in the driver ====== |
| + | <code>v4l2-ctl -L</code> |
| + | |
| + | <code>User Controls</code> |
| + | |
| + | <code> horizontal_flip 0x00980914 (bool) : default=0 value=0</code> |
| + | |
| + | <code> vertical_flip 0x00980915 (bool) : default=0 value=0</code> |
| + | |
| + | <code> trigger_mode 0x00981901 (int) : min=0 max=2 step=1 default=0 value=0 flags=volatile, execute-on-write</code> |
| + | |
| + | <code> trigger_src 0x00981902 (int) : min=0 max=1 step=1 default=1 value=1 flags=volatile, execute-on-write</code> |
| + | |
| + | <code> soft_trgone 0x00981903 (button) : flags=write-only, execute-on-write</code> |
| + | |
| + | <code> frame_rate 0x00981904 (int) : min=1 max=22 step=1 default=22 value=22 flags=volatile, execute-on-write</code> |
| + | |
| + | <code> roi_x 0x00981905 (int) : min=0 max=2712 step=8 default=0 value=0</code> |
| + | |
| + | <code> roi_y 0x00981906 (int) : min=0 max=1744 step=4 default=0 value=0</code> |
| + | |
| + | <code>Camera Controls</code> |
| + | |
| + | <code>low_latency_mode 0x009a206d (bool) : default=0 value=0</code> |
| + | |
| + | <code> preferred_stride 0x009a206e (int) : min=0 max=65535 step=1 default=0 value=0</code> |
| + | |
| + | <code> vi_time_out_disable 0x009a2078 (bool) : default=0 value=0</code> |
| + | |
| + | Parameters can be set and get using the following methods. |
| + | |
| + | <code>v4l2-ctl --set-ctrl [ctrl_type]=[val]</code> |
| + | |
| + | <code>v4l2-ctl --get-ctrl [ctrl_type]</code> |
| + | |
| + | All the above functions can be implemented using [http://wiki.veye.cc/index.php/Mv_mipi_i2c.sh_user_guide mv_mipi_i2c.sh]. |
| + | |
| + | None of the above parameters can be modified in the state when the image acquisition is started. |
| + | |
| + | Each of them is described below: |
| + | ======horizontal and <small>vertical</small> flip====== |
| + | |
| + | *horizontal flip |
| + | |
| + | <code>v4l2-ctl --set-ctrl horizontal_flip=1</code> |
| + | |
| + | *<small>vertical flip</small> |
| + | |
| + | <code>v4l2-ctl --set-ctrl <small>vertical_flip</small>=1</code> |
| + | ======Trigger Mode====== |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_mode=[0-2]</small></code> |
| + | |
| + | 0:Video streaming mode |
| + | |
| + | 1:Normal trigger mode. |
| + | |
| + | 2:High-speed continuous trigger mode. |
| + | ======Trigger Source====== |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_src=[0-1]</small></code> |
| + | |
| + | 0: Software trigger mode. |
| + | |
| + | 1: Hardware trigger mode. |
| + | ======Software trigger command====== |
| + | <code>v4l2-ctl --set-ctrl <small>soft_trgone=1</small></code> |
| + | ======Set frame rate====== |
| + | <code>v4l2-ctl --set-ctrl frame_rate=[1-max]</code> |
| + | |
| + | The maximum frame rate is automatically updated as the resolution changed. |
| + | |
| + | ======Set ROI and pixel format====== |
| + | For example, for MV-MIPI-IMX178M: |
| + | |
| + | <code>v4l2-ctl --set-ctrl roi_x=0</code> |
| + | |
| + | <code>v4l2-ctl --set-ctrl roi_y=0</code> |
| + | |
| + | <code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY</code> |
| + | |
| + | The maximum frame rate will be adjusted automatically after setting ROI. Please note that the camera roi parameters need to comply with the requirements in the camera manual. |
| + | |
| + | ====== preferred_stride ====== |
| <br /> | | <br /> |