pco Software Development Kit

Quick Setup
- Declare conversion structures, e.g.,
PCO_SensorInfo strsensorinf;andPCO_Display strDisplay;. - Set size fields:
strsensorinf.wSize = sizeof(PCO_SensorInfo)andstrDisplay.wSize = sizeof(PCO_Display). - Create the convert object:
PCO_ConvertCreate(&hConvert, (PCO_SensorInfo*)&strsensorinf.wSize, ...). - Optionally open a convert dialog using the dialog API (if you want a GUI to set parameters).
- Read display limits into
strDisplayand set the desired min/max scale values, then apply them to the convert object viaPCO_ConvertSetDisplay. - Run the conversion for your input buffer (example shown:
PCO_Convert16TOCOL(hConvert, 0, 0, 1280, 1024, b16, b8rgb)), then optionally update the GUI dialog with the converted data (PCO_SetDataToDialog). - Close the optionally opened convert dialog.
- Delete/cleanup the convert object with
PCO_ConvertDeletebefore unloading/exit.
This work is licensed under the Creative Commons Attribution-NoDerivatives 4.0 International License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/4.0/ or send a letter to Creative Commons, PO Box 1866, Mountain View, CA 94042, USA.

General
- The description in this pco.convert Software Development Kit (SDK) can be used to implement the PCO convert routines in proprietary applications used to control PCO cameras. It is prohibited to use the convert routines with third-party cameras.
- The pco.convert SDK consists of two parts: The LUT conversion functions pco.conv.dll and the dialog functions pco_cdlg.dll.
- The conversion functions are used to convert data areas, b/w and color, with a resolution of more than 8 bits per pixel to either b/w data areas with a resolution of 8 bits per pixel or color data areas with a resolution of 24 (32) bits per pixel. This DLL also includes functions to create and fill the various convert objects.
- The second part of the API contains the dialog functions. The dialogs are simple GUI dialogs which enable the user to set the parameters of the convert objects. The dialog functions are included in the pco_cdlg.dll and are based on some functions of the pco.conv.dll.
- In the pco.sdk for PCO cameras exist two samples, that make use of pco.convert. One is the Test_cvDlg sample and the other is the sc2_demo. Please take a look at those samples in order to ’see’ the pco.convert functions in action.
Supported Platforms
- This section lists the currently supported operating systems, runtimes, and tools as well as planned support changes.
Operating systems
| OS | Minimum supported | Latest supported | Planned |
| Debian LTS | 11 (until 2026) | 12 | 13 (2026) |
| Ubuntu LTS | 20 (until 2026) | 22 | 24 (2026) |
| Redhat | 8 (until 2026) | 9 | 10 (2026) |
| Windows | 10 (until 2027) | 11 | Not planned |
| Name | Minimum supported | Latest supported | Planned |
| Python | 3.8 (until 2026) | 3.12 | 3.13 (2027) |
| .Net Framework | 4.6 (until 2026) | 4.8.1 | Not planned |
| cMake | 3.20 | — | Not planned |
| GPU CC | 5.0 (until 2026) | — | 7.0 (2026) |
B/W And Pseudo Color Conversion
- The conversion algorithm used in the b/w function is based on the following simple routine:
![]()
where:
- pos is the counter variable
- dataout is the output data area
- datain is the input data area
- lutbw is a data area of size 2n containing the LUT, where n = resolution of the input area in bits per pixel.
In the pseudocolor function the basic routine to convert to a RGB data area is:

where:
- pos is the input counter variable
- pout is the output counter variable
- dataout is the output data area
- datain is the input data area
- lutbw is a data area of size 2n containing the LUT, where n = resolution of the input area in bits per pixel
- lutred, lutgreen, lutblue are data areas of size 2n containing the LUT, where n = resolution of the output area in bits per pixel.
Color Conversion
- CCD and sCMOS color sensors used in PCO color cameras have filters for the colors red, green, and blue.
- Each pixel has one type of filter, thus originally you do not get full color information for each pixel. Rather each pixel delivers a value with a dynamic range of up to 16 bits for the color passing through its filter.
- All color cameras at PCO work with the Bayer-filter demosaicking. The color filter pattern of those color image sensors can be reduced to a 2×2 matrix. The image sensor itself can be seen as a matrix of those 2×2 matrixes.
Assume this color pattern

- The color itself is only an interpretation of the matrix. This interpretation will be done by a so-called demosaicing algorithm. The pco_conv.dll works with a special proprietary method.
Convert API Function Description
PCO_ConvertCreate
Description
- Creates a new convert object based on the PCO_SensorInfo structure. The created convert handle will be used during the conversion. Please call PCO_ConvertDelete before the application exits and unloads the convert dll.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE* | Pointer to a handle which will receive the created convert object |
| strSensor | PCO_SensorInfo* | Pointer to a sensor information structure. Please do not forget to set the wSize parameter. |
| iConvertType | int | Variable to determine the conversion type, either b/w, color, pseudo color or color 16 |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertDelete
Description
- Deletes a previously created convert object. It is mandatory to call this function before closing the application.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, ErrorCode otherwise. |
PCO_ConvertGet
Description
- Gets all the values of a previously created convert object.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrConvert | PCO_Convert* | Pointer to a pco convert structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertSet
Description
- Sets necessary values for a previously created convert object.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrConvert | PCO_Convert* | Pointer to a pco convert structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertGetDisplay
Description
- Gets the PCO_Display structure.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrDisplay | PCO_Display* | Pointer to a pco display structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertSetDisplay
Description
- Sets the PCO_Display structure.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrDisplay | PCO_Display* | Pointer to a pco display structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertSetFilter
Description
- Sets the filter structure values of a previously created convert object.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrBayer | PCO_Bayer* | Pointer to a PCO Bayer structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_ConvertSetSensorInfo
Description
- Sets the PCO_SensorInfo structure for a previously created convert object.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| pstrFilter | PCO_Filter* | Pointer to a pco filter structure |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_SetPseudoLut
Description
- Loads the three pseudolut color tables of plut.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object. |
| pstrSensorInfo | PCO_SensorInfo* | Pointer to a sensor information structure. Please do not forget to set the wSize parameter |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_LoadPseudoLut
Description
- Loads a pseudo color lookup table to the convert object. This function can be used to load some of the predefined or self-created pseudo lookup tables.
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| format | int | 0 → lt1, 1 → lt2, 2 → lt3, 3 → lt4 |
| filename | char* | Name of the file to load |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_Convert16TO8
Description
- Converts picture data in b16 to 8-bit data in b8 (grayscale).
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| mode | int | Mode parameter |
| icolmode | int | Color mode parameter |
| width | int | Width of the image to convert |
| height | int | Height of the image to convert |
| b16 | word* | Pointer to the raw image |
| b8 | byte* | Pointer to converted 8bit b/w image |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_Convert16TO24
Description
- Converts picture data in b16 to 24-bit data in b24 (grayscale).
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| mode | int | Mode parameter |
| Name | Type | Description |
| icolmode | int | Color mode parameter |
| width | int | Width of the image to convert |
| height | int | Height of the image to convert |
| b16 | word* | Pointer to the raw image |
| b24 | byte* | Pointer to converted 24bit color image |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_Convert16TOCOL
Description
- Converts picture data in b16 to RGB data in b8 (color).
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| mode | int | Mode parameter |
| icolmode | int | Color mode parameter |
| width | int | Width of the image to convert |
| height | int | Height of the image to convert |
| b16 | word* | Pointer to the raw image |
| b8 | byte* | Pointer to converted 24bit color image |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_Convert16TOPSEUDO
Description
- Converts picture data in b16 to pseudo color data in b8 (color).
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| mode | int | Mode parameter |
| icolmode | int | Color mode parameter |
| width | int | Width of the image to convert |
| height | int | Height of the image to convert |
| b16 | word* | Pointer to the raw image |
| b8 | byte* | Pointer to converted 24bit pseudo color image |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_Convert16TOCOL16
Description
- Converts picture data in b16 to RGB data in b16 (color).
Prototype

Parameter
| Name | Type | Description |
| ph | HANDLE | Handle to a previously created convert object |
| mode | int | Mode parameter |
| Name | Type | Description |
| icolmode | int | Color mode parameter |
| width | int | Width of the image to convert |
| height | int | Height of the image to convert |
| b16in | word* | Pointer to the raw image |
| b16out | word* | Pointer to converted 48bit color image |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_GetWhiteBalance
Description
- Gets white balanced values for color_temp and tint.
Prototype

Parameter

Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_GetMaxLimit
Description
- GetMaxLimit gets the RGB values for a given temp and tint.
- The max value within the convert control dialog must not exceed the biggest value of the RGB values, e.g. in case R is the biggest value, the max value can increase till the R value hits the bit resolution (4095). Same condition must be met for decreasing the max value, e.g. in case B is the lowest value, the max value can decrease till the B value hits the min value.
Prototype

Parameter
| Name | Type | Description |
| r_max | float* | Pointer to a float receiving the max red value |
| g_max | float* | Pointer to a float receiving the max green value |
| b_max | float* | Pointer to a float receiving the max blue value |
| temp | float | Color temperature |
| tint | float | Tint setting |
| output_bits | int | Bit resolution of the converted image (usually 8) |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_GetColorValues
Description
- Gets color temperature and tint for given R,G,B max values.
- GetColorValues is used only in pco.camware. It calculates the color temperature and tint based on the Rmax,Gmax,Bmax values of the old color lut. The calculated values are used to convert old b16 and tif16 images with the new convert routines.
Prototype

Parameter
| Name | Type | Description |
| pfColorTemp | float* | Pointer to a float for receiving the color temperature |
| pfColorTint | float* | Pointer to a float for receiving the color tint |
| iRedMax | int | Integer to set the current max value for red |
| iGreenMax | int | Integer to set the current max value for green. |
| iBlueMax | int | Integer to set the current max value for blue |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_WhiteBalanceToDisplayStruct
Description
- Calculates the white balance and sets the values to the strDisplay struct while maintaining the limits.
- Gets the struct strDisplay from the convert Handle internally.
Prototype

Parameter

Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
PCO_GetVersionInfoPCO_CONV
Description
- Returns version information about the dll.
Prototype

Parameter
| Name | Type | Description |
| pszName | char* | String to get the name of the module (can be NULL) |
| iNameLength | int | Length of the string in bytes (can be 0) |
| pszPath | char* | String to get the path of the module (can be NULL) |
| iPathLength | int | Length of the string in bytes (can be 0) |
| piMajor | int* | Pointer to int to get the major version number (can be NULL) |
| piMinor | int* | Pointer to int to get the minor version number (can be NULL) |
| piPatch | int* | Pointer to int to get the patch version number (can be NULL) |
| piBuild | int* | Pointer to int to get the build version number (can be NULL) |
Return value
| Name | Type | Description |
| ErrorMessage | int | 0 in case of success, Errorcode otherwise. |
Typical Implementation
This typical step-by-step implementation shows the basic handling:
- Declarations:

- Set all buffer ’size’ parameters to the expected values:

- Set the sensor info parameters and create the convert object:

- Optionally open a convert dialog:

- Set the min and max value to the desired range and set them to the convert object:

- Do the convert and set the data to the dialog if dialog is open:

- Close the optionally opened convert dialog:

- Close the convert object:
![]()
See the Test_cvDlg sample in the pco.sdk sample folder. Starting with v1.20, the range of the negative tint value has been doubled.
About Excelitas®
- Excelitas is a leading provider of advanced, life-enriching technologies that make a difference, serving global market leaders in the life sciences, advanced industrial, next-generation semiconductor and avionics end markets. Headquartered in Pittsburgh, PA, USA, Excelitas is an essential partner in the design, development and manufacture of advanced technologies, offering leading-edge innovation in sensing, detection, imaging, optics and specialty illumination for customers worldwide.
- Excelitas is at the forefront of addressing many of the relevant megatrends impacting the world today, including precision medicine, industrial automation, artificial intelligence and connected devices (IoT).
Troubleshooting
- Conversion object not cleaned up: Ensure you call
PCO_ConvertDeletebefore the application exits and unloads the convert DLL (described as mandatory). - Incorrect structure handling: The manual notes you must set the
wSizeparameter when using sensor/display-related structures (for example, inPCO_SensorInfoandPCO_Display). The typical implementation setswSizetosizeof(...). - Parameter display range issues (white balance/tint scaling): When working with max/min limits, the manual states the maximum value in the convert control dialog must not exceed the biggest value of the RGB values (e.g., R hits the bit resolution), and the same holds for decreasing the max value (e.g., B hits the min value).
CONTACT
- +49 9441 2005 0
- Europe
- +1 866 662 6653
- North America
- +86 400 080 2255
- Asia-Pacific
- Donaupark 11
- 93309 Kelheim
- Germany
- excelitas.com
- pco@excelitas.com
For a complete listing of our global offices, visit www.excelitas.com/locations
© 2026 Excelitas Technologies Corp. All rights reserved. The Excelitas logo, Excelitas® and PCO® are registered trademarks; pco.pixelflyTM, pco.visionTM and MachVisTM are trademarks of the Excelitas group of companies. All other products and services are either trademarks or registered trademarks of their respective owners. Excelitas reserves the right to change this document at any time without notice and disclaims liability for editorial, pictorial or typographical errors.
Documents / Resources
![]() | Software Development Kit |
References
- creativecommons.org/licenses/by-nd/4.0/creativecommons.org
- excelitas.comexcelitas.com
- excelitas.com/locations©www.excelitas.com
- excelitas.com/pcowww.excelitas.com
- excelitas.com/pcowww.excelitas.com
- User Manualmanual.tools

