Foundation (LightMeter.dll) 15.0
Functions

Functions

cvbres_t LMCreate (LMH *LMHandle)
 Creates a LightMeter object. More...
 
cvbres_t LMDestroy (LMH LMHandle)
 Destroys a LightMeter object. More...
 
cvbres_t LMExecute (LMH LMHandle)
 Calculate the histogram of an image and all statistical values. More...
 
cvbres_t LMGetArea (LMH LMHandle, cvbdim_t PlaneIndex, TArea *pArea)
 Get the area of a specific plane which the LightMeter object is using to process the histogram and the statistic values. More...
 
cvbres_t LMGetDensity (LMH LMHandle, cvbdim_t PlaneIndex, cvbdensity_t *pDensity)
 Get the density used by the LightMeter object for the processing of the selected plane. More...
 
cvbres_t LMGetEntireImageFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t *pEntireImageFlag)
 Checks if LightMeter is using the entire image for processing or the area selected by the LMSetArea function. More...
 
cvbres_t LMGetImage (LMH LMHandle, IMG *pImage)
 Get the image object that is currently used. More...
 
cvbres_t LMGetLastMessageString (LMH LMHandle, char *Message, size_t MaxMessageLength)
 Returns the last error message if a function has returned with an error. More...
 
cvbres_t LMGetProcessFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t *pProcessFlag)
 Checks if LightMeter is using the selected plane for processing. More...
 
cvbres_t LMGetResetCSFlag (LMH LMHandle, cvbbool_t *pResetCSFlag)
 Checks if LightMeter is resetting the image coordinate system before it is processing the histogram.

By default the flag is set to FALSE when a new image is passed to the LightMeter object with the LMSetImage function. More...
 
cvbres_t LMGetSingleHistogramEntry (LMH LMHandle, cvbdim_t PlaneIndex, size_t EntryIndex, double *pEntry)
 Get the number of pixels with a specific grey value in the selected area of a specific plane.

To determine number of pixels found for a single grey value use the grey value as index number for the function. More...
 
cvbres_t LMGetStatisticMax (LMH LMHandle, cvbdim_t PlaneIndex, double *pMax)
 Get the maximum gray value in the selected area of a specific plane. More...
 
cvbres_t LMGetStatisticMean (LMH LMHandle, cvbdim_t PlaneIndex, double *pMean)
 Get the mean gray value in the selected area of a specific plane. More...
 
cvbres_t LMGetStatisticMin (LMH LMHandle, cvbdim_t PlaneIndex, double *pMin)
 Get the minimum gray value in the selected area of a specific plane. More...
 
cvbres_t LMGetStatisticMode (LMH LMHandle, cvbdim_t PlaneIndex, double *pMode)
 Get the most common gray value in the selected area of a specific plane. More...
 
cvbres_t LMGetStatisticPixelInLimits (LMH LMHandle, cvbdim_t PlaneIndex, cvbuint32_t LowerLimit, cvbuint32_t UpperLimit, double *pPixelInLimits)
 Get the number of pixels with a grey value between a lower and a upper limit in the selected area of a specific plane.

The minimum and the maximum value for the limits are determined by the data type of the image object (e.g. 0-255 for a 8 bit image). More...
 
cvbres_t LMGetStatisticStdDev (LMH LMHandle, cvbdim_t PlaneIndex, double *pStdDev)
 Get he standard deviation of the gray values in the selected area of a specific plane.

The standard deviation is the square root of the variance. See LMGetStatisticVariance for more information. More...
 
cvbres_t LMGetStatisticTotal (LMH LMHandle, cvbdim_t PlaneIndex, double *pTotal)
 Get the total number of pixels used by the LightMeter object to process the histogram and the statistic values for a specific plane.

The value depends on the Density set with the LMSetDensity function. More...
 
cvbres_t LMGetStatisticVariance (LMH LMHandle, cvbdim_t PlaneIndex, double *pVariance)
 Get the variance of the gray values in the selected area of a specific plane.

The variance is calculated as follows: More...
 
cvbres_t LMGetStopWatch (LMH LMHandle, cvbval_t Index, double *pStopWatch)
 Measure the time between two subsequent calls to the function with the same index.

The index is used to start several stopwatch objects which measure different intervals. More...
 
cvbres_t LMGetUseCSFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t *pUseCSFlag)
 Checks if LightMeter is using the image coordinate system to process the histogram.

By default the image coordinate system is used when a new image is passed to the LightMeter object with the LMSetImage function. The image coordinate system can switched ON or OFF for each plane of the image. More...
 
cvbres_t LMSetArea (LMH LMHandle, cvbdim_t PlaneIndex, TArea Area)
 Set the area of a specific plane which the LightMeter object is using to process the histogram and the statistic values. More...
 
cvbres_t LMSetDensity (LMH LMHandle, cvbdim_t PlaneIndex, cvbdensity_t Density)
 Set the density used by the LightMeter object for the processing of the selected plane. More...
 
cvbres_t LMSetEntireImageFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t EntireImageFlag)
 Specifies whether the LightMeter object is using the entire image for processing the histogram or the area selected by the LMSetArea function. More...
 
cvbres_t LMSetImage (LMH LMHandle, IMG Image)
 Set the image object that is used by the LightMeter object. More...
 
cvbres_t LMSetProcessFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t ProcessFlag)
 Sets the process flag of a specific plane of the image. More...
 
cvbres_t LMSetResetCSFlag (LMH LMHandle, cvbbool_t ResetCSFlag)
 Specifies if the LightMeter object is resetting the image coordinate system before it is processing the histogram or not.

By default the flag is set to FALSE when a new image is passed to the LightMeter object with the LMSetImage function. More...
 
cvbres_t LMSetUseCSFlag (LMH LMHandle, cvbdim_t PlaneIndex, cvbbool_t UseCSFlag)
 Specifies if the image image coordinate system should be used to process the histogram.

By default the image coordinate system is used when a new image is passed to the LightMeter object with the LMSetImage function. The image coordinate system can switched ON or OFF for each plane of the image. More...
 

Detailed Description

Function Documentation

◆ LMCreate()

cvbres_t LMCreate ( LMH *  LMHandle)

Creates a LightMeter object.

Attention
This function must be called before any other LightMeter function is called. It is possible to create more than one LightMeter objects by calling the function several times.
Parameters
[out]LMHandleHandle to LightMeter object.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMDestroy()

cvbres_t LMDestroy ( LMH  LMHandle)

Destroys a LightMeter object.

Attention
This function must be called for each LightMeter object created with LMCreate before you terminate your application.
Parameters
[in]LMHandleHandle to LightMeter object.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMExecute()

cvbres_t LMExecute ( LMH  LMHandle)

Calculate the histogram of an image and all statistical values.

Attention
This function must be called before any other function like LMGetStatisticMean can be used.
Parameters
[in]LMHandleHandle to LightMeter object.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetArea()

cvbres_t LMGetArea ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
TArea *  pArea 
)

Get the area of a specific plane which the LightMeter object is using to process the histogram and the statistic values.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pAreaArea of interest in the image plane.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetDensity()

cvbres_t LMGetDensity ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbdensity_t *  pDensity 
)

Get the density used by the LightMeter object for the processing of the selected plane.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pDensityDensity for the selected plane used for processing. The range is 0 - 1000.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetEntireImageFlag()

cvbres_t LMGetEntireImageFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t *  pEntireImageFlag 
)

Checks if LightMeter is using the entire image for processing or the area selected by the LMSetArea function.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pEntireImageFlagTRUE indicates that the entire image is used for processing, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetImage()

cvbres_t LMGetImage ( LMH  LMHandle,
IMG *  pImage 
)

Get the image object that is currently used.

Parameters
[in]LMHandleHandle to LightMeter object.
[out]pImageHandle to the image object.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetLastMessageString()

cvbres_t LMGetLastMessageString ( LMH  LMHandle,
char *  Message,
size_t  MaxMessageLength 
)

Returns the last error message if a function has returned with an error.

Parameters
[in]LMHandleHandle to LightMeter object. his buffer must be allocated from the user and be at least as long as defined in MaxMessageLength.
[out]MessageString Buffer in which message is written to.
[in]MaxMessageLengthLength of the string.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetProcessFlag()

cvbres_t LMGetProcessFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t *  pProcessFlag 
)

Checks if LightMeter is using the selected plane for processing.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pProcessFlagTRUE if the plane is used for processing, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetResetCSFlag()

cvbres_t LMGetResetCSFlag ( LMH  LMHandle,
cvbbool_t *  pResetCSFlag 
)

Checks if LightMeter is resetting the image coordinate system before it is processing the histogram.

By default the flag is set to FALSE when a new image is passed to the LightMeter object with the LMSetImage function.

Parameters
[in]LMHandleHandle to LightMeter object.
[out]pResetCSFlagTRUE if coordinate is reseted before it is processing the histogram, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetSingleHistogramEntry()

cvbres_t LMGetSingleHistogramEntry ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
size_t  EntryIndex,
double *  pEntry 
)

Get the number of pixels with a specific grey value in the selected area of a specific plane.

To determine number of pixels found for a single grey value use the grey value as index number for the function.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]EntryIndexIndex (grey value) of the entry.
[out]pEntryNumber of pixels for that index (grey value).
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticMax()

cvbres_t LMGetStatisticMax ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pMax 
)

Get the maximum gray value in the selected area of a specific plane.

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pMaxMaximum gray value.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticMean()

cvbres_t LMGetStatisticMean ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pMean 
)

Get the mean gray value in the selected area of a specific plane.

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pMeanMean gray value.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticMin()

cvbres_t LMGetStatisticMin ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pMin 
)

Get the minimum gray value in the selected area of a specific plane.

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pMinMinimum gray value.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticMode()

cvbres_t LMGetStatisticMode ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pMode 
)

Get the most common gray value in the selected area of a specific plane.

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pModeMost common gray value.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticPixelInLimits()

cvbres_t LMGetStatisticPixelInLimits ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbuint32_t  LowerLimit,
cvbuint32_t  UpperLimit,
double *  pPixelInLimits 
)

Get the number of pixels with a grey value between a lower and a upper limit in the selected area of a specific plane.

The minimum and the maximum value for the limits are determined by the data type of the image object (e.g. 0-255 for a 8 bit image).

Attention
The value is not calculated during the LMExecute function of the object. Due to that it is possible to use statistic values generated during the LMExecute function (e.g. LMGetStatisticMean) to specify the lower and the upper limits.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]LowerLimitLower intensity limit.
[in]UpperLimitUpper intensity limit.
[out]pPixelInLimitsNumber of pixels between the limits.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticStdDev()

cvbres_t LMGetStatisticStdDev ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pStdDev 
)

Get he standard deviation of the gray values in the selected area of a specific plane.

The standard deviation is the square root of the variance. See LMGetStatisticVariance for more information.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pStdDevStandard deviation.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticTotal()

cvbres_t LMGetStatisticTotal ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pTotal 
)

Get the total number of pixels used by the LightMeter object to process the histogram and the statistic values for a specific plane.

The value depends on the Density set with the LMSetDensity function.

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pTotalTotal number of pixels used for processing the histogram and the statistical values.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStatisticVariance()

cvbres_t LMGetStatisticVariance ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
double *  pVariance 
)

Get the variance of the gray values in the selected area of a specific plane.

The variance is calculated as follows:

Variance

 

 

 

Attention
The LMExecute function must be called before this value is available.
Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pVarianceVariance value.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetStopWatch()

cvbres_t LMGetStopWatch ( LMH  LMHandle,
cvbval_t  Index,
double *  pStopWatch 
)

Measure the time between two subsequent calls to the function with the same index.

The index is used to start several stopwatch objects which measure different intervals.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]IndexIndex of the stopwatch to read (0 - 49). More than one stopwatch can be used.
[out]pStopWatchElapsed time between two subsequent calls to the function with the same index in milliseconds.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMGetUseCSFlag()

cvbres_t LMGetUseCSFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t *  pUseCSFlag 
)

Checks if LightMeter is using the image coordinate system to process the histogram.

By default the image coordinate system is used when a new image is passed to the LightMeter object with the LMSetImage function. The image coordinate system can switched ON or OFF for each plane of the image.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[out]pUseCSFlagTRUE indicates that the image coordinate system is used, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetArea()

cvbres_t LMSetArea ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
TArea  Area 
)

Set the area of a specific plane which the LightMeter object is using to process the histogram and the statistic values.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]AreaArea of interest in the image plane.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetDensity()

cvbres_t LMSetDensity ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbdensity_t  Density 
)

Set the density used by the LightMeter object for the processing of the selected plane.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]DensityDensity for the selected plane used for processing. The range is 0 - 1000.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetEntireImageFlag()

cvbres_t LMSetEntireImageFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t  EntireImageFlag 
)

Specifies whether the LightMeter object is using the entire image for processing the histogram or the area selected by the LMSetArea function.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]EntireImageFlagTRUE indicates that the entire image is used for processing, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetImage()

cvbres_t LMSetImage ( LMH  LMHandle,
IMG  Image 
)

Set the image object that is used by the LightMeter object.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]ImageHandle to the image object.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetProcessFlag()

cvbres_t LMSetProcessFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t  ProcessFlag 
)

Sets the process flag of a specific plane of the image.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]ProcessFlagTRUE means that the plane is used for processing, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetResetCSFlag()

cvbres_t LMSetResetCSFlag ( LMH  LMHandle,
cvbbool_t  ResetCSFlag 
)

Specifies if the LightMeter object is resetting the image coordinate system before it is processing the histogram or not.

By default the flag is set to FALSE when a new image is passed to the LightMeter object with the LMSetImage function.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]ResetCSFlagTRUE if coordinate is reseted before it is processing the histogram, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64

◆ LMSetUseCSFlag()

cvbres_t LMSetUseCSFlag ( LMH  LMHandle,
cvbdim_t  PlaneIndex,
cvbbool_t  UseCSFlag 
)

Specifies if the image image coordinate system should be used to process the histogram.

By default the image coordinate system is used when a new image is passed to the LightMeter object with the LMSetImage function. The image coordinate system can switched ON or OFF for each plane of the image.

Parameters
[in]LMHandleHandle to LightMeter object.
[in]PlaneIndexIndex of the plane to access between 0 and image dimensions - 1.
[in]UseCSFlagTRUE indicates that the image coordinate system should be used, FALSE otherwise.
Returns
0 : OK
< 0: an error occurred.
Supported platforms:
Win32
Win64