Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] The issue of output image of OAK-1-W sensor with 400P resolution #1145

Open
cjh1995-ros opened this issue Oct 7, 2024 · 7 comments
Open
Labels
bug Something isn't working

Comments

@cjh1995-ros
Copy link

Describe the bug
A clear and concise description of what the bug is.
Currently, I'm working on OAK-1-W-97 with OV9782. In the doc, it supports 400P, 720P, 800P. So I try to test every resolution and 720P and 800P work fine, but 400P gave me the following result.

Screenshot from 2024-10-07 13-28-21

I tested it with following code.

import depthai as dai
import cv2

pipeline = dai.Pipeline()

# Define sources and outputs
camRgb: dai.node.Camera = pipeline.create(dai.node.Camera)

#Properties
camRgb.setBoardSocket(dai.CameraBoardSocket.CAM_A)
camRgb.setSize((640, 400))

# Linking
videoOut = pipeline.create(dai.node.XLinkOut)
videoOut.setStreamName("video")
camRgb.video.link(videoOut.input)

ispOut = pipeline.create(dai.node.XLinkOut)
ispOut.setStreamName("isp")
camRgb.isp.link(ispOut.input)

with dai.Device(pipeline) as device:
    video = device.getOutputQueue(name="video", maxSize=1, blocking=False)
    isp = device.getOutputQueue(name="isp", maxSize=1, blocking=False)

    while True:
        if video.has():
            cv2.imshow("video", video.get().getCvFrame())
        if isp.has():
            cv2.imshow("isp", isp.get().getCvFrame())
        if cv2.waitKey(1) == ord('q'):
            break

For additional test, here's the result of depthai-viewer. Idk why the following log came out.

[18443010C1D9E4F400] [3.3.2.1] [1.634] [ColorCamera(0)] [warning] Unsupported resolution set for detected camera OV9782, needs 800_P or 720_P. Defaulting to 800_P
Couldn't start pipeline:  ColorCamera(0) - 'video' width or height (1920, 1080) bigger than maximum at current sensor resolution (1280, 800)
[2024-10-07T05:55:06Z ERROR re_viewer::depthai::depthai] Error: Couldn't start pipeline
Selecting device:  
Resetting...
Closing device...
Done
@cjh1995-ros cjh1995-ros added the bug Something isn't working label Oct 7, 2024
@cjh1995-ros cjh1995-ros changed the title [BUG] {The issue of output image of OAK-1-W sensor with 400P resolution} [BUG] The issue of output image of OAK-1-W sensor with 400P resolution Oct 7, 2024
@jakaskerl
Copy link
Contributor

I think the issue is that older calibrations store ov9782 as being able to output both mono and color: socket: CAM_A, sensorName: OV9782, width: 1280, height: 800, orientation: AUTO, supportedTypes: [COLOR, MONO]. We can fix it by changing the calibration or to fix in FW.
cc @SzabolcsGergely

@cjh1995-ros
Copy link
Author

@jakaskerl So do I need to calibrate the camera with chessboard?

@jakaskerl
Copy link
Contributor

Hi @cjh1995-ros
Afaik the device needs to be reflashed completely (not possible through recalibration). Best to wait for FW fix.

Workaround:

camRgb.setSize((1280, 800))
camRgb.setVideoSize((640, 400))

@cjh1995-ros
Copy link
Author

Thanks @jakaskerl. It worked!

@cjh1995-ros
Copy link
Author

cjh1995-ros commented Oct 10, 2024

Hi @cjh1995-ros Afaik the device needs to be reflashed completely (not possible through recalibration). Best to wait for FW fix.

Workaround:

camRgb.setSize((1280, 800))
camRgb.setVideoSize((640, 400))

Sorry that I closed the issue. I just checked and it works. However, fov is decreased so hard. Guess it cropped the undistorted image. Here's the results. Is there any way to resize the image in the Camera node?

(setSize - serVideoSize)
800P - 400P
1

800P - 800P
2

400P - 400P
3

@cjh1995-ros
Copy link
Author

Hi @cjh1995-ros
Afaik the device needs to be reflashed completely (not possible through recalibration). Best to wait for FW fix.

@jakaskerl Then how long should I wait for the FW update?

@lturing
Copy link

lturing commented Oct 28, 2024

@jakaskerl
I meet the same question, how long will update the FW? many thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants