RPi 5 and OwlSight 64 MP Camera

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

  2. Model number of the product(s)?
    B0483

  3. What hardware/platform were you working on?
    Raspberry Pi 5 4GB

  4. Instructions you have followed. (link/manual/etc.)
    64MP OwlSight - Arducam Wiki

  5. Problems you were having?
    Camera not detected. In camera 0 port.

  6. The dmesg log from your hardware?
    N/A

  7. Troubleshooting attempts you’ve made?
    Checked cable
    Changed /boot/firmware/config.txt
    Fresh install

  8. What help do you need?

  9. How do I get the camera to run?

  10. Can I use two 64 MP cameras?

The output when running libcamera-hello is below:

[0:04:54.210415013] [1025]  INFO Camera camera_manager.cpp:284 libcamera v0.1.0+147-057299d0-dirty (2024-01-24T08:51:15+00:00)
Options:
    verbose: 2
    info_text:#%frame (%fps fps) exp %exp ag %ag dg %dg
    timeout: 5000ms
    width: 0
    height: 0
    output:
    post_process_file:
    preview: default
    qt-preview: 0
    transform: identity
    roi: all
    metering: centre
    exposure: normal
    ev: 0
    awb: auto
    flush: false
    wrap: 0
    brightness: 0
    contrast: 1
    saturation: 1
    sharpness: 1
    framerate: 30
    denoise: auto
    viewfinder-width: 0
    viewfinder-height: 0
    tuning-file: (libcamera)
    lores-width: 0
    lores-height: 0
    autofocus-range: normal
    autofocus-speed: normal
    autofocus-window: all
    hdr: off
    mode: unspecified
    viewfinder-mode: unspecified
    metadata:
    metadata-format: json
    keypress: 0
    signal: 0
No connector ID specified.  Choosing default from list:
Connector 32 (crtc 88): type 11, 3840x2160 (chosen)
Connector 42 (crtc 0): type 11, 0x0
Made DRM preview window
Opening camera...
Closing RPiCam application(frames displayed 0, dropped 0)
Camera stopped!
Tearing down requests, buffers and configuration
Camera closed
ERROR: *** no cameras available ***

It appears the software is not fully ready yet.

The ‘upstream support’ is still pending on the RPi end. So, yeah. I guess I am stuck for now.

Hi,
Currently, the Raspberry Pi has released kernel version 6.1.73 , which already includes the built-in support for the OV64A40 camera module. Therefore, there is no need for separate driver installation and libcamera.
We have update our doc, please check it:
https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/64MP-OV64A40/#software

Hi Dion,

With all respect - that just is not true right now.

The Pull Request is still open and yet to be merged.

Until it is merged, your statement that it has built-in support is not true.

I managed to get the camera to work by using the ArduCam version of libcamera. The default Raspberry Pi libcamera (raspi-cam or whatever they call it) does not support the OV64A40.

The upstream libcamera library (0.2.0) does support the OV64A40 camera, but that is not supported by Raspberry Pi 5 yet.

You may need to put some pressure on Raspberry Pi foundation / company / code maintainers to get the software support ArduCam deserves.

Hi,
Got it. Thank you for your feedback:-)
I’ll verify the current situation.

1 Like

Thank you for following up Dion.

Can I also say that it is not upstreamed for Raspberry Pi 4 either. I tried both devices and the camera does not work ‘out of the box’ for either.

I have left this message on the Pull Request as a comment so that hopefully someone can speed up the process of getting the code working.

The Pull Request has been idle since November 2023 (nearly 6 months). I do not believe this is a problem with the ArduCam team, but with the Raspberry Pi maintainers. I am here to help get this moving along (and have been trying).

Hi,
Thank you for your effort.
Besides, I tried the Raspberry Pi native libcamera to run the OV64A40 and it worked. Please see the screenshots below:




I was running it on Raspberry Pi 5.

Hi Dion,

I will try and test again with a blank SD Card later tonight. It appears something has changed since I posted on the forum here. Your release is dated 15 Feb 2024 which is after I created this question.

Let me get back to you.

Hi

Yes.

Beside, the PR below is no longer useful because the ov64a40 has been merged into the upstream mainline.

Raspberry Pi will pull the upstream mainline code directly.Here you can see the ov64a40 code, already in the Raspberry PI’s libcamera repository.

1 Like

Any word if this is going to apply to the RPi4 too? I’ve been trying to get it work unsuccessfully.

Hi,
Yes, it is also applied to the RPI4. But you need to burn the Bookworm OS and upgrade the kernel version to 6.1.73

I tried that and it still didn’t work. I have been getting a lot of assistance on the Rpi forum. Just yesterday I was finally able to take a 64MP image using a “rpi-still…” command at terminal. Here’s what I did to get it to work on my RPi 4 8Gb.

  • get latest version of bookworm
  • sudo apt-get update
  • sudo apt full-upgrade
  • sudo reboot
  • sudo nano /boot/firmware/config.txt
  • (add “dtoverlay=ov64a40, link-frequency=360000000” in the config.txt file at the bottom under the [all] header)
  • Press CTRL+O
  • Press Enter
  • Press CTRL+X
  • sudo reboot
  • sudo SKIP_KERNEL=1 rpi-update f51e83aa02a132177efcf18215fcf8924d7b039f
  • sudo reboot

I found that I had the latest kernel of 6.1.73, but for some reason “vcgencmd version” would return a date of “Oct 17, 2023” the “SKIP_KERNEL=1…” command mentioned above was able to update the version successfully. Now I can take 64MP photos and I actually get an image, not just a green screen.

The current struggle is how to write a python script to take a photo. I haven’t be able to successfully implement code to take a 64MP photo, I receive a “Failed to start camera: Cannot allocate memory” error. I’m unsure what library works best with the OV64A40 camera: picam2, libcam, or rpicam. I know picamera2 is based on libcamera, and rpicamera is supposed to replace libcamera. But honestly that’s all way over my head, and I have been reading the documentation without finding a clear answer.

Hey,

Picam2 didn’t work for me either. I am using this script instead:

import subprocess

def execute_command(command):
    try:
        # Execute the command using subprocess
        result = subprocess.run(command, shell=True, capture_output=True, text=True)
        # Print the output of the command
        print(f"Command '{command}' output:")
        print(result.stdout)
    except Exception as e:
        print(f"Error executing command '{command}': {e}")

if __name__ == "__main__":
        command = "libcamera-still --width 9248 --height 6944 --camera 0 -o test-timer-64mp-mp-0.jpg -n"
        execute_command(command)

I am able to capture a 64mp image using a python script with Picamera2. I can also get it to work with a streaming preview, but you have to use a command that pauses the video stream, takes a photo, then resumes the stream. I believe that has solved the memory buffer problems.

from picamera2 import Picamera2
import time
from libcamera import controls

picam2 = Picamera2()

capture_config = picam2.create_still_configuration()

picam2.start(show_preview=True)

picam2.set_controls({"AfMode": controls.AfModeEnum.Continuous})

time.sleep(5)

picam2.switch_mode_and_capture_file(capture_config, "image.jpg")

Only a single camera can be used at this time

What’s the deal with this? Was trying to get this to work in a dual camera config on a cm4. Is this something that will be fixed in the near future?

Even with just the owlsight installed camera installed if you reference cam0 or cam1 it won’t detect:

works:
dtoverlay=ov64a40, link-frequency=360000000

Neither of these work:
dtoverlay=ov64a40,cam0, link-frequency=360000000
dtoverlay=ov64a40, link-frequency=360000000,cam0

This should work:

hey Dion,

I can confirm the 64 MP OwlSight (OV64A40) works out of the box now.

In addition:

  • turned off auto-detect camera
  • added dtoverlay for both camera
  • no need to I2C to be enabled anymore.

Thank you for assistance.

Hi,
Thank you very much for your feedback. We are tryting to make our DOC and support more simple and effective. However, the Englist is not our native language. SO there is a dilemma that we know the solution but I can not express it more precise in English :-(( For example, in terms of ov64A40, we have updated the doc last week and received expected comments like unclear quick start guide :frowning:
https://docs.arducam.com/Raspberry-Pi-Camera/Native-camera/64MP-OV64A40/#hardware-connection
Anyway, we value every customer’s suggestions and feedback and try our best to perfect our expressiono from native speaker’s view in the DOC or somewhere.

1 Like

Docs looking very good Dion.

Just missing the “turn off camera auto-detect”. I feel that was necessary. Is it still necessary?

Hi,
Whatever tuning on/off the camera auto-detect, the camera module is able to stream with libcamera command. However, in case of other unexpected effects, I suggest that adding ‘‘turn off the camera auto-detect’’ is evitable. We will update the doc in two days.
Thank you for your notice.