Hi~ @Agent_kapo
preparation
Use the latest firmware
vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.4-221229-emmc.img
http://dl.khadas.com/products/vim3/firmware/ubuntu/emmc/vim3-ubuntu-20.04-gnome-linux-4.9-fenix-1.4-221229-emmc.img.xz
Install Dependencies
sudo apt install libopencv-dev python3-opencv
Demo Source Code
import cv2
if __name__ == '__main__':
val = True
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 1920)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1080)
fourcc = cv2.VideoWriter_fourcc(*'XVID')
out = cv2.VideoWriter("./test.avi", fourcc, 20.0, (640, 480), True)
while val is True:
ret, frame = cap.read()
cv2.cvtColor(frame,cv2.COLOR_RGB2BGR)
if frame is None:
break
else:
out.write(frame)
cv2.imshow("video", frame)
k = cv2.waitKey(1) & 0xFF
if k == 27:
break
cap.release()
out.release()
Click to get the source file
https://docs.khadas.com/_export/code/products/sbc/vim3/add-ons/os08a10-mipi-camera?codeblock=4
Run
python3 ./mipi-camera.py