5

Does picamera work on Ubuntu 20.04 arm64?

I am on pi4 4gb.

  1. Added start_x=1 to /boot/firmware/usercfg.txt and rebooted. Checked for updates.
  2. pip3 install picamera - ok.

When import picamera is called, I get:

OSError: libbcm_host.so: cannot open shared object file: No such file or directory

I searched for libbcm_host.so and could not find anything. sudo ldconfig -v | grep libbcm did not return any results. I also searched /usr/lib/ and /usr/local/lib/.

Thank you!

lead-free
  • 53
  • 1
  • 1
  • 6

1 Answers1

5

The longer answer is that rpi does not support it in their packages. The camera is functional under aarch64.

Don't install the rpi packages picamera on Ubuntu 20.04 64 bit, instead use opencv, for example, to access and process images or video. OpenCV example for taking a single image:

import cv2

open camera

cap = cv2.VideoCapture('/dev/video0', cv2.CAP_V4L)

set dimensions

cap.set(cv2.CAP_PROP_FRAME_WIDTH, 2560) cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 1440)

take frame

ret, frame = cap.read()

write frame to file

cv2.imwrite('image.jpg', frame)

release camera

cap.release()

This is tested under Ubuntu 20.04.2 LTS 64bit using the RPI HQ Camera v1.0 2018 and functions as expected.

Aduen
  • 166
  • 1
  • 3