Quick start
Hardware
Software
Focus control
For motorized-focus ov5647 sensor
Please run the command 'sudo nano /boot/config.txt' and add the content below under [all] in the config file to configure the camera and motor driver.
Then reboot your Pi to take effect.Use libcamera to preview the camera:
For motorized-focus imx219 sensor
Please run the command 'sudo nano /boot/config.txt' and add the content below under [all] in the config file to configure the camera and motor driver.
Then reboot your Pi to take effect.Use libcamera to preview the camera:
Python demo
Arducam has released three demos: Motorized_Focus_Camera_Preview.py, Autofocus.py, and FocuserExample.py
Preparation
You need to perform the following steps first:
Step 1. Install dependencies
sudo apt-get upgrade
sudo apt install -y python3-kms++ python3-libcamera python3-pip
sudo apt install -y python3-pyqt5 python3-prctl libatlas-base-dev ffmpeg
sudo pip3 install numpy --upgrade
sudo pip3 install picamera2 opencv-python
Step 2. Install the driver and libcamera
Find your corresponding camera in the following two links, and then execute the following command
Note
If you do not find your camera please contact us.(support@arducam.com)
Step 3. Download library
Step 4. Enable i2c
Press Y to reboot
Usage
Motorized_Focus_Camera_Preview.py
- This demo supports focusing in preview mode, You can see the focus visually
- Single focus by keyboard up and down
AutofocusTest.py
- This demo supports auto focusing in preview mode, You can see the focus visually
- Click the ‘F’ button to achieve autofocus, click the ‘Q’ button to exit and save the /picture
FocuserExample.py
- FocuserExample.py Example of manual focus