DotNET SDK Programming Reference Manual
DotNET SDK Programming Reference Manual
DotNET SDK
Programmer's Guide
Version:V1.3.7
Date:2025-03-05
Notice
All rights reserved. No parts of this manual may be used or reproduced, in any forms or by any means,
without prior written permission of China Daheng Group, Inc. Beijing Image Vision Technology Branch.
The right is also reserved to modify or change any parts of this manual in the future without prior notification.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch
Web: www.daheng-imaging.com/en
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch I
3.5. GX_ACCESS_MODE .............................................................................................34
3.6. GX_PIXEL_FORMAT_ENTRY ...............................................................................34
3.7. GX_FRAME_STATUS_LIST...................................................................................37
3.8. GX_FEATURE_TYPE ............................................................................................37
3.9. GX_BAYER_CONVERT_TYPE_LIST ....................................................................37
3.10. GX_VALLID_BIT_LIST .........................................................................................38
3.11. GX_IP_CONFIGURE_MODE ...............................................................................38
3.12. GX_RESET_DEVICE_MODE ..............................................................................38
3.13. COLOR_TRANSFORM_FACTOR ........................................................................38
3.14. GX_TL_TYPE_LIST .............................................................................................39
3.15. GX_ACTUAL_BITS ..............................................................................................39
3.16. GX_PIXEL_COLOR_FILTER ...............................................................................39
3.17. GX_STATIC_DEFECT_CORRECTION ................................................................39
3.18. GX_IMAGE_INFO ................................................................................................40
3.19. GX_REGISTER_STACK_ENTRY ........................................................................40
3.20. GX_GIGE_ACTION_COMMAND_RESULT .........................................................40
4. Handle Type Definition ................................................................................................. 41
5. Delegate Function Type Definition .............................................................................. 42
6. Module Interface Definition .......................................................................................... 43
6.1. IGXFactory .............................................................................................................43
6.1.1. GetInstance ....................................................................................................................... 43
6.1.2. Init ...................................................................................................................................... 44
6.1.3. Uninit .................................................................................................................................. 44
6.1.4. SetLogType........................................................................................................................ 44
6.1.5. GetLogType ....................................................................................................................... 44
6.1.6. UpdateDeviceList............................................................................................................... 44
6.1.7. UpdateAllDeviceList .......................................................................................................... 45
6.1.8. UpdateAllDeviceListEx ...................................................................................................... 45
6.1.9. OpenDeviceByIP/MAC/SN/UserID .................................................................................... 45
6.1.10. GigEIPConfiguration ........................................................................................................ 45
6.1.11. GigEForceIP .................................................................................................................... 46
6.1.12. GigEResetDevice ............................................................................................................ 46
6.1.13. CreateImageFormatConvert ............................................................................................ 47
6.1.14. CreateImageSpecialFunction .......................................................................................... 47
6.1.15. GetAllInterfaceInfo ........................................................................................................... 47
6.1.16. GetInterface ..................................................................................................................... 47
6.1.17. CreateImageProcess ....................................................................................................... 47
6.1.18. GigEIssueActionCommand ............................................................................................. 48
6.1.19. GigEIssueScheduledActionCommand ............................................................................ 48
6.2. IGXInterfaceInfo .....................................................................................................49
6.2.1. GetType ............................................................................................................................. 50
6.2.2. GetModelName.................................................................................................................. 50
6.2.3. GetDisplayName................................................................................................................ 50
6.2.4. GetSerialNumber ............................................................................................................... 50
6.2.5. GetInterfaceID ................................................................................................................... 50
6.2.6. GetInitFlag ......................................................................................................................... 50
6.2.7. GetVendorName ................................................................................................................ 51
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch II
6.3. IGXInterface ...........................................................................................................51
6.3.1. GetInterfaceInfo ................................................................................................................. 51
6.3.2. GetAllDeviceInfo ................................................................................................................ 51
6.3.3. GetFeatureControl ............................................................................................................. 51
6.4. IGXDeviceInfo ........................................................................................................51
6.4.1. GetVendorName ................................................................................................................ 52
6.4.2. GetModelName.................................................................................................................. 52
6.4.3. GetSN ................................................................................................................................ 52
6.4.4. GetDisplayName................................................................................................................ 53
6.4.5. GetDeviceID ...................................................................................................................... 53
6.4.6. GetUserID .......................................................................................................................... 53
6.4.7. GetAccessStatus ............................................................................................................... 53
6.4.8. GetDeviceClass ................................................................................................................. 53
6.4.9. GetMAC ............................................................................................................................. 53
6.4.10. GetIP ................................................................................................................................ 54
6.4.11. GetSubnetMask ............................................................................................................... 54
6.4.12. GetGateway ..................................................................................................................... 54
6.4.13. GetNICMAC ..................................................................................................................... 54
6.4.14. GetNICIP ......................................................................................................................... 54
6.4.15. GetNICSubnetMask......................................................................................................... 54
6.4.16. GetNICGateway............................................................................................................... 55
6.4.17. GetNICDescription ........................................................................................................... 55
6.5. IGXDevice ..............................................................................................................55
6.5.1. GetDeviceInfo .................................................................................................................... 56
6.5.2. GetStreamCount ................................................................................................................ 56
6.5.3. OpenStream ...................................................................................................................... 56
6.5.4. GetFeatureControl ............................................................................................................. 56
6.5.5. GetRemoteFeatureControl ................................................................................................ 56
6.5.6. GetEventNumInQueue ...................................................................................................... 56
6.5.7. FlushEvent ......................................................................................................................... 57
6.5.8. RegisterDeviceOfflineCallback .......................................................................................... 57
6.5.9. UnregisterDeviceOfflineCallback ....................................................................................... 57
6.5.10. CreateImageProcessConfig ............................................................................................ 57
6.5.11. ExportConfigFile .............................................................................................................. 57
6.5.12. ImportConfigFile .............................................................................................................. 57
6.5.13. ExportConfigFileW ........................................................................................................... 58
6.5.14. ImportConfigFileW ........................................................................................................... 58
6.5.15. Close ................................................................................................................................ 58
6.5.16. GetParentInterface .......................................................................................................... 58
6.6. IGXFeatureControl .................................................................................................58
6.6.1. GetFeatureNameList ......................................................................................................... 59
6.6.2. GetFeatureType ................................................................................................................. 59
6.6.3. IsImplemented ................................................................................................................... 59
6.6.4. IsReadable......................................................................................................................... 60
6.6.5. IsWritable ........................................................................................................................... 60
6.6.6. GetIntFeature..................................................................................................................... 60
6.6.7. GetFloatFeature................................................................................................................. 60
6.6.8. GetEnumFeature ............................................................................................................... 60
6.6.9. GetBoolFeature ................................................................................................................. 60
6.6.10. GetStringFeature ............................................................................................................. 61
6.6.11. GetCommandFeature ...................................................................................................... 61
6.6.12. GetRegisterFeature ......................................................................................................... 61
6.6.13. RegisterFeatureCallback ................................................................................................. 61
6.6.14. UnregisterFeatureCallback .............................................................................................. 61
6.6.15. ReadPort.......................................................................................................................... 61
6.6.16. WritePort .......................................................................................................................... 62
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch III
6.6.17. ReadPortStacked ............................................................................................................ 62
6.6.18. WritePortStacked ............................................................................................................. 62
6.6.19. FeatureSave .................................................................................................................... 63
6.6.20. FeatureSaveW ................................................................................................................. 63
6.6.21. FeatureLoad .................................................................................................................... 63
6.6.22. FeatureLoadW ................................................................................................................. 63
6.7. IIntFeature ..............................................................................................................64
6.7.1. GetMin ............................................................................................................................... 64
6.7.2. GetMax .............................................................................................................................. 64
6.7.3. GetInc ................................................................................................................................ 64
6.7.4. GetValue ............................................................................................................................ 64
6.7.5. SetValue............................................................................................................................. 64
6.8. IFloatFeature ..........................................................................................................65
6.8.1. GetMin ............................................................................................................................... 65
6.8.2. GetMax .............................................................................................................................. 65
6.8.3. HasInc ................................................................................................................................ 65
6.8.4. GetInc ................................................................................................................................ 65
6.8.5. GetUnit ............................................................................................................................... 65
6.8.6. GetValue ............................................................................................................................ 66
6.8.7. SetValue............................................................................................................................. 66
6.9. IEnumFeature .........................................................................................................66
6.9.1. GetEnumEntryList.............................................................................................................. 66
6.9.2. GetValue ............................................................................................................................ 66
6.9.3. SetValue............................................................................................................................. 66
6.10. IBoolFeatur ...........................................................................................................67
6.10.1. GetValue .......................................................................................................................... 67
6.10.2. SetValue........................................................................................................................... 67
6.11. IStringFeature .......................................................................................................67
6.11.1. GetValue .......................................................................................................................... 67
6.11.2. SetValue ........................................................................................................................... 68
6.11.3. GetStringMaxLength ........................................................................................................ 68
6.12. ICommandFeature................................................................................................68
6.12.1. Execute ............................................................................................................................ 68
6.13. IRegisterFeature ...................................................................................................68
6.13.1. GetLength ........................................................................................................................ 69
6.13.2. GetBuffer.......................................................................................................................... 69
6.13.3. SetBuffer .......................................................................................................................... 69
6.14. IGXStream ............................................................................................................69
6.14.1. StartGrab ......................................................................................................................... 70
6.14.2. StopGrab ......................................................................................................................... 70
6.14.3. RegisterCaptureCallback................................................................................................. 70
6.14.4. UnregisterCaptureCallback ............................................................................................. 70
6.14.5. GetImage ......................................................................................................................... 71
6.14.6. GetImageNoThrow .......................................................................................................... 71
6.14.7. DQBuf .............................................................................................................................. 71
6.14.8. QBuf ................................................................................................................................. 71
6.14.9. GetFeatureControl ........................................................................................................... 72
6.14.10. FlushQueue ................................................................................................................... 72
6.14.11. SetAcquisitionBufferNumber.......................................................................................... 72
6.14.12. Close .............................................................................................................................. 72
6.14.13. GetOptimalPacketSize .................................................................................................. 72
6.14.14. GetPayloadSize ............................................................................................................. 73
6.14.15. RegisterBuffer ................................................................................................................ 73
6.14.16. UnRegisterBuffer ........................................................................................................... 74
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch IV
6.15. IFrameData ..........................................................................................................75
6.15.1. GetStatus ......................................................................................................................... 75
6.15.2. GetPayloadSize ............................................................................................................... 75
6.15.3. GetWidth .......................................................................................................................... 75
6.15.4. GetHeight......................................................................................................................... 76
6.15.5. GetPixelFormat ................................................................................................................ 76
6.15.6. GetFrameID ..................................................................................................................... 76
6.15.7. GetTimeStamp ................................................................................................................. 76
6.15.8. GetBuffer.......................................................................................................................... 76
6.15.9. ConvertToRaw8 ............................................................................................................... 76
6.15.10. ConvertToRGB24 .......................................................................................................... 77
6.15.11. ImageProcess ................................................................................................................ 77
6.15.12. GetUserParam ............................................................................................................... 77
6.16. IImageData ...........................................................................................................77
6.17. IImagProcessConfig .............................................................................................77
6.17.1. SetValidBit........................................................................................................................ 79
6.17.2. GetValidBit ....................................................................................................................... 79
6.17.3. EnableDefectivePixelCorrect ........................................................................................... 79
6.17.4. IsDefectivePixelCorrect ................................................................................................... 79
6.17.5. EnableSharpen ................................................................................................................ 79
6.17.6. IsSharpen ........................................................................................................................ 79
6.17.7. EnableAccelerate ............................................................................................................ 80
6.17.8. IsAccelerate ..................................................................................................................... 80
6.17.9. SetSharpenParam ........................................................................................................... 80
6.17.10. GetSharpenParam ......................................................................................................... 80
6.17.11. SetContrastParam ......................................................................................................... 80
6.17.12. GetContrastParam ......................................................................................................... 81
6.17.13. SetGammaParam .......................................................................................................... 81
6.17.14. GetGammaParam ......................................................................................................... 81
6.17.15. SetLightnessParam ....................................................................................................... 81
6.17.16. GetLightnessParam ....................................................................................................... 81
6.17.17. EnableDenoise .............................................................................................................. 81
6.17.18. IsDenoise ....................................................................................................................... 82
6.17.19. SetSaturationParam ...................................................................................................... 82
6.17.20. GetSaturationParam ...................................................................................................... 82
6.17.21. SetConvertType ............................................................................................................. 82
6.17.22. GetConvertType ............................................................................................................ 82
6.17.23. EnableConvertFlip ......................................................................................................... 82
6.17.24. IsConvertFlip.................................................................................................................. 83
6.17.25. EnableColorCorrection .................................................................................................. 83
6.17.26. IsColorCorrection ........................................................................................................... 83
6.17.27. Reset.............................................................................................................................. 83
6.17.28. Destroy .......................................................................................................................... 83
6.17.29. IsUserSetCCParam ....................................................................................................... 83
6.17.30. EnableUserSetCCParam............................................................................................... 84
6.17.31. SetUserCCParam .......................................................................................................... 84
6.17.32. GetUserCCParam ......................................................................................................... 84
6.18. IGXImageFormatConvert .....................................................................................84
6.18.1. Support conversion types ................................................................................................ 85
6.18.2. SetDstFormat................................................................................................................... 86
6.18.3. GetDstFormat .................................................................................................................. 87
6.18.4. SetInterpolationType........................................................................................................ 87
6.18.5. GetInterpolationType ....................................................................................................... 87
6.18.6. SetAlphaValue ................................................................................................................. 87
6.18.7. GetAlphaValue ................................................................................................................. 87
6.18.8. GetBufferSizeForConversion........................................................................................... 88
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch V
6.18.9. GetBufferSizeForConversion........................................................................................... 88
6.18.10. Convert .......................................................................................................................... 88
6.18.11. Convert........................................................................................................................... 89
6.18.12. SetValidBits .................................................................................................................... 89
6.18.13. GetValidBits ................................................................................................................... 89
6.18.14. Set3DCalibParam .......................................................................................................... 90
6.18.15. Get3DCalibParam ......................................................................................................... 90
6.18.16. SetYStep........................................................................................................................ 90
6.18.17. GetYStep ....................................................................................................................... 90
6.19. IGXImageProcess ................................................................................................90
6.19.1. StaticDefectCorrection..................................................................................................... 91
6.19.2. ImageImprovment ............................................................................................................ 91
6.19.3. ImageImprovment ............................................................................................................ 92
6.19.4. CalculaLut ........................................................................................................................ 92
6.19.5. ReadLutFile ..................................................................................................................... 93
6.20. CgalaxyException .................................................................................................93
6.20.1. GetErrorCode .................................................................................................................. 93
6.21. IGXImageSpecialFunction (No longer maintained) ..............................................93
6.21.1. CalculaLut ........................................................................................................................ 94
6.21.2. ReadLutFile ..................................................................................................................... 94
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch VI
1.Introduction
1. Introduction
The supported versions of .NET Core are .net 6.0 and above (requires the .net 6.0 runtime environment
to be installed), using the GxIAPINET.dll file located in the .net 6.0 directory.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 1
2.Programming Guide
2. Programming Guide
Figure 2-1
Right click the References in the solution explorer, select AddReference, as shown in the following figure:
Figure 2-2
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 2
2.Programming Guide
In the pop-up Add Reference dialog box, select Browse tab and select the GxIAPINET.dll file, then click
OK, see the following figure.
Figure 2-3
Click OK and we can see the library which we have selected in the Reference, see the following figure:
Figure 2-4
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 3
2.Programming Guide
Before calling the library, you should add a using namespace GXIAPINET in the Code Editor area, see the
following figure:
Figure 2-5
2.1.2. Linux
2.1.2.1. Environments
The current Linux installer supports .net 6.0 and above on 64-bit systems (requires the .net 6.0 runtime
environment to be installed). Users first need to install the latest Linux installer and the .net development
environment before proceeding with the development.
Execute the command dotnet new console -o TestCamera to build a .net project directory named
TestCamera which include Program.cs code, TestCamera.csproj project configuration file and obj
intermediate files catalogue.
Figure 2-6
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 4
2.Programming Guide
The vscode/vim/gedit/nano files can be used to edit the software for .net project development under Linux.
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<Platforms>x64</Platforms>
<PlatformTarget>x64</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="GxIAPINET">
<HintPath>/usr/lib/net6.0/GxIAPINET.dll</HintPath>
</Reference>
</ItemGroup>
</Project>
When the user running the application, it will send heartbeat packet normally and keep connect with the
camera, but in debug mode, when the application runs to the breakpoint, the debugger will suspend all the
thread, including the sending heartbeat packet thread, so in debug mode, the application will not send
heartbeat packet to the camera.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 5
2.Programming Guide
The first one is: open the device in the program and add the following code:
Only in debugging mode can use this code snippet, don't use it in the release program.
//Open device, here, open the device through Serial Number (SN), the SN will
//be subject to the actual device. Users can also open the device by other ways.
#if DEBUG
#endif
The other way is: add environment variable 'MER_HEARTBEAT_TIMEOUT' in the system, and assign a
value greater than zero, then open the device with application program, the device's heartbeat timeout will
automatically become the environment variable's value. Only to add the environment variable in the
development system and they will work in the application no matter in debug mode or release mode.
Note: If the user set the heartbeat timeout very long, when close the program it will not call the close device
method to close the device, this will lead to the device cannot to be reset in the heartbeat time, thus when
the user try again to open the device, it will fail. This problem can be solved by resetting or reconnecting
the device.
Reset device: It is equivalent to powering off and powering up the device, and the programs in the camera
are completely reloaded.
Reconnect device: It is equivalent to the software interface close the device. After doing this, the user can
reopen the device.
The IGXFactory.GetInstance().Uninit() must be called to release all the resources of the GxIAPINET
application before the process exits.
//After closing the device, can't call any other interface library.
IGXFactory.GetInstance().Uninit();
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 6
2.Programming Guide
Note: Except the enumerated methods above, GxIAPINET also provides a enumerated method:
IGXFactory.GetInstance().UpdateDeviceList. For non-GigE Vision cameras, they are the same in the
function, but for GigE Vision cameras, they are different in the internal enumeration mechanism.
1) UpdateAllDeviceList(): Enumerate in all subnet.
2) UpdateDeviceList(): Enumerate in the same subnet.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 7
2.Programming Guide
Sample Code:
//Get Interface information
List<IGXInterfaceInfo> lstGXInterfaceInfo =
new(nothrow) List<IGXInterfaceInfo>();
IGXFactory.GetInstance().GetAllInterfaceInfo(lstGXInterfaceInfo);
for each (IGXInterfaceInfo objInterfaceIofo in lstGXInterfaceInfo)
{
Console.WriteLine(lstGXInterfaceInfo.GetModelName());
Console.WriteLine(lstGXInterfaceInfo.GetVendorName());
Sample Code:
//Get Interface pointer
IGXInterface objInterface;
objInterface = IGXFactory.GetInstance().GetInterface(1);
IGXFactory::GetInstance().GigEIpConfiguration()
IGXFactory::GetInstance().GigEForceIp()
Use the function GigEIpConfiguration() can set the camera static (permanent) IP address, and provide
four setting modes: direct write static IP address, use DHCP server to assign IP addresses, use LLA (Link-
Local Address) to configure camera IP and use default mode to set IP. When you choose the default mode,
the internal camera will enable the other three configure modes, but the static IP as a preferred way to
configure camera IP address.
Use the function GigEForceIp() can perform ForceIP operations on the camera. ForceIP means that
setting the IP address is valid only for this use. When the camera power off and power on will restore the
original IP address.
Two ways to configure the IP address of the camera sample code is as follows.
//Sample MAC address, actual camera MAC address can be obtained by enumeration.
String strMAC = "00-21-49-00-00-00";
String strIPAddress = "192.168.10.10";
String strSubnetMask = "255.255.255.0";
String strDefaultGateway = "192.168.10.2";
String strUserID = "DAHENG Imaging";
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 8
2.Programming Guide
IGXFactory.GetInstance().GigEIpConfiguration(strMAC, emIpConfigureMode,
strIpAddress, strSubnetMask,
strDefaultGateway, strUserID);
//Sample MAC address, actual camera MAC address can be obtained by enumeration.
String strMAC = "00-21-49-00-00-00";
String strIPAddress = "192.168.10.10";
String strSubnetMask = "255.255.255.0";
String strDefaultGateway = "192.168.10.2";
//ForceIp
IGXFactory.GetInstance().GigEForceIp (strMAC, strIpAddress, strSubnetMask,
strDefaultGateway);
Note:
1) Before calling these two interfaces, you must first enumeration, and when you do this, the camera can't
be opened.
2) The maximum length of the user-defined name (UserID) allowed is 16 characters.
IGXFactory.GetInstance().OpenDeviceBySN()
IGXFactory.GetInstance().OpenDeviceByUserID()
IGXFactory.GetInstance().OpenDeviceByMAC()
IGXFactory.GetInstance().OpenDeviceByIP()
UserID: user defined name (if the device does not support UserID, assign this item as a null string).
MAC: the MAC address of the device (for non-GigE Vision cameras, assign this item as a null string).
IP: the device's IP address (for non-GigE Vision cameras, assign this item as a null string).
It is strongly recommended the user to call the enumeration device method and update the GxIAPINET
library internal device list before open the device, otherwise may open the device failure. The sample code
snippet as follows:
List<IGXDeviceInfo> lstGXDeviceInfo = new(nothrow) List<IGXDeviceInfo>();
IGXFactory.GetInstance().UpdateAllDeviceList(200, lstGXDeviceInfo);
if (lstGXDeviceInfo.Count> 0)
{
//Open the first device in the list.
IGXDevice objDevice = null;
String strSN = listGXDeviceInfo[0].GetSN();
String strUserID = listGXDeviceInfo[0].GetUserID();
String strMAC = listGXDeviceInfo[0].GetMAC();
String strIP = listGXDeviceInfo[0].GetIP();
//Users can also assign the device information of the opened device
//directly. The information shown in the following code is indicative only,
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 9
2.Programming Guide
Note: For GigE Vision devices, users can open the device directly without enumeration, because the
network mechanism allows to establishment connection directly by IP address.
Users can call the IGXDevice::Close to close device, release all the device resources. Code snippet as
follows:
//After closing the device, user can not to call the function 'IDevice' and
//all the 'IFeatureControl&IStream' functions of the device.
objDevice.Close();
Note: After closing the device, all the resources about the device will be released, including the
IGXFeatureControl object and IGXStream object which get from the device object, so when the device
is closed, these objects' interface are not allowed to be called again.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 10
2.Programming Guide
4) DataStream manages the data stream output by devices (such as image transmission), and a
device can have one or more DataStream instances.
GxIAPCPPEx is implemented based on the GenTL standard encapsulation. To achieve the corresponding
module configuration, GxIAPICPPEx abstracts IGXFeatureControl to achieve completion control of visual
components. In GxIAPICPPEx, the above concepts are abstracted into the following four instances of
attribute controllers:
1) IGXFeatureControl instance for Device (remote):
Running the GalaxyView demo to open the device, you can see the parameters in the right properties
controller tree, there are three parts: the upper one is the properties which return from
IGXDevice::GetRemoteFeatureControl(), and the middle one is the properties which return from
IGXDevice::GetFeatureControl(). The lower one is the return properties from
IGXStream::GetFeatureControl().
Figure 2-7
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 11
2.Programming Guide
Get from the GalaxyView demo: open the device by GalaxyView demo, look over the right side—
properties list, the English name of every control node, as shown in the following figure:
Figure 2-6
As shown above, when the mouse pitch on image width, the function name, maximum, minimum, step
etc. will be shown in the Function Properties Description Area.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 12
2.Programming Guide
All functions are controlled by function string. Check to see if the feature is currently available, and then to
read or write.
//Obtain remote device attribute controller
IGXFeature Control objIGXFeatureControl =
objIGXDevice.GetRemoteFeatureControl();
//Retrieve the read and write properties of the current data node
Boolean bIsImplemented = objIGXFeatureControl.IsImplemented("Width");
if (bIsImplemented)
{
//Is readable?
Boolean bIsReadable = objIGXFeatureControl.IsReadable("Width");
//Is writable?
Boolean bIsWritable = objIGXFeatureControl.IsWritable("Width");
}
According to the data type, the camera's function is divided into seven categories, integer is one of them,
including width, height and other integer control parameters, users can use the integer controller
IntFeature to read the current value, inquire the maximum, minimum and step.
//Obtain remote device attribute controller
IGXFeatureControl objIGXFeatureControl =
objIGXDevice.GetRemoteFeatureControl();
//Get integer data nodes
IIntFeature objInt = objIGXFeatureControl.GetIntFeature("Width");
To access the float data by FloatFeature, you can read and write the current value, check the Maximum,
Minimum, whether to support increment, increment value and unit.
//Obtain remote device attribute controller
IGXFeatureControl objIGXFeatureControl =
objIGXDevice.GetRemoteFeatureControl();
//Get float data nodes
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 13
2.Programming Guide
Enumerated can check the options, and read/write interfaces which the enumerated function supported.
//Obtain remote device attribute controller
IGXFeatureControl objIGXFeatureControl = objIGXDevice.GetRemoteFeatureControl();
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 14
2.Programming Guide
String provides the function to read/write the current value, check the maximum string length supported
before write.
//Obtain remote device attribute controller
IGXFeatureControl objIGXFeatureControl = objIGXDevice.GetRemoteFeatureControl();
2.10.6. Precautions
After getting from the device object, the features controller IGXFeatureControl is valid until the device
closed. Once the device is closed, the features controller is invalid; you cannot call any features of the
features controller.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 15
2.Programming Guide
There are two acquisition ways: callback acquisition and get a single image.
2.11.1. DQBuf
After enabling stream object acquisition and sending start acquisition commands to the device, the user
can call DQBuf() interface to acquire single frames, please see the following code:
CGXStreamPointer objStreamPtr = objDevicePtr->OpenStream(0);
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 16
2.Programming Guide
objStreamPtr->QBuf(objImageDataPtr);
//Stop acquisiton
objFeatureControlPtr->GetCommandFeature("AcquisitionStop")->Execute();
objStreamPtr->StopGrab();
Note: StartGrab() must be called first to enable the acquisition of the streaming channel, and then the
acquisition command must be sent to the device, otherwise the acquisition command is invalid.
2.11.2. GetImage
After opening the stream object acquisition and sending start acquisition command to the device, you can
call the GetImage() to get a single image, please see the following code:
IGXStream objIGXStream = objIGXDevice.OpenStream(0);
//Set the optimal packet length value to the stream channel packet
//length of the current device.
m_objIGXFeatureControl.GetIntFeature("GevSCPSPacketSize").SetValue(
nPacketSize);
}
}
//Open stream channel acquisition.
objIGXStream.StartGrab();
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 17
2.Programming Guide
//Stop acquisition.
objIGXFeatureControl.GetCommandFeature("AcquisitionStop").Execute();
objIGXStream.StopGrab();
Note: Users must call the StartGrab() to start the stream channel acquisition first, and then send start
acquisition command to the device, otherwise the start acquisition command will invalid. Users use the
function GetImage() to get the IImageData() object, if you do not use this function anymore, please destroy
it by calling the Destroy method. When using a high-resolution camera for high-speed data
acquisition, recommend you to use callback acquisition mode, because the buffer copy inside the
GetImage() will affect the transmission performance.
//Set the optimal packet length value to the stream channel packet
//length of the current device.
m_objIGXFeatureControl.GetIntFeature("GevSCPSPacketSize").SetValue(
nPacketSize);
}
}
//Register the acquisition callback function. Note: the first parameter is a user's
//private parameter, user can set any type of object, and also can set it null.
//The user's private parameter used within the callback function for restore,
//if not use the private parameter, you can set it null.
objIGXStream.RegisterCaptureCallback(objIGXDevice, OnFrameCallbackFun);
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 18
2.Programming Guide
objIGXStream.UnregisterCaptureCallback();
Note: Users must call the function StartGrab() to start stream channel acquisition, and then send start
acquisition command to the device; otherwise the start acquisition command will invalid.
//Set the optimal packet length value to the stream channel packet
//length of the current device.
m_objIGXFeatureControl.GetIntFeature("GevSCPSPacketSize").SetValue(
nPacketSize);
}
}
//Set the number of acquisition buffer.
objStream.SetAcqusitionBufferNumber(10);
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 19
2.Programming Guide
// ………
//Stop acquisition.
objIGXFeatureControl.GetCommandFeature("AcquisitionStop").Execute();
objStream.StopGrab();
Note:
1) This interface is an optional interface. When multiple cameras are acquisiting at the same time, if the
frame rate of individual cameras is 0, you can call this interface to adjust the number of acquisition
buffers of all cameras to ensure that all cameras have buffers for acquisition.
2) The buffer number must be set before calling StartGrab() to start the stream channel acquisition,
otherwise the setting is invalid.
Function description: Specified for an 8 bit valid data. Assume that the original data is non 8-bit, no matter
mono or color, you can call the function Covert() to specify for an 8-bit data, and the return value type is
IntPtr. The specified memory size is Width * Height.
Sample Code:
//ObjImageConvPtr can be either passed in by the acquisition callback function
//or obtained as CImageDataPointer by GetImage() Or obtained from DQBuf
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 20
2.Programming Guide
Function description: Bayer format convert to RGB24 format, no matter the current image output is mono
or color, 8-bit or non 8-bit, you can call the function Convert() to complete data interpolation processing,
and the return IntPtr is RGB24 format. The memory size is Width*Height*3.
Sample Code:
//ObjImageConvPtr can be either passed in by the acquisition callback function
//or obtained as CImageDataPointer by GetImage() Or obtained from DQBuf
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 21
2.Programming Guide
The interface library also provides the image effect enhanced in software side, users can do some image
effect enhanced operate selectively, such as: defective-pixel correction, sharpening, contrast, brightness
and etc. The image effect enhanced involves the functions IImageProcessConfig, IFrameData,
IImageData and IGXImageProcess.
Sample Code:
// ObjIBaseData can be IFrameData passed in by the callback function, ImageData
//obtained by GetImage, or IframeData obtained by DQBuf
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 22
2.Programming Guide
pRGB24Processed = Marshal.AllocCoTaskMem(objIBaseData.GetWidth() *
objIBaseData.GetHeight() * 3);
//The return result is the RGB24 format data that has been enhanced
//with image effects
m_objImageProcess.ImageImprovment(objIBaseData, pRGB24Processe,
objCfg);
//When the user is not using objcfg, it needs to be released
objCfg.Destroy();
if( IntPtr.Zero != pRGB24Processed)
{
Marshal.FreeHGlobal( pRGB24Processed);
pRGB24Processed = IntPtr.Zero;
}
For different data type cameras, the support of effect enhanced from interface library is also different.
Details as follows:
RawData
function Corresponding interface Mono Bayer
Mono8 Bayer8
non8 non8
Set valid bit SetValidBit Yes Yes Yes Yes
Defective Pixel correction
EnableDefectivePixelCorrect Yes Yes Yes Yes
switch
Sharpen switch EnableSharpen Yes Yes Yes Yes
Sharpen factor SetSharpenParam Yes Yes Yes Yes
Contrast SetContrastParam Yes Yes Yes Yes
Gamma SetGammaParam Yes Yes Yes Yes
Brightness SetLightnessParam Yes Yes Yes Yes
Noise reduction switch EnableDenoise No No Yes Yes
Saturation SetSaturationParam No No Yes Yes
RGB24 interpolation type SetConvertType No No Yes Yes
RGB24 interpolation flip
EnableConvertFlip No No Yes Yes
switch
Color correction switch EnableColorCorrection No No Yes Yes
The parameter range of Image effect enhance and the detail explanation as follows:
Functions Default value Range Remarks
For 8bit data , only one to
select : GX_BIT_0_7
For 10bit data, you can select
Refer GX_BIT_0_7, GX_BIT_1_8,
Set valid bit GX_BIT_0_7
GX_VALID_BIT_LIST GX_BIT_2_9, recommend
GX_BIT_2_9
For 12bit data, you can select
GX_BIT_0_7, GX_BIT_1_8,
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 23
2.Programming Guide
GX_BIT_2_9, GX_BIT_3_10,
GX_BIT_4_11, recommend
GX_BIT_4_11
true: switch on defective Pixel
Defective Pixel correction
false true, false
correction switch false: switch off defective Pixel
correction
true: switch on sharpen
Sharpen switch false true, false
false: switch off sharpen
Sharpen factor 0.1 [0.1, 5] Increase sharpening effect gradually
0: the contrast ratio does not change
Contrast 0 [-50, 100] > 0: increasing contrast ratio
<0: decrease contrast ratio
Gamma 0 [0.1, 10] -
0 : the brightness does not change
Brightness 0 [-150, 150] > 0: increasing brightness
< 0: decrease brightness
Noise reduction true: switch on noise reduction
false true, false
switch false: switch off noise reduction
64: saturation does not change
>64: increasing saturation
Saturation 64 [0, 128] < 64: decrease saturation
128: double the current saturation
0: mono image
RGB24 Refer
GX_RAW2RGB_
interpolation GX_BAYER_CONVERT -
NEIGHBOUR
type _TYPE_LIST
RGB24
true: flip
interpolation flip false true, false
false: non-flip
switch
Table 2-2 Image effect enhanced parameters range and description
The advanced user can fine-tune the parameter after getting IImageProcessConfig object, see as follows:
// ObjIBaseData can be IFrameData passed in by the callback function, ImageData
//obtained by GetImage, or IframeData obtained by DQBuf
//Obtain image processing objects
IImageProcessConfig objCfg = objIGXDevice.CreateImageProcessConfig();
//Initialization the default configuration parameter when constructing the
//'objcfg' object, the user can choose to fine-tune the configuration parameter.
//Select significance bit 0-7.
objCfg.SetValidBit(GX_BIT_0_7);
//Enable defective Pixel correction.
objCfg.EnableDefectivePixelCorrect(true);
//Enable sharpen.
objCfg.EnableSharpen(true);
//Set sharpen factor is 1.
objCfg.SetSharpenParam(1);
//Set contrast control parameter.
objCfg.SetContrastParam(0);
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 24
2.Programming Guide
According on the cameras' type and usage scenario, the image effect enhanced configuration parameters
are also different, but there are still a few recommend functions can meet the needs of most users. Take
MER-200-20GC GigE Vision camera for example, the image which the camera output after image format
conversion to RGB24 bit, the result as follows without any effect enhance processing:
Figure 2-9 Neighborhood interpolation RGB image (color correction: off; saturation: 64; Gamma: 1; contrast: 0)
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 25
2.Programming Guide
On the basis of Figure 2-9, switch on the color correction function, see the result as follows:
Figure 2-10 Switch on color correction based on figure2-9 (color correction: on; saturation: 64; Gamma: 1; Contrast: 0)
On the basis of Figure 2-10, increase the saturation to 80, see the result as follows:
Figure 2-11 Set saturation to 80(color correction: on; saturation: 80; Gamma: 1; Contrast: 0)
On the basis of Figure 2-11, adjust the Gamma to 1.98, make the image more close to what the users see
in the actual scene, the value 1.98 is just for an example, for different cameras the Gamma value will differ.
For the USB2.0 and USB3.0 cameras, users can read the gamma by the read/write interface. But for the
GigE Vision camera, the user should adjust the gamma by himself, there is not an interface to be called
directly.
Figure 2-12 Set the Gamma is 1.98(color correction: on; saturation: 80; Gamma: 1.98; Contrast: 0)
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 26
2.Programming Guide
On the basis of Figure 2-12, set the contrast to 40, see the result as follows:
Figure 2-13 Set the contrast is 40(color correction: on; saturation: 80; Gamma: 1.98; Contrast: 40)
The "StreamBufferHandlingMode" in the stream object features can set the processing mode of the Buffer.
Three Buffer processing modes are available:
1) OldestFirst: The default value. The image buffer follows the first-in-first-out principle. After all the
buffers are filled, the new image data will be discarded until the user completes the processing of the
buffer that has filled the image data. The typical application is to receive each frame of images
acquired by the camera without losing frames. In order to achieve no frame loss, the speed of image
data transmission and processing need to be as fast as possible (at least less than the frame period).
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 27
2.Programming Guide
2) OldestFirstOverwrite: Follow the first-in-first-out principle. The difference from the OldestFirst mode is
that when all the buffers are filled, the SDK will automatically discard one frame of image buffer with
the oldest timestamp to receive new image data. The typical application is that it does not require
receiving each frame of images acquired by the camera, and the image data transmission and
processing speed is slow.
3) NewestOnly: In this mode, the user always receives the latest image received by the SDK. Each time
the SDK receives a new frame of image data, it will automatically discard the image with the old
timestamp. Therefore, when the user's image processing is not timely or the speed is slow, frame loss
will occur. In the main applications, the real-time requirements of image acquisition and display are
high, and it is not required to receive each frame of images acquired by the camera. However,
depending on the camera's frame rate, memory cache, transmission speed, and user applications,
there may be a delay between the latest image received by the SDK and the latest image exposed by
the camera.
Note: The above code snippet just shown the stream layer control function of the GigE Vision cameras,
for the other cameras, please use the GalaxyView demo to open the device, or call the function
IGXFeatureControl.GetFeatureNameList to get the function list.
2.11.7. Precautions
After getting from the device object, the features controller IGXStream is valid, until the device is closed.
Once the device is closed, the stream object will invalid, you cannot call any interface of the stream object.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 28
2.Programming Guide
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 29
2.Programming Guide
//Register event callback function, note that the second parameter is a user
//private parameter, the user can set any 'object' type object.
//The private parameter can be restored for the user's use within the callback
//function, if the user does not use the private parameter, the parameter can
//be set to null.
//Here we set the 'objRemoteFeatureControl' object.
GX_FEATURE_CALLBACK_HANDLE hEventHandle = null;
hEventHandle = objRemoteFeatureControl.RegisterFeatureCallback(
"EventExposureEnd",
objRemoteFeatureControl,
OnFeatureCallback);
//Send start acquisition command and the camera start exposuring and
//outputting images, when the exposure is end, an exposure end event will
//generate, then will activate the callback 'OnFeatureCallback' interface.
//Receive the exposure end event, please refer to the
//'OnFeatureCallback'function.
//Send stop acquisition command to the device.
objIGXFeatureControl.GetCommandFeature("AcquisitionStop").Execute();
objIGXStream.StopGrab();
//Unregister event.
objRemoteFeatureControl.UnregisterFeatureCallback(hEventHandle);
Note: Users must send the start acquisition command first, then the camera can output exposure end
event and send start acquisition command. So the user must call the IGXStream::StartGrab() first, and
then get the AcquisitionStart command node by the features controller and to execute the command
Execute.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 30
2.Programming Guide
Note: Not allowed to execute close the device operation within the offline callback function.
Figure 2-14
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 31
2.Programming Guide
Select Export Device Setting menu, a new text file will create in the local disk to save the current
parameter of the device.
Select Import Device Setting menu, select the local file and import it.
//Export configuration files, users can free to take the file name, but the
//export catalog must be existed first.
objIGXDevice.ExportConfigFile("D:\\Config.txt");
Note: Before executing the import/export configuration file, you should open the device first, and open the
first stream object of the device.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 32
3.Data Type Definition
3.1. GX_STATUS_LIST
Val
Definition Explanation
ue
GX_STATUS_SUCCESS 0 Success.
GX_STATUS_ERROR -1 Error unexpected.
GX_STATUS_NOT_FOUND_TL -2 Cannot find TL library.
GX_STATUS_NOT_FOUND_DEVICE -3 Cannot find devices.
GX_STATUS_OFFLINE -4 Current device status is offline.
GX_STATUS_INVALID_PARAMETER -5 Invalid parameter.
GX_STATUS_INVALID_HANDLE -6 Invalid handle.
GX_STATUS_INVALID_CALL -7 Invalid interface calling.
Current function cannot be accessed or the
GX_STATUS_INVALID_ACCESS -8
device access mode is incorrect.
GX_STATUS_NEED_MORE_BUFFER -9 User's buffer is not enough.
Feature type error, such as use IntFeature to
GX_STATUS_ERROR_TYPE -10
handle float function.
GX_STATUS_OUT_OF_RANGE -11 Input value is out of the range.
GX_STATUS_NOT_IMPLEMENTED -12 Unsupported function.
GX_STATUS_NOT_INIT_API -13 Not call initialize interface.
GX_STATUS_TIMEOUT -14 Timeout error.
GX_STATUS_MEMORY_NOT_ENOUGH -15 Out of memory
3.2. GX_LOG_TYPE_LIST
Definition Value Explanation
GX_LOG_TYPE_OFF 0x00000000 Turn off all types of log output
GX_LOG_TYPE_FATAL 0x00000001 Output FATAL logs
GX_LOG_TYPE_ERROR 0x00000010 Output ERROR logs
GX_LOG_TYPE_WARN 0x00000100 Output WARN logs
GX_LOG_TYPE_INFO 0x00001000 Output INFO logs
GX_LOG_TYPE_DEBUG 0x00010000 Output DEBUG logs
GX_LOG_TYPE_TRACE 0x00100000 Output TRACE logs
3.3. GX_DEVICE_CLASS_LIST
Definition Value Explanation
GX_DEVICE_CLASS_UNKNOWN 0 The class of the Device is unknown.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 33
3.Data Type Definition
3.4. GX_ACCESS_STATUS
Definition Value Explanation
GX_ACCESS_STATUS_UNKNOWN 0 The status of the current device is unknown.
The status of the current device is
GX_ACCESS_STATUS_READWRITE 1
readable/writable.
GX_ACCESS_STATUS_READONLY 2 The status of the current device is read-only.
The status of the current device is not readable /
GX_ACCESS_STATUS_NOACCESS 3
writable.
3.5. GX_ACCESS_MODE
Definition Value Explanation
3.6. GX_PIXEL_FORMAT_ENTRY
Definition Value Explanation
GX_PIXEL_FORMAT_UNDEFINED 0x00000000 -
GX_PIXEL_FORMAT_MONO8 0x01080001 Monochrome 8-bit
GX_PIXEL_FORMAT_MONO8_SIGNED 0x01080002 Monochrome 8-bit signed
GX_PIXEL_FORMAT_MONO10 0x01100003 Monochrome 10-bit unpacked
GX_PIXEL_FORMAT_MONO10_P 0x010A0046 Monochrome 10-bit packed
GX_PIXEL_FORMAT_MONO12 0x01100005 Monochrome 12-bit unpacked
GX_PIXEL_FORMAT_MONO12_P 0x010C0047 Monochrome 12-bit packed
GX_PIXEL_FORMAT_MONO14 0x01100025 Monochrome 14-bit unpacked
GX_PIXEL_FORMAT_MONO14_P 0x010E0104 Monochrome 14-bit packed
GX_PIXEL_FORMAT_MONO16 0x01100007 Monochrome 16-bit
GX_PIXEL_FORMAT_BAYER_GR8 0x01080008 Bayer Green-Red 8-bit
GX_PIXEL_FORMAT_BAYER_RG8 0x01080009 Bayer Red-Green 8-bit
GX_PIXEL_FORMAT_BAYER_GB8 0x0108000A Bayer Green-Blue 8-bit
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 34
3.Data Type Definition
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 35
3.Data Type Definition
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 36
3.Data Type Definition
3.7. GX_FRAME_STATUS_LIST
Definition Value Explanation
GX_FRAME_STATUS_SUCCESS 0 The frame status is successful.
GX_FRAME_STATUS_INCOMPLETE -1 The frame status is incomplete.
3.8. GX_FEATURE_TYPE
Definition Value Explanation
GX_FEATURE_INT 0x10000000 Integer function.
GX_FEATURE_FLOAT 0x20000000 Float function.
GX_FEATURE_ENUM 0x30000000 Enumerated function.
GX_FEATURE_BOOL 0x40000000 Boolean function.
GX_FEATURE_STRING 0x50000000 String function.
GX_FEATURE_BUFFER 0x60000000 Register function.
GX_FEATURE_COMMAND 0x70000000 Command function.
3.9. GX_BAYER_CONVERT_TYPE_LIST
Definition Value Explanation
GX_RAW2RGB_NEIGHBOUR 0 Neighborhood average interpolation algorithm.
GX_RAW2RGB_ADAPTIVE 1 Edge adaptive interpolation algorithm.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 37
3.Data Type Definition
3.10. GX_VALLID_BIT_LIST
Definition Value Explanation
GX_BIT_0_7 0 bit 0~7
GX_BIT_1_8 1 bit 1~8
GX_BIT_2_9 2 bit 2~9
GX_BIT_3_10 3 bit 3~10
GX_BIT_4_11 4 bit 4~11
GX_BIT_5_12 5 bit 5~12
GX_BIT_6_13 6 bit 6~13
GX_BIT_7_14 7 bit 7~14
GX_BIT_8_15 8 bit 8~15
3.11. GX_IP_CONFIGURE_MODE
Definition Value Explanation
3.12. GX_RESET_DEVICE_MODE
Definition Value Explanation
Device reconnection. It is equivalent to
GX_MANUFACTURER_SPECIFIC_RECONNECT 1
the software interface close the device.
Device reset. It is equivalent to powering
GX_MANUFACTURER_SPECIFIC_RESET 2
off and powering up the device.
3.13. COLOR_TRANSFORM_FACTOR
Definition Default value Value range Explanation
float fGain00 1.0 -4.0 ~ 4.0 Red Channel Gain contribution to the red pixel.
float fGain01 0.0 -4.0 ~ 4.0 Green Channel Gain contribution to the red pixel.
float fGain02 0.0 -4.0 ~ 4.0 Blue Channel Gain contribution to the red pixel.
float fGain10 0.0 -4.0 ~ 4.0 Red Channel Gain contribution to the green pixel.
float fGain11 1.0 -4.0 ~ 4.0 Green Channel Gain contribution to the green pixel.
float fGain12 0.0 -4.0 ~ 4.0 Blue Channel Gain contribution to the green pixel.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 38
3.Data Type Definition
float fGain20 0.0 -4.0 ~ 4.0 Red Channel Gain contribution to the blue pixel.
float fGain21 0.0 -4.0 ~ 4.0 Green Channel Gain contribution to the blue pixel.
3.14. GX_TL_TYPE_LIST
Definition Value Explanation
3.15. GX_ACTUAL_BITS
Definition Value Explanation
GX_ACTUAL_BITS_8 8 8bit
GX_ACTUAL_BITS_10 10 10bit
GX_ACTUAL_BITS_12 12 12bit
GX_ACTUAL_BITS_14 14 14bit
GX_ACTUAL_BITS_16 16 16bit
3.16. GX_PIXEL_COLOR_FILTER
Definition Value Explanation
NONE 0 Non Bayer format
BAYERRG 1 BayerRG
BAYERGB 2 BayerGB
BAYERGR 3 BayerGR
BAYERBG 4 BayerBG
3.17. GX_STATIC_DEFECT_CORRECTION
Definition Explanation
UInt32 nImgWidth The width of the current image
UInt32 nImgHeight The height of the current image
UInt32 nImgOffsetX The horizontal offset of the current image
UInt32 nImgOffsetY The vertical offset of the current image
UInt32 nImgWidthMax The maximum width supported by the device
GX_PIXEL_COLOR_FILTER nBayerType Image pixel format
GX_ACTUAL_BITS emActualBits Actual significant Bit of image pixels
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 39
3.Data Type Definition
3.18. GX_IMAGE_INFO
Definition Explanation
IntPtr pInputBuffer Image buffer pointer
UInt32 nWidth Image width
UInt32 nHeight Image height
GX_PIXEL_FORMAT_ENTRY emSrcFormat Image format
3.19. GX_REGISTER_STACK_ENTRY
Definition Explanation
UInt64 Address Register address
IntPtr pBuffer Register memory address
UInt32 Size Register memory size
3.20. GX_GIGE_ACTION_COMMAND_RESULT
Definition Explanation
[MarshalAs(UnmanagedType.ByValArray,
The current device IP that returns ack (Dotted Decimal
SizeConst = 16)]
Notation IPv4, length 16 bytes)
public byte[] DeviceAddress
The ACTION status returned by the device, the error
originates from the GigaVision protocol
0: Command sent successfully.
0x8013: The device is not time synchronized with the
master clock. Before executing this interface, “PtpEnable”
must be enabled and “PtpStatus” must be set to “Master” or
“Slave” (indicating synchronization with the master clock).
public int Status 0x8015: The device queue or packet data has overflowed.
When the device corresponding to strDeviceAddress is
executing the previous
GXGigEIssueScheduledActionCommand request and
receives a new GXGigEIssueScheduledActionCommand
request, this error will be returned.
0x8016: The Scheduled Action Command issued by
GXGigEIssueScheduledActionCommand is outdated.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 40
4.Handle Type Definition
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 41
5.Delegate Function Type Definition
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 42
6.Module Interface Definition
6.1. IGXFactory
The 'IGXFactory' is responsible for initializing global resources, enumerating devices, and opening devices.
Interface List:
GetInstance Static function, which can be called globally. Return to IGXFactory
object instance.
Init Initialize the library resources.
Uninit Release library resources.
SetLogType Set type of the output log
GetLogType Get the output log type
UpdateDeviceList Enumerate the device (subnet enumeration for GigE Vision device).
UpdateAllDeviceList Enumerate the device (all subnet enumeration for GigE Vision device)
UpdateAllDeviceListEx Enumerate the device (all subnet enumeration for GigE Vision device)
OpenDeviceByIP Open the device by IP address.
OpenDeviceByMAC Open the device by MAC address.
OpenDeviceBySN Open the device by SN.
OpenDeviceByUserID Open the device by user ID.
GigEIPConfiguration Configure the camera static state (perpetual) IP address.
GigEForceIP Execute Force IP operation.
GigEResetDevice Execute device reconnection or device reset operation.
CreateImageFormatConvert Get image format conversion pointer
CreateImageSpecialFunction Get special image interface
GetAllInterfaceInfo Get all information of frame grabbers
GetInterface Get the frame grabber pointer object corresponding to the number of
specify and count the subscripts starting from 1
CreateImageProcess Instantiate IGXImageProcess object
GigEIssueActionCommand All cameras on the network execute “action” simultaneously by sending
ActionCommond
GigEIssueSchedualdActionC By sending ActionCommond at an absolute point in time, all cameras
ommand on the network can simultaneously execute “action”
6.1.1. GetInstance
Interface definition:
static IGXFactory GetInstance ()
Function description:
Static function, and can be called globally. Return to the IGXFactory object instance.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 43
6.Module Interface Definition
6.1.2. Init
Interface definition:
void Init(void)
Function description:
Initialize library resources.
6.1.3. Uninit
Interface definition:
void Uninit(void)
Function description:
6.1.4. SetLogType
Interface definition:
Function description:
Parameter:
emLogType [in] Output log, refer to GX_LOG_TYPE_LIST
eg: GX_LOG_TYPE_FATAL |
GX_LOG_TYPE_ERROR | GX_LOG_TYPE_INFO
6.1.5. GetLogType
Interface definition:
Function description:
6.1.6. UpdateDeviceList
Interface definition:
Function description:
Parameter:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 44
6.Module Interface Definition
6.1.7. UpdateAllDeviceList
Interface definition:
Function description:
Parameter:
6.1.8. UpdateAllDeviceListEx
Interface definition:
Function description:
Parameter:
6.1.9. OpenDeviceByIP/MAC/SN/UserID
Interface definition:
Function description:
Parameter:
strIP [in] The device's IP address
6.1.10. GigEIPConfiguration
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 45
6.Module Interface Definition
String strDefaultGateway,
String strUserID)
Function description:
Parameter:
trDeviceMacAddress [in] The MAC address of the device
emIpConfigFlag [in] The IP configuration mode
strIpAddress [in] The IP address to be configured
strSubnetMask [in] The subnet mask to be configured
strDefaultGateway [in] The default gateway to be configured
strUserID [in] The user-defined name to be configured
6.1.11. GigEForceIP
Interface definition:
Function description:
Parameter:
trDeviceMacAddress [in] The MAC address of the device
strIpAddress [in] The IP address to be configured
strSubnetMask [in] The subnet mask to be configured
strDefaultGateway [in] The default gateway to be configured
6.1.12. GigEResetDevice
Interface definition:
Device reconnection is usually used when debugging GigE cameras. The device has been opened, the
program is abnormal, and then the device is reopened immediately, and an error is reported (because the
heartbeat time is 5 minutes, the device is still open). In this case, you can use the device reconnection
function to make the device unopened. Then open the device again and it will succeed.
Device reset is usually used when the camera status is abnormal. In this case, the device reconnection
function does not work, and there is no condition to repower the device. Try to use the device reset function
to power off and power up the device. After the device is reset, you need to enumerate device and open
device again.
Note:
1) Device reset takes about 1s, so you need to ensure that the enumeration interface is called after 1s.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 46
6.Module Interface Definition
2) If the device is acquiring normally, you cannot use the device reset and device reconnection function,
otherwise the device will offline.
Parameter:
strDeviceMacAddress [in] The MAC address of the device
6.1.13. CreateImageFormatConvert
Interface definition:
IGXImageFormatConvert CreateImageFormatConvert()
Function description:
Create and return an instance of the image conversion object.
6.1.14. CreateImageSpecialFunction
Interface definition:
IGXImageSpecialFunction CreateImageSpecialFunction()
Function description:
Create and return an instance of the image special object.
6.1.15. GetAllInterfaceInfo
Interface definition:
void GetAllInterfaceInfo(List<IGXInterfaceInfo>, vectorInterfaceInfo);
Function description:
Get all information of the frame grabbers.
Parameter:
vectorInterfaceInfo [out] The returned frame grabber information list
6.1.16. GetInterface
Interface definition:
Function description:
Parameter:
nIndex [in] Frame grabber index, with index counting starting from 1
6.1.17. CreateImageProcess
Interface definition:
IGXImageProcess CreateImageProcess();
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 47
6.Module Interface Definition
Function description:
6.1.18. GigEIssueActionCommand
Interface definition:
void GigEIssueActionCommand(UInt32 deviceKey,
UInt32 groupKey,
UInt32 groupMask,
string pBroadcastAddress,
string pSpecialAddress,
UInt32 timeoutMs,
ref UInt32 pNumResults,
GX_GIGE_ACTION_COMMAND_RESULT[] pResults);
Function description:
All cameras on the network execute “action” simultaneously by sending ActionCommond.
Parameter1: Device secret key, corresponding to the “ActionDeviceKey” attribute of the device.
Parameter2: Group secret key, corresponding to the “ActionGroupKey” attribute of the device.
Parameter3: Group mask, corresponding to the “ActionGroupMask” attribute of the device, can not be 0.
Parameter4: The destination IP for sending the “action” command can be broadcast, subnet broadcast,
or unicast.
Parameter5: The source IP address for sending the “action” command is used to clearly indicate which
network adapter is sending the command from. If not specified, each IP of all network adapters will send
the current “action” command. Please fill in an empty string without specifying the network port.
Parameter6: 0 means there is no need to wait for ack to return; Non zero indicates the maximum waiting
time for ack return, and after the time is up, the parameter pNumResults returns the actual number of ack
received.
Parameter7: Indicate the expected number of ack returns. This value represents the expected number of
ACKs that the user expects to receive in feedback from the device executing the “action” command. If
nTimeoutMs is 0, ignore this parameter. Therefore, if nTimeoutMs is 0, this parameter can be NULL.
Parameter8: An array containing *pNumResults elements, used to store the state of operation command
results. The buffer is filled from scratch. If the received results are less than the available result items, the
remaining results will not be changed. If nTimeoutMs is 0, ignore this parameter. Therefore, if nTimeoutMs
is 0, this parameter can be NULL. Please refer to GX_GIGE_ACTION_COMMAND_RESULT.
Return: None.
6.1.19. GigEIssueScheduledActionCommand
Interface definition:
void GigEIssueScheduledActionCommand(UInt32 deviceKey,
UInt32 groupKey,
UInt32 groupMask,
UInt64 actiontimeNs,
string pBroadcastAddress,
string pSpecialAddress,
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 48
6.Module Interface Definition
UInt32 timeoutMs,
ref UInt32 pNumResults,
GX_GIGE_ACTION_COMMAND_RESULT[] pResults);
Function description:
By sending ActionCommond at an absolute point in time, all cameras on the network can
simultaneously execute “action”.
Parameter1: Device secret key, corresponding to the “ActionDeviceKey” attribute of the device.
Parameter2: Group secret key, corresponding to the “ActionGroupKey” attribute of the device.
Parameter3: Group mask, corresponding to the “ActionGroupMask” attribute of the device, can not be 0.
Parameter4: Execution time (in nanoseconds). The actual value can be the master clock value used plus
the expected delay time. The master clock value of a set of synchronized camera devices can be obtained
by locking the timestamp value GXSetCommandValue (hDevice, "TimestampMatch") from a set of camera
devices and reading the timestamp value GXGetIntValue (hDevice, "TimestampLatchValue", &pstIntValue).
Parameter5: The destination IP for sending the “action” command can be broadcast, subnet broadcast,
or unicast.
Parameter6: The source IP address for sending the “action” command is used to clearly indicate which
network adapter is sending the command from. If not specified, each IP of all network adapters will send
the current “action” command. Please fill in an empty string without specifying the network port.
Parameter7: 0 means there is no need to wait for ack to return; Non zero indicates the maximum waiting
time for ack return, and after the time is up, the parameter pNumResults returns the actual number of ack
received.
Parameter8: Indicate the expected number of ack returns. This value represents the expected number of
ACKs that the user expects to receive in feedback from the device executing the “action” command. If
nTimeoutMs is 0, ignore this parameter. Therefore, if nTimeoutMs is 0, this parameter can be NULL.
Parameter9: An array containing *pNumResults elements, used to store the state of operation command
results. The buffer is filled from scratch. If the received results are less than the available result items, the
remaining results will not be changed. If nTimeoutMs is 0, ignore this parameter. Therefore, if nTimeoutMs
is 0, this parameter can be NULL. Please refer to GX_GIGE_ACTION_COMMAND_RESULT.
Return: None.
6.2. IGXInterfaceInfo
Interface information storage unit, storing all interface information, users can get from calling
GetAllInterfaceInfo() after enumeration.
Interface list:
GetType Get Interface type, like USB2.0, USB3.0, GigE, CXP
GetModelName Get Interface name
GetDisplayName Get Interface display name
GetSerialNumber Get Interface serial number
GetInterfaceID Get Interface ID, the value is 0 when is non CXP type
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 49
6.Module Interface Definition
GetInitFlag Gets the Interface initialization flag, the value is 0 when is non CXP type
GetVendorName Get Interface vendor name
6.2.1. GetType
Interface definition:
GX_TL_TYPE_LIST GetType()
Function description:
6.2.2. GetModelName
Interface definition:
String GetModelName()
Function description:
Get frame grabber name.
6.2.3. GetDisplayName
Interface definition:
String GetDisplayName()
Function description:
6.2.4. GetSerialNumber
Interface definition:
String GetSerialNumber()
Function description:
6.2.5. GetInterfaceID
Interface definition:
String GetInterfaceID()
Function description:
6.2.6. GetInitFlag
Interface definition:
UInt32 GetInitFlag()
Function description:
Gets the Interface initialization flag, the value is 0 when is non CXP type.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 50
6.Module Interface Definition
6.2.7. GetVendorName
Interface definition:
String GetVendorName()
Function description:
6.3. IGXInterface
Interface function pointer, which can be enumerated and obtained through GetInterface().
Interface list:
GetInterfaceInfo Get Interface layer information pointer
GetAllDeviceInfo Get all linked device list under the Interface layer
GetFeatureControl Get Interface property controller pointer
6.3.1. GetInterfaceInfo
Interface definition:
IGXInterfaceInfo GetInterfaceInfo()
Function description:
6.3.2. GetAllDeviceInfo
Interface definition:
Function description:
6.3.3. GetFeatureControl
Interface definition:
IGXFeatureControl GetFeatureControl()
Function description:
6.4. IGXDeviceInfo
Device information storage unit, stores all the information of the device. You can get the information by the
enumeration interface: IGXFactory.UpdateDeviceList(), IGXFactory.UpdateAllDeviceList() or
IGXFactory.UpdateAllDeviceListEx()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 51
6.Module Interface Definition
Interface list:
GetVendorName Get the name of the manufacturer.
GetModelName Get the name of the device model.
GetSN Get the Series Number of the device.
GetDisplayName Get the display name of the device.
GetDeviceID Get the device ID, and the ID can be used to identify the device uniquely.
GetUserID Get the user-defined name.
GetAccessStatus Get the current addressable status of the device.
GetDeviceClass Get the device class, such as USB2.0, USB3.0, GigE and CXP.
GetMAC Get the MAC address of the device, set the value to NULL for non-GigE device.
GetIP Get the IP address of the device, set the value to NULL for non-GigE device.
GetSubnetMask Get the subnet mask of the device, set the value to NULL for non-GigE device.
GetGateway Get the default gateway of the device, set the value to NULL for non-GigE
device.
GetNICMAC Get the corresponding NIC MAC address of the device, set the value to NULL
for non-GigE device.
GetNICIP Get the corresponding NIC IP address of the device, set the value to NULL for
non-GigE device.
GetNICSubnetMask Get the corresponding NIC subnet mask of the device, set the value to NULL
for non-GigE device.
GetNICGateway Get the corresponding NIC default gateway of the device, set the value to NULL
for non-GigE device.
GetNICDescription Get the corresponding NIC description information of the device, set the value
to NULL for non-GigE device.
6.4.1. GetVendorName
Interface definition:
String GetVendorName()
Function description:
Get the name of the manufacturer.
6.4.2. GetModelName
Interface definition:
String GetModelName()
Function description:
Get the model name of the device.
6.4.3. GetSN
Interface definition:
String GetSN()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 52
6.Module Interface Definition
Function description:
Get the Series Number of the device.
6.4.4. GetDisplayName
Interface definition:
String GetDisplayName()
Function description:
Get the display name of the device.
6.4.5. GetDeviceID
Interface definition:
String GetDeviceID()
Function description:
Get the DeviceID, and the ID can be used to identify the device uniquely.
6.4.6. GetUserID
Interface definition:
String GetUserID()
Function description:
Get the user-defined name.
6.4.7. GetAccessStatus
Interface definition:
GX_ACCESS_STATUS GetAccessStatus()
Function description:
Get the current addressable status of the device.
6.4.8. GetDeviceClass
Interface definition:
GX_DEVICE_CLASS_LIST GetDeviceClass()
Function description:
Get the device class, such as USB2.0, USB3.0, and GigE.
6.4.9. GetMAC
Interface definition:
String GetMAC()
Function description:
Get the MAC address of the device, set the value to NULL for non-GigE device.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 53
6.Module Interface Definition
6.4.10. GetIP
Interface definition:
String GetIP()
Function description:
Get the IP address of the device, set the value to NULL for non-GigE device.
6.4.11. GetSubnetMask
Interface definition:
String GetSubnetMask()
Function description:
Get the IP address of the device, set the value to NULL for non-GigE device.
6.4.12. GetGateway
Interface definition:
String GetGateway()
Function description:
Get the default gateway of the device, set the value to NULL for non-GigE device.
6.4.13. GetNICMAC
Interface definition:
String GetNICMAC()
Function description:
Get the NIC MAC address of the device, set the value to NULL for non-GigE device.
6.4.14. GetNICIP
Interface definition:
String GetNICIP()
Function description:
Get the NIC IP address of the device, set the value to NULL for non-GigE device.
6.4.15. GetNICSubnetMask
Interface definition:
String GetNICSubnetMask()
Function description:
Get the NIC subnet mask of the device, set the value to NULL for non-GigE device.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 54
6.Module Interface Definition
6.4.16. GetNICGateway
Interface definition:
String GetNICGateway()
Function description:
Get the NIC default gateway of the device, set the value to NULL for non-GigE device.
6.4.17. GetNICDescription
Interface definition:
String GetNICDescription()
Function description:
Get the NIC description information of the device, set the value to NULL for non-GigE device.
6.5. IGXDevice
Device object, is responsible for getting device information, feature controller (control channel), stream
object (acquisition channel), and device offline events. You can get the information by calling the interface:
IGXFactory.OpenDeviceByIP/MAC/SN/UserID().
Interface list:
GetDeviceInfo Get the information object of the device.
GetStreamCount Get the number of stream channel supported by the device.
OpenStream The user can open the stream by the stream channel number
which is specified, and get the stream channel object.
GetFeatureControl Get the local device layer feature controller, and control all the
functions of the local device via this controller.
GetRemoteFeatureControl Get the remote device layer feature controller, and control all the
functions of the remote device via this controller.
GetEventNumInQueue Get the event queue length of the device, represents how much
cache data is in the current event queue.
FlushEvent Flush the device event queue.
RegisterDeviceOfflineCallback Register offline callback function.
UnregisterDeviceOfflineCallback Unregister offline callback function.
CreateImageProcessConfig Creating the image processing configure parameter object.
ExportConfigFile Export the current configuration parameter to the text file.
ImportConfigFile Import the parameters in the configuration file to the camera.
Export the current camera configuration parameters to a text file
ExportConfigFileW
(UNICODE version)
Import parameters from the configuration file into the camera
ImportConfigFileW
(UNICODE version)
Close Close the device.
GetParentInterface Specify the device handle to get the interface handle it belongs to.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 55
6.Module Interface Definition
6.5.1. GetDeviceInfo
Interface definition:
IGXDeviceInfo GetDeviceInfo()
Function description:
6.5.2. GetStreamCount
Interface definition:
UInt32 GetStreamCount()
Function description:
6.5.3. OpenStream
Interface definition:
Parameter:
nStreamID [in] Stream channel number, starts from 0. The user can open
the stream by the stream channel number which is specified,
and get the stream channel object
6.5.4. GetFeatureControl
Interface definition:
IGXFeatureControl GetFeatureControl()
Function description:
Get the local device layer feature controller, and control all the functions of the local device via this
controller.
6.5.5. GetRemoteFeatureControl
Interface definition:
IGXFeatureControl GetRemoteFeatureControl()
Function description:
Get the remote device layer feature controller, and control all the functions of the remote device via
this controller.
6.5.6. GetEventNumInQueue
Interface definition:
UInt32 GetEventNumInQueue()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 56
6.Module Interface Definition
Function description:
Get the event queue length of the device, represents how much cache data is in the current event
queue.
6.5.7. FlushEvent
Interface definition:
void FlushEvent()
Function description:
Flush the device event queue.
6.5.8. RegisterDeviceOfflineCallback
Interface definition:
GX_DEVICE_OFFLINE_CALLBACK_HANDLE RegisterDeviceOfflineCallback(
Object objUserParam,DeviceOfflineHandler delDeviceNotify)
Function description:
Register offline callback function.
6.5.9. UnregisterDeviceOfflineCallback
Interface definition:
void UnregisterDeviceOfflineCallback(GX_DEVICE_OFFLINE_CALLBACK_HANDLE hCallBack)
Function description:
6.5.10. CreateImageProcessConfig
Interface definition:
IImageProcessConfig CreateImageProcessConfig()
Function description:
6.5.11. ExportConfigFile
Interface definition:
Function description:
6.5.12. ImportConfigFile
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 57
6.Module Interface Definition
Function description:
Import the parameters from the configuration file into the camera..
6.5.13. ExportConfigFileW
Interface definition:
Function description:
6.5.14. ImportConfigFileW
Interface definition:
Function description:
Import the parameters from the configuration file into the camera.
6.5.15. Close
Interface definition:
void Close()
Function description:
6.5.16. GetParentInterface
Interface definition:
IGXInterface GetParentInterface()
Function description:
Get the parent Interface pointer of the current device.
6.6. IGXFeatureControl
Feature controller, the device object IGXDevice and stream object IGXStream have their own feature
controllers. Users can control all the function features of the camera via the feature controller, such as
getting an integer function controller and then controlling read-write function via the integer controller. You
can also register a feature update callback function for the feature. Users can get three different types of
feature controllers by these four ways: IGXInterface.GetFeatureControl(), IGXDevice.GetFeatureControl(),
IGXDevice.GetRemoteFeatureControl and IGXStream.GetFeatureControl.
Interface list:
GetFeatureNameList Get all the function name string list which the current controller supports.
GetFeatureType Get the data type of the current string feature: integer, float, enumerated etc.,
for more details please see the function definition: GX_FEATURE_TYPE.
IsImplemented Check to see if the current data node control is available.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 58
6.Module Interface Definition
6.6.1. GetFeatureNameList
Interface definition:
Function description:
Get all the function name string list which the current controller supports.
6.6.2. GetFeatureType
Interface definition:
Function description:
Get the data type of the current string feature: integer, float, enumerated etc. For more details please
see the function definition: GX_FEATURE_TYPE.
6.6.3. IsImplemented
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 59
6.Module Interface Definition
Function description:
6.6.4. IsReadable
Interface definition:
Function description:
Check to see if the current feature is readable.
6.6.5. IsWritable
Interface definition:
bool IsWritable(String strFeatureName)
Function description:
Check to see if the current feature is writable.
6.6.6. GetIntFeature
Interface definition:
IIntFeature GetIntFeature(String strFeatureName)
Function description:
Get an integer feature controller.
6.6.7. GetFloatFeature
Interface definition:
IFloatFeature GetFloatFeature(String strFeatureName)
Function description:
Get a float feature controller.
6.6.8. GetEnumFeature
Interface definition:
IEnumFeature GetEnumFeature(String strFeatureName)
Function description:
Get an enumerated controller.
6.6.9. GetBoolFeature
Interface definition:
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 60
6.Module Interface Definition
6.6.10. GetStringFeature
Interface definition:
Function description:
6.6.11. GetCommandFeature
Interface definition:
Function description:
6.6.12. GetRegisterFeature
Interface definition:
Function description:
6.6.13. RegisterFeatureCallback
Interface definition:
Function description:
6.6.14. UnregisterFeatureCallback
Interface definition:
Function description:
6.6.15. ReadPort
Interface definition:
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 61
6.Module Interface Definition
Parameter:
uiAddress [in] Register address
pBuffer [out] The address of the pointer to the read memory value,
GigE/10GigE devices read the big endian, other
devices read the little endian
piSize [in] Size of memory to be read
Note: The value of the GigE camera attribute is read as big endian data.
6.6.16. WritePort
Interface definition:
Function description:
Parameter:
uiAddress [in] Write the value of the camera specified register
pBuffer [in] The address of the pointer to the write memory value,
GigE/10GigE devices write to the big endian, other devices
write to the little endian
piSize [in] Size of memory to be read
Note:
1) Attribute values set by the GigE camera need to be converted to the big endian and then set.
2) After calling the current interface, the node values obtained such as GetEnumFeature(),
GetIntFeature(), GetBoolFeature(), etc. are still the pre-modification values, and users can use
the ReadPort() or ReadPortStacked() interfaces to obtain the latest attribute values.
6.6.17. ReadPortStacked
Interface definition:
Function description:
Read camera specified cameras attribute value in batch, only 4 bytes/unit are supported.
Parameter:
arrEntries [in] Register structure array of camera attributes (including
register address, register value and register value size), not
NULL
[out] Read register values
nNumEntries [in] The number of obtained camera attribute values, not NULL
[out] Number of successfully read register values
6.6.18. WritePortStacked
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 62
6.Module Interface Definition
Function description:
Set camera specified cameras attribute value in batch, only 4 bytes/unit are supported.
Parameter:
arrEntries [in] Register structure array of camera attributes (including
register address, register value and register value size), not
NULL
nNumEntries [in] Number of registers, cannot be NULL
[out] Number of successfully written registers
Note:
2. After calling the current interface, the node values obtained by using GetEnumFeature(),
GetIntFeature(), GetBoolFeature() and other interfaces are still the values before modification. You
can get the latest attribute values via ReadPort() or ReadPortStacked().
6.6.19. FeatureSave
Interface definition:
void FeatureSave(String strFilePath)
Function description:
Save the current frame grabber or camera configuration parameters to the text file.
6.6.20. FeatureSaveW
Interface definition:
void FeatureSaveW(String strWFilePath)
Function description:
Save the current frame grabber or camera configuration parameters to the text file.
6.6.21. FeatureLoad
Interface definition:
void FeatureLoad(String strFilePath)
Function description:
Load the parameters in the configuration file into the frame grabber or camera.
6.6.22. FeatureLoadW
Interface definition:
void FeatureLoadW(String strWFilePath)
Function description:
Load the parameters in the configuration file into the frame grabber or camera.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 63
6.Module Interface Definition
6.7. IIntFeature
Integer function node controller, corresponds to one integer node and can be get from
IGXFeatureControl.GetIntFeature.
Interface list:
6.7.1. GetMin
Interface definition:
int64GetMin()
Function description:
Get the minimum value.
6.7.2. GetMax
Interface definition:
int64 GetMax()
Function description:
6.7.3. GetInc
Interface definition:
int64GetInc()
Function description:
Get the step length.
6.7.4. GetValue
Interface definition:
int64 GetValue()
Function description:
Get the current value.
6.7.5. SetValue
Interface definition:
void SetValue(Int64 nValue)
Function description:
Set the current value.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 64
6.Module Interface Definition
6.8. IFloatFeature
Float data node, corresponds one float function node and can be get from
IGXFeatureControl.GetFloatFeature.
Interface list:
GetMin Get the minimum value.
GetMax Get the maximum value.
HasInc Check to see if there is a step length.
GetInc Get the step length. If HasInc interface returns 'false', then it will return 0 when calling this
interface.
GetUnit Get the unit.
GetValue Get the current value.
SetValue Set the current value.
6.8.1. GetMin
Interface definition:
Double GetMin()
Function description:
Get the minimum value.
6.8.2. GetMax
Interface definition:
Double GetMax()
Function description:
Get the maximum value.
6.8.3. HasInc
Interface definition:
bool HasInc()
Function description:
Check to see if there is a step length.
6.8.4. GetInc
Interface definition:
Double GetInc()
Function description:
Get the step length of float type value. If HasInc interface returns 'false', then it will return 0 when
calling this interface.
6.8.5. GetUnit
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 65
6.Module Interface Definition
String GetUnit()
Function description:
Get the unit of the float value.
6.8.6. GetValue
Interface definition:
Double GetValue()
Function description:
Get the current value.
6.8.7. SetValue
Interface definition:
void SetValue(Double dValue)
Function description:
Set the current value.
6.9. IEnumFeature
The enumeration data node is corresponding to one enumeration function node and can be get by the
function: IGXFeatureControl.GetEnumFeature.
Interface list:
GetEnumEntryList Get the supported enumeration item list.
GetValue Get the enumeration item value.
SetValue Set the enumeration item value.
6.9.1. GetEnumEntryList
Interface definition:
List<String> GetEnumEntryList()
Function description:
6.9.2. GetValue
Interface definition:
String GetValue()
Function description:
6.9.3. SetValue
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 66
6.Module Interface Definition
Function description:
6.10. IBoolFeatur
The boolean data node is corresponding to one Boolean function node and can be get by the function:
IGXFeatureControl.GetBoolFeature.
Interface list:
GetValue Get the current value.
SetValue Set the current value.
6.10.1. GetValue
Interface definition:
bool GetValue()
Function description:
6.10.2. SetValue
Interface definition:
Function description:
6.11. IStringFeature
The string data node is corresponding to one string function node and can be get by the function:
IGXFeatureControl.GetStringFeature.
Interface list:
GetValue Get the current value.
SetValue Set the current value.
GetStringMaxLength Get the maximum length that can be set, not including the terminator.
6.11.1. GetValue
Interface definition:
String GetValue()
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 67
6.Module Interface Definition
6.11.2. SetValue
Interface definition:
Function description:
6.11.3. GetStringMaxLength
Interface definition:
Int64 GetStringMaxLength()
Function description:
Get the maximum length that can be set, not including the terminator.
6.12. ICommandFeature
The command data node is corresponding to one command function node and can be get by the function:
IGXFeatureControl.GetCommandFeature.
Interface list:
Execute Execute command.
6.12.1. Execute
Interface definition:
void Execute()
Function description:
Execute command.
6.13. IRegisterFeature
The register data node controller is corresponding to one command function node and can be get by the
function: IGXFeatureControl.GetCommandFeature.
Interface list:
GetLength Get the length of the register buffer. The user reads this length to read-write buffer.
GetBuffer Get the value of the current register buffer. The length of input parameter 'ptrBuffer'
must equal to the length that the interface 'GetLength' gets.
SetBuffer Set the value of the current register buffer. The length of input parameter 'ptrBuffer'
must equal to the length that the interface 'GetLength' gets.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 68
6.Module Interface Definition
6.13.1. GetLength
Interface definition:
Int64 GetLength()
Function description:
Get the length of the register buffer. The user reads this length to read-write buffer.
6.13.2. GetBuffer
Interface definition:
Function description:
Get the value of the current register buffer. The length of input parameter 'ptrBuffer' must equal to the
length that the interface 'GetLength' gets.
6.13.3. SetBuffer
Interface definition:
Function description:
Set the value of the current register buffer. The length of input parameter 'ptrBuffer' must equal to the
length that the interface 'GetLength' gets.
6.14. IGXStream
Representing the stream object, and it is responsible for the related operation of grabbing images, such
as unregistering callback function and getting a single image. It can be get by the interface function:
IGXDevice.OpenStream interface.
Interface list:
StartGrab Start stream layer acquisition, whether using callback acquisition or a
single image acquisition, the user must call the interface function
StartGrab first.
StopGrab Stop stream layer acquisition.
RegisterCaptureCallback Register the delegation acquisition callback function.
UnregisterCaptureCallback Unregister the acquisition callback function.
GetImage Get a single image.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 69
6.Module Interface Definition
RegisterBuffer The buffer applied by the registered user is used for internal acquisition
UnRegisterBuffer Cancel the buffer registered using the RegisterBuffer() interface
6.14.1. StartGrab
Interface definition:
void StartGrab()
Interface description:
Start stream layer acquisition, whether using callback acquisition or a single image acquisition, the
user must call the StartGrab() first and start stream layer acquisition, including start acquisition thread
and resource application operation of TLClass layer.
6.14.2. StopGrab
Interface definition:
void StopGrab()
Interface description:
Stop stream layer acquisition, including stop acquisition thread of TLClass layer and release resources
operation etc.
6.14.3. RegisterCaptureCallback
Interface definition:
Interface description:
Register the user delegate acquisition callback function. Parameter 1 is the user private parameter, it
is returned to the user by delegation, and parameter 2 is the user delegate callback function object.
Function requirements:
1) After starting acquisition, that is after calling the interface function StartGrab(), you do not
allowed to call the register interface function.
2) The user can register the acquisition callback function repeatedly, and using the overwrite
mechanism.
6.14.4. UnregisterCaptureCallback
Interface definition:
void UnregisterCaptureCallback()
Interface description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 70
6.Module Interface Definition
6.14.5. GetImage
Interface definition:
Interface description:
Get a single image. Parameter 1 is timeout time, unit is ms. If the image is not captured within the
time, the timeout error will returned.
Function requirements:
If the user registers the acquisition delegate function, then it is not allowed to call GetImage() interface.
If call this interface forcibly, it will return illegal call exception error.
6.14.6. GetImageNoThrow
Interface definition:
Interface description:
Get a single image. Parameter 1 is timeout time, unit is ms. If the image is not captured within the
time, NULL will be returned.
Function requirements:
If the user registers the acquisition delegate function, then it is not allowed to call GetImage() interface.
If call this interface forcibly, it will return illegal call exception error.
6.14.7. DQBuf
Interface definition:
Interface description:
Zero copy method for collecting single frames. Parameter 1 is the timeout period, measured in
milliseconds. If the image is not obtained after this time, a timeout error will be returned.
Function requirements:
If the user has registered an acquisition delegation function, the DQBuf() interface is not allowed to
be used. If this interface is forcefully called, an illegal call exception will be returned.
6.14.8. QBuf
Interface definition:
Interface description:
Function requirements:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 71
6.Module Interface Definition
If the user has registered an acquisition delegation function, the QBuf() interface is not allowed to be
used. If this interface is forcefully called, an illegal call exception will be returned.
6.14.9. GetFeatureControl
Interface definition:
IGXFeatureControl GetFeatureControl()
Interface description:
Get stream layer feature controller, to control the stream layer function feature.
6.14.10. FlushQueue
Interface definition:
void FlushQueue()
Interface description:
6.14.11. SetAcquisitionBufferNumber
Interface definition:
Interface description:
Function requirements:
1) This interface is optional and is not necessary in the start acquisition process.
2) The setting value must be greater than 0, if the setting value is too large and exceed the system
capacity, it will not to start acquisition successfully.
3) If need to call this interface, it must be called before start acquisition and it is not allowed to call
this interface during the acquisition process.
4) Once the user has set up the buffer number and has been successfully captured, the buffer
number will remain valid until the stream object is closed.
6.14.12. Close
Interface definition:
void Close()
Interface description:
6.14.13. GetOptimalPacketSize
Interface definition:
uint32_t GetOptimalPacketSize(void)
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 72
6.Module Interface Definition
Interface description:
Function requirements:
1) This interface only supports Gigabit network cameras to obtain optimal packet length.
2) If need to call this interface, it must be called before starting acquisition and it is not allowed to
call this interface during the acquisition process.
6.14.14. GetPayloadSize
Interface definition:
uint64_t GetPayloadSize(void)
Function requirements:
Note: The user image data size needs to be greater than or equal to the return value of the current interface,
otherwise an error may occur.
6.14.15. RegisterBuffer
Interface definition:
Function requirements:
The buffer applied by registered users is used for internal collection, and users can independently
manage the buffer memory.
Parameter:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 73
6.Module Interface Definition
4) RegisterBuffer() is an optional interface. If this interface is not called to register the buffer, the API
library will automatically apply for and mine the buffer after mining, without affecting the collection
process.
6.14.16. UnRegisterBuffer
Interface definition:
Function requirements:
Unregister the buffer that the user registered using the RegisterBuffer() interface.
Parameter:
Note:
This interface needs to be called after the acquisition is stopped. Calling it during the acquisition
process will affect the normal collection process.
Sample Code:
//Get registered buffer information
Uint64 u64BufferSize = objGXStream.GetPayloadSize();
IGXFeatureControl objStreamFeatureControl =
objGXStream.GetFeatureControl();
Uint32 u32BufAddrAlignment = objStreamFeatureControl.GetIntFeature(
"StreamBufferAlignment").GetValue();
//Apply for the buffer length obtained based on the address alignment
value
Intptr pBuffer = _aligned_malloc( u64BufferSize, u32BufAddrAlignment);
if(IntPtr.Zero == pBuffer)
{
//Exception handling...
}
//Register buffer
objGXStream.RegisterBuffer( pBuffer, u64BufferSize, pUserParam);
//Start acquisition...
//Image processing...
//Stop acquisition...
//Realese memory...
if(IntPtr.Zero!= pBuffer)
{
_aligned_free(pBuffer);
pBuffer = IntPtr.Zero;
}
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 74
6.Module Interface Definition
6.15. IFrameData
Image object, including image databuffer and image information. After the user registering acquisition
callback function, when the images come, the image object will return to the user via entrance parameter
of the acquisition callback function.
Interface list:
GetStatus Get the status of the current frame and see if the frame is complete.
GetPayloadSize Get the current frame load and the image size.
GetWidth Get the width of the current frame.
GetHeight Get the height of the current frame.
GetPixelFormat Get the pixel format of the current frame.
GetFrameID Get the current frame ID.
GetTimeStamp Get the timestamp of the current frame.
GetBuffer Get the image data buffer, return the IntPtr type pointer and point to the
unmanaged memory directly.
ConvertToRaw8 The interface is used for non 8-bit. The user can get the specified 8 valid bit
in non 8-bit data.
ConvertToRGB24 Convert the raw data to the RGB24 bit data that is interpolated.
ImageProcess To enhance the current image, and return the image after enhancing effect.
GetUserParam Get user parameter
6.15.1. GetStatus
Interface definition:
GX_FRAME_STATUS_LIST GetStatus()
Function description:
Get the status of the current frame and see if the frame is complete.
6.15.2. GetPayloadSize
Interface definition:
UInt64 GetPayloadSize()
Function description:
Get the current frame load, and the image size. If the frame information is accessible, this value is the
sum of image data size and frame information size; if the frame information is not accessible, this
value is the image data size.
6.15.3. GetWidth
Interface definition:
UInt64 GetWidth()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 75
6.Module Interface Definition
Function description:
6.15.4. GetHeight
Interface definition:
UInt64 GetHeight()
Function description:
6.15.5. GetPixelFormat
Interface definition:
GX_PIXEL_FORMAT_ENTRYGetPixelFormat()
Function description:
6.15.6. GetFrameID
Interface definition:
UInt64 GetFrameID()
Function description:
6.15.7. GetTimeStamp
Interface definition:
UInt64 GetTimeStamp()
Function description:
6.15.8. GetBuffer
Interface definition:
IntPtr GetBuffer()
Function description:
Get the image data buffer, return the IntPtr type pointer and point to the unmanaged memory directly.
6.15.9. ConvertToRaw8
Interface definition:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 76
6.Module Interface Definition
Function description:
The interface is used for non 8-bit data. The user can get specified 8 valid bit in non 8-bit data.
6.15.10. ConvertToRGB24
Interface definition:
Function description:
Convert the raw data to the RGB24 bit data by interpolation algorithm.
6.15.11. ImageProcess
Interface definition:
IntPtrImageProcess(IImageProcessConfig objCfg)
Function description:
To enhance the current image, and returns the enhanced image data.
Note:
2) The mono camera void* returns 8bit image data, the image size is image width * image height.
3) The color camera void* returns RGB image data, image size is image width * image height * 3.
6.15.12. GetUserParam
Interface definition:
IntPtr GetUserParam()
Function description:
Retrieve the user parameters set by the user through RegisterBuffer(). If the interface is not called,
the return value is empty.
6.16. IImageData
IImageData is an image data obtained from the IGXStream.GetImage interface. The interface of this object
is basically consistent with the 'IFrameData' object. Compared with the interface IFrameData, the interface
IImageData has one interface "void IImageData.Destroy()", which is used for destroying itself and releasing
resources.
6.17. IImagProcessConfig
The configurable parameter object of Image enhancement, which has a set of configuration parameter
inside, and can be get by the interface: IGXDevice.CreateImageProcessConfig().
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 77
6.Module Interface Definition
Interface List:
SetValidBit Select the specified 8 bit valid data that to be get, and the interface is
used to specify which 8bit is selected.
GetValidBit Get the 8 valid bits which are currently specified.
EnableDefectivePixelCorrect Enable defective-pixel correction.
IsDefectivePixelCorrect Check whether the defective-pixel correction is enabled currently.
EnableSharpen Enable sharpness function.
IsSharpen Check whether the sharpness function is enabled.
EnableAccelerate Enable accelerating image processing.
IsAccelerate Check whether it works in the accelerating enable status currently.
SetSharpenParam Set the sharpness intensity factor.
GetSharpenParam Get the sharpness intensity factor currently used.
SetContrastParam Set contrast adjustment parameter.
GetContrastParam Get the contrast adjustment parameter currently used.
SetGammaParam Set Gamma coefficient.
GetGammaParam Get Gamma coefficient.
SetLightnessParam Set brightness adjustment parameter.
GetLightnessParam Get brightness adjustment parameter.
EnableDenoise Enable denoise function.
IsDenoise Check whether the denoise function is enabled currently.
SetSaturationParam Set saturation coefficient.
GetSaturationParam Get saturation coefficient.
SetConvertType Set image format conversion algorithm.
GetConvertType Get image format conversion algorithm.
EnableConvertFlip Enable image format conversion flip.
IsConvertFlip Check whether the image format conversion flip function is enabled
currently.
EnableColorCorrection Enable color correction.
IsColorCorrection Check whether the color correction function is enabled.
Reset Restore the default adjustment parameter.
Destroy Destroy itself and release resources.
IsUserSetCCParam Check whether the color correction function is user-set mode.
EnableUserSetCCParam Enable user-set mode for color correction function.
SetUserCCParam Set color transform factor by user.
GetUserCCParam Get color transform factor which set by user.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 78
6.Module Interface Definition
6.17.1. SetValidBit
Interface definition:
void SetValidBit(GX_VALID_BIT_LISTemValidBits)
Function description:
Select the specified 8 bit valid data that to be get, and the interface is used for non-8bit raw data.
6.17.2. GetValidBit
Interface definition:
GX_VALID_BIT_LIST GetValidBit()
Function description:
Get specified 8 bit valid data, and the interface is used for non-8bit raw data.
6.17.3. EnableDefectivePixelCorrect
Interface definition:
Function description:
Enable defective-pixel correction function. The defective pixel correction is enabled when the
'bEnable' is 'ture', and the defective pixel correction is disable when the 'bEnable' is 'false'.
6.17.4. IsDefectivePixelCorrect
Interface definition:
bool IsDefectivePixelCorrect()
Function description:
6.17.5. EnableSharpen
Interface definition:
Function description:
Enable sharpen function. When the 'bEnable' is 'ture', the sharpness function is enabled; when the
'bEnable' is 'false' the sharpness function is disabled.
6.17.6. IsSharpen
Interface definition:
bool IsSharpen()
Function description:
Get the status of sharpness.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 79
6.Module Interface Definition
6.17.7. EnableAccelerate
Interface definition:
void EnableAccelerate(bool bEnable)
Function description:
Image processing accelerating enable. If it is set 'true', the accelerating function is enabled and if it is
set 'false', the accelerating function is disabled. If the CPU of the current PC is not allowed to
accelerate because of itself limitation, an error will occurs when the user sets 'true'.
Note:
When the acceleration function is enabled, the current image height must be an integer multiple of
four, otherwise an error will occurs in the IFrameData::ImageProces interface or
IImageData::ImageProcess interface.
6.17.8. IsAccelerate
Interface definition:
bool IsAccelerate()
Function description:
Check whether the device works in the accelerating enable status currently. 'true' means accelerating
and 'false' means not accelerating.
6.17.9. SetSharpenParam
Interface definition:
Function description:
6.17.10. GetSharpenParam
Interface definition:
System::Double GetSharpenParam()
Function description:
6.17.11. SetContrastParam
Interface definition:
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 80
6.Module Interface Definition
6.17.12. GetContrastParam
Interface definition:
Int32 GetContrastParam()
Function description:
6.17.13. SetGammaParam
Interface definition:
Function description:
6.17.14. GetGammaParam
Interface definition:
System::Double GetGammaParam()
Function description:
6.17.15. SetLightnessParam
Interface definition:
Function description:
6.17.16. GetLightnessParam
Interface definition:
Int32 GetLightnessParam()
Function description:
6.17.17. EnableDenoise
Interface definition:
Function description:
Enable denoise switch (not support for monochrome cameras), when the 'bEnable' is 'true', the
denoise function is enabled; when the 'bEnable' is 'false', the denoise function is disabled.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 81
6.Module Interface Definition
6.17.18. IsDenoise
Interface definition:
bool IsDenoise()
Function description:
6.17.19. SetSaturationParam
Interface definition:
Function description:
6.17.20. GetSaturationParam
Interface definition:
Int32 GetSaturationParam()
Function description:
6.17.21. SetConvertType
Interface definition:
Function description:
Set image format conversion algorithm (not support for monochrome cameras).
6.17.22. GetConvertType
Interface definition:
GX_BAYER_CONVERT_TYPE_LIST GetConvertType()
Function description:
6.17.23. EnableConvertFlip
Interface definition:
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 82
6.Module Interface Definition
6.17.24. IsConvertFlip
Interface definition:
bool IsConvertFlip()
Function description:
Get interpolation flit identification (not support for monochrome cameras), 'true' means flipping and
'false' means not flipping.
6.17.25. EnableColorCorrection
Interface definition:
Function description:
Enable color correction (not support for monochrome cameras), 'true' means enable color correction
and 'false' means disabling color correction.
6.17.26. IsColorCorrection
Interface definition:
bool IsColorCorrection()
Function description:
Check whether the color correction is enabled (not support for monochrome cameras).
6.17.27. Reset
Interface definition:
void Reset()
Function description:
The user can select to restore the optimal default parameter configuration.
6.17.28. Destroy
Interface definition:
void Destroy()
Function description:
Destroy itself and release resources.
6.17.29. IsUserSetCCParam
Interface definition:
bool IsUserSetCCParam()
Function description:
Check whether the color correction function is user-set mode (not support for monochrome cameras).
Returns true if it is user-set mode, otherwise returns false.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 83
6.Module Interface Definition
6.17.30. EnableUserSetCCParam
Interface definition:
void EnableUserSetCCParam(bool bIsUserMode)
Function description:
Enable user-set mode for color correction function (not support for monochrome cameras). If
bIsUserMode is true the user-set mode is enabled; otherwise it is disabled.
6.17.31. SetUserCCParam
Interface definition:
void SetUserCCParam(COLOR_TRANSFORM_FACTOR stColorTransformFactor)
Function description:
Set stColorTransformFactor to color correction function (only supported for user-set mode) (The
recommended range of color correction structure parameters is -4 ~ 4. If the parameter setting is less
than -4, the correction effect is consistent with -4. If the parameter setting is greater than 4, the
correction effect is consistent with 4.).
6.17.32. GetUserCCParam
Interface definition:
COLOR_TRANSFORM_FACTOR GetUserCCParam()
Function description:
Get current stColorTransformFactor which used to color correction function (only supported for user-
set mode).
6.18. IGXImageFormatConvert
Image format conversion interface class, you can convert the image format through this object.
Interface List:
SetDstFormat Set the desired conversion format
SetAlphaValue Set the Alpha value of the image with Alpha channel
GetBufferSizeForConversion Method 1, get the image Buffer length of the desired format
based on the input image pointer
GetBufferSizeForConversion Method 2, get the image Buffer length of the desired format
based on the input image data
Convert Method 1, get the converted image Buffer according to the input
image pointer
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 84
6.Module Interface Definition
Convert Method 2, get the converted image Buffer based on the input
image data
Set the effective data bits to be retained when converting the
SetValidBits
input source image to the desired image format
Obtain the effective data bits retained when converting the input
GetValidBits
source image to the desired image format
This function is used to load 3D calibration parameters and
Set3DCalibParam
convert the altitude map into a point cloud map
Get3DCalibParam Obtain 3D calibration parameters
Set the Y-direction step size for converting the height map to the
SetYStep
point cloud
Obtain the Y-direction step size of the height conversion point
GetYStep
cloud
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 85
6.Module Interface Definition
GX_PIXEL_FORMAT_RGB16
RGB 16bit GX_PIXEL_FORMAT_MONO16
GX_PIXEL_FORMAT_BGR16
GX_PIXEL_FORMAT_MONO8
GX_PIXEL_FORMAT_MONO10_PACKED GX_PIXEL_FORMAT_MONO10
GX_PIXEL_FORMAT_MONO12_PACKED GX_PIXEL_FORMAT_MONO12
Mono
GX_PIXEL_FORMAT_MONO10_P GX_PIXEL_FORMAT_MONO14
Packed
GX_PIXEL_FORMAT_MONO12_P GX_PIXEL_FORMAT_MONO16
GX_PIXEL_FORMAT_MONO14_P GX_PIXEL_FORMAT_RGB8
GX_PIXEL_FORMAT_BGR8
GX_PIXEL_FORMAT_RGB8
GX_PIXEL_FORMAT_BAYER_GR10_PACKED GX_PIXEL_FORMAT_BGR8
GX_PIXEL_FORMAT_BAYER_RG10_PACKED GX_PIXEL_FORMAT_BAYER_GR8
GX_PIXEL_FORMAT_BAYER_GB10_PACKED GX_PIXEL_FORMAT_BAYER_RG8
GX_PIXEL_FORMAT_BAYER_BG10_PACKED GX_PIXEL_FORMAT_BAYER_GB8
GX_PIXEL_FORMAT_BAYER_GR12_PACKED GX_PIXEL_FORMAT_BAYER_BG8
GX_PIXEL_FORMAT_BAYER_RG12_PACKED GX_PIXEL_FORMAT_BAYER_GR10
GX_PIXEL_FORMAT_BAYER_GB12_PACKED GX_PIXEL_FORMAT_BAYER_RG10
GX_PIXEL_FORMAT_BAYER_BG12_PACKED GX_PIXEL_FORMAT_BAYER_GB10
GX_PIXEL_FORMAT_BAYER_GR10_P GX_PIXEL_FORMAT_BAYER_BG10
Bayer GX_PIXEL_FORMAT_BAYER_RG10_P GX_PIXEL_FORMAT_BAYER_GR12
Packed GX_PIXEL_FORMAT_BAYER_GB10_P GX_PIXEL_FORMAT_BAYER_RG12
GX_PIXEL_FORMAT_BAYER_BG10_P GX_PIXEL_FORMAT_BAYER_GB12
GX_PIXEL_FORMAT_BAYER_GR12_P GX_PIXEL_FORMAT_BAYER_BG12
GX_PIXEL_FORMAT_BAYER_RG12_P GX_PIXEL_FORMAT_BAYER_GR14
GX_PIXEL_FORMAT_BAYER_GB12_P GX_PIXEL_FORMAT_BAYER_RG14
GX_PIXEL_FORMAT_BAYER_BG12_P GX_PIXEL_FORMAT_BAYER_GB14
GX_PIXEL_FORMAT_BAYER_GR14_P GX_PIXEL_FORMAT_BAYER_BG14
GX_PIXEL_FORMAT_BAYER_RG14_P GX_PIXEL_FORMAT_BAYER_GR16
GX_PIXEL_FORMAT_BAYER_GB14_P GX_PIXEL_FORMAT_BAYER_RG16
GX_PIXEL_FORMAT_BAYER_BG14_P GX_PIXEL_FORMAT_BAYER_GB16
GX_PIXEL_FORMAT_BAYER_BG16
GX_PIXEL_FORMAT_COORD3D_ABC32F
COOR
GX_PIXEL_FORMAT_COORD3D_C16 GX_PIXEL_FORMAT_COORD3D_ABC32F
D3D_C16
_PLANAR
6.18.2. SetDstFormat
Interface definition:
Function description:
Parameter:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 86
6.Module Interface Definition
6.18.3. GetDstFormat
Interface definition:
GX_PIXEL_FORMAT_ENTRY GetDstFormat()
Function description:
6.18.4. SetInterpolationType
Interface definition:
Function description:
Parameter:
6.18.5. GetInterpolationType
Interface definition:
GX_BAYER_CONVERT_TYPE_LIST GetInterpolationType ()
Function description:
Get the image format conversion algorithm.
6.18.6. SetAlphaValue
Interface definition:
void SetAlphaValue(ulong ui64AlphaValue)
Function description:
Parameter:
ui64AlphaValue [in] Alpha channel value, the value range is 0~255, the default
value is 255.
6.18.7. GetAlphaValue
Interface definition:
ulong GetAlphaValue()
Function description:
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 87
6.Module Interface Definition
6.18.8. GetBufferSizeForConversion
Interface definition:
Function description:
Get the image Buffer length in the desired format based on the input image pointer.
Parameter:
pObjSrcImageData [in] The source image pointer, which can be accessed via the
Acquisition callback delegate function and GetImage()
6.18.9. GetBufferSizeForConversion
Interface definition:
Function description:
Get the image Buffer length in the desired format based on the input image data.
Parameter:
6.18.10. Convert
Interface definition:
Function description:
Convert the input source image to the desired image format, convertible formats refer to Support
conversion types.
Parameter:
objSrcImageData [in] The source image pointer, which can be accessed via
the Acquisition callback delegate function and GetImage()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 88
6.Module Interface Definition
nDstBufferSize [in] The length of the destination image Buffer, available via
GetBufferSizeForConversion()
6.18.11. Convert
Interface definition:
Function description:
Convert the input source image to the desired image format, convertible formats refer to Support
conversion types.
Parameter:
nDstBufferSize [in] The length of the destination image Buffer, available via
GetBufferSizeForConversion()
6.18.12. SetValidBits
Interface definition:
Function description:
Set the reserved valid data bits when converting the input source image to the desired image format.
6.18.13. GetValidBits
Interface definition:
GX_VALID_BIT_LIST GetValidBits()
Function description:
Obtain the reserved valid data bits when converting the input source image to the desired image
format.
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 89
6.Module Interface Definition
6.18.14. Set3DCalibParam
Interface definition:
Function description:
This function is used to load 3D calibration parameters and convert the height map into a point cloud map.
Parameter:
6.18.15. Get3DCalibParam
Interface definition:
IntPtr Get3DCalibParam()
Function description:
6.18.16. SetYStep
Interface definition:
Function description:
Set the Y-direction step size for converting the height map to a point cloud.
6.18.17. GetYStep
Interface definition:
double GetYStep()
Function description:
Obtain the Y-direction step size of the height transition point cloud.
6.19. IGXImageProcess
Image processing function class, users can improve image quality through this object, including Static
Defect Correction, Noise Reduction, Sharpening, Color Correction, Brightness, Contrast, Gamma
adjustment and other functions.
Interface List:
StaticDefectCorrection Static defect correction
ImageImprovment Method1: Input image data for image quality improvement
ImageImprovment Method2: Input image pointer for image quality improvement
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 90
6.Module Interface Definition
6.19.1. StaticDefectCorrection
Interface definition:
void StaticDefectCorrection(IntPtr pInputBuffer,
IntPtr pOutputBuffer,
GX_STATIC_DEFECT_CORRECTION stGxDefectCorrection,
IntPtr pDefectPosBuffer,
UInt32 nDefectPosBufferSize)
Function description:
Execute static defect correction command.
Parameter:
pInputBuffer [in] Source image Buffer pointer
pOutputBuffer [in] Destination image Buffer pointer
[out] Target image Buffer data
stGxDefectCorrection [in] Source image parameters
See details in GX_STATIC_DEFECT_CORRECTION
pDefectPosBuffer [in] Defect pixel location data (Read data from defect pixel
files, which are saved as dp files through
StaticDefectCorrection plugin)
nDefectPosBufferSize [in] Defect pixel location data Buffer size
6.19.2. ImageImprovment
Interface definition:
void ImageImprovment(ref GX_IMAGE_INFO stImgInfo,
IntPtr pOutputBuf,
IImageProcessConfig^ objCfg)
Function description:
Improve image quality. Support input formats: RGB/BGR, Bayer, Mono.
Parameter:
stImgInfo [in] Source image information, see details in GX_IMAGE_INFO
pOutputBuf [in] Destination image Buffer pointer
[out] Destination image Buffer data
objCfg [in] Image processing function configuration
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 91
6.Module Interface Definition
Lightness × √ √
Denoise × √ ×
ColorCorrection √ √ ×
Saturation × √ ×
ConvertType × √ ×
Flip √ √ √
Accelerate × √ √
6.19.3. ImageImprovment
Interface definition:
void ImageImprovment (ref GxIAPINET.IBaseData objFrameData,
IntPtr pOutputBuf, IImageProcessConfig objCfg)
Function description:
Improve image quality. Support input formats: RGB/BGR, Bayer, Mono.
Parameter:
objFrameData [in] Source image pointer, get from Callback function
Delegate Function Type Definition or GetImage()
pOutputBuf [in] Destination image Buffer pointer
[out] Destination image Buffer data
objCfg [in] Image processing function configuration
Supported functions see section 6.19.2.
6.19.4. CalculaLut
Interface definition:
void CalculaLut(Int nContrastParam, double dGamma,
Int nLightness, IntPtr pLut, ref Int pnLutLength)
Function description:
Camera lookup table calculation.
Parameter:
nContrastParam [in] Contrast, value range: -50 ~ 100, which can be obtained through
GetContrastParam()
dGamma [in] Gamma, value range: 0.1 ~ 10, which can be obtained through
GetGammaParam()
nLightness [in] Brightness, value range: -150 ~ 150, which can be obtained through
GetLightnessParam()
pLut [in] LUT memory pointer, applied by users, which length is pnLutLength
[out] Camera LUT obtained through calculation, which can be obtained through
GetRegisterFeature (“LUTValueAll”) ->SetBuffer(pLut, pnLutLength) to
set LUT
pnLutLength [in] LUT length, which can be obtained through GetRegisterFeature
(“LUTValueAll”)->GetLength()
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 92
6.Module Interface Definition
6.19.5. ReadLutFile
Interface definition:
Function description:
Read .lut file saved by the lookup table plugin and parse the data into lookup table data that can be
set to the corresponding camera based on the length of the camera lookup table.
Parameter:
strLutFilePath [in] LUT file path, LUTfile (xxx.lut) can be obtained through
LookUpTable plugin, and the plugin path is:
“Galaxy View->Menu->Plugin->LookUpTable Plugin”
pLut [in] LUT memory pointer, applied by users, which length is
pnLutLength
[out] Camera LUT obtained by reading files
Which can be obtained through GetRegisterFeature
(“LUTValueAll”)->SetBuffer (pLut, pnLutLength) to set LUT
pnLutLength [in] LUT length, unit in bytes,
Which can be obtained through GetRegisterFeature
(“LUTValueAll”)-> GetLength()
6.20. CgalaxyException
Abnormal interface class.
Interface List:
6.20.1. GetErrorCode
Interface definition:
int GetErrorCode()
Function description:
Interface List:
CalculaLut Camera lookup table calculation
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 93
6.Module Interface Definition
6.21.1. CalculaLut
Interface definition:
Function description:
Parameter:
6.21.2. ReadLutFile
Interface definition:
Function description:
Read the .lut file saved by the lookup table plugin and parse the data into lookup table format that can
be set to the appropriate camera based on the camera lookup table length.
Parameter:
strLutFilePath [in] Lookup table file path, lookup table file (xxx.lut) can be
obtained by lookup table plugin
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 94
6.Module Interface Definition
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 95
7.Revision History
7. Revision History
No. Version API Version Changes Date
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 96
7.Revision History
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 97
7.Revision History
IGXImageFormatConvert::SetValidBits interface
6. Add 6.18.13 section:
IGXImageFormatConvert::GetValidBits interface
7. Add 6.19 section: IGXImageProcess class
1. Expand GX_PIXEL_FORMAT_ENTRY
enumeration type
2. Add 6.18.14 section:
IGXImageFormatConvert::Set3DCalibParam
interface
2.0.2404.x 3. Add 6.18.15 section:
22 V1.3.2 2024-04-08
or above IGXImageFormatConvert::Get3DCalibParam
interface
4. Add 6.18.16 section:
IGXImageFormatConvert::SetYStep interface
5. Add 6.18.17 section:
IGXImageFormatConvert::GetYStep interface
1. Add
2.0.2412.x 3.20.GX_GIGE_ACTION_COMMAND_RESULT
25 V1.3.5 2024-12-10
or above 2. Add 6.1.18. GigEIssueActionCommand
Add 6.1.19. GigEIssueScheduledActionCommand
1. Add 6.14.15.RegisterBuffer
2. Add 6.14.16.UnRegisterBuffer
26 V1.3.6 2.0.2412.x 3. Add 6.15.12.GetUserParam 2025-01-08
or above 4. Add 6.20.CgalaxyException
5. Optimize section description information
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 98
7.Revision History
© 2025 China Daheng Group, Inc. Beijing Image Vision Technology Branch 99