9.Software Tool
© 2023 China Daheng Group, Inc. Beijing Image Vision Technology Branch 185
9.1.2.4.
Save LUT
The group contains two widgets: Save To File and Write To Device.
1.
When selecting "Save To File", the current LUT data can be saved to the file. The saved file contains
two formats: lut and csv, The save type can be changed when saving the file. The default save path
is ".\resource\gxplugins\LookUpTable\LUT12", which is the directory where the GalaxyView.exe is
installed.
2.
When "Write To Device" is selected, the current LUT data is written to UserSet0, and UserSetDefault
is modified to UserSet0. UserSet0 will be loaded when reading from the device again.
9.1.2.5.
Read LUT
There are two ways to read the .lut file saved by the plugin and set it into the camera:
1.
Using the plugin: After selecting the LUT file, a dialog box for selecting the file will pop up. You can
select the lookup table file (xxx.lut). Clicking the "Write To Device" to set the LUT file data into the
camera.
2.
Using the API interface: Read the .lut file through the ReadLutFile interface in the GxIAPI library and
DxImageProc library and parse it into lookup table format that can be set to the appropriate camera.
The specific steps are as follows:
a)
Get the length of the Lookup Table.
b)
Apply for the LUT Buffer resource of the corresponding size according to the LUT length.
c)
Read the LUT file (xxx.lut), and get the LUT Buffer data.
d)
Set the LUT Buffer data into the camera. (Make sure the LUTEnable is true).
e)
Save the current LUT data to UserSet0, and synchronously set the UserSetDefault to UserSet0. When
reading from the device again, the camera will load the lookup table data.
The API interface supports C/C++/C#. For specific about the interface and example programs, please refer
to relevant section of "C SDK Programming Reference Manual", "C++ SDK Programming Reference
Manual" and "DotNET SDK Programming Reference Manual".
9.1.3.
Precautions
9.1.3.1.
Read From Device
When reading from device, UserSet0 will be loaded, which will cause the previously modified device
feature information to be lost. Therefore, the information should be saved in time before reading from
device.
9.1.3.2.
Write To Device
In order to ensure that the device will restore the effect before power off after the device is power-on again.
When writing to device, it will set the parameter set to UserSet0 and set the UserSetDefault to UserSet0.