Difference between revisions of "Rockpi4/hardware/camera/"
(2 intermediate revisions by 2 users not shown) | |||
Line 4: | Line 4: | ||
[[rockpi4 | ROCK Pi 4]] > [[rockpi4/hardware | Hardware]] > [[Rockpi4/hardware/camera/ | Camera module]] | [[rockpi4 | ROCK Pi 4]] > [[rockpi4/hardware | Hardware]] > [[Rockpi4/hardware/camera/ | Camera module]] | ||
− | ==MIPI CSI Camera== | + | === MIPI CSI Camera === |
ROCK Pi 4 supports [https://www.raspberrypi.org/products/camera-module-v2/ The Raspberry Pi Camera Module v2] now. And Raspberry pi official camera module v1-OV5647 is in testing. | ROCK Pi 4 supports [https://www.raspberrypi.org/products/camera-module-v2/ The Raspberry Pi Camera Module v2] now. And Raspberry pi official camera module v1-OV5647 is in testing. | ||
Line 11: | Line 11: | ||
You must connect the display on ROCK Pi 4 before testing the camera module. | You must connect the display on ROCK Pi 4 before testing the camera module. | ||
− | |||
− | ==USB Camera== | + | <pre> |
+ | #!/bin/bash | ||
+ | #export GST_DEBUG=*:5 | ||
+ | export DISPLAY=:0.0 | ||
+ | export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/gstreamer-1.0 | ||
+ | #export GST_DEBUG=ispsrc:5 | ||
+ | #export GST_DEBUG_FILE=/tmp/2.txt | ||
+ | echo "Start RKISP Camera Preview!" | ||
+ | gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! xvimagesink | ||
+ | </pre> | ||
+ | |||
+ | === USB Camera === | ||
+ | Update kernel to version 4.4.154-115-rockchip or newer. | ||
+ | |||
+ | root@rockpi4:~# apt install linux-4.4-rock-pi-4-latest | ||
+ | |||
+ | Install tool fswebcam | ||
+ | |||
+ | root@rockpi4:~# apt-get install -y fswebcam | ||
+ | |||
+ | Plug USB camera in, there shall be video devices. | ||
+ | |||
+ | root@rockpi4:~# ls /dev/video* | ||
+ | /dev/video4 /dev/video5 | ||
+ | |||
+ | Capture image | ||
+ | |||
+ | fswebcam -d /dev/video4 ./test.png | ||
+ | |||
+ | === Troubleshooting === | ||
+ | |||
+ | * Post your issue on the forum: https://forum.radxa.com/c/rockpi4 |
Latest revision as of 02:14, 2 March 2023
ROCK Pi 4 > Hardware > Camera module
MIPI CSI Camera
ROCK Pi 4 supports The Raspberry Pi Camera Module v2 now. And Raspberry pi official camera module v1-OV5647 is in testing.
Test:
You must connect the display on ROCK Pi 4 before testing the camera module.
#!/bin/bash #export GST_DEBUG=*:5 export DISPLAY=:0.0 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib/aarch64-linux-gnu/gstreamer-1.0 #export GST_DEBUG=ispsrc:5 #export GST_DEBUG_FILE=/tmp/2.txt echo "Start RKISP Camera Preview!" gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,format=NV12,width=1920,height=1080, framerate=30/1 ! xvimagesink
USB Camera
Update kernel to version 4.4.154-115-rockchip or newer.
root@rockpi4:~# apt install linux-4.4-rock-pi-4-latest
Install tool fswebcam
root@rockpi4:~# apt-get install -y fswebcam
Plug USB camera in, there shall be video devices.
root@rockpi4:~# ls /dev/video* /dev/video4 /dev/video5
Capture image
fswebcam -d /dev/video4 ./test.png
Troubleshooting
- Post your issue on the forum: https://forum.radxa.com/c/rockpi4