Arducam 64MP Ultra High-Resolution Autofocus Raspberry Pi Camera Module

Hey Kyle, any thoughts on supporting this camera in the near future?

Doesn’t it just use libcamera? This library is already available in Mycodo.

I guess there are some arguments that can be passed to libcamera that are specific for this camera (such as autofocus).

yes, it just uses libcamera. but it’s looking for those specific arguments like autofocus. can I file be tweaked for to use a specific arguments?

I also own this camera and would second having the ability to use autofocus with it would be amazing.

You can always add any additional libcamera options you want with the Custom Options setting, such as --autofocus.

Unfortunately it is not that simple. When you go to add the arducam as a libcamera the mycodo sees libcamera-apps-lite as a missing dependency. When I installed the dependency I am unable to use the camera. Below is command line output before resolving the libcamera-apps-lite dependency (the image was obtained and worked fine):

pi@mycodo-1:~ $ libcamera-still -o test2.jpg --autofocus
Preview window unavailable
[0:37:29.060610189] [4727] INFO Camera camera_manager.cpp:293 libcamera v0.0.0+3897-c3c878a9
[0:37:29.091271628] [4729] WARN CameraSensorProperties camera_sensor_properties.cpp:174 No static properties available for ‘imx519’
[0:37:29.091336571] [4729] WARN CameraSensorProperties camera_sensor_properties.cpp:176 Please consider updating the camera sensor properties database
[0:37:29.110753353] [4729] WARN RPI raspberrypi.cpp:1280 Mismatch between Unicam and CamHelper for embedded data usage!
[0:37:29.111627860] [4729] ERROR DelayedControls delayed_controls.cpp:87 Delay request for control id 0x009a090a but control is not exposed by device /dev/v4l-subdev0
[0:37:29.111802783] [4729] INFO RPI raspberrypi.cpp:1404 Registered camera /base/soc/i2c0mux/i2c@1/imx519@1a to Unicam device /dev/media0 and ISP device /dev/media3
[0:37:29.112445089] [4727] INFO Camera camera.cpp:1035 configuring streams: (0) 2328x1748-YUV420
[0:37:29.112838398] [4729] INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 2328x1748-SRGGB10_1X10 - Selected unicam format: 2328x1748-pRAA
[0:37:34.359469177] [4727] INFO Camera camera.cpp:1035 configuring streams: (0) 4656x3496-YUV420 (1) 4656x3496-SRGGB10_CSI2P
[0:37:34.360141853] [4729] INFO RPI raspberrypi.cpp:765 Sensor: /base/soc/i2c0mux/i2c@1/imx519@1a - Selected sensor format: 4656x3496-SRGGB10_1X10 - Selected unicam format: 4656x3496-pRAA
Still capture image received

If I install libcamera-apps-lite it overwrites the vendor supplied libcamera-still which lacks the ‘–autofocus’ option. Is there a way to ignore or modify the check for the dependency?

Ok, so I got this working (although it may not be the best way to go about it).

  1. Edit ~/Mycodo/mycodo/ and commented out the original dependency line and changed it to below:
    (‘apt’, ‘libcamera-apps’, ‘libcamera-apps’)
    # (‘apt’, ‘libcamera-apps-lite’, ‘libcamera-apps-lite’)

  2. sudo ln -s /usr/local/bin/libcamera-still /usr/bin/libcamera-still

  3. Edit camera settings in mycodo and added ‘–autofocus’ to Custom options.

1 Like

Who is this vendor?

Is this simply the package repository not using the latest version of libcamera with arducam support?

The vendor is Arducam. I’m not sure why they chose to modify the package but I suspect it was to add the autofocus option. I believe they forked the libcamera package to provide additional options.

yea I gave that a shot and it didn’t work for me. I will set up a non-production system and give it a try.

I’ve been thinking about refactoring the Camera modules into Functions (similar to what was done for Display/LCD modules), which would allow importing of custom Camera Functions and more rapid deployment of new built-in Camera Functions.

That would be amazing if it worked like the display modules. Then you would have the ability to overlay text like the date and time and other input data. if you need a hand testing anything out let me know and I would be able to give you a hand with that.

1 Like

I made a bit of progress with a proof-of-concept Function that can now take still images and start/stop time-lapses. Still a long way to go to integrating it with Widgets and making it more presentable by displaying the latest still/timelapse images in the status and adding more options, but it’s slowly coming together.

A bit more progress:

1 Like

That’s looking amazing so far. Great Work!

I just committed the camera code I’ve been working on thus far. I’ve only created a libcamera module, but it appears to be working in all aspects (image and video acquisition and widget functionality). I still need to go over the code a lot more to make sure the framework for the module is rational before creating all the other camera modules, as well as determine which functions I can consolidate into universal functions all camera modules can use. In order to make the libcamera library for the arducam work, you would need to copy this module and modify it to create a new module that compiles/installs the arducam version of libcamera. If no one has tested doing this by after the holidays, I’ll see about deeloping an approach to do it.