Skip to content

Start USB3 UVC Camera on Windows

Note

If you are using windows operating system, we recommend using PotPlayer and Python Opencv Demo to access UVC3.0 camera.

Hardware Connection


  • Package List (Example: B0471)
  • Connection

Software Guide


PotPlayer


  • Supported Systems

Windows 8、Windows 8.1、Windows 10 and higher version

  • Download PotPlayer

You can download the PotPlayer software from the link below and install it on your computer

PotPlayer Download

  • How to turn on the camera

After opening the software, click in the upper left corner to open the menu

  • How to choose the Resolution and Frame rate

  • How to control other parameters



Python OpenCV Demo1


  • Supported Systems

Windows and Linux

  • Demo Code

Gitlab-Python demo code

  • Install dependencies
python -m pip install -r requirements.txt
  • Check Help
python arducam_demo.py -h

  • How to turn on the camera
python .\arducam_demo.py -F -W 3840 -H 2160 -d 1280:720

input "q" on the keyboard to exit the camera

  • Save Images

Add the -o parameter to the running command, and enter s on the keyboard to save the picture to the specified path

python .\arducam_demo.py -F -W 3840 -H 2160 -d 1280:720 -o test.jpg

Python OpenCV Demo2

This is a simple demo to show how you set the manual exposure mode with your camera module.

import cv2

def list_ports():
    is_working = True
    dev_port = 0
    while is_working:
        camera = cv2.VideoCapture(dev_port)
        if not camera.isOpened():
            is_working = False
            print("Camera",dev_port,"not found")
        else:
            is_working = False
            print("Camera",dev_port,"found")
        dev_port += 1
    return dev_port-1

camera_index = list_ports()
cap = cv2.VideoCapture(camera_index)

if cap.isOpened():
    # 1. Automatic exposure control, Linux OS: AUTO=0, Manual=1; Windows OS: AUTO=1, Manual=0
    cap.set(cv2.CAP_PROP_AUTO_EXPOSURE, 0)  

    # 2. Set Exposure Value:  Experiment with these values!
    exposure_value = -12  # Example: Adjust as needed. Exposure range from -13 ~ -1(int)
    cap.set(cv2.CAP_PROP_EXPOSURE, exposure_value)
    print(f"Exposure set to: {exposure_value}")

    # 3. Set Gain (Optional):  Gain can also affect brightness
    gain_value = 100 # Example: Adjust as needed.
    cap.set(cv2.CAP_PROP_GAIN, gain_value)
    print(f"Gain set to: {gain_value}")

    cv2.namedWindow("Video", cv2.WINDOW_NORMAL) # Create a window to display the video

    while(True):
        ret, frame = cap.read()
        if not ret: # Check if frame reading was successful
            print("Error reading frame. Check camera connection or video source.")
            break
        cv2.imshow('Video', frame) # Display the frame
        if cv2.waitKey(1) & 0xFF == ord('q'): # Press 'q' to quit
            break

    cap.release()
    cv2.destroyAllWindows()

else:
    print("Failed to open camera.")