对于视频流获取方面新加了一个用Mindvision官方说明的获取方式,测试了代码运行是内存占用高达1G
This commit is contained in:
@@ -12,13 +12,15 @@ extern "C" {
|
||||
|
||||
class MindVisionCamera {
|
||||
public:
|
||||
int camera_handle; // MindVision SDK中的相机句柄
|
||||
CameraHandle camera_handle; // MindVision SDk中的相机句柄
|
||||
bool is_opened;
|
||||
std::string target_color;
|
||||
int width;
|
||||
int height;
|
||||
int fps;
|
||||
unsigned char* g_pRgbBuffer; // 处理后数据缓存区
|
||||
tSdkCameraCapbility capability; // 相机能力信息
|
||||
tSdkImageResolution image_resolution; // 分辨率信息
|
||||
|
||||
MindVisionCamera(int cam_id = 0, const std::string& target_color = "red");
|
||||
~MindVisionCamera();
|
||||
@@ -29,6 +31,10 @@ public:
|
||||
void release();
|
||||
bool switch_color(const std::string& target_color);
|
||||
|
||||
int get_width() const { return width; }
|
||||
int get_height() const { return height; }
|
||||
bool set_resolution(int width, int height);
|
||||
|
||||
private:
|
||||
void set_camera_parameters();
|
||||
bool initialize_camera(int cam_id);
|
||||
|
||||
Reference in New Issue
Block a user