7. USB Camera
7. 1 Testing USB Camera
-
Connect the USB camera and check if the device is detected by entering the command:
v4l2-ctl --list-deviceslinaro@linaro-alip:~$ v4l2-ctl --list-devicesrkisp-statistics (platform: rkisp):/dev/video7/dev/video8/dev/video16/dev/video17rkisp_mainpath (platform:rkisp-vir0):/dev/video0/dev/video1/dev/video2/dev/video3/dev/video4/dev/video5/dev/video6rkisp_mainpath (platform:rkisp-vir1):/dev/video9/dev/video10/dev/video11/dev/video12/dev/video13/dev/video14/dev/video15USB 2.0 Camera: USB Camera (usb-xhci-hcd.5.auto-1.2):/dev/video18/dev/video19- Here, /dev/video18 represents the camera driver.
-
Install the necessary libraries by entering the following command:
sudo apt install subversion -y -
Download mjpeg-stream to Core3566:
sudo git clone https://github.com/jacksonliam/mjpg-streamer.gitcd mjpg-streamer/mjpg-streamer-experimentalsudo make allsudo make install -
Open start.sh:
sudo nano start.shReplace ./mjpg_streamer -i "./input_uvc.so " -o "./output_http.so -w ./www"with:./mjpg_streamer -i "./input_uvc.so -d /dev/video18" -o "./output_http.so -w ./www" -
Run start.sh:
sudo chmod 777 start.shsudo ./start.sh -
Open Firefox browser and enter
http://<Core3566 IP address\>:8080, for example, if the IP address of Core3566 is 192.168.15.103:http://192.168.15.103:8080