Skip to content

A simple, easy to use dialog window for controlling Qt 6.8 QCameras

License

Notifications You must be signed in to change notification settings

m-riley04/QtCameraControls

Repository files navigation

QtCameraControls

A widget/dialog for controlling Qt camera settings and state. It includes all available slots for QCamera for Qt 6.8.0.

Table of Contents

Supported Platforms

  • Windows
  • Linux (untested, but theoretically should work)
  • MacOS (untested, but theoretically should work)

Features

  • Full control over almost every QCamera imaging property, including:
    • Camera start/stop
    • Auto Exposure Time
    • Auto ISO Sensitivity
    • Color Temperature
    • Exposure Compensation
    • Flash Mode
    • Manual Exposure Time
    • Manual ISO Sensitivity
    • Torch Mode
    • White Balance Mode
  • Ability to pick and choose the camera format:
    • Frame Rate
    • Resolution
    • Pixel Format
  • Control over the zoom and focus of the camera, specifically:
    • Zoom Factor
    • Focus Mode
    • Focus Distance
  • FFMPEG support for UVC camera control
  • Save/Close/Reset Defaults buttons functionality
  • Full checks for camera feature availablility
  • "Full" error handling
  • Docstrings for all functions

NOTE: While the code should be fully functional, some camera features may not be recognized as "supported" due to current QCamera limitations.

Test Program Features

  • Basic camera preview:
    • QVideoWidget preview
    • Camera device selection
    • Add auto-refresh for camera devices

Build Instructions

  1. Clone the repository
  2. Install the necessary dependencies
  3. Open the solution (preferrably in Visual Studio)
  4. Build the solution

Usage

Main Window

This is a window primarily for showing the utilization of the QtCameraControlsDialog widget. It has the following features:

  • QVideoWidget for viewing the current camera preview
  • Dropdown for selecting the camera device
    • Automatically updates, but can be manually refreshed through the menu bar
  • Menubar for certain functions and "About" links

QtCameraControlDialog

This is the dialog window/widget that is used to control the camera options/settings. At the top, you are able to see the camera device name and toggle it on or off.

Formats

This tab is for changing the format of the camera:

  • FPS
  • Resolution
  • Pixel Format

Zoom and Focus

This tab is for chaning the zoom and focus properties of the camera:

  • Zoom Rate
  • Zoom Factor
  • Focus Mode
  • Focus Distance

Settings and Properties

This tab is for changing the majority of the camera's visual properties:

  • Color Temperature
  • Exposure Mode
  • Exposure Composition
  • Flash Mode
  • Auto Exposure Time
  • Auto ISO Sensitivity
  • Manual ISO Sensitivity
  • Torch Mode
  • White Balance Mode
  • FFMPEG-based DirectShow UVC control window (Windows only)

Dependencies

  • Qt 6.8.0
    • QtCore
    • QtGUI
    • QtMultimedia
    • QtMultimediaWidgets

NOTE: If you are using Visual Studio, you should use the official Qt Visual Studio Tools extension to manage your Qt installation.