1 Star 0 Fork 0

Open3DV/lumos-firmware

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
device_control.h 1.98 KB
一键复制 编辑 原始数据 按行查看 历史
zhangguanjin 提交于 2024-03-15 14:26 . Create a virtual camera
#pragma once
#include "buffer_queue_control.h"
#include<chrono>
#include<ctime>
#include <time.h>
#include <map>
#include "patterns_cache_control.h"
#include "camera_param.h"
class DeviceControl
{
public:
static DeviceControl *getInstance()
{
if (instance == nullptr)
{
instance = new DeviceControl();
}
return instance;
}
private:
DeviceControl(){};
~DeviceControl(){};
static DeviceControl *instance;
public:
int setEnumFeatureParam(std::string feature,std::string value);
int setIntFeatureParam(std::string feature,std::string value);
int setFloatFeatureParam(std::string feature,std::string value);
int setBoolFeatureParam(std::string feature,std::string value);
int setCommandFeatureParam(std::string feature,std::string value);
public:
int init();
int captureOneFrame();
int reconstructOneFrame();
int captureRaw(std::string pattterns_selector,std::string exposure_model,char* &data,PatternsParamStruct& param);
int captureFrameContinue();
int captureFrameContinueThread();
void startCaptureContinue();
void stopCaptureContinue();
void getCalibParam(struct CameraCalibParam& param);
void getResulotion(int &width,int &height);
void setProjectSolidField(bool enable);
void getTimestamp(std::string &stamp);
void setGrabStatus(bool start);
public:
void handle_error(int code);
private:
int camera_width_ = 0;
int camera_height_ = 0;
BufferQueneuControl* stream_control_ptr_;
// Scan3D scan3d_;
struct CameraCalibParam param;
int frame_status_;
bool continue_capture_flag_ = false;
bool start_grab_flag_ = false;
std::timed_mutex capture_mutex_;
std::thread producer_;
};
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C/C++
1
https://gitee.com/open3dv/lumos-firmware.git
git@gitee.com:open3dv/lumos-firmware.git
open3dv
lumos-firmware
lumos-firmware
master

搜索帮助