Line 237: |
Line 237: |
| <code>v4l2-ctl --set-selection=target=crop,top=0,left=0,width=3088,height=2064</code> | | <code>v4l2-ctl --set-selection=target=crop,top=0,left=0,width=3088,height=2064</code> |
| | | |
| + | ===== Frame rate statistics ===== |
| In streaming mode, the following commands can be used for frame rate statistics. | | In streaming mode, the following commands can be used for frame rate statistics. |
| | | |
Line 248: |
Line 249: |
| <code>./yavta -c1 -Fy8-3104x2064.yuv --skip 0 -f Y8 -s 3088x2064 /dev/video0</code> | | <code>./yavta -c1 -Fy8-3104x2064.yuv --skip 0 -f Y8 -s 3088x2064 /dev/video0</code> |
| | | |
− | PS.This y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe]. | + | PS. This y8 file can be used with this player: [https://yuv-player-deluxe.software.informer.com/2.6/ YUV Displayer Deluxe]. |
| | | |
| Since the memory requested by Raspberry Pi for the image, the width is 32-align and the height is 16-align, the 3088*2064 image will be saved as 3104*2064 size. | | Since the memory requested by Raspberry Pi for the image, the width is 32-align and the height is 16-align, the 3088*2064 image will be saved as 3104*2064 size. |
| | | |
| + | ==== Trigger mode ==== |
| | | |
| + | ===== Set ROI ===== |
| + | Take MV-MIPI-IMX178M, 3088*2064 as an example. |
| | | |
| + | <code>v4l2-ctl --set-selection=target=crop,top=0,left=0,width=3088,height=2064</code> |
| + | |
| + | ===== Software trigger mode ===== |
| + | |
| + | ====== Set mode ====== |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_mode=1</small></code> |
| + | |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_src=0</small></code> |
| + | |
| + | ====== Start acquisition ====== |
| + | <code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-3104x2064.yuv</code> |
| + | |
| + | ====== Perform soft trigger operation ====== |
| + | In other shell terminals, you can execute the following command multiple times for multiple triggers. |
| + | |
| + | <code>v4l2-ctl --set-ctrl <small>soft_trgone=1</small></code> |
| + | |
| + | Notes: The first image triggered in this way cannot be output and saved. ''I haven't found out why.'' |
| + | |
| + | ===== Hardware trigger mode ===== |
| + | The following is an example of using Raspberry Pi GPIO21 as an trigger source with rising edge trigger. |
| + | |
| + | You can use the [[Mv mipi i2c.sh user guide|mv_mipi_i2c.sh]] script for other trigger parameter setting. |
| + | |
| + | ====== Hardware Connection ====== |
| + | (TODO picture) |
| + | |
| + | ====== Set mode ====== |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_mode=1</small></code> |
| + | |
| + | <code>v4l2-ctl --set-ctrl <small>trigger_src=1</small></code> |
| + | |
| + | ====== Start acquisition ====== |
| + | <code>v4l2-ctl --set-fmt-video=width=3088,height=2064,pixelformat=GREY --stream-mmap --stream-count=5 --stream-to=y8-3104x2064.yuv</code> |
| + | |
| + | ====== Perform hardware trigger operation ====== |
| + | <code>python gpio_trigger.py</code> |
| + | |
| + | Note: script [https://github.com/veyeimaging/mvcam_raspberrypi/tree/main/mv_tools_rpi link]. |
| + | <br /> |
| <br /> | | <br /> |