Open main menu

Wiki-Orange Pi β

Changes

Orange Pi 5 Plus

345 bytes added, 17:23, 6 June 2023
USB camera test
<li><p>First, you need to prepare a USB camera that supports the UVC protocol as shown in the figure below or similar, and then insert the USB camera into the USB port of the Orange Pi development board</p>
<p>[[File:media/image18.png|277x160px]]</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 the 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, Cheese can be used to directly open the USB camera. The method of opening Cheese is shown in the figure below:</p>
<p>[[File:media/image292.png|474x302px]]</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-alpha;">
<li><p>-S option is used to set the number of previous frames to &gt; skip</p></li>
<li><p>./image.jpg is used to set the name and path of the &gt; generated 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 &gt; command to transfer the taken pictures to the Ubuntu PC for &gt; image 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 desktop version of the linux system, you can directly &gt; view the captured pictures through the HDMI display d. In the &gt; desktop version of the linux system, you can directly view the &gt; captured pictures through the HDMI display</p></li></ol>
</li></ol>