Color (CVCColor.dll) 14.0
Colour Functions

Functions

BOOL CLRCLFDestroy (CLF clf)
 This function destroys a classifier object. More...
 
BOOL CLRCLFGetFilterColor (CLF clf, long Index, double *RGB)
 This function returns an individual colour for a given colour model which is displayed in the result image. More...
 
DWORD CLRCLFGetModelCount (CLF clf)
 This function returns the number of models in the Colour classifier. More...
 
BOOL CLRCLFGetName (CLF clf, LPSTR name)
 This function gets the name of a Colour classifier. More...
 
BOOL CLRCLFGetWhite (CLF clf, IMG &Image)
 This function returns the white reference of a Colour classifier. More...
 
BOOL CLRCLFGetWhiteColor (CLF clf, double *RGB)
 This function gets the white reference of a Colour classifier as a RGB colour value. More...
 
BOOL CLRCLFLoad (CLF &clf, const char *FileName)
 This function loads a classifier clf from a given file. More...
 
BOOL CLRCLFSearchAll (CLF clf, IMG img, long PlaneIndex, const TArea &ar, long Density, BOOL UseCs, CR &result)
 This function searches not only for the best fitting colour in the classifier but gives a quality to the distance to all colours in the classifier. More...
 
BOOL CLRCLFSearchOptimum (CLF clf, IMG img, long PlaneIndex, const TArea &ar, long Density, BOOL UseCs, PCLRResult result)
 This function searches for the best fitting model to the area in the image using the classifier clf. More...
 
BOOL CLRCLFSetFilterColor (CLF clf, long Index, const double *RGB)
 This function sets an individual colour which is displayed in the result image for a found colour. More...
 
BOOL CLRCLFSetWhite (CLF clf, IMG Image, const TArea *Area)
 This function sets the white reference of a Colour classifier using an area in an image. More...
 
BOOL CLRCLFSetWhiteColor (CLF clf, const double *RGB)
 This function sets the white reference of a Colour classifier as a RGB colour value. More...
 
BOOL CLRFLTDestroy (CFLT flt)
 This function destroys a Colour filter object. More...
 
BOOL CLRFLTFilterImage (CFLT flt, IMG Src, IMG Dst, const TArea *DstArea)
 This function filters the area of the input image using the Colour filter flt. More...
 
BOOL CLRFLTFilterImageEx (CFLT flt, IMG Src, IMG Dst, const TArea *DstArea, long Density, BOOL UseCs, long PlaneIndex)
 This function filters the area of the input image using the Colour filter flt. More...
 
BOOL CLRFLTLoad (CFLT &cflt, const char *FileName)
 This function loads a Colour filter object from a given filename. More...
 
BOOL CLRIsClf (CLF clf)
 This function specifies whether clf is a valid Colour classifier object or not. More...
 
BOOL CLRIsFilter (CFLT cflt)
 This function specifies whether a given clft value is a valid Colour filter object or not. More...
 
BOOL CLRIsSearchResult (CR clrresult)
 This function specifies whether a given clrresult value is a valid Colour result list or not. More...
 
BOOL CLRSEARCHDestroy (CR csr)
 This function destroys a Colour result list. More...
 
long CLRSEARCHGetNumResult (CR csr)
 This function gets the number of entries in a result structure list CR (returned by CLRCLFSearchAll). More...
 
BOOL CLRSEARCHGetResult (CR csr, long index, PCLRResult result)
 This function gets resulting colour in result at index from a list of result structures (returned by CLRCLFSearchAll). More...
 

Detailed Description

Function Documentation

◆ CLRCLFDestroy()

BOOL CLRCLFDestroy ( CLF  clf)

This function destroys a classifier object.

Parameters
[in]clfHandle to a Colour classifier object.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFGetFilterColor()

BOOL CLRCLFGetFilterColor ( CLF  clf,
long  Index,
double *  RGB 
)

This function returns an individual colour for a given colour model which is displayed in the result image.

Parameters
[in]clfHandle to a Colour classifier object.
[in]IndexIndex of the colour model for which the destination colour should be retrieved.
[out]RGBPointer to an array of three double values describing a colour in the RGB colour space.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFGetModelCount()

DWORD CLRCLFGetModelCount ( CLF  clf)

This function returns the number of models in the Colour classifier.

Parameters
[in]clfHandle to a Colour classifier object.
Returns
Number of colour models.
Supported platforms:
Win32

◆ CLRCLFGetName()

BOOL CLRCLFGetName ( CLF  clf,
LPSTR  name 
)

This function gets the name of a Colour classifier.

Parameters
[in]clfHandle to a Colour classifier object.
[out]namePointer to a string buffer which receives the name.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFGetWhite()

BOOL CLRCLFGetWhite ( CLF  clf,
IMG &  Image 
)

This function returns the white reference of a Colour classifier.

Parameters
[in]clfHandle to a Colour classifier object.
[out]ImageHandle to the output image.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFGetWhiteColor()

BOOL CLRCLFGetWhiteColor ( CLF  clf,
double *  RGB 
)

This function gets the white reference of a Colour classifier as a RGB colour value.

Parameters
[in]clfHandle to a Colour classifier object.
[out]RGBPointer to an array of three double values describing a colour in the RGB colour space.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFLoad()

BOOL CLRCLFLoad ( CLF clf,
const char *  FileName 
)

This function loads a classifier clf from a given file.

Parameters
[out]clfHandle to a Colour classifier object to be loaded.
[in]FileNameName of the file to load.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFSearchAll()

BOOL CLRCLFSearchAll ( CLF  clf,
IMG  img,
long  PlaneIndex,
const TArea &  ar,
long  Density,
BOOL  UseCs,
CR result 
)

This function searches not only for the best fitting colour in the classifier but gives a quality to the distance to all colours in the classifier.

This information can be used to determine for example how close the next colour is.

Parameters
[in]clfHandle to a Colour classifier object.
[in]imgHandle to the source image with at least three dimensions.
[in]PlaneIndexIndex of the first plane to use as the red plane.
[in]arArea of interest to be processed.
[in]DensityDensity which is used to scan the image.
[in]UseCsSpecifies whether the coordinate system of the image is used or not.
[out]resultA pointer to a colour result object is returned. Use the Colour CLRSEARCHGetResult functions to access that object.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFSearchOptimum()

BOOL CLRCLFSearchOptimum ( CLF  clf,
IMG  img,
long  PlaneIndex,
const TArea &  ar,
long  Density,
BOOL  UseCs,
PCLRResult  result 
)

This function searches for the best fitting model to the area in the image using the classifier clf.

Parameters
[in]clfHandle to a Colour classifier object.
[in]imgHandle to the source image with at least three dimensions.
[in]PlaneIndexIndex of the first plane to use as the red plane.
[in]arArea of interest to be processed.
[in]DensityDensity which is used to scan the image.
[in]UseCsSpecifies whether the coordinate system of the image is used or not.
[out]resultA pointer to an allocated Colour result structure. See PCLRResult for more information.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFSetFilterColor()

BOOL CLRCLFSetFilterColor ( CLF  clf,
long  Index,
const double *  RGB 
)

This function sets an individual colour which is displayed in the result image for a found colour.

Parameters
[in]clfHandle to a Colour classifier object.
[in]IndexIndex of the colour model for which the destination colour should be changed.
[in]RGBPointer to an array of three double values describing a colour in the RGB colour space.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFSetWhite()

BOOL CLRCLFSetWhite ( CLF  clf,
IMG  Image,
const TArea *  Area 
)

This function sets the white reference of a Colour classifier using an area in an image.

Parameters
[in]clfHandle to a Colour classifier object.
[in]ImageHandle to the source image.
[in]AreaArea in the image to process.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRCLFSetWhiteColor()

BOOL CLRCLFSetWhiteColor ( CLF  clf,
const double *  RGB 
)

This function sets the white reference of a Colour classifier as a RGB colour value.

Parameters
[in]clfHandle to a Colour classifier object.
[in]RGBPointer to an array of three double values describing a colour in the RGB colour space.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRFLTDestroy()

BOOL CLRFLTDestroy ( CFLT  flt)

This function destroys a Colour filter object.

Parameters
[in]fltHandle to the Colour filter object.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRFLTFilterImage()

BOOL CLRFLTFilterImage ( CFLT  flt,
IMG  Src,
IMG  Dst,
const TArea *  DstArea 
)

This function filters the area of the input image using the Colour filter flt.

Parameters
[in]fltHandle to the Colour filter object.
[in]SrcHandle to the source image to be filtered.
[out]DstHandle to the result image.
[in]DstAreaArea of interest to use.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRFLTFilterImageEx()

BOOL CLRFLTFilterImageEx ( CFLT  flt,
IMG  Src,
IMG  Dst,
const TArea *  DstArea,
long  Density,
BOOL  UseCs,
long  PlaneIndex 
)

This function filters the area of the input image using the Colour filter flt.

Parameters
[in]fltHandle to the Colour filter object.
[in]SrcHandle to the source image to be filtered.
[out]DstHandle to the result image.
[in]DstAreaArea of interest to use.
[in]DensityDensity which is used to scan the image.
[in]UseCsSpecifies whether the coordinate system of the image is used or not.
[in]PlaneIndexIndex of the first plane to use as the red plane.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRFLTLoad()

BOOL CLRFLTLoad ( CFLT cflt,
const char *  FileName 
)

This function loads a Colour filter object from a given filename.

Parameters
[out]cfltHandle to the Colour filter object to be loaded.
[in]FileNameFilname of the Colour filter object.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRIsClf()

BOOL CLRIsClf ( CLF  clf)

This function specifies whether clf is a valid Colour classifier object or not.

Parameters
[in]clfHandle to a Colour classifier object.
Returns
TRUE specifies that the given handle is a valid Colour classifier, FALSE otherwise.
Supported platforms:
Win32

◆ CLRIsFilter()

BOOL CLRIsFilter ( CFLT  cflt)

This function specifies whether a given clft value is a valid Colour filter object or not.

Parameters
[in]cfltHandle to the Colour filter object.
Returns
TRUE indicates that the given value is a valid Colour filter object, FALSE otherwise.
Supported platforms:
Win32

◆ CLRIsSearchResult()

BOOL CLRIsSearchResult ( CR  clrresult)

This function specifies whether a given clrresult value is a valid Colour result list or not.

Parameters
[in]clrresultHandle to the Colour result list (returned by CLRCLFSearchAll).
Returns
TRUE indicates that the given value is a valid Colour result list, FALSE otherwise.
Supported platforms:
Win32

◆ CLRSEARCHDestroy()

BOOL CLRSEARCHDestroy ( CR  csr)

This function destroys a Colour result list.

Parameters
[in]csrHandle to the Colour result list object.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32

◆ CLRSEARCHGetNumResult()

long CLRSEARCHGetNumResult ( CR  csr)

This function gets the number of entries in a result structure list CR (returned by CLRCLFSearchAll).

Parameters
[in]csrHandle to the Colour result list (returned by CLRCLFSearchAll).
Returns
> 0 on success (number of result colours),
<= 0 if any error occurs.
Supported platforms:
Win32

◆ CLRSEARCHGetResult()

BOOL CLRSEARCHGetResult ( CR  csr,
long  index,
PCLRResult  result 
)

This function gets resulting colour in result at index from a list of result structures (returned by CLRCLFSearchAll).

Parameters
[in]csrHandle to the Colour result list (returned by CLRCLFSearchAll).
[in]indexIndex of the entry to get.
[out]resultPointer to an allocated result structure. See PCLRResult for more information.
Returns
TRUE on success, FALSE otherwise.
Supported platforms:
Win32