Skip to content

Juxi-Technology/USB-Auto-Focus-Camera

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

USB-Auto-Focus-Camera

Visual Testing Software (Windows)

Videocap Software (Can Take Photos)

Software Tutorial

Insert image description here Insert image description here Insert image description here Insert image description here Insert image description here Insert image description here Insert image description here

Linux: Switching Between Fixed Focus / Auto-Focus Mode

1. Setting via guvcview GUI Software

sudo apt-get install guvcview
  1. Open the guvcview software
  2. Find Auto Focus(continuous) and Focus,Automatic Continuous and uncheck them
  3. Set the focus by dragging or entering a value (0-1023) in Focus,Absolute Insert image description here

2. Adjusting via Command Line

  1. Install the v4l-utils toolkit, which provides the v4l2-ctl command for controlling camera parameters: Check camera device
sudo apt install v4l-utils
  1. Check the camera device, use the lsusb command to confirm the camera is connected and recognized: Insert image description here Example output: Bus 001 Device 006: ID 1e45:0209 CN02KX4NLG0004AK00 USB Camera This indicates the camera has been recognized.

  2. Check focus mode parameters Use v4l2-ctl to view the supported focus mode parameters of the camera:

v4l2-ctl -d /dev/video0 --list-ctrls

Insert image description here Key parameters include:

  • focus_absolute: Absolute focus value (0-1023)
  • focus_automatic_continuous: Continuous auto-focus mode (0=off, 1=on)
  1. Switch focus mode
  • Manual focus: Turn off auto-focus and set the absolute focus value
 v4l2-ctl -d /dev/video0 --set-ctrl=focus_auto=0
v4l2-ctl -d /dev/video0 --set-ctrl=focus_absolute=500  # Set focus value (0-1000)
  • Auto-focus: Turn on auto-focus
v4l2-ctl -d /dev/video0 --set-ctrl=focus_auto=1
  1. Verify focus mode Check the parameters again to confirm the switch result:
 v4l2-ctl -d /dev/video0 --get-ctrl=focus_auto,focus_absolute

FAQ

1. Auto-focus not working Check if the focus option is checked. If the focus is not clear, you can also use pliers to twist the lens. The lens is threaded and can be rotated for focusing. 2. Low frame rate Set the format to MJPG AVC H.264

About

USB Driver-Free 86° Wide Angle AF 1080P 30FPS Camera

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors