#include <SENSWebCamera.h>
Definition at line 11 of file SENSWebCamera.h.
◆ SENSWebCamera()
| SENSWebCamera::SENSWebCamera |
( |
| ) |
|
|
inline |
Definition at line 14 of file SENSWebCamera.h.
std::atomic< bool > _permissionGranted
◆ captureProperties()
Get SENSCaptureProps which contains necessary information about all available camera devices and their capabilities.
Implements SENSCamera.
Definition at line 93 of file SENSWebCamera.cpp.
98 static std::vector<cv::Size> testSizes = {
108 for (
int i = 0; i < 10; ++i)
117 for (
auto s : testSizes)
123 cv::Size newSize = frame.size();
124 if (!characteristics.contains(newSize) &&
125 newSize != cv::Size(0, 0))
128 characteristics.add(newSize.width, newSize.height, -1.f);
141 dummyProps.add(640, 480, -1.f);
SENSCaptureProps _captureProperties
cv::VideoCapture _videoCapture
The SLScene class represents the top level instance holding the scene structure.
◆ grab()
| void SENSWebCamera::grab |
( |
| ) |
|
Definition at line 77 of file SENSWebCamera.cpp.
86 updateFrame(bgrImg, cv::Mat(),
false, bgrImg.rows, bgrImg.cols);
#define LOG_WEBCAM_WARN(...)
SENSCameraConfig _config
indicates what is currently running
void updateFrame(cv::Mat bgrImg, cv::Mat intrinsics, int width, int height, bool intrinsicsChanged)
SENSCameraStreamConfig streamConfig
currently selected stream config index (use it to look up original capture size)
◆ start()
Call this function to configure the camera if you exactly know, what device you want to open and with which stream configuration. You can find out these properties by using SENSCaptureProps object (see getCaptureProperties())
- Parameters
-
| deviceId | camera device id to start |
| streamConfig | SENSCameraStreamConfig from camera device. This defines the size of the image. The image is converted to BGR and assigned to SENSFrame::imgBGR. |
| provideIntrinsics | specifies if intrinsics estimation should be enabled. The estimated intrinsics are transferred with every SENSFrame as they may be different for every frame (e.g. on iOS). This value has different effects on different architectures. |
- Returns
- the found configuration that is adjusted and used when SENSCamera::start() is called.
Implements SENSCamera.
Definition at line 13 of file SENSWebCamera.cpp.
19 Utils::warnMsg(
"SENSWebCamera",
"Call to start was ignored. Camera is currently running!", __LINE__, __FILE__);
33 int id = std::stoi(deviceId);
std::atomic< bool > _started
flags if camera was started
void processStart()
call from start function to do startup preprocessing
bool containsDeviceId(const std::string &deviceId) const
const SENSCaptureProps & captureProperties() override
Get SENSCaptureProps which contains necessary information about all available camera devices and thei...
std::thread _cameraThread
void warnMsg(const char *tag, const char *msg, const int line, const char *file)
Platform independent warn message output.
◆ stop()
| void SENSWebCamera::stop |
( |
| ) |
|
|
overridevirtual |
◆ _cameraThread
| std::thread SENSWebCamera::_cameraThread |
|
private |
◆ _stop
| std::atomic_bool SENSWebCamera::_stop {false} |
|
private |
◆ _videoCapture
| cv::VideoCapture SENSWebCamera::_videoCapture |
|
private |
The documentation for this class was generated from the following files: