Functions | |
cvbbool_t | ButterWorth (IMG imgIn, short highPass, double gain, cvbval_t addOffset, cvbval_t order, double cutOff, IMG &imgOut) |
Calculates a band pass filtered image. More... | |
cvbbool_t | FilterDilate (IMG imgIn, IMG &imgOut) |
Calculates a gray scale dilation of the input image with a 3x3 filter mask. More... | |
cvbbool_t | FilterEdge2x2 (IMG imgIn, IMG &imgOut) |
Creates an edge-filtered version of the input image. More... | |
cvbbool_t | FilterEdge3x3 (IMG imgIn, IMG &imgOut) |
Creates an edge-filtered version of the input image. More... | |
cvbbool_t | FilterErode (IMG imgIn, IMG &imgOut) |
Calculates a gray scale erosion of the input image with a 3x3 filter mask. More... | |
cvbbool_t | FilterLaplace3x3 (IMG imgIn, IMG &imgOut) |
Creates a Laplace-filtered image. More... | |
cvbbool_t | FilterLow2x2 (IMG imgIn, IMG &imgOut) |
Creates a blurred version of the input image. More... | |
cvbbool_t | FilterLow3x3 (IMG imgIn, IMG &imgOut) |
Creates a blurred version of the input image. More... | |
cvbbool_t | FilterLow5x5 (IMG imgIn, IMG &imgOut) |
Creates a blurred version of the input image. More... | |
cvbbool_t | FilterPyramid3x3 (IMG imgIn, IMG &imgOut) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height. More... | |
cvbbool_t | FilterPyramid4x4 (IMG imgIn, IMG &imgOut) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height. More... | |
cvbbool_t | FilterPyramid5x5 (IMG imgIn, IMG &imgOut) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height. More... | |
cvbbool_t | FilterSharpen (IMG imgIn, IMG &imgOut) |
Creates a sharpened version of the input image. More... | |
cvbbool_t | FilterUser2x2 (IMG imgIn, const TFilterDef &filterDef, IMG &imgOut) |
Creates an image by applying a 2x2 linear convolution filter to the input image. More... | |
cvbbool_t | FilterUser3x3 (IMG imgIn, const TFilterDef &filterDef, IMG &imgOut) |
Creates an image by applying a 3x3 linear convolution filter to the input image. More... | |
cvbbool_t | FilterUser5x5 (IMG imgIn, const TFilterDef &filterDef, IMG &imgOut) |
Creates an image by applying a 5x5 linear convolution filter to the input image. More... | |
cvbbool_t ButterWorth | ( | IMG | imgIn, |
short | highPass, | ||
double | gain, | ||
cvbval_t | addOffset, | ||
cvbval_t | order, | ||
double | cutOff, | ||
IMG & | imgOut | ||
) |
Calculates a band pass filtered image.
This function uses the 1st or 2nd order Butterworth pass filter to process the input images. Butterworth filters can act as hight or low pass filters and have a fairly flat frequency response. They are not very computationally expensive, making them a good alternative to FFT-based band pass filtering.
original | Butterworth 1st order | Butterworth 2nd order |
---|---|---|
(both example images use the following parameters: highPass = TRUE
, gain = 1.0
, addOffset = 128
, cutOff = 10
)
[in] | imgIn | Handle to the input image. |
[in] | highPass | When set to TRUE the filter acts as a high pass filter, when set to FALSE it will act as a low pass filter. |
[in] | gain | Magnitude of the frequency response. |
[in] | addOffset | Offset to be added to the result. |
[in] | order | Order of the butter-worth filter. Must be either 1 or 2. |
[in] | cutOff | Cut-off parameter. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterDilate | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Calculates a gray scale dilation of the input image with a 3x3 filter mask.
The dilation is one of the basic morphology operations. It is based on scanning every location in the input image with a structural element (in this case simply a rectangle) and setting the corresponding pixel value in the output image to the brightest value found in the structural element.
Dilation effectively expands bright structures in the image (in this case, because a 3x3 mask is used, by 1 pixel in every direction). Dilation followed by an erosion (FilterErode) can be used for closing small holes dark pixels in bright objects) in objects.
original | dilated |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterEdge2x2 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates an edge-filtered version of the input image.
The output value for position (x,y) is calculated according to:
(effectively the maximum norm over the two Roberts filters). The results are clamped to the range [0...255].
original | low pass filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterEdge3x3 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates an edge-filtered version of the input image.
The output value for position (x,y) is calculated according to:
The results are clamped to the range [0...255].
original | low pass filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterErode | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Calculates a gray scale erosion of the input image with a 3x3 filter mask.
The erosion is one of the basic morphology operations. It is based on scanning every location in the input image with a structural element (in this case simply a rectangle) and setting the corresponding pixel value in the output image to the darkest value found in the structural element.
Erosion effectively expands dark structures in the image (in this case, because a 3x3 mask is used, by 1 pixel in every direction). Erosion followed by a dilation (FilterDilate) can be used for removing bright spots in otherwise dark objects.
original | dilated |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterLaplace3x3 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates a Laplace-filtered image.
The convolution kernel for the Laplace filter is
0 | -1 | 0 |
-1 | 4 | -1 |
0 | -1 | 0 |
The results will be offset by 128 and clamped to the range [0...255].
original | Laplace-filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterLow2x2 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates a blurred version of the input image.
This function blurs the image data of the input image with the convolution kernel
1/4 | 1/4 |
1/4 | 1/4 |
For a stronger blurring effect try FilterLow3x3 or FilterLow5x5.
original | low pass filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterLow3x3 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates a blurred version of the input image.
This function blurs the image data of the input image with the convolution kernel
1/16 | 2/16 | 1/16 |
2/16 | 4/16 | 2/16 |
1/16 | 2/16 | 1/16 |
For a weaker blurring effect try FilterLow2x2. For a stronger blurring effect try FilterLow5x5.
original | low pass filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterLow5x5 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates a blurred version of the input image.
This function blurs the image data of the input image with the convolution kernel
1 | 4 | 6 | 4 | 1 |
4 | 16 | 24 | 16 | 4 |
6 | 24 | 36 | 24 | 6 |
4 | 16 | 24 | 16 | 4 |
1 | 4 | 6 | 4 | 1 |
For a weaker blurring effect try FilterLow3x3 and FilterLow2x2.
original | low pass filtered |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterPyramid3x3 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height.
The low pass filter applied is effectively the same as implemented by the functions FilterLow3x3.
original | pyramid |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterPyramid4x4 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height.
The low pass filter applied is defined by the filter mask
1/64 | 3/64 | 3/64 | 1/64 |
3/64 | 9/64 | 9/64 | 3/64 |
3/64 | 9/64 | 9/64 | 3/64 |
1/64 | 3/64 | 3/64 | 1/64 |
original | pyramid |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterPyramid5x5 | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Applies a binomial low pass filter and downscales the image by a factor of 2 in width and height.
The low pass filter applied is effectively the same as implemented by the functions FilterLow5x5.
original | pyramid |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one planecvbbool_t FilterSharpen | ( | IMG | imgIn, |
IMG & | imgOut | ||
) |
Creates a sharpened version of the input image.
Sharpened images are effectively high pass images, in this case created with the convolution kernel
0 | -1 | 0 |
-1 | 5 | -1 |
0 | -1 | 0 |
The results are clamped to the range [0...255]. Sharpened images may show more detail, the sharpen filter also amplifies noise (and is therefore usually not a good choice for preprocessing images that are going to be used with Minos).
original | sharpened |
---|---|
[in] | imgIn | Handle to the input image. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one plane
|
related |
Creates an image by applying a 2x2 linear convolution filter to the input image.
The 2x2 convolution kernel needs to be specified as a TFilterDef structure. In this case, only the central members
c0000 | c0R00 |
c000B | c0R0B |
and Offst will be evaluated. Result values will be clamped to the range [0...255].
[in] | imgIn | Handle to the input image. |
[in] | filterDef | Filter definition. See TFilterDef. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one plane
|
related |
Creates an image by applying a 3x3 linear convolution filter to the input image.
The 3x3 convolution kernel needs to be specified as a TFilterDef structure. In this case, only the central members
c0L0T | c000T | c0R0T |
c0L00 | c0000 | c0R00 |
c0L0B | c000B | c0R0B |
and Offst will be evaluated. Result values will be clamped to the range [0...255].
[in] | imgIn | Handle to the input image. |
[in] | filterDef | Filter definition. See TFilterDef. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one plane
|
related |
Creates an image by applying a 5x5 linear convolution filter to the input image.
The 5x5 convolution kernel needs to be specified as a TFilterDef structure. In this case all coefficient members and Offst will be evaluated. Result values will be clamped to the range [0...255].
[in] | imgIn | Handle to the input image. |
[in] | filterDef | Filter definition. See TFilterDef. |
[out] | imgOut | Receives the handle of the newly created output image. Remember to dispose of the output image with ReleaseObject from the CVCImg.dll once it is no longer needed. |
TRUE
if the filter function succeeded, FALSE
otherwise. Possible reasons for failure are:imgIn
does not refer to a valid imageimgIn
has more than 8 bits per pixel in at least one plane