Skip to content

LEGO VISION COMMAND USB Camera with EV3 and ev3dev #770

Description

@Nikolay-Zagrebin

ev3dev version: 4.14.117-ev3dev-2.3.5-ev3
ev3dev-lang-python version: INSERT ALL VERSIONS GIVEN BY dpkg-query -l {python3,micropython}-ev3dev* HERE
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-===================-==============-==============-===========================================
ii python3-ev3dev 1.2.0 all Python language bindings for ev3dev
dpkg-query: no packages found matching micropython-ev3dev

Hi there,
Thanks to the ev3dev development team, especially David Lechner.
Inspired by his experiment on connecting the LEGO Movie Maker USB camera to EV3 and ev3dev, repeated with LEGO VISION COMMAND USB Camera everything works!
Next, there is an idea to experiment with machine vision and neural networks, I decided to use the pygame library, installed it from the repository, checked that version 1.9.1... was downloaded as part of the installed packages.

python-pygame/oldstable,now 1.9.1release+dfsg-10+b2 armel [installed]

Just with this version, pygame supports working with the camera, I'm trying to repeat the example of working with the camera, described here
Connection, initialization everything goes perfectly.

brickrun -r -- python
import pygame
import pygame.camera
from pygame.locals import *
pygame.init()
pygame.camera.init()
cam = pygame.camera.Camera("/dev/video0",(640,480))
cam.start()

When I call cam.start (), I get an error

Traceback (most recent call last):
File "", line 1, in
SystemError: ioctl(VIDIOC_S_FMT) failure: no supported formats

I understand correctly that perhaps the camera is not supported by pygame?
Perhaps there are recommendations for solving the problem?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions