OWLIFT C Library for Windows: Getting and Converting Image
OWLIFT C Library for Windows  1.9.3
Top Page
Functions
Getting and Converting Image

Functions

OwStatus_t OwLib_CaptureSetup (OwDev dev, OwFrameRate_t frameRate, OwLibCaptureProc proc, void *userData)
 
OwStatus_t OwLib_CaptureStart (OwDev dev)
 
OwStatus_t OwLib_CaptureStop (OwDev dev)
 
void OwLib_CaptureRelease (OwDev dev)
 
LepTelemetryDataLineAOwLib_GetTelemetryData (OwDev dev, BYTE *buf)
 
OwStatus_t OwLib_Decode (OwDev dev, BYTE *srcBuf, BYTE *dstBuf, UINT32 dstBufLen, UINT32 dstBufStride, OwDecodeType_t dtype)
 
void OwLib_FinishDecode (OwDev dev)
 
OwStatus_t OwLib_GetTempTable (OwDev dev, UINT16 *buf, UINT32 bufLen)
 
int OwLib_GetLastTempResolution (OwDev dev)
 
void OwLib_GetDecodeRange (OwDev dev, INT32 *minTempp, INT32 *maxTempp)
 
void OwLib_SetDecodeRange (OwDev dev, INT32 minTemp, INT32 maxTemp)
 
void OwLib_GetAGCRange (OwDev dev, INT32 *minTempp, INT32 *maxTempp)
 
void OwLib_SetAGCRange (OwDev dev, INT32 minTemp, INT32 maxTemp)
 
OwDecodeType_t OwLib_GetManualGainType (OwDecodeType_t dtype)
 
OwDecodeType_t OwLib_GetLinearAutoGainType (OwDecodeType_t dtype)
 
OwDecodeType_t OwLib_GetNonLinearAutoGainType (OwDecodeType_t dtype)
 
OwDecodeType_t OwLib_GetAutoGainType (OwDecodeType_t dtype)
 
BOOL OwLib_GetSubtractionTemp (OwDev dev)
 
void OwLib_SetSubtractionTemp (OwDev dev, BOOL enabled)
 
OwStatus_t OwLib_SetSubtractionTempTable (OwDev dev, UINT16 *buf, UINT32 bufLen)
 
BOOL OwLib_GetColorizeByRaw (OwDev dev)
 
void OwLib_SetColorizeByRaw (OwDev dev, BOOL enabled)
 
void OwLib_SetWindowCorrection (OwDev dev, OwWindowCorrectionType wctype, int reserved)
 
void OwLib_GetWindowCorrection (OwDev dev, OwWindowCorrectionType *wctype, int *reserved)
 
OwStatus_t OwLib_SetReflectCorrFile (OwDev dev, const wchar_t *filePath)
 
OwStatus_t OwLib_EnableHighGainMode (OwDev dev)
 
UINT32 OwLib_GetColorTableSize (OwDecodeType_t dtype)
 
void OwLib_GetColorTable (OwDecodeType_t dtype, DWORD *tab)
 
OwStatus_t OwLib_Magnify3 (BYTE *srcBuf, UINT32 src_wx, UINT32 src_wy, BYTE *dstBuf, UINT32 dstBufLen, UINT32 bpp, UINT32 src_ofsx)
 
OwStatus_t OwLib_Gray8ToRGB (BYTE *srcBuf, UINT32 src_wx, UINT32 src_wy, BYTE *dstBuf, UINT32 dstBufLen, UINT32 dstBufStride, UINT32 bpp)
 
BOOL OwLib_GetUpsideDown (OwDev dev)
 
void OwLib_SetUpsideDown (OwDev dev, BOOL enabled)
 
BOOL OwLib_GetRGBOrder (OwDev dev)
 
void OwLib_SetRGBOrder (OwDev dev, BOOL BGRorRGB)
 

Detailed Description

Function Documentation

◆ OwLib_CaptureRelease()

void OwLib_CaptureRelease ( OwDev  dev)

Releases a configuration data for capturing.

Parameters
dev[in] The device handle.

◆ OwLib_CaptureSetup()

OwStatus_t OwLib_CaptureSetup ( OwDev  dev,
OwFrameRate_t  frameRate,
OwLibCaptureProc  proc,
void *  userData 
)

Configures the capturing. This function allocates data for capturing. Caller takes responsibility to release the allocated data by OwLib_CaptureRelease() after stop capturing.

Parameters
dev[in] The device handle.
frameRate[in] The frame rate.
proc[in] The callback function being called while capturing. This function is called every time a frame is retrieved from the device. The user can take frames in the user-defined function of which type is OwLibCaptureProc.
userData[in] The arbitrary value passed to 'proc'.
Returns
The error code.

◆ OwLib_CaptureStart()

OwStatus_t OwLib_CaptureStart ( OwDev  dev)

Starts capturing.

Parameters
dev[in] The device handle.
Returns
The error code.

◆ OwLib_CaptureStop()

OwStatus_t OwLib_CaptureStop ( OwDev  dev)

Stops capturing.

Parameters
dev[in] The device handle.
Returns
The error code.

◆ OwLib_Decode()

OwStatus_t OwLib_Decode ( OwDev  dev,
BYTE *  srcBuf,
BYTE *  dstBuf,
UINT32  dstBufLen,
UINT32  dstBufStride,
OwDecodeType_t  dtype 
)

Converts raw data to data of other formats or temperature data. In principle, call this function in the OwLibCaptureProc callback function passed to OwLib_CaptureSetup(). If this function is called once or more times against a frame, OwLib_FinishDecode() must be called before next calling. After calling OwLib_CaptureStart(), there is a possibility that this function returns except OWST_OK while a fixed term. If this function returns except OWST_OK, return from your callback function.

Parameters
dev[in] The device handle.
srcBuf[in] The raw data of the frame.
dstBuf[out] The buffer into which 'srcBuf' is converted.
dstBufLen[in] The size of the area where 'dstBuf' points in bytes.
dstBufStride[in] The stride of the area where 'dstBuf' points in bytes. If 0 is specified, the value is automatically calculated. This parameter is not used when a'dtype' is OWDECODETYPE_RAW_14 or OWDECODETYPE_TEMPERATURE_16.
dtype[in] The decoding type.
Returns
The error code.

◆ OwLib_EnableHighGainMode()

OwStatus_t OwLib_EnableHighGainMode ( OwDev  dev)

Enables High Gain mode. Cannot use against Type-A.

Parameters
dev[in] The device handle.
Returns
The error code.

◆ OwLib_FinishDecode()

void OwLib_FinishDecode ( OwDev  dev)

Notifies the completion for calling OwLib_Decode() against a frame.

Parameters
dev[in] The device handle.

◆ OwLib_GetAGCRange()

void OwLib_GetAGCRange ( OwDev  dev,
INT32 *  minTempp,
INT32 *  maxTempp 
)

Gets the minimum and maximum temperature for Auto Gain Control. The temperature less than the specified minimum temperature is corrected to the minimum color value. The temperature greater than the specified maximum temperature is corrected to the maximum color value.

Parameters
dev[in] The deivce handle.
minTempp[out] The pointer that receives the minimum temperature. The unit is 0.01 Kelvin.
maxTempp[out] The pointer that receives the maximum temperature. The unit is 0.01 Kelvin.

◆ OwLib_GetAutoGainType()

OwDecodeType_t OwLib_GetAutoGainType ( OwDecodeType_t  dtype)

◆ OwLib_GetColorizeByRaw()

BOOL OwLib_GetColorizeByRaw ( OwDev  dev)

Returns whether or not colorizing by raw data directly. If TRUE, you can not get temperature data.

Parameters
dev[in] The device handle.
Returns
TRUE : enabled, FALSE: disabled.

◆ OwLib_GetColorTable()

void OwLib_GetColorTable ( OwDecodeType_t  dtype,
DWORD *  tab 
)

Returns the color table corresponding to the specified decode type. The element is a value of 24bit RGB.

Parameters
dtype[in] Decode type.
tabThe destination area that can store elements of which number is gotten by OwLib_GetColorTableSize().

◆ OwLib_GetColorTableSize()

UINT32 OwLib_GetColorTableSize ( OwDecodeType_t  dtype)

Returns the number of colors in the color table corresponding to the specified decode type.

Parameters
dtype[in] Decode type.
Returns
The number of colors in the color table.

◆ OwLib_GetDecodeRange()

void OwLib_GetDecodeRange ( OwDev  dev,
INT32 *  minTempp,
INT32 *  maxTempp 
)

Gets the minimum and maximum temperature for Manual Gain Control. Manual Gain Control corrects colors of image so that the specified minimum temperature becomes the minimum color value in the color table and the maximum temperature becomes the maximum color value. The temperature less than the specified minimum temperature is corrected to the minimum color value. The temperature greater than the specified maximum temperature is corrected to the maximum color value.

Parameters
dev[in] The deivce handle.
minTempp[out] The pointer that receives the minimum temperature. The unit is 0.01 Kelvin.
maxTempp[out] The pointer that receives the maximum temperature. The unit is 0.01 Kelvin.

◆ OwLib_GetLastTempResolution()

int OwLib_GetLastTempResolution ( OwDev  dev)

Returns the resolution of the temperature table corresponding to the last decoded frame. A kelvin value is obtained by dividing a temperature value of OwLib_GetTempTable() by this value. This function must not be called before calling OwLib_Decode().

Parameters
dev[in] The device handle.
Returns
10, 100

◆ OwLib_GetLinearAutoGainType()

OwDecodeType_t OwLib_GetLinearAutoGainType ( OwDecodeType_t  dtype)

Converts the specified decoding type to the type of Linear Auto Gain Control.

Parameters
dtypeThe decoding type.
Returns
The decoding type of Linear Auto Gain Control corresponding to 'dtype'. Returns 'dtype' if 'dtype' is the type of Linear Gain Control. Returns OWDECODETYPE_UNKNOWN if the corresponding type is not found.

◆ OwLib_GetManualGainType()

OwDecodeType_t OwLib_GetManualGainType ( OwDecodeType_t  dtype)

Converts the specified decoding type to the type of Manual Gain Control.

Parameters
dtypeThe decoding type.
Returns
The decoding type of Manual Gain Control corresponding to 'dtype'. Returns 'dtype' if 'dtype' is the type of Manual Gain Control. Returns OWDECODETYPE_UNKNOWN if the corresponding type is not found.

◆ OwLib_GetNonLinearAutoGainType()

OwDecodeType_t OwLib_GetNonLinearAutoGainType ( OwDecodeType_t  dtype)

Converts the specified decoding type to the type of Nonlinear Auto Gain Control.

Parameters
dtypeThe decoding type.
Returns
The decoding type of Nonlinear Auto Gain Control corresponding to 'dtype'. Returns 'dtype' if 'dtype' is the type of Nonlinear Gain Control. Returns OWDECODETYPE_UNKNOWN if the corresponding type is not found.

◆ OwLib_GetRGBOrder()

BOOL OwLib_GetRGBOrder ( OwDev  dev)

Gets an byte-order for RGB format. This property is only relevant for 24-bit RGB and 32-bit RGB.

Parameters
dev[in] The device handle.
Returns
TRUE: BGR, FALSE: RGB

◆ OwLib_GetSubtractionTemp()

BOOL OwLib_GetSubtractionTemp ( OwDev  dev)

Gets whether or not the Temperature Data Subtraction Output is enabled.

Parameters
dev[in] The device handle.
Returns
The corresponding value.

◆ OwLib_GetTelemetryData()

LepTelemetryDataLineA* OwLib_GetTelemetryData ( OwDev  dev,
BYTE *  buf 
)

Gets the pointer to the Telemetry Data in the specified frame buffer.

Parameters
dev[in] The device handle.
buf[in] The frame buffer.
Returns
The error code.

◆ OwLib_GetTempTable()

OwStatus_t OwLib_GetTempTable ( OwDev  dev,
UINT16 *  buf,
UINT32  bufLen 
)

Gets the temperature data. The data can be gotten between calling OwLib_Decode() once or more times against a frame and calling OwLib_FinishDecode(). The data is same as one that can be gotten by OwLib_Decode() with passing 'dtype' as OWDECODETYPE_TEMPERATURE_16.

Parameters
dev[in] The device handle.
buf[out] The pointer that receives the temperature data. The format is 16-bit per pixel. The unit is represented by OwLib_GetLastTempResolution().
  • The temperature resolution of OWLIFT Type-A is 1/100. A kelvin value is obtained by dividing a temperature data by 100.
  • The temperature resolution of OWLIFT Type-B and F is 1/10. A kelvin value is obtained by dividing a temperature data by 10.
bufLen[in] The size of the area where 'buf' points in bytes.
Returns
The error code.

◆ OwLib_GetUpsideDown()

BOOL OwLib_GetUpsideDown ( OwDev  dev)

Returns whether or not rotating 180 degrees.

Parameters
dev[in] The device handle.
Returns
The correspoinding value.

◆ OwLib_GetWindowCorrection()

void OwLib_GetWindowCorrection ( OwDev  dev,
OwWindowCorrectionType wctype,
int *  reserved 
)

Gets a correction type for protection windows.

Parameters
dev[in] The device handle.
wctype[out] The pointer that receives the correction type.
reserved[out] Unused.

◆ OwLib_Gray8ToRGB()

OwStatus_t OwLib_Gray8ToRGB ( BYTE *  srcBuf,
UINT32  src_wx,
UINT32  src_wy,
BYTE *  dstBuf,
UINT32  dstBufLen,
UINT32  dstBufStride,
UINT32  bpp 
)

Converts 8-bit grayscale format images to RGB format.

Parameters
srcBuf[in] The source image's area.
src_wx[in] Width of the source image.
src_wy[in] Height of the source image.
dstBuf[out] The destination image's area.
dstBufLen[in] Size of the destination image.
dstBufStride[in] The stride of the area where 'dstBuf' points in bytes. If 0 is specified, the value is automatically calculated.
bpp[in] Byte per pixel. 3 or 4.
Returns
The error code.

◆ OwLib_Magnify3()

OwStatus_t OwLib_Magnify3 ( BYTE *  srcBuf,
UINT32  src_wx,
UINT32  src_wy,
BYTE *  dstBuf,
UINT32  dstBufLen,
UINT32  bpp,
UINT32  src_ofsx 
)

Magnifies the image 3 times vertically and horizontally.

Parameters
srcBuf[in] The source image's area.
src_wx[in] Width of the source image.
src_wy[in] Height of the source image.
dstBuf[out] The destination image's area.
dstBufLen[in] Size of the destination image.
bpp[in] Byte per pixel. 3 or 4.
src_ofsx[in] The source offset of x axis. Normally specify 0.
Returns
The error code.

◆ OwLib_SetAGCRange()

void OwLib_SetAGCRange ( OwDev  dev,
INT32  minTemp,
INT32  maxTemp 
)

Sets the minimum and maximum temperature for Auto Gain Control. See OwLib_GetAGCRange() about Auto Gain Control.

Parameters
dev[in] The device handle.
minTemp[in] The minimum temperature. The unit is 0.01 Kelvin.
maxTemp[in] The maximum temperature. The unit is 0.01 Kelvin.

◆ OwLib_SetColorizeByRaw()

void OwLib_SetColorizeByRaw ( OwDev  dev,
BOOL  enabled 
)

Returns whether or not colorizing by raw data directly.

Parameters
dev[in] The device handle.
enabled[in] TRUE : enabled, FALSE: disabled.

◆ OwLib_SetDecodeRange()

void OwLib_SetDecodeRange ( OwDev  dev,
INT32  minTemp,
INT32  maxTemp 
)

Sets the minimum and maximum temperature for Manual Gain Control. See OwLib_GetDecodeRange() about Manual Gain Control.

Parameters
dev[in] The device handle.
minTemp[in] The minimum temperature. The unit is 0.01 Kelvin.
maxTemp[in] The maximum temperature. The unit is 0.01 Kelvin.

◆ OwLib_SetReflectCorrFile()

OwStatus_t OwLib_SetReflectCorrFile ( OwDev  dev,
const wchar_t *  filePath 
)

Sets a reflection correction data file. Reflection correction reduce a reflected image of OWLIFT in a protection window. Reflection correction data file can be generated and exported by OWLIFTCap.

Parameters
dev[in] The device handle.
filePath[in] The file path of a reflection correction data file.
Returns
The error code.

◆ OwLib_SetRGBOrder()

void OwLib_SetRGBOrder ( OwDev  dev,
BOOL  BGRorRGB 
)

Sets an byte-order for RGB format. This property is only relevant for 24-bit RGB and 32-bit RGB.

Parameters
dev[in] The device handle.
BGRorRGB[in] TRUE: BGR, FALSE: RGB

◆ OwLib_SetSubtractionTemp()

void OwLib_SetSubtractionTemp ( OwDev  dev,
BOOL  enabled 
)

Enables or disables the Temperature Data Subtraction Output. If enabled, the temperature data set by OwLib_SetSubtractionTempTable() is subtracted from the current temperature data. The temperature data got by OwLib_GetTempTable() will be subtracted data. The decoding process will be done by subtracted data.

Parameters
dev[in] The device handle.
enabled[in] TRUE : enabled, FALSE: disabled.

◆ OwLib_SetSubtractionTempTable()

OwStatus_t OwLib_SetSubtractionTempTable ( OwDev  dev,
UINT16 *  buf,
UINT32  bufLen 
)

Sets the reference temperature data for the Temperature Data Subtraction Output.

Parameters
dev[in] The device handle.
buf[in] The temperature data.
bufLen[in] The size of the area where 'buf' points in bytes.
Returns
The error code.

◆ OwLib_SetUpsideDown()

void OwLib_SetUpsideDown ( OwDev  dev,
BOOL  enabled 
)

Sets whether or not rotating 180 degrees.

Parameters
dev[in] The device handle.
enabled[in] The correspoinding value.

◆ OwLib_SetWindowCorrection()

void OwLib_SetWindowCorrection ( OwDev  dev,
OwWindowCorrectionType  wctype,
int  reserved 
)

Sets a correction type for protection windows.

Parameters
dev[in] The device handle.
wctype[in] The correction type.
reserved[in] Unused.