![]() |
SmartSpectra C++ SDK
Measure human vitals from video with SmartSpectra C++ SDK.
|
Abstract interface for camera/video input sources. More...
#include <video_source.hpp>
Public Member Functions | |
| VideoSource & | operator>> (cv::Mat &frame) |
| virtual absl::Status | Initialize (const VideoSourceSettings &settings) |
| virtual bool | SupportsExactFrameTimestamp () const =0 |
| virtual int64_t | GetFrameTimestamp () const =0 |
| virtual absl::Status | TurnOnAutoExposure () |
| Enable automatic exposure mode. | |
| virtual absl::Status | TurnOffAutoExposure () |
| Disable automatic exposure and switch to manual mode. | |
| virtual absl::Status | ToggleAutoExposure () |
| Toggle between automatic and manual exposure modes. | |
| virtual absl::StatusOr< bool > | IsAutoExposureOn () |
| Check if automatic exposure is currently enabled. | |
| virtual absl::Status | IncreaseExposure () |
| Increase exposure by a fixed hardware-specific step. | |
| virtual absl::Status | DecreaseExposure () |
| Decrease exposure by a fixed hardware-specific step. | |
| virtual absl::Status | SetExposure (double value) |
| Set exposure to a normalized value. | |
| virtual absl::StatusOr< double > | GetExposure () |
| Get current exposure as a normalized value. | |
| virtual bool | SupportsExposureControls () |
| Check if this video source supports exposure controls. | |
| virtual bool | SupportsWhiteBalanceControls () |
| Check if this video source supports white balance controls. | |
| virtual absl::Status | TurnOnAutoWhiteBalance () |
| Enable automatic white balance mode. | |
| virtual absl::Status | TurnOffAutoWhiteBalance () |
| Disable automatic white balance and switch to manual mode. | |
| virtual absl::Status | ToggleAutoWhiteBalance () |
| Toggle between automatic and manual white balance modes. | |
| virtual absl::StatusOr< bool > | IsAutoWhiteBalanceOn () |
| Check if automatic white balance is currently enabled. | |
| virtual absl::Status | IncreaseWhiteBalance () |
| Increase white balance temperature by a fixed hardware-specific step. | |
| virtual absl::Status | DecreaseWhiteBalance () |
| Decrease white balance temperature by a fixed hardware-specific step. | |
| virtual absl::Status | SetWhiteBalance (double value) |
| Set white balance temperature to a normalized value. | |
| virtual absl::StatusOr< double > | GetWhiteBalance () |
| Get current white balance temperature as a normalized value. | |
| virtual bool | SupportsGainControl () |
| Check if this video source supports gain controls. | |
| virtual absl::Status | IncreaseGain () |
| Increase gain by a fixed hardware-specific step. | |
| virtual absl::Status | DecreaseGain () |
| Decrease gain by a fixed hardware-specific step. | |
| virtual absl::Status | SetGain (double value) |
| Set gain to a normalized value. | |
| virtual absl::StatusOr< double > | GetGain () |
| Get current gain as a normalized value. | |
| virtual int | GetWidth () |
| virtual int | GetHeight () |
| virtual InputTransformMode | GetDefaultInputTransformMode () |
| bool | HasFrameDimensions () |
| virtual bool | SupportsCompressedOutput () |
| virtual bool | ProduceCompressedFrame (std::vector< uint8_t > &jpeg_data) |
Protected Member Functions | |
| virtual void | ProducePreTransformFrame (cv::Mat &frame)=0 |
Protected Attributes | |
| InputTransformer | input_transformer |
Abstract interface for camera/video input sources.
|
virtual |
Decrease exposure by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Decrease gain by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Decrease white balance temperature by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Get current exposure as a normalized value.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
pure virtual |
return the current frame's timestamp, in microseconds
Implemented in presage::smartspectra::video_source::capture::CaptureCameraSource, presage::smartspectra::video_source::capture::CaptureVideoAndTimeStampFile, presage::smartspectra::video_source::capture::CaptureVideoFileSource, presage::smartspectra::video_source::file_stream::FileStreamVideoSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Get current gain as a normalized value.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Get current white balance temperature as a normalized value.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
| bool presage::smartspectra::video_source::VideoSource::HasFrameDimensions | ( | ) |
Check if the source has valid frame dimension information.
|
virtual |
Increase exposure by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Increase gain by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Increase white balance temperature by a fixed hardware-specific step.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Configure the source with provided settings.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, presage::smartspectra::video_source::capture::CaptureVideoAndTimeStampFile, presage::smartspectra::video_source::capture::CaptureVideoFileSource, presage::smartspectra::video_source::file_stream::FileStreamVideoSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if automatic exposure is currently enabled.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if automatic white balance is currently enabled.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
| VideoSource & presage::smartspectra::video_source::VideoSource::operator>> | ( | cv::Mat & | frame | ) |
Grab the next frame from the source.
|
virtual |
Get the next frame as compressed JPEG data (if supported). Only call this if SupportsCompressedOutput() returns true.
| jpeg_data | Output buffer for compressed JPEG data |
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Set exposure to a normalized value.
| value | Normalized exposure value in range [0.0, 1.0] where 0.0 is minimum and 1.0 is maximum. |
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Set gain to a normalized value.
| value | Normalized gain value in range [0.0, 1.0] where 0.0 is minimum and 1.0 is maximum. |
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Set white balance temperature to a normalized value.
| value | Normalized white balance value in range [0.0, 1.0] where 0.0 is coolest and 1.0 is warmest. |
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if this video source can provide compressed JPEG frames directly. This allows bypassing recompression when the source already provides MJPEG.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if this video source supports exposure controls.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if this video source supports gain controls.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Check if this video source supports white balance controls.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Toggle between automatic and manual exposure modes.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Toggle between automatic and manual white balance modes.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Disable automatic exposure and switch to manual mode.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Disable automatic white balance and switch to manual mode.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Enable automatic exposure mode.
Reimplemented in presage::smartspectra::video_source::capture::CaptureCameraSource, and presage::smartspectra::video_source::v4l2::V4l2CameraSource.
|
virtual |
Enable automatic white balance mode.
Reimplemented in presage::smartspectra::video_source::v4l2::V4l2CameraSource.