feat:测试连接海康摄像头
commit
81e4ff45ec
|
|
@ -0,0 +1,46 @@
|
||||||
|
cmake_minimum_required(VERSION 3.16)
|
||||||
|
project(MvsTest LANGUAGES CXX)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 20)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# 头文件目录
|
||||||
|
set(HIK_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/third_party/hikrobot/include)
|
||||||
|
|
||||||
|
# 你封装的 cpp 文件目录
|
||||||
|
set(HIK_SRC_DIR ${CMAKE_SOURCE_DIR}/third_party/hikrobot/src)
|
||||||
|
|
||||||
|
# 海康 MVS 动态库目录
|
||||||
|
set(HIK_LIB_DIR /opt/MVS/lib/aarch64)
|
||||||
|
|
||||||
|
add_executable(MvsTest
|
||||||
|
src/main.cpp
|
||||||
|
${HIK_SRC_DIR}/MvCamera.cpp
|
||||||
|
)
|
||||||
|
|
||||||
|
target_include_directories(MvsTest PRIVATE
|
||||||
|
${HIK_INCLUDE_DIR}
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(HIK_MV_CAMERA_CONTROL
|
||||||
|
NAMES MvCameraControl
|
||||||
|
PATHS ${HIK_LIB_DIR}
|
||||||
|
NO_DEFAULT_PATH
|
||||||
|
)
|
||||||
|
|
||||||
|
if(NOT HIK_MV_CAMERA_CONTROL)
|
||||||
|
message(FATAL_ERROR "Cannot find libMvCameraControl.so in ${HIK_LIB_DIR}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
message(STATUS "HIK_MV_CAMERA_CONTROL = ${HIK_MV_CAMERA_CONTROL}")
|
||||||
|
|
||||||
|
target_link_libraries(MvsTest PRIVATE
|
||||||
|
${HIK_MV_CAMERA_CONTROL}
|
||||||
|
pthread
|
||||||
|
dl
|
||||||
|
)
|
||||||
|
|
||||||
|
set_target_properties(MvsTest PROPERTIES
|
||||||
|
BUILD_RPATH "${HIK_LIB_DIR}"
|
||||||
|
INSTALL_RPATH "${HIK_LIB_DIR}"
|
||||||
|
)
|
||||||
|
|
@ -0,0 +1,248 @@
|
||||||
|
#include <iostream>
|
||||||
|
#include <iomanip>
|
||||||
|
#include <sstream>
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include <chrono>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
|
#include "MvCamera.h"
|
||||||
|
|
||||||
|
static std::string ToHex(int v)
|
||||||
|
{
|
||||||
|
std::ostringstream oss;
|
||||||
|
oss << "0x" << std::hex << std::uppercase << v;
|
||||||
|
return oss.str();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintRawBytes(const void* data, size_t size, const char* name)
|
||||||
|
{
|
||||||
|
const auto* p = static_cast<const uint8_t*>(data);
|
||||||
|
|
||||||
|
std::printf("%s.Length = %zu\n", name, size);
|
||||||
|
|
||||||
|
for (size_t i = 0; i < size; ++i)
|
||||||
|
{
|
||||||
|
std::printf("%02X", p[i]);
|
||||||
|
if (i + 1 < size)
|
||||||
|
{
|
||||||
|
std::printf("-");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
std::printf("\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintFrameStructInfo()
|
||||||
|
{
|
||||||
|
std::cout << "sizeof(MV_FRAME_OUT) = " << sizeof(MV_FRAME_OUT) << std::endl;
|
||||||
|
std::cout << "sizeof(MV_FRAME_OUT_INFO_EX) = " << sizeof(MV_FRAME_OUT_INFO_EX) << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
static void PrintDeviceInfo(const MV_CC_DEVICE_INFO* pInfo, unsigned int index)
|
||||||
|
{
|
||||||
|
if (pInfo == nullptr)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "[" << index << "] ";
|
||||||
|
|
||||||
|
if (pInfo->nTLayerType == MV_GIGE_DEVICE)
|
||||||
|
{
|
||||||
|
std::cout << "GigE";
|
||||||
|
const auto& s = pInfo->SpecialInfo.stGigEInfo;
|
||||||
|
std::cout << " model=" << s.chModelName
|
||||||
|
<< " ip="
|
||||||
|
<< ((s.nCurrentIp & 0xFF000000) >> 24) << "."
|
||||||
|
<< ((s.nCurrentIp & 0x00FF0000) >> 16) << "."
|
||||||
|
<< ((s.nCurrentIp & 0x0000FF00) >> 8) << "."
|
||||||
|
<< ((s.nCurrentIp & 0x000000FF));
|
||||||
|
}
|
||||||
|
else if (pInfo->nTLayerType == MV_USB_DEVICE)
|
||||||
|
{
|
||||||
|
std::cout << "USB";
|
||||||
|
const auto& s = pInfo->SpecialInfo.stUsb3VInfo;
|
||||||
|
std::cout << " model=" << s.chModelName
|
||||||
|
<< " serial=" << s.chSerialNumber;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
std::cout << "Other device";
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << std::endl;
|
||||||
|
}
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
|
||||||
|
int nRet = CMvCamera::InitSDK();
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "InitSDK failed: " << ToHex(nRet) << std::endl;
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_CC_DEVICE_INFO_LIST stDeviceList;
|
||||||
|
std::memset(&stDeviceList, 0, sizeof(stDeviceList));
|
||||||
|
|
||||||
|
nRet = CMvCamera::EnumDevices(MV_GIGE_DEVICE | MV_USB_DEVICE, &stDeviceList);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "EnumDevices failed: " << ToHex(nRet) << std::endl;
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (stDeviceList.nDeviceNum == 0)
|
||||||
|
{
|
||||||
|
std::cerr << "No camera found." << std::endl;
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::cout << "Found " << stDeviceList.nDeviceNum << " device(s)" << std::endl;
|
||||||
|
for (unsigned int i = 0; i < stDeviceList.nDeviceNum; ++i)
|
||||||
|
{
|
||||||
|
PrintDeviceInfo(stDeviceList.pDeviceInfo[i], i);
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_CC_DEVICE_INFO* pDeviceInfo = stDeviceList.pDeviceInfo[0];
|
||||||
|
if (pDeviceInfo == nullptr)
|
||||||
|
{
|
||||||
|
std::cerr << "First device info is null." << std::endl;
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
CMvCamera camera;
|
||||||
|
|
||||||
|
nRet = camera.Open(pDeviceInfo);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "Open failed: " << ToHex(nRet) << std::endl;
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// GigE 建议设置最佳包大小
|
||||||
|
if (pDeviceInfo->nTLayerType == MV_GIGE_DEVICE)
|
||||||
|
{
|
||||||
|
unsigned int optimalPacketSize = 0;
|
||||||
|
int retPacket = camera.GetOptimalPacketSize(&optimalPacketSize);
|
||||||
|
if (MV_OK == retPacket && optimalPacketSize > 0)
|
||||||
|
{
|
||||||
|
int retSet = camera.SetIntValue("GevSCPSPacketSize", optimalPacketSize);
|
||||||
|
if (MV_OK != retSet)
|
||||||
|
{
|
||||||
|
std::cerr << "Warning: Set GevSCPSPacketSize failed: " << ToHex(retSet) << std::endl;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 连续采集模式
|
||||||
|
nRet = camera.SetEnumValueByString("TriggerMode", "Off");
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "Set TriggerMode Off failed: " << ToHex(nRet) << std::endl;
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
nRet = camera.StartGrabbing();
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "StartGrabbing failed: " << ToHex(nRet) << std::endl;
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
// 稍等一会儿,让流稳定一点
|
||||||
|
std::this_thread::sleep_for(std::chrono::milliseconds(200));
|
||||||
|
|
||||||
|
MV_FRAME_OUT stFrame = {};
|
||||||
|
nRet = camera.GetImageBuffer(&stFrame, 3000);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "GetImageBuffer failed: " << ToHex(nRet) << std::endl;
|
||||||
|
camera.StopGrabbing();
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
PrintFrameStructInfo();
|
||||||
|
PrintRawBytes(&stFrame, sizeof(MV_FRAME_OUT), "stFrame");
|
||||||
|
|
||||||
|
std::cout << "Grab success:"
|
||||||
|
<< " width=" << stFrame.stFrameInfo.nWidth
|
||||||
|
<< " height=" << stFrame.stFrameInfo.nHeight
|
||||||
|
<< " frameLen=" << stFrame.stFrameInfo.nFrameLen
|
||||||
|
<< " pixelType=0x" << std::hex << std::uppercase
|
||||||
|
<< static_cast<unsigned int>(stFrame.stFrameInfo.enPixelType)
|
||||||
|
<< std::dec << std::endl;
|
||||||
|
|
||||||
|
// 保存为 bmp/jpg 都可以
|
||||||
|
MV_SAVE_IMAGE_PARAM_EX3 stSaveParam;
|
||||||
|
std::memset(&stSaveParam, 0, sizeof(stSaveParam));
|
||||||
|
|
||||||
|
stSaveParam.enImageType = MV_Image_Bmp; // 也可改为 MV_Image_Jpeg
|
||||||
|
stSaveParam.enPixelType = stFrame.stFrameInfo.enPixelType;
|
||||||
|
stSaveParam.nWidth = stFrame.stFrameInfo.nWidth;
|
||||||
|
stSaveParam.nHeight = stFrame.stFrameInfo.nHeight;
|
||||||
|
stSaveParam.nDataLen = stFrame.stFrameInfo.nFrameLen;
|
||||||
|
stSaveParam.pData = stFrame.pBufAddr;
|
||||||
|
stSaveParam.iMethodValue = 0;
|
||||||
|
stSaveParam.nJpgQuality = 90;
|
||||||
|
|
||||||
|
const unsigned int maxImageLen =
|
||||||
|
stFrame.stFrameInfo.nWidth * stFrame.stFrameInfo.nHeight * 4 + 2048;
|
||||||
|
|
||||||
|
unsigned char* pImageBuffer = new unsigned char[maxImageLen];
|
||||||
|
std::memset(pImageBuffer, 0, maxImageLen);
|
||||||
|
|
||||||
|
stSaveParam.pImageBuffer = pImageBuffer;
|
||||||
|
stSaveParam.nBufferSize = maxImageLen;
|
||||||
|
|
||||||
|
nRet = camera.SaveImage(&stSaveParam);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
std::cerr << "SaveImage failed: " << ToHex(nRet) << std::endl;
|
||||||
|
delete[] pImageBuffer;
|
||||||
|
camera.FreeImageBuffer(&stFrame);
|
||||||
|
camera.StopGrabbing();
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
const std::string outFile = "grab_result.bmp";
|
||||||
|
FILE* fp = std::fopen(outFile.c_str(), "wb");
|
||||||
|
if (fp == nullptr)
|
||||||
|
{
|
||||||
|
std::cerr << "Open output file failed: " << outFile << std::endl;
|
||||||
|
delete[] pImageBuffer;
|
||||||
|
camera.FreeImageBuffer(&stFrame);
|
||||||
|
camera.StopGrabbing();
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
std::fwrite(pImageBuffer, 1, stSaveParam.nImageLen, fp);
|
||||||
|
std::fclose(fp);
|
||||||
|
|
||||||
|
std::cout << "Image saved: " << outFile
|
||||||
|
<< ", bytes=" << stSaveParam.nImageLen << std::endl;
|
||||||
|
|
||||||
|
delete[] pImageBuffer;
|
||||||
|
|
||||||
|
camera.FreeImageBuffer(&stFrame);
|
||||||
|
camera.StopGrabbing();
|
||||||
|
camera.Close();
|
||||||
|
CMvCamera::FinalizeSDK();
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,151 @@
|
||||||
|
/************************************************************************/
|
||||||
|
/* 以C++接口为基础,对常用函数进行二次封装,方便用户使用 */
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _MV_CAMERA_H_
|
||||||
|
#define _MV_CAMERA_H_
|
||||||
|
|
||||||
|
#include "MvCameraControl.h"
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
#ifndef MV_NULL
|
||||||
|
#define MV_NULL 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class CMvCamera
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CMvCamera();
|
||||||
|
~CMvCamera();
|
||||||
|
|
||||||
|
// ch:初始化SDK | en:Initialize SDK
|
||||||
|
static int InitSDK();
|
||||||
|
|
||||||
|
// ch:反初始化SDK | en:Finalize SDK
|
||||||
|
static int FinalizeSDK();
|
||||||
|
|
||||||
|
// ch:获取SDK版本号 | en:Get SDK Version
|
||||||
|
static int GetSDKVersion();
|
||||||
|
|
||||||
|
// ch:枚举设备 | en:Enumerate Device
|
||||||
|
static int EnumDevices(unsigned int nTLayerType, MV_CC_DEVICE_INFO_LIST* pstDevList);
|
||||||
|
|
||||||
|
// ch:判断设备是否可达 | en:Is the device accessible
|
||||||
|
static bool IsDeviceAccessible(MV_CC_DEVICE_INFO* pstDevInfo, unsigned int nAccessMode);
|
||||||
|
|
||||||
|
// ch:打开设备 | en:Open Device
|
||||||
|
int Open(MV_CC_DEVICE_INFO* pstDeviceInfo);
|
||||||
|
|
||||||
|
// ch:关闭设备 | en:Close Device
|
||||||
|
int Close();
|
||||||
|
|
||||||
|
// ch:判断相机是否处于连接状态 | en:Is The Device Connected
|
||||||
|
bool IsDeviceConnected();
|
||||||
|
|
||||||
|
// ch:注册图像数据回调 | en:Register Image Data CallBack
|
||||||
|
int RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), void* pUser);
|
||||||
|
|
||||||
|
int RegisterImageCallBack2(void(__stdcall* cbOutput)(MV_FRAME_OUT* pstFrame, void *pUser, bool bAutoFree), void* pUser, bool bAutoFree);
|
||||||
|
|
||||||
|
|
||||||
|
// ch:开启抓图 | en:Start Grabbing
|
||||||
|
int StartGrabbing();
|
||||||
|
|
||||||
|
// ch:停止抓图 | en:Stop Grabbing
|
||||||
|
int StopGrabbing();
|
||||||
|
|
||||||
|
// ch:主动获取一帧图像数据 | en:Get one frame initiatively
|
||||||
|
int GetImageBuffer(MV_FRAME_OUT* pFrame, int nMsec);
|
||||||
|
|
||||||
|
// ch:释放图像缓存 | en:Free image buffer
|
||||||
|
int FreeImageBuffer(MV_FRAME_OUT* pFrame);
|
||||||
|
|
||||||
|
// ch:显示一帧图像 | en:Display one frame image
|
||||||
|
int DisplayOneFrame(void* hDisplay, MV_CC_IMAGE* pImageInfo);
|
||||||
|
|
||||||
|
// ch:设置SDK内部图像缓存节点个数 | en:Set the number of the internal image cache nodes in SDK
|
||||||
|
int SetImageNodeNum(unsigned int nNum);
|
||||||
|
|
||||||
|
// ch:获取设备信息 | en:Get device information
|
||||||
|
int GetDeviceInfo(MV_CC_DEVICE_INFO* pstDevInfo);
|
||||||
|
|
||||||
|
// ch:获取GEV相机的统计信息 | en:Get detect info of GEV camera
|
||||||
|
int GetGevAllMatchInfo(MV_MATCH_INFO_NET_DETECT* pMatchInfoNetDetect);
|
||||||
|
|
||||||
|
// ch:获取U3V相机的统计信息 | en:Get detect info of U3V camera
|
||||||
|
int GetU3VAllMatchInfo(MV_MATCH_INFO_USB_DETECT* pMatchInfoUSBDetect);
|
||||||
|
|
||||||
|
// ch:获取和设置Int型参数,如 Width和Height
|
||||||
|
// en:Get Int type parameters, such as Width and Height
|
||||||
|
int GetIntValue(IN const char* strKey, OUT MVCC_INTVALUE_EX *pIntValue);
|
||||||
|
int SetIntValue(IN const char* strKey, IN int64_t nValue);
|
||||||
|
|
||||||
|
// ch:获取和设置Enum型参数,如 PixelFormat
|
||||||
|
// en:Get Enum type parameters, such as PixelFormat
|
||||||
|
int GetEnumValue(IN const char* strKey, OUT MVCC_ENUMVALUE *pEnumValue);
|
||||||
|
int SetEnumValue(IN const char* strKey, IN unsigned int nValue);
|
||||||
|
int SetEnumValueByString(IN const char* strKey, IN const char* sValue);
|
||||||
|
int GetEnumEntrySymbolic(IN const char* strKey, IN MVCC_ENUMENTRY* pstEnumEntry);
|
||||||
|
|
||||||
|
// ch:获取和设置Float型参数,如 ExposureTime和Gain
|
||||||
|
// en:Get Float type parameters, such as ExposureTime and Gain
|
||||||
|
int GetFloatValue(IN const char* strKey, OUT MVCC_FLOATVALUE *pFloatValue);
|
||||||
|
int SetFloatValue(IN const char* strKey, IN float fValue);
|
||||||
|
|
||||||
|
// ch:获取和设置Bool型参数,如 ReverseX
|
||||||
|
// en:Get Bool type parameters, such as ReverseX
|
||||||
|
int GetBoolValue(IN const char* strKey, OUT bool *pbValue);
|
||||||
|
int SetBoolValue(IN const char* strKey, IN bool bValue);
|
||||||
|
|
||||||
|
// ch:获取和设置String型参数,如 DeviceUserID
|
||||||
|
// en:Get String type parameters, such as DeviceUserID
|
||||||
|
int GetStringValue(IN const char* strKey, MVCC_STRINGVALUE *pStringValue);
|
||||||
|
int SetStringValue(IN const char* strKey, IN const char * strValue);
|
||||||
|
|
||||||
|
// ch:执行一次Command型命令,如 UserSetSave
|
||||||
|
// en:Execute Command once, such as UserSetSave
|
||||||
|
int CommandExecute(IN const char* strKey);
|
||||||
|
|
||||||
|
// ch:探测网络最佳包大小(只对GigE相机有效) | en:Detection network optimal package size(It only works for the GigE camera)
|
||||||
|
int GetOptimalPacketSize(unsigned int* pOptimalPacketSize);
|
||||||
|
|
||||||
|
// ch:注册消息异常回调 | en:Register Message Exception CallBack
|
||||||
|
int RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser), void* pUser);
|
||||||
|
|
||||||
|
// ch:注册单个事件回调 | en:Register Event CallBack
|
||||||
|
int RegisterEventCallBack(const char* pEventName, void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser);
|
||||||
|
|
||||||
|
// ch:强制IP | en:Force IP
|
||||||
|
int ForceIp(unsigned int nIP, unsigned int nSubNetMask, unsigned int nDefaultGateWay);
|
||||||
|
|
||||||
|
// ch:配置IP方式 | en:IP configuration method
|
||||||
|
int SetIpConfig(unsigned int nType);
|
||||||
|
|
||||||
|
// ch:设置网络传输模式 | en:Set Net Transfer Mode
|
||||||
|
int SetNetTransMode(unsigned int nType);
|
||||||
|
|
||||||
|
// ch:像素格式转换 | en:Pixel format conversion
|
||||||
|
int ConvertPixelType(MV_CC_PIXEL_CONVERT_PARAM_EX* pstCvtParam);
|
||||||
|
|
||||||
|
// ch:保存图片 | en:save image
|
||||||
|
int SaveImage(MV_SAVE_IMAGE_PARAM_EX3* pstParam);
|
||||||
|
|
||||||
|
// ch:保存图片为文件 | en:Save the image as a file
|
||||||
|
int SaveImageToFile(MV_CC_IMAGE* pstImage, MV_CC_SAVE_IMAGE_PARAM* pSaveImageParam, const char* pcImagePath);
|
||||||
|
|
||||||
|
// ch:绘制圆形辅助线 | en:Draw circle auxiliary line
|
||||||
|
int DrawCircle(MVCC_CIRCLE_INFO* pCircleInfo);
|
||||||
|
|
||||||
|
// ch:绘制线形辅助线 | en:Draw lines auxiliary line
|
||||||
|
int DrawLines(MVCC_LINES_INFO* pLinesInfo);
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
void* m_hDevHandle;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif//_MV_CAMERA_H_
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,122 @@
|
||||||
|
|
||||||
|
#ifndef _MV_ERROR_DEFINE_H_
|
||||||
|
#define _MV_ERROR_DEFINE_H_
|
||||||
|
|
||||||
|
#include "MvISPErrorDefine.h"
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name 正确码定义
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name Definition of correct code
|
||||||
|
/// @{
|
||||||
|
#define MV_OK 0x00000000 ///< \~chinese 成功,无错误 \~english Successed, no error
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name 通用错误码定义:范围0x80000000-0x800000FF
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name Definition of General error code
|
||||||
|
/// @{
|
||||||
|
#define MV_E_HANDLE 0x80000000 ///< \~chinese 错误或无效的句柄 \~english Error or invalid handle
|
||||||
|
#define MV_E_SUPPORT 0x80000001 ///< \~chinese 不支持的功能 \~english Not supported function
|
||||||
|
#define MV_E_BUFOVER 0x80000002 ///< \~chinese 缓存已满 \~english Buffer overflow
|
||||||
|
#define MV_E_CALLORDER 0x80000003 ///< \~chinese 函数调用顺序错误 \~english Function calling order error
|
||||||
|
#define MV_E_PARAMETER 0x80000004 ///< \~chinese 错误的参数 \~english Incorrect parameter
|
||||||
|
#define MV_E_RESOURCE 0x80000006 ///< \~chinese 资源申请失败 \~english Applying resource failed
|
||||||
|
#define MV_E_NODATA 0x80000007 ///< \~chinese 无数据 \~english No data
|
||||||
|
#define MV_E_PRECONDITION 0x80000008 ///< \~chinese 前置条件有误,或运行环境已发生变化 \~english Precondition error, or running environment changed
|
||||||
|
#define MV_E_VERSION 0x80000009 ///< \~chinese 版本不匹配 \~english Version mismatches
|
||||||
|
#define MV_E_NOENOUGH_BUF 0x8000000A ///< \~chinese 传入的内存空间不足 \~english Insufficient memory
|
||||||
|
#define MV_E_ABNORMAL_IMAGE 0x8000000B ///< \~chinese 异常图像,可能是丢包导致图像不完整 \~english Abnormal image, maybe incomplete image because of lost packet
|
||||||
|
#define MV_E_LOAD_LIBRARY 0x8000000C ///< \~chinese 动态导入DLL失败 \~english Load library failed
|
||||||
|
#define MV_E_NOOUTBUF 0x8000000D ///< \~chinese 没有可输出的缓存 \~english No Avaliable Buffer
|
||||||
|
#define MV_E_ENCRYPT 0x8000000E ///< \~chinese 加密错误 \~english Encryption error
|
||||||
|
#define MV_E_OPENFILE 0x8000000F ///< \~chinese 打开文件出现错误 \~english open file error
|
||||||
|
#define MV_E_BUF_IN_USE 0x80000010 ///< \~chinese 缓存地址已使用 \~english Buffer already in use
|
||||||
|
#define MV_E_BUF_INVALID 0x80000011 ///< \~chinese 无效的缓存地址 \~english Buffer address invalid
|
||||||
|
#define MV_E_NOALIGN_BUF 0x80000012 ///< \~chinese 缓存对齐异常 \~english Buffer alignmenterror error
|
||||||
|
#define MV_E_NOENOUGH_BUF_NUM 0x80000013 ///< \~chinese 缓存个数不足 \~english Insufficient cache count
|
||||||
|
#define MV_E_PORT_IN_USE 0x80000014 ///< \~chinese 串口被占用 \~english Port is in use
|
||||||
|
#define MV_E_IMAGE_DECODEC 0x80000015 ///< \~chinese 解码错误(SDK校验图像异常)\~english Decoding error (SDK verification image exception)
|
||||||
|
#define MV_E_UINT32_LIMIT 0x80000016 /// \~chinese 图像大小超过unsigned int返回,接口不支持
|
||||||
|
#define MV_E_IMAGE_HEIGHT 0x80000017 /// \~chinese 图像高度异常(残帧丢弃) \~english image height anomaly (discard incomplete images)
|
||||||
|
#define MV_E_NOENOUGH_DDR 0x80000018 ///< \~chinese DDR缓存不足 \~english The DDR cache is Insufficient
|
||||||
|
#define MV_E_NOENOUGH_STREAM 0x80000019 ///< \~chinese 流通道不足 \~english The stream channel is Insufficient
|
||||||
|
#define MV_E_NORESPONSE 0x8000001A ///< \~chinese 设备无响应 \~english No response from device
|
||||||
|
|
||||||
|
#define MV_E_UNKNOW 0x800000FF ///< \~chinese 未知的错误 \~english Unknown error
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name GenICam系列错误:范围0x80000100-0x800001FF
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name GenICam Series Error Codes: Range from 0x80000100 to 0x800001FF
|
||||||
|
/// @{
|
||||||
|
#define MV_E_GC_GENERIC 0x80000100 ///< \~chinese 通用错误 \~english General error
|
||||||
|
#define MV_E_GC_ARGUMENT 0x80000101 ///< \~chinese 参数非法 \~english Illegal parameters
|
||||||
|
#define MV_E_GC_RANGE 0x80000102 ///< \~chinese 值超出范围 \~english The value is out of range
|
||||||
|
#define MV_E_GC_PROPERTY 0x80000103 ///< \~chinese 属性 \~english Property
|
||||||
|
#define MV_E_GC_RUNTIME 0x80000104 ///< \~chinese 运行环境有问题 \~english Running environment error
|
||||||
|
#define MV_E_GC_LOGICAL 0x80000105 ///< \~chinese 逻辑错误 \~english Logical error
|
||||||
|
#define MV_E_GC_ACCESS 0x80000106 ///< \~chinese 节点访问条件有误 \~english Node accessing condition error
|
||||||
|
#define MV_E_GC_TIMEOUT 0x80000107 ///< \~chinese 超时 \~english Timeout
|
||||||
|
#define MV_E_GC_DYNAMICCAST 0x80000108 ///< \~chinese 转换异常 \~english Transformation exception
|
||||||
|
#define MV_E_GC_UNKNOW 0x800001FF ///< \~chinese GenICam未知错误 \~english GenICam unknown error
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name GigE_STATUS对应的错误码:范围0x80000200-0x800002FF
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name GigE_STATUS Error Codes: Range from 0x80000200 to 0x800002FF
|
||||||
|
/// @{
|
||||||
|
#define MV_E_NOT_IMPLEMENTED 0x80000200 ///< \~chinese 命令不被设备支持 \~english The command is not supported by device
|
||||||
|
#define MV_E_INVALID_ADDRESS 0x80000201 ///< \~chinese 访问的目标地址不存在 \~english The target address being accessed does not exist
|
||||||
|
#define MV_E_WRITE_PROTECT 0x80000202 ///< \~chinese 目标地址不可写 \~english The target address is not writable
|
||||||
|
#define MV_E_ACCESS_DENIED 0x80000203 ///< \~chinese 设备无访问权限 \~english No permission
|
||||||
|
#define MV_E_BUSY 0x80000204 ///< \~chinese 设备忙,或网络断开 \~english Device is busy, or network disconnected
|
||||||
|
#define MV_E_PACKET 0x80000205 ///< \~chinese 网络包数据错误 \~english Network data packet error
|
||||||
|
#define MV_E_NETER 0x80000206 ///< \~chinese 网络相关错误 \~english Network error
|
||||||
|
#define MV_E_SUPPORT_MODIFY_DEVICE_IP 0x8000020E ///< 在固定IP模式下不支持修改设备IP模式 \~english Current Mode Not Support Modify Ip
|
||||||
|
#define MV_E_KEY_VERIFICATION 0x8000020F ///< \~chinese 秘钥校验错误 \~english SwitchKey error
|
||||||
|
#define MV_E_IP_CONFLICT 0x80000221 ///< \~chinese 设备IP冲突 \~english Device IP conflict
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name USB_STATUS对应的错误码:范围0x80000300-0x800003FF
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name USB_STATUS Error Codes: Range from 0x80000300 to 0x800003FF
|
||||||
|
/// @{
|
||||||
|
#define MV_E_USB_READ 0x80000300 ///< \~chinese 读usb出错 \~english Reading USB error
|
||||||
|
#define MV_E_USB_WRITE 0x80000301 ///< \~chinese 写usb出错 \~english Writing USB error
|
||||||
|
#define MV_E_USB_DEVICE 0x80000302 ///< \~chinese 设备异常 \~english Device exception
|
||||||
|
#define MV_E_USB_GENICAM 0x80000303 ///< \~chinese GenICam相关错误 \~english GenICam error
|
||||||
|
#define MV_E_USB_BANDWIDTH 0x80000304 ///< \~chinese 带宽不足 \~english Insufficient bandwidth
|
||||||
|
#define MV_E_USB_DRIVER 0x80000305 ///< \~chinese 驱动不匹配或者未装驱动 \~english Driver mismatch or unmounted drive
|
||||||
|
#define MV_E_USB_UNKNOW 0x800003FF ///< \~chinese USB未知的错误 \~english USB unknown error
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
/********************************************************************/
|
||||||
|
/// \~chinese
|
||||||
|
/// \name 升级时对应的错误码:范围0x80000400-0x800004FF
|
||||||
|
/// @{
|
||||||
|
/// \~english
|
||||||
|
/// \name Upgrade Error Codes: Range from 0x80000400 to 0x800004FF
|
||||||
|
/// @{
|
||||||
|
#define MV_E_UPG_FILE_MISMATCH 0x80000400 ///< \~chinese 升级固件不匹配 \~english Firmware mismatches
|
||||||
|
#define MV_E_UPG_LANGUSGE_MISMATCH 0x80000401 ///< \~chinese 升级固件语言不匹配 \~english Firmware language mismatches
|
||||||
|
#define MV_E_UPG_CONFLICT 0x80000402 ///< \~chinese 升级冲突(设备已经在升级了再次请求升级即返回此错误) \~english Upgrading conflicted (repeated upgrading requests during device upgrade)
|
||||||
|
#define MV_E_UPG_INNER_ERR 0x80000403 ///< \~chinese 升级时设备内部出现错误 \~english Camera internal error during upgrade
|
||||||
|
#define MV_E_UPG_UNKNOW 0x800004FF ///< \~chinese 升级时未知错误 \~english Unknown error during upgrade
|
||||||
|
/// @}
|
||||||
|
|
||||||
|
#endif //_MV_ERROR_DEFINE_H_
|
||||||
|
|
@ -0,0 +1,98 @@
|
||||||
|
|
||||||
|
#ifndef _MV_ISP_ERROR_DEFINE_H_
|
||||||
|
#define _MV_ISP_ERROR_DEFINE_H_
|
||||||
|
|
||||||
|
/************************************************************************
|
||||||
|
* 来自ISP算法库的错误码
|
||||||
|
************************************************************************/
|
||||||
|
// 通用类型
|
||||||
|
#define MV_ALG_OK 0x00000000 //处理正确
|
||||||
|
#define MV_ALG_ERR 0x10000000 //不确定类型错误
|
||||||
|
|
||||||
|
// 能力检查
|
||||||
|
#define MV_ALG_E_ABILITY_ARG 0x10000001 //能力集中存在无效参数
|
||||||
|
|
||||||
|
// 内存检查
|
||||||
|
#define MV_ALG_E_MEM_NULL 0x10000002 //内存地址为空
|
||||||
|
#define MV_ALG_E_MEM_ALIGN 0x10000003 //内存对齐不满足要求
|
||||||
|
#define MV_ALG_E_MEM_LACK 0x10000004 //内存空间大小不够
|
||||||
|
#define MV_ALG_E_MEM_SIZE_ALIGN 0x10000005 //内存空间大小不满足对齐要求
|
||||||
|
#define MV_ALG_E_MEM_ADDR_ALIGN 0x10000006 //内存地址不满足对齐要求
|
||||||
|
|
||||||
|
// 图像检查
|
||||||
|
#define MV_ALG_E_IMG_FORMAT 0x10000007 //图像格式不正确或者不支持
|
||||||
|
#define MV_ALG_E_IMG_SIZE 0x10000008 //图像宽高不正确或者超出范围
|
||||||
|
#define MV_ALG_E_IMG_STEP 0x10000009 //图像宽高与step参数不匹配
|
||||||
|
#define MV_ALG_E_IMG_DATA_NULL 0x1000000A //图像数据存储地址为空
|
||||||
|
|
||||||
|
// 输入输出参数检查
|
||||||
|
#define MV_ALG_E_CFG_TYPE 0x1000000B //设置或者获取参数类型不正确
|
||||||
|
#define MV_ALG_E_CFG_SIZE 0x1000000C //设置或者获取参数的输入、输出结构体大小不正确
|
||||||
|
#define MV_ALG_E_PRC_TYPE 0x1000000D //处理类型不正确
|
||||||
|
#define MV_ALG_E_PRC_SIZE 0x1000000E //处理时输入、输出参数大小不正确
|
||||||
|
#define MV_ALG_E_FUNC_TYPE 0x1000000F //子处理类型不正确
|
||||||
|
#define MV_ALG_E_FUNC_SIZE 0x10000010 //子处理时输入、输出参数大小不正确
|
||||||
|
|
||||||
|
// 运行参数检查
|
||||||
|
#define MV_ALG_E_PARAM_INDEX 0x10000011 //index参数不正确
|
||||||
|
#define MV_ALG_E_PARAM_VALUE 0x10000012 //value参数不正确或者超出范围
|
||||||
|
#define MV_ALG_E_PARAM_NUM 0x10000013 //param_num参数不正确
|
||||||
|
|
||||||
|
// 接口调用检查
|
||||||
|
#define MV_ALG_E_NULL_PTR 0x10000014 //函数参数指针为空
|
||||||
|
#define MV_ALG_E_OVER_MAX_MEM 0x10000015 //超过限定的最大内存
|
||||||
|
#define MV_ALG_E_CALL_BACK 0x10000016 //回调函数出错
|
||||||
|
|
||||||
|
// 算法库加密相关检查
|
||||||
|
#define MV_ALG_E_ENCRYPT 0x10000017 //加密错误
|
||||||
|
#define MV_ALG_E_EXPIRE 0x10000018 //算法库使用期限错误
|
||||||
|
|
||||||
|
// 内部模块返回的基本错误类型
|
||||||
|
#define MV_ALG_E_BAD_ARG 0x10000019 //参数范围不正确
|
||||||
|
#define MV_ALG_E_DATA_SIZE 0x1000001A //数据大小不正确
|
||||||
|
#define MV_ALG_E_STEP 0x1000001B //数据step不正确
|
||||||
|
|
||||||
|
// cpu指令集支持错误码
|
||||||
|
#define MV_ALG_E_CPUID 0x1000001C //cpu不支持优化代码中的指令集
|
||||||
|
|
||||||
|
#define MV_ALG_WARNING 0x1000001D //警告
|
||||||
|
|
||||||
|
#define MV_ALG_E_TIME_OUT 0x1000001E //算法库超时
|
||||||
|
#define MV_ALG_E_LIB_VERSION 0x1000001F //算法版本号出错
|
||||||
|
#define MV_ALG_E_MODEL_VERSION 0x10000020 //模型版本号出错
|
||||||
|
#define MV_ALG_E_GPU_MEM_ALLOC 0x10000021 //GPU内存分配错误
|
||||||
|
#define MV_ALG_E_FILE_NON_EXIST 0x10000022 //文件不存在
|
||||||
|
#define MV_ALG_E_NONE_STRING 0x10000023 //字符串为空
|
||||||
|
#define MV_ALG_E_IMAGE_CODEC 0x10000024 //图像解码器错误
|
||||||
|
#define MV_ALG_E_FILE_OPEN 0x10000025 //打开文件错误
|
||||||
|
#define MV_ALG_E_FILE_READ 0x10000026 //文件读取错误
|
||||||
|
#define MV_ALG_E_FILE_WRITE 0x10000027 //文件写错误
|
||||||
|
#define MV_ALG_E_FILE_READ_SIZE 0x10000028 //文件读取大小错误
|
||||||
|
#define MV_ALG_E_FILE_TYPE 0x10000029 //文件类型错误
|
||||||
|
#define MV_ALG_E_MODEL_TYPE 0x1000002A //模型类型错误
|
||||||
|
#define MV_ALG_E_MALLOC_MEM 0x1000002B //分配内存错误
|
||||||
|
#define MV_ALG_E_BIND_CORE_FAILED 0x1000002C //线程绑核失败
|
||||||
|
|
||||||
|
// 降噪特有错误码
|
||||||
|
#define MV_ALG_E_DENOISE_NE_IMG_FORMAT 0x10402001 //噪声特性图像格式错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_FEATURE_TYPE 0x10402002 //噪声特性类型错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_PROFILE_NUM 0x10402003 //噪声特性个数错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_GAIN_NUM 0x10402004 //噪声特性增益个数错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_GAIN_VAL 0x10402005 //噪声曲线增益值输入错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_BIN_NUM 0x10402006 //噪声曲线柱数错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_INIT_GAIN 0x10402007 //噪声估计初始化增益设置错误
|
||||||
|
#define MV_ALG_E_DENOISE_NE_NOT_INIT 0x10402008 //噪声估计未初始化
|
||||||
|
#define MV_ALG_E_DENOISE_COLOR_MODE 0x10402009 //颜色空间模式错误
|
||||||
|
#define MV_ALG_E_DENOISE_ROI_NUM 0x1040200a //图像ROI个数错误
|
||||||
|
#define MV_ALG_E_DENOISE_ROI_ORI_PT 0x1040200b //图像ROI原点错误
|
||||||
|
#define MV_ALG_E_DENOISE_ROI_SIZE 0x1040200c //图像ROI大小错误
|
||||||
|
#define MV_ALG_E_DENOISE_GAIN_NOT_EXIST 0x1040200d //输入的相机增益不存在(增益个数已达上限)
|
||||||
|
#define MV_ALG_E_DENOISE_GAIN_BEYOND_RANGE 0x1040200e //输入的相机增益不在范围内
|
||||||
|
#define MV_ALG_E_DENOISE_NP_BUF_SIZE 0x1040200f //输入的噪声特性内存大小错误
|
||||||
|
|
||||||
|
// 去紫边特有错误码
|
||||||
|
#define MV_ALG_E_PFC_ROI_PT 0x10405000 //去紫边算法ROI原点错误
|
||||||
|
#define MV_ALG_E_PFC_ROI_SIZE 0x10405001 //去紫边算法ROI大小错误
|
||||||
|
#define MV_ALG_E_PFC_KERNEL_SIZE 0x10405002 //去紫边算法滤波核尺寸错误
|
||||||
|
|
||||||
|
#endif //_MV_ISP_ERROR_DEFINE_H_
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,655 @@
|
||||||
|
|
||||||
|
#ifndef _MV_OBSOLETE_CAM_PARAMS_H_
|
||||||
|
#define _MV_OBSOLETE_CAM_PARAMS_H_
|
||||||
|
|
||||||
|
#include "PixelType.h"
|
||||||
|
|
||||||
|
/// \~chinese 输出帧的信息 \~english Output Frame Information
|
||||||
|
typedef struct _MV_FRAME_OUT_INFO_
|
||||||
|
{
|
||||||
|
unsigned short nWidth; ///< [OUT] \~chinese 图像宽 \~english Image Width
|
||||||
|
unsigned short nHeight; ///< [OUT] \~chinese 图像高 \~english Image Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [OUT] \~chinese 像素格式 \~english Pixel Type
|
||||||
|
|
||||||
|
unsigned int nFrameNum; ///< [OUT] \~chinese 帧号 \~english Frame Number
|
||||||
|
unsigned int nDevTimeStampHigh; ///< [OUT] \~chinese 时间戳高32位 \~english Timestamp high 32 bits
|
||||||
|
unsigned int nDevTimeStampLow; ///< [OUT] \~chinese 时间戳低32位 \~english Timestamp low 32 bits
|
||||||
|
unsigned int nReserved0; ///< [OUT] \~chinese 保留,8字节对齐 \~english Reserved, 8-byte aligned
|
||||||
|
int64_t nHostTimeStamp; ///< [OUT] \~chinese 主机生成的时间戳 \~english Host-generated timestamp
|
||||||
|
|
||||||
|
unsigned int nFrameLen;
|
||||||
|
|
||||||
|
unsigned int nLostPacket; // 本帧丢包数
|
||||||
|
unsigned int nReserved[2];
|
||||||
|
}MV_FRAME_OUT_INFO;
|
||||||
|
|
||||||
|
/// \~chinese 保存图片参数 \~english Save image type
|
||||||
|
typedef struct _MV_SAVE_IMAGE_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned char* pData; ///< [IN] \~chinese 输入数据缓存 \~english Input Data Buffer
|
||||||
|
unsigned int nDataLen; ///< [IN] \~chinese 输入数据大小 \~english Input Data Size
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 输入像素格式 \~english Input Data Pixel Format
|
||||||
|
unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Image Width
|
||||||
|
unsigned short nHeight; ///< [IN] \~chinese 图像高 \~english Image Height
|
||||||
|
|
||||||
|
unsigned char* pImageBuffer; ///< [OUT] \~chinese 输出图片缓存 \~english Output Image Buffer
|
||||||
|
unsigned int nImageLen; ///< [OUT] \~chinese 输出图片大小 \~english Output Image Size
|
||||||
|
unsigned int nBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Output buffer size provided
|
||||||
|
enum MV_SAVE_IAMGE_TYPE enImageType; ///< [IN] \~chinese 输出图片格式 \~english Output Image Format
|
||||||
|
|
||||||
|
}MV_SAVE_IMAGE_PARAM;
|
||||||
|
|
||||||
|
typedef struct _MV_IMAGE_BASIC_INFO_
|
||||||
|
{
|
||||||
|
unsigned short nWidthValue;
|
||||||
|
unsigned short nWidthMin;
|
||||||
|
unsigned int nWidthMax;
|
||||||
|
unsigned int nWidthInc;
|
||||||
|
|
||||||
|
unsigned int nHeightValue;
|
||||||
|
unsigned int nHeightMin;
|
||||||
|
unsigned int nHeightMax;
|
||||||
|
unsigned int nHeightInc;
|
||||||
|
|
||||||
|
float fFrameRateValue;
|
||||||
|
float fFrameRateMin;
|
||||||
|
float fFrameRateMax;
|
||||||
|
|
||||||
|
unsigned int enPixelType; ///< [OUT] \~chinese 当前的像素格式 \~english Current pixel format
|
||||||
|
unsigned int nSupportedPixelFmtNum; ///< [OUT] \~chinese 支持的像素格式种类 \~english Support pixel format
|
||||||
|
unsigned int enPixelList[MV_MAX_XML_SYMBOLIC_NUM];
|
||||||
|
unsigned int nReserved[8];
|
||||||
|
|
||||||
|
}MV_IMAGE_BASIC_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
/// \~chinese 噪声特性类型 \~english Noise feature type
|
||||||
|
typedef enum _MV_CC_BAYER_NOISE_FEATURE_TYPE
|
||||||
|
{
|
||||||
|
MV_CC_BAYER_NOISE_FEATURE_TYPE_INVALID = 0, ///< \~chinese 无效值 \~english Invalid
|
||||||
|
MV_CC_BAYER_NOISE_FEATURE_TYPE_PROFILE = 1, ///< \~chinese 噪声曲线 \~english Noise curve
|
||||||
|
MV_CC_BAYER_NOISE_FEATURE_TYPE_LEVEL = 2, ///< \~chinese 噪声水平 \~english Noise level
|
||||||
|
MV_CC_BAYER_NOISE_FEATURE_TYPE_DEFAULT = 1, ///< \~chinese 默认值 \~english Default
|
||||||
|
|
||||||
|
}MV_CC_BAYER_NOISE_FEATURE_TYPE;
|
||||||
|
|
||||||
|
/// \~chinese Bayer格式降噪特性信息 \~english Denoise profile info
|
||||||
|
typedef struct _MV_CC_BAYER_NOISE_PROFILE_INFO_T_
|
||||||
|
{
|
||||||
|
unsigned int nVersion; ///< \~chinese 版本 \~english version
|
||||||
|
MV_CC_BAYER_NOISE_FEATURE_TYPE enNoiseFeatureType; ///< \~chinese 噪声特性类型 \~english noise feature type
|
||||||
|
enum MvGvspPixelType enPixelType; ///< \~chinese 图像格式 \~english image format
|
||||||
|
int nNoiseLevel; ///< \~chinese 平均噪声水平 \~english noise level
|
||||||
|
unsigned int nCurvePointNum; ///< \~chinese 曲线点数 \~english curve point number
|
||||||
|
int* nNoiseCurve; ///< \~chinese 噪声曲线 \~english noise curve
|
||||||
|
int* nLumCurve; ///< \~chinese 亮度曲线 \~english luminance curve
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_BAYER_NOISE_PROFILE_INFO;
|
||||||
|
|
||||||
|
/// \~chinese Bayer格式噪声估计参数 \~english Bayer noise estimate param
|
||||||
|
typedef struct _MV_CC_BAYER_NOISE_ESTIMATE_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽(大于等于8) \~english Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高(大于等于8) \~english Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
|
||||||
|
unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据大小 \~english Input data size
|
||||||
|
|
||||||
|
unsigned int nNoiseThreshold; ///< [IN] \~chinese 噪声阈值(0-4095) \~english Noise Threshold
|
||||||
|
|
||||||
|
unsigned char* pCurveBuf; ///< [IN] \~chinese 用于存储噪声曲线和亮度曲线(需要外部分配,缓存大小:4096 * sizeof(int) * 2) \~english Buffer used to store noise and brightness curves, size:4096 * sizeof(int) * 2)
|
||||||
|
MV_CC_BAYER_NOISE_PROFILE_INFO stNoiseProfile; ///< [OUT] \~chinese 降噪特性信息 \~english Denoise profile
|
||||||
|
|
||||||
|
unsigned int nThreadNum; ///< [IN] \~chinese 线程数量,0表示算法库根据硬件自适应;1表示单线程(默认);大于1表示线程数目 \~english Thread number, 0 means that the library is adaptive to the hardware, 1 means single thread(Default value), Greater than 1 indicates the number of threads
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_BAYER_NOISE_ESTIMATE_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese Bayer格式空域降噪参数 \~english Bayer spatial Denoise param
|
||||||
|
typedef struct _MV_CC_BAYER_SPATIAL_DENOISE_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽(大于等于8) \~english Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高(大于等于8) \~english Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
|
||||||
|
unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据大小 \~english Input data size
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出降噪后的数据 \~english Output data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出降噪后的数据长度 \~english Output data length
|
||||||
|
|
||||||
|
MV_CC_BAYER_NOISE_PROFILE_INFO stNoiseProfile; ///< [IN] \~chinese 降噪特性信息(来源于噪声估计) \~english Denoise profile
|
||||||
|
unsigned int nDenoiseStrength; ///< [IN] \~chinese 降噪强度(0-100) \~english nDenoise Strength
|
||||||
|
unsigned int nSharpenStrength; ///< [IN] \~chinese 锐化强度(0-32) \~english Sharpen Strength
|
||||||
|
unsigned int nNoiseCorrect; ///< [IN] \~chinese 噪声校正系数(0-1280) \~english Noise Correct
|
||||||
|
|
||||||
|
unsigned int nThreadNum; ///< [IN] \~chinese 线程数量,0表示算法库根据硬件自适应;1表示单线程(默认);大于1表示线程数目 \~english Thread number, 0 means that the library is adaptive to the hardware, 1 means single thread(Default value), Greater than 1 indicates the number of threads
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_BAYER_SPATIAL_DENOISE_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese CLUT参数 \~english CLUT param
|
||||||
|
typedef struct _MV_CC_CLUT_PARAM_T_
|
||||||
|
{
|
||||||
|
bool bCLUTEnable; ///< [IN] \~chinese 是否启用CLUT \~english CLUT enable
|
||||||
|
unsigned int nCLUTScale; ///< [IN] \~chinese 量化系数(2的整数幂,最大65536) \~english Quantitative scale(Integer power of 2, <= 65536)
|
||||||
|
unsigned int nCLUTSize; ///< [IN] \~chinese CLUT大小,目前仅支持17 \~english CLUT size, currently only supports 17
|
||||||
|
unsigned char* pCLUTBuf; ///< [IN] \~chinese 量化CLUT表 \~english CLUT buffer
|
||||||
|
unsigned int nCLUTBufLen; ///< [IN] \~chinese 量化CLUT缓存大小(nCLUTSize*nCLUTSize*nCLUTSize*sizeof(int)*3) \~english CLUT buffer length(nCLUTSize*nCLUTSize*nCLUTSize*sizeof(int)*3)
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_CLUT_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 锐化结构体 \~english Sharpen structure
|
||||||
|
typedef struct _MV_CC_SHARPEN_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度(最小8) \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度(最小8) \~english Image Height
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据大小 \~english Input data length
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
|
||||||
|
|
||||||
|
unsigned int nSharpenAmount; ///< [IN] \~chinese 锐度调节强度,[0,500] \~english Sharpen amount,[0,500] // [nSharpenAmount 作废, 使用 nSharpenPosAmount & nSharpenNegAmount 替代 ]
|
||||||
|
unsigned int nSharpenRadius; ///< [IN] \~chinese 锐度调节半径(半径越大,耗时越长),[1,21] \~english Sharpen radius(The larger the radius, the longer it takes),[1,21]
|
||||||
|
unsigned int nSharpenThreshold; ///< [IN] \~chinese 锐度调节阈值,[0,255] \~english Sharpen threshold,[0,255]
|
||||||
|
|
||||||
|
|
||||||
|
unsigned int nSharpenPosAmount; // [IN] 锐度调节正向强度,范围:[0, 500]
|
||||||
|
unsigned int nSharpenNegAmount; // [IN] 锐度调节负向强度,范围:[0, 500]
|
||||||
|
|
||||||
|
unsigned int nRes[6]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_SHARPEN_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 色彩校正结构体 \~english Color correct structure
|
||||||
|
typedef struct _MV_CC_COLOR_CORRECT_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度 \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度 \~english Image Height
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据大小 \~english Input data length
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
|
||||||
|
|
||||||
|
unsigned int nImageBit; ///< [IN] \~chinese 有效图像位数(8,10,12,16) \~english Image bit(8 or 10 or 12 or 16)
|
||||||
|
MV_CC_GAMMA_PARAM stGammaParam; ///< [IN] \~chinese Gamma信息 \~english Gamma info
|
||||||
|
MV_CC_CCM_PARAM_EX stCCMParam; ///< [IN] \~chinese CCM信息 \~english CCM info
|
||||||
|
MV_CC_CLUT_PARAM stCLUTParam; ///< [IN] \~chinese CLUT信息 \~english CLUT info
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_COLOR_CORRECT_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 矩形ROI结构体 \~english Rect ROI structure
|
||||||
|
typedef struct _MV_CC_RECT_I_
|
||||||
|
{
|
||||||
|
unsigned int nX; ///< \~chinese 矩形左上角X轴坐标 \~english X Position
|
||||||
|
unsigned int nY; ///< \~chinese 矩形左上角Y轴坐标 \~english Y Position
|
||||||
|
unsigned int nWidth; ///< \~chinese 矩形宽度 \~english Rect Width
|
||||||
|
unsigned int nHeight; ///< \~chinese 矩形高度 \~english Rect Height
|
||||||
|
|
||||||
|
}MV_CC_RECT_I;
|
||||||
|
|
||||||
|
/// \~chinese 噪声估计结构体 \~english Noise estimate structure
|
||||||
|
typedef struct _MV_CC_NOISE_ESTIMATE_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度(最小8) \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度(最小8) \~english Image Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据大小 \~english Input data length
|
||||||
|
|
||||||
|
MV_CC_RECT_I* pstROIRect; ///< [IN] \~chinese 图像ROI \~english Image ROI
|
||||||
|
unsigned int nROINum; ///< [IN] \~chinese ROI个数 \~english ROI number
|
||||||
|
|
||||||
|
///< \~chinese Bayer域噪声估计参数,Mono8/RGB域无效 \~english Bayer Noise estimate param,Mono8/RGB formats are invalid
|
||||||
|
unsigned int nNoiseThreshold; ///< [IN] \~chinese 噪声阈值[0,4095] \~english Noise threshold[0,4095]
|
||||||
|
///< \~chinese 建议值:8bit,0xE0;10bit,0x380;12bit,0xE00 \~english Suggestive value:8bit,0xE0;10bit,0x380;12bit,0xE00
|
||||||
|
|
||||||
|
unsigned char* pNoiseProfile; ///< [OUT] \~chinese 输出噪声特性 \~english Output Noise Profile
|
||||||
|
unsigned int nNoiseProfileSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nNoiseProfileLen; ///< [OUT] \~chinese 输出噪声特性长度 \~english Output Noise Profile length
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_NOISE_ESTIMATE_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 空域降噪结构体 \~english Spatial denoise structure
|
||||||
|
typedef struct _MV_CC_SPATIAL_DENOISE_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度(最小8) \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度(最小8) \~english Image Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据大小 \~english Input data length
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出降噪后的数据 \~english Output data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出降噪后的数据长度 \~english Output data length
|
||||||
|
|
||||||
|
unsigned char* pNoiseProfile; ///< [IN] \~chinese 输入噪声特性 \~english Input Noise Profile
|
||||||
|
unsigned int nNoiseProfileLen; ///< [IN] \~chinese 输入噪声特性长度 \~english Input Noise Profile length
|
||||||
|
|
||||||
|
///< \~chinese Bayer域空域降噪参数,Mono8/RGB域无效 \~english Bayer Spatial denoise param,Mono8/RGB formats are invalid
|
||||||
|
unsigned int nBayerDenoiseStrength; ///< [IN] \~chinese 降噪强度[0,100] \~english Denoise Strength[0,100]
|
||||||
|
unsigned int nBayerSharpenStrength; ///< [IN] \~chinese 锐化强度[0,32] \~english Sharpen Strength[0,32]
|
||||||
|
unsigned int nBayerNoiseCorrect; ///< [IN] \~chinese 噪声校正系数[0,1280] \~english Noise Correct[0,1280]
|
||||||
|
|
||||||
|
///< \~chinese Mono8/RGB域空域降噪参数,Bayer域无效 \~english Mono8/RGB Spatial denoise param,Bayer formats are invalid
|
||||||
|
unsigned int nNoiseCorrectLum; ///< [IN] \~chinese 亮度校正系数[1,2000] \~english Noise Correct Lum[1,2000]
|
||||||
|
unsigned int nNoiseCorrectChrom; ///< [IN] \~chinese 色调校正系数[1,2000] \~english Noise Correct Chrom[1,2000]
|
||||||
|
unsigned int nStrengthLum; ///< [IN] \~chinese 亮度降噪强度[0,100] \~english Strength Lum[0,100]
|
||||||
|
unsigned int nStrengthChrom; ///< [IN] \~chinese 色调降噪强度[0,100] \~english Strength Chrom[0,100]
|
||||||
|
unsigned int nStrengthSharpen; ///< [IN] \~chinese 锐化强度[1,1000] \~english Strength Sharpen[1,1000]
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_SPATIAL_DENOISE_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese LSC标定结构体 \~english LSC calib structure
|
||||||
|
typedef struct _MV_CC_LSC_CALIB_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度[16,65535] \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度[16-65535] \~english Image Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length
|
||||||
|
|
||||||
|
unsigned char* pCalibBuf; ///< [OUT] \~chinese 输出标定表缓存 \~english Output calib buffer
|
||||||
|
unsigned int nCalibBufSize; ///< [IN] \~chinese 提供的标定表缓冲大小(nWidth*nHeight*sizeof(unsigned short)) \~english Provided output buffer size
|
||||||
|
unsigned int nCalibBufLen; ///< [OUT] \~chinese 输出标定表缓存长度 \~english Output calib buffer length
|
||||||
|
|
||||||
|
unsigned int nSecNumW; ///< [IN] \~chinese 宽度分块数 \~english Width Sec num
|
||||||
|
unsigned int nSecNumH; ///< [IN] \~chinese 高度分块数 \~english Height Sec num
|
||||||
|
unsigned int nPadCoef; ///< [IN] \~chinese 边缘填充系数[1,5] \~english Pad Coef[1,5]
|
||||||
|
unsigned int nCalibMethod; ///< [IN] \~chinese 标定方式(0-中心为基准;1-最亮区域为基准;2-目标亮度为基准) \~english Calib method
|
||||||
|
unsigned int nTargetGray; ///< [IN] \~chinese 目标亮度(标定方式为2时有效) \~english Target Gray
|
||||||
|
///< \~chinese 8位,范围:[0,255] \~english 8bit,range:[0,255]
|
||||||
|
///< \~chinese 10位,范围:[0,1023] \~english 10bit,range:[0,1023]
|
||||||
|
///< \~chinese 12位,范围:[0,4095] \~english 12bit,range:[0,4095]
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_LSC_CALIB_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese LSC校正结构体 \~english LSC correct structure
|
||||||
|
typedef struct _MV_CC_LSC_CORRECT_PARAM_T_
|
||||||
|
{
|
||||||
|
unsigned int nWidth; ///< [IN] \~chinese 图像宽度[16,65535] \~english Image Width
|
||||||
|
unsigned int nHeight; ///< [IN] \~chinese 图像高度[16,65535] \~english Image Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
unsigned char* pSrcBuf; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcBufLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
|
||||||
|
|
||||||
|
unsigned char* pCalibBuf; ///< [IN] \~chinese 输入标定表缓存 \~english Input calib buffer
|
||||||
|
unsigned int nCalibBufLen; ///< [IN] \~chinese 输入标定表缓存长度 \~english Input calib buffer length
|
||||||
|
|
||||||
|
unsigned int nRes[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_LSC_CORRECT_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 某个节点对应的子节点个数最大值 \~english The maximum number of child nodes corresponding to a node
|
||||||
|
#define MV_MAX_XML_NODE_NUM_C 128
|
||||||
|
|
||||||
|
/// \~chinese 节点名称字符串最大长度 \~english The maximum length of node name string
|
||||||
|
#define MV_MAX_XML_NODE_STRLEN_C 64
|
||||||
|
|
||||||
|
/// \~chinese 节点String值最大长度 \~english The maximum length of Node String
|
||||||
|
#define MV_MAX_XML_STRVALUE_STRLEN_C 64
|
||||||
|
|
||||||
|
/// \~chinese 节点描述字段最大长度 \~english The maximum length of the node description field
|
||||||
|
#define MV_MAX_XML_DISC_STRLEN_C 512
|
||||||
|
|
||||||
|
/// \~chinese 最多的单元数 \~english The maximum number of units
|
||||||
|
#define MV_MAX_XML_ENTRY_NUM 10
|
||||||
|
|
||||||
|
/// \~chinese 父节点个数上限 \~english The maximum number of parent nodes
|
||||||
|
#define MV_MAX_XML_PARENTS_NUM 8
|
||||||
|
|
||||||
|
/// \~chinese 每个已经实现单元的名称长度 \~english The length of the name of each unit that has been implemented
|
||||||
|
#define MV_MAX_XML_SYMBOLIC_STRLEN_C 64
|
||||||
|
|
||||||
|
enum MV_XML_Visibility
|
||||||
|
{
|
||||||
|
V_Beginner = 0, ///< Always visible
|
||||||
|
V_Expert = 1, ///< Visible for experts or Gurus
|
||||||
|
V_Guru = 2, ///< Visible for Gurus
|
||||||
|
V_Invisible = 3, ///< Not Visible
|
||||||
|
V_Undefined = 99 ///< Object is not yet initialized
|
||||||
|
};
|
||||||
|
|
||||||
|
/// \~chinese 单个节点基本属性 | en:Single Node Basic Attributes
|
||||||
|
typedef struct _MV_XML_NODE_FEATURE_
|
||||||
|
{
|
||||||
|
enum MV_XML_InterfaceType enType; ///< \~chinese 节点类型 \~english Node Type
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Is visibility
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述,目前暂不支持 \~english Node Description, NOT SUPPORT NOW
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称 \~english Display Name
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名 \~english Node Name
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示 \~english Notice
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_NODE_FEATURE;
|
||||||
|
|
||||||
|
/// \~chinese 节点列表 | en:Node List
|
||||||
|
typedef struct _MV_XML_NODES_LIST_
|
||||||
|
{
|
||||||
|
unsigned int nNodeNum; ///< \~chinese 节点个数 \~english Node Number
|
||||||
|
MV_XML_NODE_FEATURE stNodes[MV_MAX_XML_NODE_NUM_C];
|
||||||
|
}MV_XML_NODES_LIST;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Value_
|
||||||
|
{
|
||||||
|
enum MV_XML_InterfaceType enType; ///< \~chinese 节点类型 \~english Node Type
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述,目前暂不支持 \~english Node Description, NOT SUPPORT NOW
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称 \~english Display Name
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名 \~english Node Name
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示 \~english Notice
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Value;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Base_
|
||||||
|
{
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
}MV_XML_FEATURE_Base;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Integer_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
int64_t nValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
int64_t nMinValue; ///< \~chinese 最小值 \~english Min Value
|
||||||
|
int64_t nMaxValue; ///< \~chinese 最大值 \~english Max Value
|
||||||
|
int64_t nIncrement; ///< \~chinese 增量 \~english Increment
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
|
||||||
|
}MV_XML_FEATURE_Integer;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Boolean_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
bool bValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Boolean;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Command_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Command;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Float_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
double dfValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
double dfMinValue; ///< \~chinese 最小值 \~english Min Value
|
||||||
|
double dfMaxValue; ///< \~chinese 最大值 \~english Max Value
|
||||||
|
double dfIncrement; ///< \~chinese 增量 \~english Increment
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Float;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_String_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
char strValue[MV_MAX_XML_STRVALUE_STRLEN_C]; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_String;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Register_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
int64_t nAddrValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Register;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Category_
|
||||||
|
{
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述 目前暂不支持 \~english Node Description, NOT SUPPORT NOW
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称 \~english Display Name
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名 \~english Node Name
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示 \~english Notice
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Category;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_EnumEntry_
|
||||||
|
{
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C];
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 目前暂不支持 \~english NOT SUPPORT NOW
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C];
|
||||||
|
int bIsImplemented;
|
||||||
|
int nParentsNum;
|
||||||
|
MV_XML_NODE_FEATURE stParentsList[MV_MAX_XML_PARENTS_NUM];
|
||||||
|
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
int64_t nValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
int nReserved[8];
|
||||||
|
|
||||||
|
}MV_XML_FEATURE_EnumEntry;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Enumeration_
|
||||||
|
{
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述 目前暂不支持 \~english Node Description, NOT SUPPORT NOW
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称 \~english Display Name
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名 \~english Node Name
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示 \~english Notice
|
||||||
|
|
||||||
|
int nSymbolicNum; ///< \~chinese ymbolic数 \~english Symbolic Number
|
||||||
|
char strCurrentSymbolic[MV_MAX_XML_SYMBOLIC_STRLEN_C];///< \~chinese 当前Symbolic索引 \~english Current Symbolic Index
|
||||||
|
char strSymbolic[MV_MAX_XML_SYMBOLIC_NUM][MV_MAX_XML_SYMBOLIC_STRLEN_C];
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ////< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
int64_t nValue; ///< \~chinese 当前值 \~english Current Value
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Enumeration;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_FEATURE_Port_
|
||||||
|
{
|
||||||
|
enum MV_XML_Visibility enVisivility; ///< \~chinese 是否可见 \~english Visible
|
||||||
|
char strDescription[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 节点描述,目前暂不支持 \~english Node Description, NOT SUPPORT NOW
|
||||||
|
char strDisplayName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 显示名称 \~english Display Name
|
||||||
|
char strName[MV_MAX_XML_NODE_STRLEN_C]; ///< \~chinese 节点名 \~english Node Name
|
||||||
|
char strToolTip[MV_MAX_XML_DISC_STRLEN_C]; ///< \~chinese 提示 \~english Notice
|
||||||
|
|
||||||
|
enum MV_XML_AccessMode enAccessMode; ///< \~chinese 访问模式 \~english Access Mode
|
||||||
|
int bIsLocked; ///< \~chinese 是否锁定。0-否;1-是,目前暂不支持 \~english Locked. 0-NO; 1-YES, NOT SUPPORT NOW
|
||||||
|
|
||||||
|
unsigned int nReserved[4];
|
||||||
|
}MV_XML_FEATURE_Port;
|
||||||
|
|
||||||
|
typedef struct _MV_XML_CAMERA_FEATURE_
|
||||||
|
{
|
||||||
|
enum MV_XML_InterfaceType enType;
|
||||||
|
union
|
||||||
|
{
|
||||||
|
MV_XML_FEATURE_Integer stIntegerFeature;
|
||||||
|
MV_XML_FEATURE_Float stFloatFeature;
|
||||||
|
MV_XML_FEATURE_Enumeration stEnumerationFeature;
|
||||||
|
MV_XML_FEATURE_String stStringFeature;
|
||||||
|
}SpecialFeature;
|
||||||
|
|
||||||
|
}MV_XML_CAMERA_FEATURE;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// \~chinese 图片保存参数 \~english Save Image Parameters
|
||||||
|
typedef struct _MV_SAVE_IMAGE_PARAM_T_EX_
|
||||||
|
{
|
||||||
|
unsigned char* pData; ///< [IN] \~chinese 输入数据缓存 \~english Input Data Buffer
|
||||||
|
unsigned int nDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input Data length
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 输入数据的像素格式 \~english Input Data Pixel Format
|
||||||
|
unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Image Width
|
||||||
|
unsigned short nHeight; ///< [IN] \~chinese 图像高 \~english Image Height
|
||||||
|
|
||||||
|
unsigned char* pImageBuffer; ///< [OUT] \~chinese 输出图片缓存 \~english Output Image Buffer
|
||||||
|
unsigned int nImageLen; ///< [OUT] \~chinese 输出图片长度 \~english Output Image length
|
||||||
|
unsigned int nBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Output buffer size provided
|
||||||
|
enum MV_SAVE_IAMGE_TYPE enImageType; ///< [IN] \~chinese 输出图片格式 \~english Output Image Format
|
||||||
|
unsigned int nJpgQuality; ///< [IN] \~chinese JPG编码质量(50-99],其它格式无效 \~english Encoding quality(50-99],Other formats are invalid
|
||||||
|
|
||||||
|
unsigned int iMethodValue; ///< [IN] \~chinese 插值方法 0-快速 1-均衡(其它值默认为均衡) 2-最优 3-最优+ \~english Bayer interpolation method 0-Fast 1-Equilibrium 2-Optimal 3-Optimal+
|
||||||
|
|
||||||
|
unsigned int nReserved[3]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_SAVE_IMAGE_PARAM_EX;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/// \~chinese 图片保存参数 \~english Save Image Parameters
|
||||||
|
typedef struct _MV_SAVE_IMG_TO_FILE_PARAM_
|
||||||
|
{
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese输入数据的像素格式 \~english The pixel format of the input data
|
||||||
|
unsigned char* pData; ///< [IN] \~chinese 输入数据缓存 \~english Input Data Buffer
|
||||||
|
unsigned int nDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input Data length
|
||||||
|
unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Image Width
|
||||||
|
unsigned short nHeight; ///< [IN] \~chinese 图像高 \~english Image Height
|
||||||
|
enum MV_SAVE_IAMGE_TYPE enImageType; ///< [IN] \~chinese 输入图片格式 \~english Input Image Format
|
||||||
|
unsigned int nQuality; ///< [IN] \~chinese JPG编码质量(50-99],其它格式无效 \~english JPG Encoding quality(50-99],Other formats are invalid
|
||||||
|
char pImagePath[256]; ///< [IN] \~chinese 输入文件路径 \~english Input file path
|
||||||
|
|
||||||
|
int iMethodValue; ///< [IN] \~chinese 插值方法 0-快速 1-均衡(其它值默认为均衡) 2-最优 3-最优+ \~english Bayer interpolation method 0-Fast 1-Equilibrium 2-Optimal 3-Optimal+
|
||||||
|
|
||||||
|
unsigned int nReserved[8]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_SAVE_IMG_TO_FILE_PARAM;
|
||||||
|
|
||||||
|
|
||||||
|
// \~chinese 像素转换结构体 \~english Pixel convert structure
|
||||||
|
typedef struct _MV_CC_PIXEL_CONVERT_PARAM_
|
||||||
|
{
|
||||||
|
unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Width
|
||||||
|
unsigned short nHeight; ///< [IN] \~chinese 图像高 \~english Height
|
||||||
|
|
||||||
|
enum MvGvspPixelType enSrcPixelType; ///< [IN] \~chinese 源像素格式 \~english Source pixel format
|
||||||
|
unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length
|
||||||
|
|
||||||
|
enum MvGvspPixelType enDstPixelType; ///< [IN] \~chinese 目标像素格式 \~english Destination pixel format
|
||||||
|
unsigned char* pDstBuffer; ///< [OUT] \~chinese 输出数据缓存 \~english Output data buffer
|
||||||
|
unsigned int nDstLen; ///< [OUT] \~chinese 输出数据长度 \~english Output data length
|
||||||
|
unsigned int nDstBufferSize; ///< [IN] \~chinese 提供的输出缓冲区大小 \~english Provided output buffer size
|
||||||
|
|
||||||
|
unsigned int nRes[4]; ///< \~chinese 预留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_CC_PIXEL_CONVERT_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 保存的3D数据格式 \~english The saved format for 3D data
|
||||||
|
enum MV_SAVE_POINT_CLOUD_FILE_TYPE
|
||||||
|
{
|
||||||
|
MV_PointCloudFile_Undefined = 0, ///< \~chinese 未定义的点云格式 \~english Undefined point cloud format
|
||||||
|
MV_PointCloudFile_PLY = 1, ///< \~chinese PLY点云格式 \~english The point cloud format named PLY
|
||||||
|
MV_PointCloudFile_CSV = 2, ///< \~chinese CSV点云格式 \~english The point cloud format named CSV
|
||||||
|
MV_PointCloudFile_OBJ = 3, ///< \~chinese OBJ点云格式 \~english The point cloud format named OBJ
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
/// \~chinese 保存3D数据到缓存 \~english Save 3D data to buffer
|
||||||
|
typedef struct _MV_SAVE_POINT_CLOUD_PARAM_
|
||||||
|
{
|
||||||
|
unsigned int nLinePntNum; ///< [IN] \~chinese 行点数,即图像宽 \~english The number of points in each row,which is the width of the image
|
||||||
|
unsigned int nLineNum; ///< [IN] \~chinese 行数,即图像高 \~english The number of rows,which is the height of the image
|
||||||
|
|
||||||
|
enum MvGvspPixelType enSrcPixelType; ///< [IN] \~chinese 输入数据的像素格式 \~english The pixel format of the input data
|
||||||
|
unsigned char* pSrcData; ///< [IN] \~chinese 输入数据缓存 \~english Input data buffer
|
||||||
|
unsigned int nSrcDataLen; ///< [IN] \~chinese 输入数据长度 \~english Input data length
|
||||||
|
|
||||||
|
unsigned char* pDstBuf; ///< [OUT] \~chinese 输出像素数据缓存 \~english Output pixel data buffer
|
||||||
|
unsigned int nDstBufSize; ///< [IN] \~chinese 提供的输出缓冲区大小(nLinePntNum * nLineNum * (16*3 + 4) + 2048) \~english Output buffer size provided(nLinePntNum * nLineNum * (16*3 + 4) + 2048)
|
||||||
|
unsigned int nDstBufLen; ///< [OUT] \~chinese 输出像素数据缓存长度 \~english Output pixel data buffer size
|
||||||
|
enum MV_SAVE_POINT_CLOUD_FILE_TYPE enPointCloudFileType; ///< [IN] \~chinese 提供输出的点云文件类型 \~english Output point data file type provided
|
||||||
|
|
||||||
|
unsigned int nReserved[8]; ///< \~chinese 保留字段 \~english Reserved
|
||||||
|
|
||||||
|
}MV_SAVE_POINT_CLOUD_PARAM;
|
||||||
|
|
||||||
|
/// \~chinese 显示帧信息 \~english Display frame information
|
||||||
|
typedef struct _MV_DISPLAY_FRAME_INFO_
|
||||||
|
{
|
||||||
|
void* hWnd; ///< [IN] \~chinese 窗口句柄 \~english HWND
|
||||||
|
unsigned char* pData; ///< [IN] \~chinese 显示的数据 \~english Data Buffer
|
||||||
|
unsigned int nDataLen; ///< [IN] \~chinese 数据长度 \~english Data Size
|
||||||
|
unsigned short nWidth; ///< [IN] \~chinese 图像宽 \~english Width
|
||||||
|
unsigned short nHeight; ///< [IN] \~chinese 图像高 \~english Height
|
||||||
|
enum MvGvspPixelType enPixelType; ///< [IN] \~chinese 像素格式 \~english Pixel format
|
||||||
|
|
||||||
|
unsigned int enRenderMode; /// [IN] \~chinese 图像渲染方式 Windows:0-GDI(默认), 1-D3D, 2-OPENGL Linux: 0-OPENGL(默认) \~english Windows:0-GDI(default), 1-D3D, 2-OPENGL Linux: 0-OPENGL(default)
|
||||||
|
unsigned int nRes[3]; ///< \~chinese 保留 \~english Reserved
|
||||||
|
|
||||||
|
}MV_DISPLAY_FRAME_INFO;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif /* _MV_OBSOLETE_CAM_PARAMS_H_ */
|
||||||
|
|
@ -0,0 +1,201 @@
|
||||||
|
|
||||||
|
#ifndef _MV_PIXEL_TYPE_H_
|
||||||
|
#define _MV_PIXEL_TYPE_H_
|
||||||
|
|
||||||
|
/************************************************************************/
|
||||||
|
/* GigE Vision (2.0.03) PIXEL FORMATS */
|
||||||
|
/************************************************************************/
|
||||||
|
|
||||||
|
// Indicate if pixel is monochrome or RGB
|
||||||
|
#define MV_GVSP_PIX_MONO 0x01000000
|
||||||
|
#define MV_GVSP_PIX_RGB 0x02000000 // deprecated in version 1.1
|
||||||
|
#define MV_GVSP_PIX_COLOR 0x02000000
|
||||||
|
#define MV_GVSP_PIX_CUSTOM 0x80000000
|
||||||
|
#define MV_GVSP_PIX_COLOR_MASK 0xFF000000
|
||||||
|
|
||||||
|
// Indicate effective number of bits occupied by the pixel (including padding).
|
||||||
|
// This can be used to compute amount of memory required to store an image.
|
||||||
|
#define MV_PIXEL_BIT_COUNT(n) ((n) << 16)
|
||||||
|
|
||||||
|
#define MV_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_MASK 0x00FF0000
|
||||||
|
#define MV_GVSP_PIX_EFFECTIVE_PIXEL_SIZE_SHIFT 16
|
||||||
|
|
||||||
|
// Pixel ID: lower 16-bit of the pixel formats
|
||||||
|
#define MV_GVSP_PIX_ID_MASK 0x0000FFFF
|
||||||
|
#define MV_GVSP_PIX_COUNT 0x46 // next Pixel ID available
|
||||||
|
|
||||||
|
/// \addtogroup 像素格式定义
|
||||||
|
///@{
|
||||||
|
|
||||||
|
///< \~chinese 图片格式定义
|
||||||
|
enum MvGvspPixelType
|
||||||
|
{
|
||||||
|
// Undefined pixel type
|
||||||
|
#ifdef WIN32
|
||||||
|
PixelType_Gvsp_Undefined = 0xFFFFFFFF, ///< 未定义的像素类型
|
||||||
|
|
||||||
|
#else
|
||||||
|
PixelType_Gvsp_Undefined = -1, ///< 未定义的像素类型
|
||||||
|
|
||||||
|
#endif
|
||||||
|
// Mono buffer format defines
|
||||||
|
PixelType_Gvsp_Mono1p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(1) | 0x0037), ///< Mono1p
|
||||||
|
PixelType_Gvsp_Mono2p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(2) | 0x0038), ///< Mono2p
|
||||||
|
PixelType_Gvsp_Mono4p = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(4) | 0x0039), ///< Mono4p
|
||||||
|
PixelType_Gvsp_Mono8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0001), ///< Mono8
|
||||||
|
PixelType_Gvsp_Mono8_Signed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0002), ///< Mono8_Signed
|
||||||
|
PixelType_Gvsp_Mono10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0003), ///< Mono10
|
||||||
|
PixelType_Gvsp_Mono10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0004), ///< Mono10_Packed
|
||||||
|
PixelType_Gvsp_Mono12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0005), ///< Mono12
|
||||||
|
PixelType_Gvsp_Mono12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0006), ///< Mono12_Packed
|
||||||
|
PixelType_Gvsp_Mono14 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0025), ///< Mono14
|
||||||
|
PixelType_Gvsp_Mono16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0007), ///< Mono16
|
||||||
|
|
||||||
|
// Bayer buffer format defines
|
||||||
|
PixelType_Gvsp_BayerGR8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0008), ///< BayerGR8
|
||||||
|
PixelType_Gvsp_BayerRG8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0009), ///< BayerRG8
|
||||||
|
PixelType_Gvsp_BayerGB8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000A), ///< BayerGB8
|
||||||
|
PixelType_Gvsp_BayerBG8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000B), ///< BayerBG8
|
||||||
|
PixelType_Gvsp_BayerRBGG8 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0046), ///< BayerRBGG8
|
||||||
|
PixelType_Gvsp_BayerGR10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000C), ///< BayerGR10
|
||||||
|
PixelType_Gvsp_BayerRG10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000D), ///< BayerRG10
|
||||||
|
PixelType_Gvsp_BayerGB10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000E), ///< BayerGB10
|
||||||
|
PixelType_Gvsp_BayerBG10 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000F), ///< BayerBG10
|
||||||
|
PixelType_Gvsp_BayerGR12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0010), ///< BayerGR12
|
||||||
|
PixelType_Gvsp_BayerRG12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0011), ///< BayerRG12
|
||||||
|
PixelType_Gvsp_BayerGB12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0012), ///< BayerGB12
|
||||||
|
PixelType_Gvsp_BayerBG12 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0013), ///< BayerBG12
|
||||||
|
PixelType_Gvsp_BayerGR10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0026), ///< BayerGR10_Packed
|
||||||
|
PixelType_Gvsp_BayerRG10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0027), ///< BayerRG10_Packed
|
||||||
|
PixelType_Gvsp_BayerGB10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0028), ///< BayerGB10_Packed
|
||||||
|
PixelType_Gvsp_BayerBG10_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0029), ///< BayerBG10_Packed
|
||||||
|
PixelType_Gvsp_BayerGR12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002A), ///< BayerGR12_Packed
|
||||||
|
PixelType_Gvsp_BayerRG12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002B), ///< BayerRG12_Packed
|
||||||
|
PixelType_Gvsp_BayerGB12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002C), ///< BayerGB12_Packed
|
||||||
|
PixelType_Gvsp_BayerBG12_Packed = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002D), ///< BayerBG12_Packed
|
||||||
|
PixelType_Gvsp_BayerGR16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x002E), ///< BayerGR16
|
||||||
|
PixelType_Gvsp_BayerRG16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x002F), ///< BayerRG16
|
||||||
|
PixelType_Gvsp_BayerGB16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0030), ///< BayerGB16
|
||||||
|
PixelType_Gvsp_BayerBG16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0031), ///< BayerBG16
|
||||||
|
|
||||||
|
// RGB Packed buffer format defines
|
||||||
|
PixelType_Gvsp_RGB8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0014), ///< RGB8_Packed
|
||||||
|
PixelType_Gvsp_BGR8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0015), ///< BGR8_Packed
|
||||||
|
PixelType_Gvsp_RGBA8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0016), ///< RGBA8_Packed
|
||||||
|
PixelType_Gvsp_BGRA8_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0017), ///< BGRA8_Packed
|
||||||
|
PixelType_Gvsp_RGB10_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0018), ///< RGB10_Packed
|
||||||
|
PixelType_Gvsp_BGR10_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0019), ///< BGR10_Packed
|
||||||
|
PixelType_Gvsp_RGB12_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x001A), ///< RGB12_Packed
|
||||||
|
PixelType_Gvsp_BGR12_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x001B), ///< BGR12_Packed
|
||||||
|
PixelType_Gvsp_RGB16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0033), ///< RGB16_Packed
|
||||||
|
PixelType_Gvsp_BGR16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x004B), ///< BGR16_Packed
|
||||||
|
PixelType_Gvsp_RGBA16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0064), ///< RGBA16_Packed
|
||||||
|
PixelType_Gvsp_BGRA16_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0051), ///< BGRA16_Packed
|
||||||
|
PixelType_Gvsp_RGB10V1_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x001C), ///< RGB10V1_Packed
|
||||||
|
PixelType_Gvsp_RGB10V2_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x001D), ///< RGB10V2_Packed
|
||||||
|
PixelType_Gvsp_RGB12V1_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(36) | 0X0034), ///< RGB12V1_Packed
|
||||||
|
PixelType_Gvsp_RGB565_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0035), ///< RGB565_Packed
|
||||||
|
PixelType_Gvsp_BGR565_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0X0036), ///< BGR565_Packed
|
||||||
|
|
||||||
|
// YUV Packed buffer format defines
|
||||||
|
PixelType_Gvsp_YUV411_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x001E), ///< YUV411_Packed
|
||||||
|
PixelType_Gvsp_YUV422_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x001F), ///< YUV422_Packed
|
||||||
|
PixelType_Gvsp_YUV422_YUYV_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0032), ///< YUV422_YUYV_Packed
|
||||||
|
PixelType_Gvsp_YUV444_Packed = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0020), ///< YUV444_Packed
|
||||||
|
PixelType_Gvsp_YCBCR8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x003A), ///< YCBCR8_CBYCR
|
||||||
|
PixelType_Gvsp_YCBCR422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x003B), ///< YCBCR422_8
|
||||||
|
PixelType_Gvsp_YCBCR422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0043), ///< YCBCR422_8_CBYCRY
|
||||||
|
PixelType_Gvsp_YCBCR411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x003C), ///< YCBCR411_8_CBYYCRYY
|
||||||
|
PixelType_Gvsp_YCBCR601_8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x003D), ///< YCBCR601_8_CBYCR
|
||||||
|
PixelType_Gvsp_YCBCR601_422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x003E), ///< YCBCR601_422_8
|
||||||
|
PixelType_Gvsp_YCBCR601_422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0044), ///< YCBCR601_422_8_CBYCRY
|
||||||
|
PixelType_Gvsp_YCBCR601_411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x003F), ///< YCBCR601_411_8_CBYYCRYY
|
||||||
|
PixelType_Gvsp_YCBCR709_8_CBYCR = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0040), ///< YCBCR709_8_CBYCR
|
||||||
|
PixelType_Gvsp_YCBCR709_422_8 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0041), ///< YCBCR709_422_8
|
||||||
|
PixelType_Gvsp_YCBCR709_422_8_CBYCRY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0045), ///< YCBCR709_422_8_CBYCRY
|
||||||
|
PixelType_Gvsp_YCBCR709_411_8_CBYYCRYY = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x0042), ///< YCBCR709_411_8_CBYYCRYY
|
||||||
|
|
||||||
|
// YUV420
|
||||||
|
PixelType_Gvsp_YUV420SP_NV12 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x8001), ///< YUV420SP_NV12
|
||||||
|
PixelType_Gvsp_YUV420SP_NV21 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(12) | 0x8002), ///< YUV420SP_NV21
|
||||||
|
|
||||||
|
// RGB Planar buffer format defines
|
||||||
|
PixelType_Gvsp_RGB8_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0021), ///< RGB8_Planar
|
||||||
|
PixelType_Gvsp_RGB10_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0022), ///< RGB10_Planar
|
||||||
|
PixelType_Gvsp_RGB12_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0023), ///< RGB12_Planar
|
||||||
|
PixelType_Gvsp_RGB16_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0024), ///< RGB16_Planar
|
||||||
|
|
||||||
|
// 自定义的图片格式
|
||||||
|
PixelType_Gvsp_Jpeg = (MV_GVSP_PIX_CUSTOM | MV_PIXEL_BIT_COUNT(24) | 0x0001), ///< Jpeg
|
||||||
|
|
||||||
|
PixelType_Gvsp_Coord3D_ABC32f = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x00C0), ///< 0x026000C0X
|
||||||
|
PixelType_Gvsp_Coord3D_ABC32f_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x00C1), ///< 0x026000C1X
|
||||||
|
|
||||||
|
PixelType_Gvsp_Coord3D_AC32f = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(40) | 0x00C2), ///< 该值被废弃,请参考PixelType_Gvsp_Coord3D_AC32f_64; the value is discarded
|
||||||
|
PixelType_Gvsp_COORD3D_DEPTH_PLUS_MASK = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(28) | 0x0001), ///< 该值被废弃; the value is discarded (已放入Chunkdata)
|
||||||
|
|
||||||
|
PixelType_Gvsp_Coord3D_ABC32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(96) | 0x3001), ///< Coord3D_ABC32
|
||||||
|
PixelType_Gvsp_Coord3D_AB32f = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3002), ///< Coord3D_AB32f
|
||||||
|
PixelType_Gvsp_Coord3D_AB32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3003), ///< Coord3D_AB32
|
||||||
|
PixelType_Gvsp_Coord3D_AC32f_64 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x00C2), ///< Coord3D_AC32f_64
|
||||||
|
PixelType_Gvsp_Coord3D_AC32f_Planar = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x00C3), ///< Coord3D_AC32f_Planar
|
||||||
|
PixelType_Gvsp_Coord3D_AC32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x3004), ///< Coord3D_AC32
|
||||||
|
PixelType_Gvsp_Coord3D_A32f = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x00BD), ///< Coord3D_A32f
|
||||||
|
PixelType_Gvsp_Coord3D_A32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x3005), ///< Coord3D_A32
|
||||||
|
PixelType_Gvsp_Coord3D_C32f = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x00BF), ///< Coord3D_C32f
|
||||||
|
PixelType_Gvsp_Coord3D_C32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x3006), ///< Coord3D_C32
|
||||||
|
PixelType_Gvsp_Coord3D_ABC16 = (MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x00B9), ///< Coord3D_ABC16
|
||||||
|
PixelType_Gvsp_Coord3D_C16 = (MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x00B8), ///< Coord3D_C16
|
||||||
|
|
||||||
|
PixelType_Gvsp_Float32 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(32) | 0x0001), //0x81200001
|
||||||
|
|
||||||
|
//无损压缩像素格式定义
|
||||||
|
PixelType_Gvsp_HB_Mono8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0001), ///< HB_Mono8
|
||||||
|
PixelType_Gvsp_HB_Mono10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0003), ///< HB_Mono10
|
||||||
|
PixelType_Gvsp_HB_Mono10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0004), ///< HB_Mono10_Packed
|
||||||
|
PixelType_Gvsp_HB_Mono12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0005), ///< HB_Mono12
|
||||||
|
PixelType_Gvsp_HB_Mono12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0006), ///< HB_Mono12_Packed
|
||||||
|
PixelType_Gvsp_HB_Mono16 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0007), ///< HB_Mono16
|
||||||
|
PixelType_Gvsp_HB_BayerGR8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0008), ///< HB_BayerGR8
|
||||||
|
PixelType_Gvsp_HB_BayerRG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0009), ///< HB_BayerRG8
|
||||||
|
PixelType_Gvsp_HB_BayerGB8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000A), ///< HB_BayerGB8
|
||||||
|
PixelType_Gvsp_HB_BayerBG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x000B), ///< HB_BayerBG8
|
||||||
|
PixelType_Gvsp_HB_BayerRBGG8 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(8) | 0x0046), ///< HB_BayerRBGG8
|
||||||
|
PixelType_Gvsp_HB_BayerGR10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000C), ///< HB_BayerGR10
|
||||||
|
PixelType_Gvsp_HB_BayerRG10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000D), ///< HB_BayerRG10
|
||||||
|
PixelType_Gvsp_HB_BayerGB10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000E), ///< HB_BayerGB10
|
||||||
|
PixelType_Gvsp_HB_BayerBG10 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x000F), ///< HB_BayerBG10
|
||||||
|
PixelType_Gvsp_HB_BayerGR12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0010), ///< HB_BayerGR12
|
||||||
|
PixelType_Gvsp_HB_BayerRG12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0011), ///< HB_BayerRG12
|
||||||
|
PixelType_Gvsp_HB_BayerGB12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0012), ///< HB_BayerGB12
|
||||||
|
PixelType_Gvsp_HB_BayerBG12 = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(16) | 0x0013), ///< HB_BayerBG12
|
||||||
|
PixelType_Gvsp_HB_BayerGR10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0026), ///< HB_BayerGR10_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerRG10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0027), ///< HB_BayerRG10_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerGB10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0028), ///< HB_BayerGB10_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerBG10_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x0029), ///< HB_BayerBG10_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerGR12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002A), ///< HB_BayerGR12_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerRG12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002B), ///< HB_BayerRG12_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerGB12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002C), ///< HB_BayerGB12_Packed
|
||||||
|
PixelType_Gvsp_HB_BayerBG12_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_MONO | MV_PIXEL_BIT_COUNT(12) | 0x002D), ///< HB_BayerBG12_Packed
|
||||||
|
PixelType_Gvsp_HB_YUV422_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x001F), ///< HB_YUV422_Packed
|
||||||
|
PixelType_Gvsp_HB_YUV422_YUYV_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(16) | 0x0032), ///< HB_YUV422_YUYV_Packed
|
||||||
|
PixelType_Gvsp_HB_RGB8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0014), ///< HB_RGB8_Packed
|
||||||
|
PixelType_Gvsp_HB_BGR8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(24) | 0x0015), ///< HB_BGR8_Packed
|
||||||
|
PixelType_Gvsp_HB_RGBA8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0016), ///< HB_RGBA8_Packed
|
||||||
|
PixelType_Gvsp_HB_BGRA8_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(32) | 0x0017), ///< HB_BGRA8_Packed
|
||||||
|
PixelType_Gvsp_HB_RGB16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x0033), ///< HB_RGB16_Packed
|
||||||
|
PixelType_Gvsp_HB_BGR16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(48) | 0x004B), ///< HB_BGR16_Packed
|
||||||
|
PixelType_Gvsp_HB_RGBA16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0064), ///< HB_RGBA16_Packed
|
||||||
|
PixelType_Gvsp_HB_BGRA16_Packed = (MV_GVSP_PIX_CUSTOM | MV_GVSP_PIX_COLOR | MV_PIXEL_BIT_COUNT(64) | 0x0051), ///< HB_BGRA16_Packed
|
||||||
|
|
||||||
|
};
|
||||||
|
///@}
|
||||||
|
|
||||||
|
#ifdef WIN32
|
||||||
|
typedef __int64 int64_t;
|
||||||
|
typedef unsigned __int64 uint64_t;
|
||||||
|
#else
|
||||||
|
#include <stdint.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* _MV_PIXEL_TYPE_H_ */
|
||||||
|
|
@ -0,0 +1,356 @@
|
||||||
|
#include "MvCamera.h"
|
||||||
|
|
||||||
|
CMvCamera::CMvCamera()
|
||||||
|
{
|
||||||
|
m_hDevHandle = MV_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
CMvCamera::~CMvCamera()
|
||||||
|
{
|
||||||
|
if (m_hDevHandle)
|
||||||
|
{
|
||||||
|
MV_CC_DestroyHandle(m_hDevHandle);
|
||||||
|
m_hDevHandle = MV_NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:初始化SDK | en:Initialize SDK
|
||||||
|
int CMvCamera::InitSDK()
|
||||||
|
{
|
||||||
|
return MV_CC_Initialize();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:反初始化SDK | en:Finalize SDK
|
||||||
|
int CMvCamera::FinalizeSDK()
|
||||||
|
{
|
||||||
|
return MV_CC_Finalize();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取SDK版本号 | en:Get SDK Version
|
||||||
|
int CMvCamera::GetSDKVersion()
|
||||||
|
{
|
||||||
|
return MV_CC_GetSDKVersion();
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:枚举设备 | en:Enumerate Device
|
||||||
|
int CMvCamera::EnumDevices(unsigned int nTLayerType, MV_CC_DEVICE_INFO_LIST* pstDevList)
|
||||||
|
{
|
||||||
|
return MV_CC_EnumDevices(nTLayerType, pstDevList);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:判断设备是否可达 | en:Is the device accessible
|
||||||
|
bool CMvCamera::IsDeviceAccessible(MV_CC_DEVICE_INFO* pstDevInfo, unsigned int nAccessMode)
|
||||||
|
{
|
||||||
|
return MV_CC_IsDeviceAccessible(pstDevInfo, nAccessMode);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:打开设备 | en:Open Device
|
||||||
|
int CMvCamera::Open(MV_CC_DEVICE_INFO* pstDeviceInfo)
|
||||||
|
{
|
||||||
|
if (MV_NULL == pstDeviceInfo)
|
||||||
|
{
|
||||||
|
return MV_E_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_hDevHandle)
|
||||||
|
{
|
||||||
|
return MV_E_CALLORDER;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nRet = MV_CC_CreateHandle(&m_hDevHandle, pstDeviceInfo);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
return nRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
nRet = MV_CC_OpenDevice(m_hDevHandle);
|
||||||
|
if (MV_OK != nRet)
|
||||||
|
{
|
||||||
|
MV_CC_DestroyHandle(m_hDevHandle);
|
||||||
|
m_hDevHandle = MV_NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return nRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:关闭设备 | en:Close Device
|
||||||
|
int CMvCamera::Close()
|
||||||
|
{
|
||||||
|
if (MV_NULL == m_hDevHandle)
|
||||||
|
{
|
||||||
|
return MV_E_HANDLE;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_CC_CloseDevice(m_hDevHandle);
|
||||||
|
|
||||||
|
int nRet = MV_CC_DestroyHandle(m_hDevHandle);
|
||||||
|
m_hDevHandle = MV_NULL;
|
||||||
|
|
||||||
|
return nRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:判断相机是否处于连接状态 | en:Is The Device Connected
|
||||||
|
bool CMvCamera::IsDeviceConnected()
|
||||||
|
{
|
||||||
|
return MV_CC_IsDeviceConnected(m_hDevHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:注册图像数据回调 | en:Register Image Data CallBack
|
||||||
|
int CMvCamera::RegisterImageCallBack(void(__stdcall* cbOutput)(unsigned char * pData, MV_FRAME_OUT_INFO_EX* pFrameInfo, void* pUser), void* pUser)
|
||||||
|
{
|
||||||
|
return MV_CC_RegisterImageCallBackEx(m_hDevHandle, cbOutput, pUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::RegisterImageCallBack2(void(__stdcall* cbOutput)(MV_FRAME_OUT* pstFrame, void *pUser, bool bAutoFree), void* pUser, bool bAutoFree)
|
||||||
|
{
|
||||||
|
return MV_CC_RegisterImageCallBackEx2(m_hDevHandle, cbOutput, pUser, bAutoFree);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:开启抓图 | en:Start Grabbing
|
||||||
|
int CMvCamera::StartGrabbing()
|
||||||
|
{
|
||||||
|
return MV_CC_StartGrabbing(m_hDevHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:停止抓图 | en:Stop Grabbing
|
||||||
|
int CMvCamera::StopGrabbing()
|
||||||
|
{
|
||||||
|
return MV_CC_StopGrabbing(m_hDevHandle);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:主动获取一帧图像数据 | en:Get one frame initiatively
|
||||||
|
int CMvCamera::GetImageBuffer(MV_FRAME_OUT* pFrame, int nMsec)
|
||||||
|
{
|
||||||
|
return MV_CC_GetImageBuffer(m_hDevHandle, pFrame, nMsec);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:释放图像缓存 | en:Free image buffer
|
||||||
|
int CMvCamera::FreeImageBuffer(MV_FRAME_OUT* pFrame)
|
||||||
|
{
|
||||||
|
return MV_CC_FreeImageBuffer(m_hDevHandle, pFrame);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:设置显示窗口句柄 | en:Set Display Window Handle
|
||||||
|
int CMvCamera::DisplayOneFrame(void* hwndDisplay,MV_CC_IMAGE* pImageInfo)
|
||||||
|
{
|
||||||
|
return MV_CC_DisplayOneFrameEx2(m_hDevHandle, hwndDisplay, pImageInfo,0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:设置SDK内部图像缓存节点个数 | en:Set the number of the internal image cache nodes in SDK
|
||||||
|
int CMvCamera::SetImageNodeNum(unsigned int nNum)
|
||||||
|
{
|
||||||
|
return MV_CC_SetImageNodeNum(m_hDevHandle, nNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取设备信息 | en:Get device information
|
||||||
|
int CMvCamera::GetDeviceInfo(MV_CC_DEVICE_INFO* pstDevInfo)
|
||||||
|
{
|
||||||
|
return MV_CC_GetDeviceInfo(m_hDevHandle, pstDevInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取GEV相机的统计信息 | en:Get detect info of GEV camera
|
||||||
|
int CMvCamera::GetGevAllMatchInfo(MV_MATCH_INFO_NET_DETECT* pMatchInfoNetDetect)
|
||||||
|
{
|
||||||
|
if (MV_NULL == pMatchInfoNetDetect)
|
||||||
|
{
|
||||||
|
return MV_E_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_CC_DEVICE_INFO stDevInfo = {0};
|
||||||
|
GetDeviceInfo(&stDevInfo);
|
||||||
|
if (stDevInfo.nTLayerType != MV_GIGE_DEVICE)
|
||||||
|
{
|
||||||
|
return MV_E_SUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_ALL_MATCH_INFO struMatchInfo = {0};
|
||||||
|
|
||||||
|
struMatchInfo.nType = MV_MATCH_TYPE_NET_DETECT;
|
||||||
|
struMatchInfo.pInfo = pMatchInfoNetDetect;
|
||||||
|
struMatchInfo.nInfoSize = sizeof(MV_MATCH_INFO_NET_DETECT);
|
||||||
|
memset(struMatchInfo.pInfo, 0, sizeof(MV_MATCH_INFO_NET_DETECT));
|
||||||
|
|
||||||
|
return MV_CC_GetAllMatchInfo(m_hDevHandle, &struMatchInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取U3V相机的统计信息 | en:Get detect info of U3V camera
|
||||||
|
int CMvCamera::GetU3VAllMatchInfo(MV_MATCH_INFO_USB_DETECT* pMatchInfoUSBDetect)
|
||||||
|
{
|
||||||
|
if (MV_NULL == pMatchInfoUSBDetect)
|
||||||
|
{
|
||||||
|
return MV_E_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_CC_DEVICE_INFO stDevInfo = {0};
|
||||||
|
GetDeviceInfo(&stDevInfo);
|
||||||
|
if (stDevInfo.nTLayerType != MV_USB_DEVICE)
|
||||||
|
{
|
||||||
|
return MV_E_SUPPORT;
|
||||||
|
}
|
||||||
|
|
||||||
|
MV_ALL_MATCH_INFO struMatchInfo = {0};
|
||||||
|
|
||||||
|
struMatchInfo.nType = MV_MATCH_TYPE_USB_DETECT;
|
||||||
|
struMatchInfo.pInfo = pMatchInfoUSBDetect;
|
||||||
|
struMatchInfo.nInfoSize = sizeof(MV_MATCH_INFO_USB_DETECT);
|
||||||
|
memset(struMatchInfo.pInfo, 0, sizeof(MV_MATCH_INFO_USB_DETECT));
|
||||||
|
|
||||||
|
return MV_CC_GetAllMatchInfo(m_hDevHandle, &struMatchInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取和设置Int型参数,如 Width和Height
|
||||||
|
// en:Get Int type parameters, such as Width and Height
|
||||||
|
int CMvCamera::GetIntValue(IN const char* strKey, OUT MVCC_INTVALUE_EX *pIntValue)
|
||||||
|
{
|
||||||
|
return MV_CC_GetIntValueEx(m_hDevHandle, strKey, pIntValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetIntValue(IN const char* strKey, IN int64_t nValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetIntValueEx(m_hDevHandle, strKey, nValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取和设置Enum型参数,如 PixelFormat
|
||||||
|
// en:Get Enum type parameters, such as PixelFormat
|
||||||
|
int CMvCamera::GetEnumValue(IN const char* strKey, OUT MVCC_ENUMVALUE *pEnumValue)
|
||||||
|
{
|
||||||
|
return MV_CC_GetEnumValue(m_hDevHandle, strKey, pEnumValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetEnumValue(IN const char* strKey, IN unsigned int nValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetEnumValue(m_hDevHandle, strKey, nValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetEnumValueByString(IN const char* strKey, IN const char* sValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetEnumValueByString(m_hDevHandle, strKey, sValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::GetEnumEntrySymbolic(IN const char* strKey, IN MVCC_ENUMENTRY* pstEnumEntry)
|
||||||
|
{
|
||||||
|
return MV_CC_GetEnumEntrySymbolic(m_hDevHandle, strKey, pstEnumEntry);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取和设置Float型参数,如 ExposureTime和Gain
|
||||||
|
// en:Get Float type parameters, such as ExposureTime and Gain
|
||||||
|
int CMvCamera::GetFloatValue(IN const char* strKey, OUT MVCC_FLOATVALUE *pFloatValue)
|
||||||
|
{
|
||||||
|
return MV_CC_GetFloatValue(m_hDevHandle, strKey, pFloatValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetFloatValue(IN const char* strKey, IN float fValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetFloatValue(m_hDevHandle, strKey, fValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取和设置Bool型参数,如 ReverseX
|
||||||
|
// en:Get Bool type parameters, such as ReverseX
|
||||||
|
int CMvCamera::GetBoolValue(IN const char* strKey, OUT bool *pbValue)
|
||||||
|
{
|
||||||
|
return MV_CC_GetBoolValue(m_hDevHandle, strKey, pbValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetBoolValue(IN const char* strKey, IN bool bValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetBoolValue(m_hDevHandle, strKey, bValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:获取和设置String型参数,如 DeviceUserID
|
||||||
|
// en:Get String type parameters, such as DeviceUserID
|
||||||
|
int CMvCamera::GetStringValue(IN const char* strKey, MVCC_STRINGVALUE *pStringValue)
|
||||||
|
{
|
||||||
|
return MV_CC_GetStringValue(m_hDevHandle, strKey, pStringValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
int CMvCamera::SetStringValue(IN const char* strKey, IN const char* strValue)
|
||||||
|
{
|
||||||
|
return MV_CC_SetStringValue(m_hDevHandle, strKey, strValue);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:执行一次Command型命令,如 UserSetSave
|
||||||
|
// en:Execute Command once, such as UserSetSave
|
||||||
|
int CMvCamera::CommandExecute(IN const char* strKey)
|
||||||
|
{
|
||||||
|
return MV_CC_SetCommandValue(m_hDevHandle, strKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:探测网络最佳包大小(只对GigE相机有效) | en:Detection network optimal package size(It only works for the GigE camera)
|
||||||
|
int CMvCamera::GetOptimalPacketSize(unsigned int* pOptimalPacketSize)
|
||||||
|
{
|
||||||
|
if (MV_NULL == pOptimalPacketSize)
|
||||||
|
{
|
||||||
|
return MV_E_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
int nRet = MV_CC_GetOptimalPacketSize(m_hDevHandle);
|
||||||
|
if (nRet < MV_OK)
|
||||||
|
{
|
||||||
|
return nRet;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pOptimalPacketSize = (unsigned int)nRet;
|
||||||
|
|
||||||
|
return MV_OK;
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:注册消息异常回调 | en:Register Message Exception CallBack
|
||||||
|
int CMvCamera::RegisterExceptionCallBack(void(__stdcall* cbException)(unsigned int nMsgType, void* pUser),void* pUser)
|
||||||
|
{
|
||||||
|
return MV_CC_RegisterExceptionCallBack(m_hDevHandle, cbException, pUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:注册单个事件回调 | en:Register Event CallBack
|
||||||
|
int CMvCamera::RegisterEventCallBack(const char* pEventName, void(__stdcall* cbEvent)(MV_EVENT_OUT_INFO * pEventInfo, void* pUser), void* pUser)
|
||||||
|
{
|
||||||
|
return MV_CC_RegisterEventCallBackEx(m_hDevHandle, pEventName, cbEvent, pUser);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:强制IP | en:Force IP
|
||||||
|
int CMvCamera::ForceIp(unsigned int nIP, unsigned int nSubNetMask, unsigned int nDefaultGateWay)
|
||||||
|
{
|
||||||
|
return MV_GIGE_ForceIpEx(m_hDevHandle, nIP, nSubNetMask, nDefaultGateWay);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:配置IP方式 | en:IP configuration method
|
||||||
|
int CMvCamera::SetIpConfig(unsigned int nType)
|
||||||
|
{
|
||||||
|
return MV_GIGE_SetIpConfig(m_hDevHandle, nType);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:设置网络传输模式 | en:Set Net Transfer Mode
|
||||||
|
int CMvCamera::SetNetTransMode(unsigned int nType)
|
||||||
|
{
|
||||||
|
return MV_GIGE_SetNetTransMode(m_hDevHandle, nType);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:像素格式转换 | en:Pixel format conversion
|
||||||
|
int CMvCamera::ConvertPixelType(MV_CC_PIXEL_CONVERT_PARAM_EX* pstCvtParam)
|
||||||
|
{
|
||||||
|
return MV_CC_ConvertPixelTypeEx(m_hDevHandle, pstCvtParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:保存图片 | en:save image
|
||||||
|
int CMvCamera::SaveImage(MV_SAVE_IMAGE_PARAM_EX3* pstParam)
|
||||||
|
{
|
||||||
|
return MV_CC_SaveImageEx3(m_hDevHandle, pstParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:保存图片为文件 | en:Save the image as a file
|
||||||
|
int CMvCamera::SaveImageToFile(MV_CC_IMAGE* pstImage, MV_CC_SAVE_IMAGE_PARAM* pSaveImageParam, const char* pcImagePath)
|
||||||
|
{
|
||||||
|
return MV_CC_SaveImageToFileEx2(m_hDevHandle, pstImage, pSaveImageParam, pcImagePath);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:绘制圆形辅助线 | en:Draw circle auxiliary line
|
||||||
|
int CMvCamera::DrawCircle(MVCC_CIRCLE_INFO* pCircleInfo)
|
||||||
|
{
|
||||||
|
return MV_CC_DrawCircle(m_hDevHandle, pCircleInfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
// ch:绘制线形辅助线 | en:Draw lines auxiliary line
|
||||||
|
int CMvCamera::DrawLines(MVCC_LINES_INFO* pLinesInfo)
|
||||||
|
{
|
||||||
|
return MV_CC_DrawLines(m_hDevHandle, pLinesInfo);
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue