IDS peak comfortC v1.10.0
Loading...
Searching...
No Matches
Sharpness measurement

Functions

PEAK_API_STATUS peak_IPL_Sharpness_Measure (peak_frame_handle hFrame, peak_roi roi, peak_sharpness_algorithm sharpnessAlgorithm, double *calculatedValue)
 Measures the sharpness in the image.
 
PEAK_API_STATUS peak_IPL_Sharpness_GetList (peak_sharpness_algorithm sharpnessAlgorithm, peak_pixel_format *pixelFormatList, size_t *pixelFormatSize)
 Query the current supported pixel formats for the given algorithm.
 

Detailed Description

Sharpness measurement related functions and types.

Function Documentation

◆ peak_IPL_Sharpness_GetList()

PEAK_API_STATUS peak_IPL_Sharpness_GetList ( peak_sharpness_algorithm  sharpnessAlgorithm,
peak_pixel_format *  pixelFormatList,
size_t *  pixelFormatSize 
)

Query the current supported pixel formats for the given algorithm.

Provides the supported pixel formats for the given algorithm

This function implements the Two Staged Data Query principle.

Parameters
[in]sharpnessAlgorithmThe algorithm used for measuring sharpness.
[out]pixelFormatListPointer to a user allocated array buffer to receive the pixel format list. If this parameter is NULL, pixelFormatSize will contain the current number of supported pixel formats.
The needed size of pixelFormatList in bytes is pixelFormatSize x sizeof(peak_pixel_format).
[in,out]pixelFormatSize
  • pixelFormatList equal NULL:
    out: minimal number of pixel formats pixelFormatList must be large enough to hold
  • pixelFormatList unequal NULL:
    in: number of pixel formats pixelFormatList can hold
    out: number of pixel formats filled by the function
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_BUFFER_TOO_SMALL pixelFormatList is not NULL and the value of *pixelFormatSize is too small to receive the expected amount of data.
PEAK_STATUS_INVALID_PARAMETER pixelFormatSize is an invalid pointer or sharpnessAlgorithm is an invalid algorithm.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.

◆ peak_IPL_Sharpness_Measure()

PEAK_API_STATUS peak_IPL_Sharpness_Measure ( peak_frame_handle  hFrame,
peak_roi  roi,
peak_sharpness_algorithm  sharpnessAlgorithm,
double *  calculatedValue 
)

Measures the sharpness in the image.

Measures the sharpness in the image or image roi using the specified sharpness algorithm. The measured values are relative so you should compare values at different focus levels to find the best sharpness value. Higher values correspond to sharper images.

Parameters
[in]hFrameThe frame handle.
[in]roiThe roi in which to measure the sharpness. Must be at least 20x20 pixels.
[in]sharpnessAlgorithmThe algorithm used for measuring sharpness.
[out]calculatedValueThe measured sharpness value.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER roi is out of range, algorithm is invalid or calculated_value is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hFrame is an invalid frame handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.