6 #define LOG_WEBCAM_WARN(...) Utils::log("SENSWebCamera", __VA_ARGS__);
10 #define LOG_WEBCAM_INFO
11 #define LOG_WEBCAM_DEBUG
15 bool provideIntrinsics)
19 Utils::warnMsg(
"SENSWebCamera",
"Call to start was ignored. Camera is currently running!", __LINE__, __FILE__);
33 int id = std::stoi(deviceId);
86 updateFrame(bgrImg, cv::Mat(),
false, bgrImg.rows, bgrImg.cols);
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);
#define LOG_WEBCAM_WARN(...)
SENSCameraConfig _config
indicates what is currently running
std::atomic< bool > _permissionGranted
SENSCaptureProps _captureProperties
std::atomic< bool > _started
flags if camera was started
void updateFrame(cv::Mat bgrImg, cv::Mat intrinsics, int width, int height, bool intrinsicsChanged)
void processStart()
call from start function to do startup preprocessing
bool contains(cv::Size toFind)
void add(int widthPix, int heightPix, float focalLengthPix)
bool containsDeviceId(const std::string &deviceId) const
void stop() override
Stop a started camera device.
cv::VideoCapture _videoCapture
const SENSCameraConfig & start(std::string deviceId, const SENSCameraStreamConfig &streamConfig, bool provideIntrinsics=true) override
const SENSCaptureProps & captureProperties() override
Get SENSCaptureProps which contains necessary information about all available camera devices and thei...
std::thread _cameraThread
The SLScene class represents the top level instance holding the scene structure.
void warnMsg(const char *tag, const char *msg, const int line, const char *file)
Platform independent warn message output.
SENSCameraStreamConfig streamConfig
currently selected stream config index (use it to look up original capture size)