This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
products:sbc:edge-2l:add-ons:edge-2l-mipi-camera [2025/11/27 02:33] gray ↷ Page moved from local:users:start:add-ons:edge-2l-mipi-camera to local:users:gray:products:sbc:edge-2l:add-ons:edge-2l-mipi-camera |
products:sbc:edge-2l:add-ons:edge-2l-mipi-camera [2026/05/11 02:05] (current) nick ↷ Page moved from local:users:gray:products:sbc:edge-2l:add-ons:edge-2l-mipi-camera to products:sbc:edge-2l:add-ons:edge-2l-mipi-camera |
||
|---|---|---|---|
| Line 2: | Line 2: | ||
| - | ====== Edge-2L MIPI Camera Usage ====== | + | ====== Edge-2L MIPI camera usage ====== |
| ===== Linux ===== | ===== Linux ===== | ||
| + | All camera interfaces on the Edge-2L support 4K@60fps recording. | ||
| - | <WRAP important > | + | ==== Video node ==== |
| - | + | ||
| - | Edge-2L CAM3 support **4K@60fps** record. If your **hardware version is V13 or later**, the **CAM2** also can support **4K@60fps** record. | + | |
| - | + | ||
| - | **Check Hardware Version** | + | |
| - | ```shell | + | |
| - | $ cat / | + | |
| - | ``` | + | |
| - | V13 or later version will show like '' | + | |
| - | + | ||
| - | Due to the different hardware versions, **CAM2 is set to 4K@30fps by default**. This is for compatibility with V11 or V12 hardware versions to | + | |
| - | ensure proper operation. If your device supports 4K@60fps, you can enable this mode by adding an overlay node '' | + | |
| - | + | ||
| - | + | ||
| - | Edit ''/ | + | |
| - | + | ||
| - | <tabbox Fenix 1.7.4 or older version> | + | |
| - | + | ||
| - | About IMX585 and IMX678, the two cameras were disabled by default. So V11 or V12 hardware version should replace '' | + | |
| - | + | ||
| - | Edit ''/ | + | |
| - | + | ||
| - | + | ||
| - | V13 or later hardware version should be set '' | + | |
| - | + | ||
| - | Edit ''/ | + | |
| - | + | ||
| - | <tabbox Fenix 1.7.5 or later version> | + | |
| - | + | ||
| - | We enbale imx585 and imx678 by default, so just add overlay | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | You need to reboot the device to take effect. | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||
| - | ==== Upgrade System ==== | + | |
| - | + | ||
| - | Please follow the [[products: | + | |
| - | + | ||
| - | ==== Video Node ==== | + | |
| Line 55: | Line 15: | ||
| | ^ Video Node ^ | | ^ Video Node ^ | ||
| - | ^ CAM1 | /dev/video42 | + | ^ CAM1 | /dev/video22 |
| - | ^ CAM2 | /dev/video33 | + | ^ CAM2 | /dev/video31 |
| - | ^ CAM3 | / | + | |
| - | ==== Record | + | ==== Record |
| - | |||
| - | Record video from '' | ||
| - | |||
| - | ```shell | ||
| - | gst-launch-1.0 v4l2src device=/ | ||
| - | ``` | ||
| Record video from '' | Record video from '' | ||
| ```shell | ```shell | ||
| - | gst-launch-1.0 v4l2src device=/ | + | gst-launch-1.0 v4l2src device=/ |
| ``` | ``` | ||
| - | For 4K@60fps, framerate should be set 60/1 | ||
| - | Record video from '' | + | Record video from '' |
| ```shell | ```shell | ||
| - | gst-launch-1.0 v4l2src device=/ | + | gst-launch-1.0 v4l2src device=/ |
| ``` | ``` | ||
| - | /* | + | ==== Capture frame with V4L2 utils ==== |
| - | ==== Record Video with OpenCV ==== | + | |
| - | + | ||
| - | Follow the steps bellow to install OpenCV: | + | |
| - | + | ||
| - | ```shell | + | |
| - | sudo apt update | + | |
| - | sudo apt install libopencv-dev python3-opencv | + | |
| - | ``` | + | |
| - | + | ||
| - | '' | + | |
| - | + | ||
| - | ```c++ mipi-camera.cpp | + | |
| - | #include < | + | |
| - | #include < | + | |
| - | #include < | + | |
| - | #include < | + | |
| - | #include < | + | |
| - | using | + | |
| - | namespace | + | |
| - | + | ||
| - | using | + | |
| - | namespace | + | |
| - | + | ||
| - | int main(int argc, char** argv) | + | |
| - | { | + | |
| - | int count=100; | + | |
| - | string str = argv[1]; | + | |
| - | string res=str.substr(10); | + | |
| - | VideoCapture capture(stoi(res), | + | |
| - | capture.set(CAP_PROP_FOURCC, | + | |
| - | capture.set(CAP_PROP_FRAME_WIDTH, | + | |
| - | capture.set(CAP_PROP_FRAME_HEIGHT, | + | |
| - | while (count) | + | |
| - | { | + | |
| - | Mat frame; | + | |
| - | capture >> frame; | + | |
| - | + | ||
| - | if (frame.empty()) { | + | |
| - | break; | + | |
| - | } | + | |
| - | int h = frame.rows; | + | |
| - | int w = frame.cols; | + | |
| - | const char *name = " | + | |
| - | namedWindow(name, | + | |
| - | imshow(name, | + | |
| - | waitKey(30); | + | |
| - | count--; | + | |
| - | } | + | |
| - | return 0; | + | |
| - | } | + | |
| - | + | ||
| - | ``` | + | |
| - | + | ||
| - | Compile: | + | |
| - | + | ||
| - | ```shell | + | |
| - | gcc -o mipi mipi-camera.cpp -lopencv_imgproc -lopencv_core -lopencv_videoio -lopencv_imgcodecs -lopencv_highgui -std=c++11 -std=gnu++11 -Wall -std=c++11 -lstdc++ -I/ | + | |
| - | ``` | + | |
| - | + | ||
| - | Test: | + | |
| - | + | ||
| - | Capture frame from '' | + | |
| - | + | ||
| - | ```shell | + | |
| - | ./mipi / | + | |
| - | ``` | + | |
| - | + | ||
| - | Capture frame from '' | + | |
| - | + | ||
| - | ```shell | + | |
| - | ./mipi / | + | |
| - | ``` | + | |
| - | + | ||
| - | Capture frame from '' | + | |
| - | + | ||
| - | ```shell | + | |
| - | ./mipi / | + | |
| - | ``` | + | |
| - | */ | + | |
| - | ==== Capture Frame with V4L2 Utils ==== | + | |
| Follow the steps below to install '' | Follow the steps below to install '' | ||
| Line 168: | Line 40: | ||
| sudo apt update | sudo apt update | ||
| sudo apt install v4l-utils | sudo apt install v4l-utils | ||
| - | ``` | ||
| - | |||
| - | Capture frame from '' | ||
| - | |||
| - | ```shell | ||
| - | v4l2-ctl -d / | ||
| ``` | ``` | ||
| Line 179: | Line 45: | ||
| ```shell | ```shell | ||
| - | v4l2-ctl -d /dev/video33 | + | v4l2-ctl -d /dev/video31 |
| ``` | ``` | ||
| - | Capture frame from '' | + | Capture frame from '' |
| ```shell | ```shell | ||
| - | v4l2-ctl -d /dev/video51 | + | v4l2-ctl -d /dev/video22 |
| ``` | ``` | ||
| - | It will capture a '' | ||
| - | + | Preview the captured | |
| - | Preview the file: | + | |
| ```shell | ```shell | ||
| Line 198: | Line 62: | ||
| ``` | ``` | ||
| - | ==== Camera | + | ==== Camera |
| <tabbox IMX415> | <tabbox IMX415> | ||
| - | * connect | + | * Connect |
| - | | ^ | + | | ^ |
| - | ^ CAM1 | 4K@30fps | 4K@30fps | + | ^ CAM1 | 4K@60fps | |
| - | ^ CAM2 | + | ^ CAM2 | |
| - | ^ CAM3 | + | |
| - | * connect two cameras to CAM3 and CAM2 simultaneously | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | * Connect two cameras simultaneously: |
| - | ^ CAM2 | | + | |
| - | ^ CAM3 | | + | |
| - | * connect three camera simultaneously: | + | | ^ frame rate ^ |
| - | + | ^ CAM1 | 4K@60fps | | |
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | ^ CAM2 | |
| - | ^ CAM1 | 4K@30fps | 4K@25fps | + | |
| - | ^ CAM2 | + | |
| - | ^ CAM3 | + | |
| <tabbox OS08A10> | <tabbox OS08A10> | ||
| - | * connect | + | * Connect |
| - | + | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | |
| - | ^ CAM1 | | + | |
| - | ^ CAM2 | | + | |
| - | ^ CAM3 | | + | |
| - | * connect two cameras to CAM3 and CAM2 simultaneously | + | | ^ frame rate ^ |
| + | ^ CAM1 | | ||
| + | ^ | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | ||
| - | ^ CAM2 | | ||
| - | ^ CAM3 | | ||
| - | * connect three camera | + | * Connect two cameras |
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | | ^ frame rate ^ |
| - | ^ CAM1 | 4K@30fps | 4K@30fps | + | ^ CAM1 | 4K@60fps | |
| - | ^ CAM2 | 4K@30fps | 4K@46fps | + | ^ CAM2 | 4K@60fps | |
| - | ^ CAM3 | | + | |
| <tabbox IMX585> | <tabbox IMX585> | ||
| - | * connect | + | * Connect |
| - | | ^ | + | | ^ |
| - | ^ CAM1 | 4K@30fps | 4K@30fps | + | ^ CAM1 | 4K@60fps | |
| - | ^ CAM2 | + | ^ CAM2 | |
| - | ^ CAM3 | + | |
| - | * connect two cameras to CAM3 and CAM2 simultaneously | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | * Connect two cameras simultaneously: |
| - | ^ CAM2 | | + | |
| - | ^ CAM3 | | + | |
| - | | + | | ^ |
| + | ^ CAM1 | | ||
| + | ^ CAM2 | | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | ||
| - | ^ CAM1 | | ||
| - | ^ CAM2 | | ||
| - | ^ CAM3 | | ||
| <tabbox IMX678> | <tabbox IMX678> | ||
| - | * connect | + | * Connect |
| - | + | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | |
| - | ^ CAM1 | | + | |
| - | ^ CAM2 | | + | |
| - | ^ CAM3 | | + | |
| - | * connect two cameras to CAM3 and CAM2 simultaneously | + | | ^ frame rate ^ |
| + | ^ CAM1 | | ||
| + | ^ | ||
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | ||
| - | ^ CAM2 | | ||
| - | ^ CAM3 | | ||
| - | * connect three camera | + | * Connect two cameras |
| - | | ^ CAM2 2lane ^ CAM2 4lane (only V13 or later version support) | + | | ^ frame rate ^ |
| - | ^ CAM1 | 4K@30fps | 4K@25fps | + | ^ CAM1 | 4K@60fps | |
| - | ^ CAM2 | + | ^ CAM2 | |
| - | ^ CAM3 | + | |
| </ | </ | ||