This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
products:sbc:common:add-ons:os08a10-mipi-camera [2022/07/08 03:25] 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 ====== | + | ====== |
===== 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 |
===== Hardware Connection ===== | ===== Hardware Connection ===== | ||
Line 13: | Line 13: | ||
{{/ | {{/ | ||
- | ===== Gucview | + | |
+ | ===== For 5.15 kernel | ||
+ | |||
+ | Please check | ||
+ | |||
+ | ===== For 4.9 kernel ===== | ||
+ | |||
+ | ==== Guvcview | ||
The desktop version has '' | The desktop version has '' | ||
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 '' | The test needs to be conducted in the framebuffer mode, and switch to the framebuffer mode through the keyboard combination of '' | ||
- | * Disable status: '' | + | == Disable status |
+ | |||
+ | ```shell | ||
$ v4l2_test | $ v4l2_test | ||
- | %%'' | + | ``` |
- | | + | |
+ | == Enable status | ||
+ | |||
+ | ```shell | ||
$ v4l2_test | $ v4l2_test | ||
- | %%'' | + | ``` |
- | ==== Record Video via Gstreamer | + | === Record Video via Gstreamer === |
- | ```sh | + | ```shell |
$ gst-launch-1.0 v4l2src name=vsrc device=/ | $ gst-launch-1.0 v4l2src name=vsrc device=/ | ||
``` | ``` | ||
Line 50: | Line 62: | ||
The recorded video is saved in '' | The recorded video is saved in '' | ||
- | ===== 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/ | $ 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/ | ||
``` | ``` | ||
- | Run format: | + | == Run == |
- | ```sh | + | ```shell |
- | $ ./test /dev/videoX | + | $ ./mipi /dev/videoX |
``` | ``` | ||
===== See Also ===== | ===== See Also ===== | ||
- | * [[https:// | + | * [[pp>os08a10-8mp-camera|Buy OS08A10 8MP Camera]] |
- | * [[https://dl.khadas.com/Hardware/Accessories/OS08A10/ | + | * [[dl> |
- | * [[https:// | + | |