0

When I try to detect my camera using python -m lerobot.find_cameras opencv I get a ton of errors like global obsensor_uvc_stream_channel.cpp:158 cv::obsensor::getStreamChannelGroup Camera index out of range. After that it still outputs

--- Detected Cameras ---
Camera #0:
    Name: OpenCV Camera @ 0
    Type: OpenCV
    Id: 0
    Backend api: MSMF
    Default stream profile:
        Format: -1.0
        Width: 640
        Height: 480
        Fps: 30.0
---------------------

But if I try using it like:

from lerobot.cameras.opencv.configuration_opencv import OpenCVCameraConfig
from lerobot.cameras.opencv.camera_opencv import OpenCVCamera
from lerobot.cameras.configs import ColorMode, Cv2Rotation

config = OpenCVCameraConfig(
    index_or_path=0,
    fps=30,
    width=640,
    height=480,
    color_mode=ColorMode.RGB,
    rotation=Cv2Rotation.NO_ROTATION
)

camera = OpenCVCamera(config)
camera.connect()

I get an ConnectionError.

(P.S.: I'm on Win11. Webcam does work when using Camera App from Windows. Webcam also works when using normal OpenCV Lib like that: cv2.VideoCapture(0) )

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.