Orange Pi (Armbian)...
 
Notifications
Clear all

Orange Pi (Armbian): control the camera in Python with OpenCV


christophe
Posts: 253
Admin
Topic starter
(@chris)
Member
Joined: 5 years ago
wpf-cross-image

In the previous tutorial, we saw how to drive (display the live image, record a snapshot and a video clip using the keyboard) on a Raspberry Pi under Raspbian. In this tutorial we will do the same but on an Orange Pi Lite (WiFi version). It is unfortunately not possible to use the Picamera library…

2 Replies
c61641c7ff8858f0434fe0b59825dba8?s=80&d=mm&r=g
Posts: 2
 Greg Miller
Guest
(@Greg Miller)
Joined: 5 years ago

In Leonardo Lontra's tutorial you linked, he says you need the kernel source. Can you add a step on how to do that? Following the steps you have I get a '/lib/modules/.../build: no such file or directory' error when attempting to build v4l2loopback.

Reply
1 Reply
c61641c7ff8858f0434fe0b59825dba8?s=80&d=mm&r=g
 Greg Miller
Guest
(@Greg Miller)
Joined: 5 years ago

Posts: 2

To answer my own question: I had to do a reboot. The "apt-get upgrade" actually upgraded the kernel, but "uname -r" still returned the old kernel name.

Attempting to run the scrip above returns the error "Window system doesn't support OpenGL". But I was able to use the script below to capture and save an image, so it's working!

import cv2
c = cv2.VideoCapture(1)

_,f = c.read()
cv2.imwrite('test.png',f)

Reply
Share:
Join Us!
Recent Posts
Last Articles
DIY Projects
DIY Projects