相机格式更改
This commit is contained in:
@ -27,7 +27,7 @@ namespace DH.Devices.Camera
|
||||
public bool Connected=false;
|
||||
public int m_n_dev_count = 0;
|
||||
private DVPCamera.dvpStreamCallback ImageCallback;
|
||||
public dvpStreamFormat dvpStreamFormat = dvpStreamFormat.S_RGB24;
|
||||
// public dvpStreamFormat dvpStreamFormat = dvpStreamFormat.S_RGB24;
|
||||
public int m_CamCount = 0;
|
||||
public Double m_dfDisplayCount = 0;
|
||||
|
||||
@ -63,6 +63,8 @@ namespace DH.Devices.Camera
|
||||
{
|
||||
try
|
||||
{
|
||||
if (CameraName == "Cam1")
|
||||
Console.WriteLine("");
|
||||
pCallBackFunc = new DVPCamera.dvpEventCallback(cbExceptiondelegate);
|
||||
nRet = DVPCamera.dvpOpenByUserId(CameraName,
|
||||
dvpOpenMode.OPEN_NORMAL,
|
||||
@ -74,7 +76,7 @@ namespace DH.Devices.Camera
|
||||
throw new Exception($"Create device failed:{nRet:x8}");
|
||||
}
|
||||
|
||||
nRet = DVPCamera.dvpSetTargetFormat(m_handle, (dvpStreamFormat)dvpStreamFormat);
|
||||
nRet = DVPCamera.dvpSetTargetFormat(m_handle, (dvpStreamFormat)DvpImageFormat);
|
||||
if (dvpStatus.DVP_STATUS_OK != nRet)
|
||||
{
|
||||
throw new Exception($"Set image format failed:{nRet:x8}");
|
||||
|
Reference in New Issue
Block a user