Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


products:sbc:common:add-ons:os08a10-mipi-camera

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
products:sbc:common:add-ons:os08a10-mipi-camera [2022/07/08 03:26]
hyphop [Control IR-Cut via V4L2]
products:sbc:common:add-ons:os08a10-mipi-camera [2023/12/29 05:30] (current)
nick
Line 1: Line 1:
-====== MIPI Camera ======+====== OS08A10 MIPI Camera ======
  
 ===== Introduction ===== ===== Introduction =====
  
-This document mainly introduces MIPI Camera. The first part of the document describes how to connect. The second part introduces how to use it under Ubuntu. The third part introduces how to use it under Android.+This document mainly introduces [[https://www.khadas.com/product-page/os08a10-8mp-camera | OS08A10 MIPI Camera]]. The first part of the document describes how to connect. The second part introduces how to use it under Ubuntu. The third part introduces how to use it under Android.
  
 ===== Hardware Connection ===== ===== Hardware Connection =====
Line 13: Line 13:
 {{/products/sbc/common/accessories/docs-vim3-camera-os8a10.png?600|docs-vim3-camera-os8a10}} {{/products/sbc/common/accessories/docs-vim3-camera-os8a10.png?600|docs-vim3-camera-os8a10}}
  
-===== Gucview =====+ 
 +===== For 5.15 kernel ===== 
 + 
 +Please check  
 + 
 +===== For 4.9 kernel ===== 
 + 
 +==== Guvcview ====
  
 The desktop version has ''Guvcview'' pre-installed, find and open this application in the application list. The desktop version has ''Guvcview'' pre-installed, find and open this application in the application list.
Line 29: Line 36:
 After the setting is successful, you can use the camera normally. After the setting is successful, you can use the camera normally.
  
-===== Command Line =====+==== Command Line ====
  
-==== Control IR-Cut via V4L2 ====+=== Control IR-Cut via V4L2 ===
  
 The test needs to be conducted in the framebuffer mode, and switch to the framebuffer mode through the keyboard combination of ''Ctrl''+''Alt''+''F1''. The test needs to be conducted in the framebuffer mode, and switch to the framebuffer mode through the keyboard combination of ''Ctrl''+''Alt''+''F1''.
  
-  * Disable status: ''+== Disable status ==  
 + 
 +```shell
 $ v4l2_test  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -N 1000 -n 800 -w 0 -e 1 -I 0 -b /dev/fb0 -v /dev/video0 $ v4l2_test  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -N 1000 -n 800 -w 0 -e 1 -I 0 -b /dev/fb0 -v /dev/video0
-'' +``` 
-  Enable status: ''+ 
 +== Enable status == 
 + 
 +```shell
 $ v4l2_test  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -N 1000 -n 800 -w 0 -e 1 -I 1 -b /dev/fb0 -v /dev/video0 $ v4l2_test  -c 1 -p 0 -F 0 -f 0 -D 0 -R 1 -r 2 -d 2 -N 1000 -n 800 -w 0 -e 1 -I 1 -b /dev/fb0 -v /dev/video0
-''+```
  
-==== Record Video via Gstreamer ====+=== Record Video via Gstreamer ===
  
-```sh+```shell
 $ gst-launch-1.0 v4l2src name=vsrc device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=60/1,format=RGB ! filesink location=.//test.rgb $ gst-launch-1.0 v4l2src name=vsrc device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=60/1,format=RGB ! filesink location=.//test.rgb
 ``` ```
Line 50: Line 62:
 The recorded video is saved in ''test.rgb''. The recorded video is saved in ''test.rgb''.
  
-===== Demo Source Code =====+==== Demo Source Code ====
  
 In addition to this, you can also test the camera via program. In addition to this, you can also test the camera via program.
  
-==== Python ====+=== Install Dependencies ==
 + 
 + 
 +```shell 
 +sudo apt install libopencv-dev python3-opencv 
 +``` 
 + 
 +=== Python ===
  
 ```python mipi-camera.py ```python mipi-camera.py
Line 133: Line 152:
 ``` ```
  
-Compile:+== Compile == 
  
-```sh+```shell
 $ gcc -o mipi mipi.cpp -lopencv_imgproc -lopencv_core -lopencv_videoio -lopencv_imgcodecs -lopencv_highgui -std=c++11 -std=gnu++11 -Wall -std=c++11 -lstdc++ -I/usr/include/opencv4 $ gcc -o mipi mipi.cpp -lopencv_imgproc -lopencv_core -lopencv_videoio -lopencv_imgcodecs -lopencv_highgui -std=c++11 -std=gnu++11 -Wall -std=c++11 -lstdc++ -I/usr/include/opencv4
 ``` ```
  
-Run format:+== Run ==
  
-```sh +```shell 
-$ ./test /dev/videoX+$ ./mipi /dev/videoX
 ``` ```
  
 ===== See Also ===== ===== See Also =====
  
-  * [[https://www.khadas.com/product-page/os08a10-8mp-camera|khadas.com/shop/product-page/os08a10-8mp-camera]] +  * [[pp>os08a10-8mp-camera|Buy OS08A10 8MP Camera]] 
-  * [[https://dl.khadas.com/Hardware/Accessories/OS08A10/OS08A10_V11_Specification.pdf|Schematic]] +  * [[dl>products/add-ons/os08a10/|OS08A10 Hardware Documentations]] 
-  * [[https://dl.khadas.com/Hardware/Accessories/OS08A10/OS08A10-H92A_Specification_Version-2-11_SE.pdf|Datasheet]]+
  
Last modified: 2022/07/08 03:26 by hyphop