Open main menu

Wiki-Orange Pi β

Changes

Orange Pi CM4

319 bytes added, 17:24, 18 September 2023
USB camera test
<p>[[File:cm4-img16.png]]</p></li>
<li><p>Through the v4l2-ctl command, you can see that the device node information of the USB camera is /dev/video0</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''v4l2-ctl --list-devices'''</p>
<p>Q8 HD Webcam: Q8 HD Webcam ('''<span style="color:#FF0000">usb</span>'''-fc880000.usb-1):</p>::<p>'''/dev/video0'''</p>::<p>/dev/video1</p>::<p>/dev/media0</p>|}{| class="wikitable" style="background-color:#ffffdc;width:800px;" |-| <big><p>'''Note that l in v4l2 is a lowercase letter l, not the number 1'''</p><p>'''In addition, the serial number of the video is not necessarily video0, please refer to what you actually see.'''</p></big>|}</li>
<li><p>In the desktop system, you can use Cheese to directly open the USB camera. The method of opening Cheese is as shown in the figure below:</p>
<p>[[File:cm4-img244.png]]</p>
<ol style="list-style-type: lower-alpha;">
<li><p>Install fswebcam</p>
{| class="wikitable" style="width:800px;"
|-
|
<p>orangepi@orangepi:~$ '''sudo''' '''apt update'''</p>
<p>orangepi@orangepi:~$ '''sudo apt-get install -y fswebcam'''</p>|}</li><li><p>After installing fswebcam, you can use the following command to &gt; take pictures</p><ol style="list-style-type: lower-alphanone;"><li><p>a) -d option is used to specify the device node of the USB &gt; camera</p></li><li><p>b) --no-banner Used to remove watermarks from photos</p></li><li><p>c) -r option to specify the resolution of the photo</p></li><li><p>d) -S Option to set the number of previous frames to skip</p></li><li><p>e) ./image.jpg Used to set the name and path of the generated &gt; photo</p>{| class="wikitable" style="width:800px;" |-|
<p>orangepi@orangepi:~$ '''sudo''' '''fswebcam -d /dev/video0 \'''</p>
<p>'''--no-banner -r 1280x720 -S 5 ./image.jpg'''</p>|}</li></ol></li><li><p>In the server version of the Linux system, you can use the scp command to transfer the taken pictures to the Ubuntu PC for mirror viewing after taking pictures</p>{| class="wikitable" style="width:800px;" |-| <p>orangepi@orangepi:~$ '''scp image.jpg [mailto:[email protected]:/home/test [email protected]:/home/test] (Modify the IP address and path according to the actual situation)'''</p>|}
</li>
<li><p>In the server version of the Linux system, you can use the scp &gt; command to transfer the taken pictures to the Ubuntu PC for &gt; mirror viewing after taking pictures</p><p>orangepi@orangepi:~$ '''scp image.jpg [mailto:[email protected]:/home/test [email protected]:/home/test] (Modify the IP address and path according to the actual situation)'''</p></li><li><p>In the desktop version of the Linux system, you can directly &gt; view the captured pictures through the HDMI display</p></li></ol>
</li></ol>