A.R.G.U.S 2.1.0
Adaptive Real-Time Guardian for Unsafe Situations
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | List of all members
CameraCapture Class Reference

Camera capture facade with pluggable backend implementations. More...

#include <CameraCapture.hpp>

Classes

struct  Options
 Construction options for camera capture. More...
 

Public Types

enum class  BackendPreference { Auto , OpenCvVideoCapture , Libcamera2OpenCv }
 Backend selection policy. More...
 

Public Member Functions

 CameraCapture (int camera_index=0)
 Construct using explicit camera index.
 
 CameraCapture (Options options)
 Construct using full options.
 
 ~CameraCapture ()
 Release camera hardware resources.
 
 CameraCapture (const CameraCapture &)=delete
 
CameraCaptureoperator= (const CameraCapture &)=delete
 
 CameraCapture (CameraCapture &&)=delete
 
CameraCaptureoperator= (CameraCapture &&)=delete
 
bool waitForNextFrame (FrameEvent &output_event)
 Wait for the next captured frame.
 
std::string backendName () const
 Return active backend name.
 
std::string backendImplementation () const
 Return active backend implementation family.
 
BackendPreference backendPreference () const noexcept
 Return requested backend preference.
 
bool setFocusPosition (float position)
 Set camera focus position when backend/hardware supports it.
 
float getFocusPosition () const
 Get current requested focus position.
 

Detailed Description

Definition at line 27 of file CameraCapture.hpp.

Member Enumeration Documentation

◆ BackendPreference

Enumerator
Auto 

Auto-select backend based on platform/runtime constraints.

OpenCvVideoCapture 

Force OpenCV VideoCapture backend.

Libcamera2OpenCv 

Force libcamera2opencv callback backend.

Definition at line 32 of file CameraCapture.hpp.

Constructor & Destructor Documentation

◆ CameraCapture() [1/4]

CameraCapture::CameraCapture ( int  camera_index = 0)
explicit
Parameters
camera_indexCamera index.

Definition at line 507 of file CameraCapture.cpp.

◆ CameraCapture() [2/4]

CameraCapture::CameraCapture ( Options  options)
explicit
Parameters
optionsCamera options.

Definition at line 510 of file CameraCapture.cpp.

References makeCameraBackend().

◆ ~CameraCapture()

CameraCapture::~CameraCapture ( )
default

◆ CameraCapture() [3/4]

CameraCapture::CameraCapture ( const CameraCapture )
delete

◆ CameraCapture() [4/4]

CameraCapture::CameraCapture ( CameraCapture &&  )
delete

Member Function Documentation

◆ backendImplementation()

std::string CameraCapture::backendImplementation ( ) const
Returns
Implementation family (for example, OpenCV VideoCapture).

Definition at line 531 of file CameraCapture.cpp.

Referenced by AppController::runCameraBackendCheck(), and AppController::runLiveMarkerTest().

◆ backendName()

std::string CameraCapture::backendName ( ) const
Returns
Backend name string, or "CLOSED" if backend is not active.

Definition at line 524 of file CameraCapture.cpp.

◆ backendPreference()

CameraCapture::BackendPreference CameraCapture::backendPreference ( ) const
noexcept
Returns
Backend preference enum.

Definition at line 538 of file CameraCapture.cpp.

◆ getFocusPosition()

float CameraCapture::getFocusPosition ( ) const
Returns
Focus position in the same convention as setFocusPosition().

Definition at line 553 of file CameraCapture.cpp.

◆ operator=() [1/2]

CameraCapture & CameraCapture::operator= ( CameraCapture &&  )
delete

◆ operator=() [2/2]

CameraCapture & CameraCapture::operator= ( const CameraCapture )
delete

◆ setFocusPosition()

bool CameraCapture::setFocusPosition ( float  position)
Parameters
positionFocus request: -1.0 autofocus, 0.0 closest, 1.0 farthest.
Returns
true when request is accepted by backend, otherwise false.

Definition at line 542 of file CameraCapture.cpp.

◆ waitForNextFrame()

bool CameraCapture::waitForNextFrame ( FrameEvent output_event)
Parameters
output_eventOutput frame event populated on success.
Returns
true on successful frame delivery, otherwise false.

Definition at line 517 of file CameraCapture.cpp.


The documentation for this class was generated from the following files: