question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Can't change FPS on OAK-D-Lite

See original GitHub issue

I can’t change the FPS on the OAK-D-Lite (but I can on OAK-D).

I used the code from here and i added the highlighed lines:

#!/usr/bin/env python3

import cv2
import depthai as dai

# Create pipeline
pipeline = dai.Pipeline()

# Define source and output
camRgb = pipeline.create(dai.node.ColorCamera)
xoutRgb = pipeline.create(dai.node.XLinkOut)

xoutRgb.setStreamName("rgb")

# Properties
camRgb.setPreviewSize(300, 300)
camRgb.setInterleaved(False)
camRgb.setColorOrder(dai.ColorCameraProperties.ColorOrder.RGB)

# -------------------- ADDED LINES --------------------
print(f"FPS before: {camRgb.getFps()}")
camRgb.setFps(60)
print(f"FPS after: {camRgb.getFps()}")
# -----------------------------------------------------

# Linking
camRgb.preview.link(xoutRgb.input)

# Connect to device and start pipeline
with dai.Device(pipeline) as device:

    print("Connected cameras: ", device.getConnectedCameras())
    # Print out usb speed
    print("Usb speed: ", device.getUsbSpeed().name)

    # Output queue will be used to get the rgb frames from the output defined above
    qRgb = device.getOutputQueue(name="rgb", maxSize=4, blocking=False)

    while True:
        inRgb = qRgb.get()  # blocking call, will wait until a new data has arrived

        # Retrieve 'bgr' (opencv format) frame
        cv2.imshow("rgb", inRgb.getCvFrame())

        if cv2.waitKey(1) == ord("q"):
            break

I tested the same code with OAK-D and OAK-D-Lite. After setting the new value for fps, the output of camRgb.getFps() is the same for both the devices, but only the OAK-D actually changes the fps, whereas the OAK-D-Lite doesn’t change the fps.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Comments:14

github_iconTop GitHub Comments

2reactions
Luxonis-Brandoncommented, Jan 31, 2022

Sorry about the trouble. Yes, I think OAK-D-Lite FPS is locked right now as a result of an underlying implementation bug or lacking.

Will circle back.

1reaction
alex-luxoniscommented, Apr 21, 2022

@JojoDevel Apologies for the delay, it’s implemented now on https://github.com/luxonis/depthai-python/pull/566

Read more comments on GitHub >

github_iconTop Results From Across the Web

Troubleshooting - DepthAI documentation - Luxonis
If python3 -m pip install fails with a Permission denied error, your user likely doesn't have permission to install packages in the system-wide...
Read more >
Introduction to OAK-D and DepthAI - LearnOpenCV
Features/Specs, OAK-D, OAK-D Lite ; RGB camera, 12 Megapixel, 4k, up to 60 fps, 12 Megapixel, 4k, up to 60 fps ; Mono...
Read more >
Python/OpenCV - Wrong actual camera FPS or too slow routine
The result is an average 0.083s elapsed (about 12fps) I can't understand if I'm getting a slow software (but I cannot figure out...
Read more >
TouchDesigner Help Group | It would be great to be able to ...
Just got my OAK-D Lite today - Had a bit of a mess around before seeing Dario ... I normally leave as transcode/keep...
Read more >
OAK-D-Lite - Waveshare Wiki
This OAK-D-Lite includes three onboard cameras (a 4K/30fps RGB camera, ... To use OAK-D-PoE, you need to use a switch or router that...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found