Owlsight ov64a40 slow to switch res and capture (compared to Hawkeye)

  1. Where did you get the camera module(s)?
    The PIHut

  2. Model number of the product(s)?
    Arducam Hawkeye and Owlsight

  3. What hardware/platform were you working on?
    Raspberry PI 5 (4gb) - (with POE hat) 6.18.34+rpt-rpi-2712 (both PIs)

We have a mixture of cameras, including the two above (Hawkeye and Owlsight) in our configuration.

I start the cameras in 1/2 resolution (4624x3472) to focus, then switch to full res to capture the final image. As expected, there is a delay when capturing, but this is significantly different between the two cameras.

On the hawkeye, it takes just over 1 second, but on the Owlsights, it takes around 3 seconds, so almost 2 seconds difference.

I’ve written a very simple python script (see bottom of post) to start the camera, capture an image, save it, then switch to full res and capture another image.

These are the timings (below) as you can see, the difference in time between ā€˜Before Switch/Capture’ and ā€˜After Switch/Capture’ is 1.1 second or 2.8 seconds

Hawkeye (arducam_64)

13:15:18.5 Instantiating, model arducam_64mp
13:15:18.5 Starting
13:15:18.6 Waiting 4s
13:15:22.6 Start First Capture
13:15:22.6 After first capture
13:15:22.7 Saved First
13:15:22.7 Before Switch/Capture
13:15:23.8 After  Switch/Capture (this is 1.1 second duration)
13:15:24.2 Saved Second

And the Owlsight (ov64a40)

13:15:29.2 Instantiating, model ov64a40
13:15:29.3 Starting
13:15:29.3 Waiting 4s
13:15:33.3 Start First Capture
13:15:33.4 After first capture
13:15:33.4 Saved First
13:15:33.4 Before Switch/Capture
13:15:36.2 After  Switch/Capture (this is 2.8 seconds duration)
13:15:36.5 Saved Second

If it helps, these are the debug logs for the Owlsight at the point that it takes 2 seconds (could this be the culprit?)

[0:16:49.115468548] [3406] DEBUG RPI pipeline_base.cpp:755 queueRequestDevice: New request sequence: 0
[0:16:49.115707738] [3406] DEBUG RPISTREAM rpi_stream.cpp:262 Queuing buffer 4 for CFE Image
[0:16:49.115716238] [3406] DEBUG V4L2 v4l2_videodevice.cpp:1783 /dev/video4[14:cap]: Queueing buffer 0
[0:16:51.004032080] [3406] DEBUG Timer timer.cpp:93 Starting timer 0x7fff7c0183b8: deadline 0:16:53.474026728
[0:16:51.005048710] [3406] DEBUG RPISTREAM rpi_stream.cpp:262 Queuing buffer 3 for ISP Output1

I realise that being different cameras, they will behave slightly differently, but it’s quite a big difference taking this much longer. In the logs, it mentions timer/deadline.

I want the photos to be taken at the same time, and I’m reluctant to put a delay on the Hawkeye to match the slower Owlsight, so was hoping there might be a better solution?

Also, this is the code I’m using to test.

from picamera2 import Picamera2
import time, os
from datetime import datetime,timezone

def main():
    #os.environ["LIBCAMERA_LOG_LEVELS"] = "0" # uncomment to get logs
    model = Picamera2.global_camera_info()[0]['Model']
    resolutions = {'full': (9248,6944) if model=='ov64a40' else (9152,6944), 'half': (4624,3472), 'quarter': (2312, 1736)}

    print(timeNow(), "Instantiating, model", model)
    picam2 = Picamera2()

    config = picam2.create_still_configuration(main={'format': 'RGB888', 'size': resolutions['half']})
    picam2.configure(config)
    print(timeNow(), "Starting")
    picam2.start()
    print(timeNow(), "Waiting 4s")
    time.sleep(4)
    print(timeNow(), "Start First Capture")
    req = picam2.capture_request()
    print(timeNow(), "After first capture")
    req.save('main', 'zz_1.jpg')
    req.release()
    print(timeNow(), "Saved First")

    newConfig = picam2.create_still_configuration(main={'format': 'RGB888', 'size': resolutions['full']})  
    print(timeNow(), "Before Switch/Capture")
    req3 = picam2.switch_mode_and_capture_request(newConfig)
    print(timeNow(),"After  Switch/Capture")
    req3.save('main', 'zz_3.jpg')
    print(timeNow(), "Saved Second")
    req3.release()

def timeNow():
    return datetime.now(timezone.utc).strftime('%H:%M:%S.%f')[:-5]

main()

Hi @richs
Seeing that specific timing difference between the Hawkeye and the Owlsight is actually a known characteristic of these two different sensors, and it’s something we’ve seen in our own testing.

The reason the Owlsight (OV64A40) takes about 1.7 seconds longer than the Hawkeye (arducam_64mp/IMX682) isn’t a bug; it’s down to the complexity of the sensor’s register map. When you switch from 1/2 resolution to full resolution, the driver has to ā€œstopā€ the sensor and push thousands of I2C register settings to re-initialize it for the new mode.

The configuration for the OV64A40 is much larger and more complex than the 64MP. Writing those extra registers over the relatively slow I2C bus simply takes more time. Furthermore, the OV64A40 has a longer internal ā€œstartupā€ delay before the MIPI lanes can stabilize and begin outputting frames in the new mode. The timer/deadline messages you’re seeing in the logs is basically the Pi’s camera subsystem waiting for the sensor to confirm it is ready to stream after being reconfigured.

To be direct: there is no way to make these two cameras transition at the same speed. It is a hardware-level limitation of the sensor startup sequences.

If you absolutely need the photos to be taken at the same time, you really only have one option: offset your triggers. You’ll need to start the Owlsight capture command approximately 1.7 seconds before you start the Hawkeye capture. Since the latency is predictable (as your logs show), you should be able to hardcode this stagger in your Python script to get the frames to align.

It’s not the ā€œcleanestā€ solution, but when you’re mixing two fundamentally different sensor architectures, a software offset is the only way to handle the hardware timing gap.

1 Like