RMVL  1.0.0
RoboMaster Vision Library
模块 | 宏定义 | 类型定义 | 枚举
相机模块
相机模块 的协作图:

模块

 迈德威视(MindVision)相机库
 
 海康机器人(HikRobot)工业相机库
 

宏定义

#define CAM_WARNING(msg...)
 
#define CAM_PASS(msg...)
 
#define CAM_ERROR(msg...)
 
#define CAM_INFO(msg...)
 

类型定义

using rm::capture_ptr = std::unique_ptr< cv::VideoCapture >
 
using rm::RetrieveMode = int
 处理模式 Camera retrieve mode 更多...
 

枚举

enum  rm::GrabMode : int { rm::GRAB_CONTINUOUS = 0 , rm::GRAB_SOFTWARE = 1 , rm::GRAB_HARDWARE = 2 }
 采集模式 Camera grab mode 更多...
 
enum  rm::_RetrieveMode : RetrieveMode { rm::RETRIEVE_SDK = 0x01 , rm::RETRIEVE_CV = 0x02 , rm::RETRIEVE_LUT = 0x10 }
 
enum  rm::RMVideoActivities : uint16_t { rm::CAP_ACT_RM_ONCE_WB = 0x0101 , rm::CAP_ACT_RM_SOFT_TRIGGER = 0x0102 }
 RoboMaster Video Capture Activities 更多...
 
enum  rm::RMVideoProperties : uint16_t {
  rm::CAP_PROP_RM_AUTO_EXPOSURE = 0x001 , rm::CAP_PROP_RM_AUTO_WB = 0x002 , rm::CAP_PROP_RM_MANUAL_EXPOSURE = 0x003 , rm::CAP_PROP_RM_MANUAL_WB = 0x004 ,
  rm::CAP_PROP_RM_EXPOSURE = 0x005 , rm::CAP_PROP_RM_GAIN = 0x006 , rm::CAP_PROP_RM_GAMMA = 0x007 , rm::CAP_PROP_RM_WB_RGAIN = 0x008 ,
  rm::CAP_PROP_RM_WB_GGAIN = 0x009 , rm::CAP_PROP_RM_WB_BGAIN = 0x00a , rm::CAP_PROP_RM_CONTRAST = 0x00c , rm::CAP_PROP_RM_SATURATION = 0x00d ,
  rm::CAP_PROP_RM_SHARPNESS = 0x00e , rm::CAP_PROP_RM_FRAME_HEIGHT = 0x00f , rm::CAP_PROP_RM_FRAME_WIDTH = 0x010 , rm::CAP_PROP_RM_TRIGGER_DELAY = 0x041 ,
  rm::CAP_PROP_RM_TRIGGER_COUNT = 0x042 , rm::CAP_PROP_RM_TRIGGER_PERIOD = 0x043
}
 RoboMaster Video Capture Properties 更多...
 

详细描述

宏定义说明

◆ CAM_ERROR

#define CAM_ERROR (   msg...)

#include <rmvl/camera/camera_logging.h>

值:
do \
{ \
printf("\033[31m[ CAM-ERR ] " msg); \
printf("\033[0m\n"); \
} while (false)

◆ CAM_INFO

#define CAM_INFO (   msg...)

#include <rmvl/camera/camera_logging.h>

值:
do \
{ \
printf("[ CAM-INFO ] " msg); \
printf("\n"); \
} while (false)
示例
samples/camera/hik/sample_hik_multi.cpp.

◆ CAM_PASS

#define CAM_PASS (   msg...)

#include <rmvl/camera/camera_logging.h>

值:
do \
{ \
printf("\033[32m[ CAM-PASS ] " msg); \
printf("\033[0m\n"); \
} while (false)

◆ CAM_WARNING

#define CAM_WARNING (   msg...)

#include <rmvl/camera/camera_logging.h>

值:
do \
{ \
printf("\033[33m[ CAM-WARN ] " msg); \
printf("\033[0m\n"); \
} while (false)

类型定义说明

◆ capture_ptr

using rm::capture_ptr = typedef std::unique_ptr<cv::VideoCapture>

◆ RetrieveMode

using rm::RetrieveMode = typedef int

#include <rmvl/camera/camera_define.h>

处理模式 Camera retrieve mode

枚举类型说明

◆ _RetrieveMode

#include <rmvl/camera/camera_define.h>

枚举值
RETRIEVE_SDK 

使用官方 SDK 进行处理 Retrieve using official SDK

RETRIEVE_CV 

使用 OpenCV 的 'cvtColor' 进行处理 Retrieve using cvtColor function in OpenCV

RETRIEVE_LUT 

使用 LUT 进行处理,需配合 RETRIEVE_CV 进行使用 Retrieve using cvtColor function with Look - Up Table

◆ GrabMode

enum rm::GrabMode : int

#include <rmvl/camera/camera_define.h>

采集模式 Camera grab mode

枚举值
GRAB_CONTINUOUS 

连续采样 Continuous grabbing

GRAB_SOFTWARE 

软触发 Grab by software trigger

GRAB_HARDWARE 

硬触发 Grab by hardware trigger

◆ RMVideoActivities

enum rm::RMVideoActivities : uint16_t

#include <rmvl/camera/camera_define.h>

RoboMaster Video Capture Activities

枚举值
CAP_ACT_RM_ONCE_WB 

执行一次白平衡 Preform once white balance

CAP_ACT_RM_SOFT_TRIGGER 

执行软触发 Preform a software trigger

◆ RMVideoProperties

enum rm::RMVideoProperties : uint16_t

#include <rmvl/camera/camera_define.h>

RoboMaster Video Capture Properties

枚举值
CAP_PROP_RM_AUTO_EXPOSURE 

自动曝光 Automatic exposure

CAP_PROP_RM_AUTO_WB 

自动白平衡 Automatic white balance

CAP_PROP_RM_MANUAL_EXPOSURE 

手动曝光 Manual exposure

CAP_PROP_RM_MANUAL_WB 

手动白平衡 Manual white balance

CAP_PROP_RM_EXPOSURE 

曝光值 Expusure

CAP_PROP_RM_GAIN 

模拟增益 Analog gain

CAP_PROP_RM_GAMMA 

Gamma 值 Gamma

CAP_PROP_RM_WB_RGAIN 

白平衡红色分量 Red channel gain of white balance

CAP_PROP_RM_WB_GGAIN 

白平衡绿色分量 Green channel gain of white balance

CAP_PROP_RM_WB_BGAIN 

白平衡蓝色分量 Blue channel gain of white balance

CAP_PROP_RM_CONTRAST 

对比度 Contrast ratio

CAP_PROP_RM_SATURATION 

饱和度 Saturation ratio

CAP_PROP_RM_SHARPNESS 

锐度 Sharpness ratio

CAP_PROP_RM_FRAME_HEIGHT 

图像帧高度 Frame height

CAP_PROP_RM_FRAME_WIDTH 

图像帧宽度 Frame width

CAP_PROP_RM_TRIGGER_DELAY 

硬触发采集延迟(微秒)Hard trigger collection delay (μs)

CAP_PROP_RM_TRIGGER_COUNT 

单次触发时的触发帧数 The number of frames in a single trigger

CAP_PROP_RM_TRIGGER_PERIOD 

单次触发时多次采集的周期(微秒)The period of multiple collection for a single trigger (μs)