Functions | |
cvbres_t | BlackhatImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method performs the black-hat operation on the input image ImgIn. More... | |
cvbres_t | ClosingImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method first dilates the input image ImgIn and then erodes it. More... | |
cvbres_t | DilateImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method is the opposite morphological operation of the erosion (see ErodeImage). More... | |
cvbres_t | ErodeImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
The morphological technique of erosion is also known as "grow", "bolden", and "expand". More... | |
cvbres_t | MorphologicalGradientImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method calculates the morphological gradient of an image. More... | |
cvbres_t | OpeningImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method first erodes the input image ImgIn and then dilates it. More... | |
cvbres_t | TophatImage (IMG ImgIn, TMorphologyMask MaskType, long MaskWidth, long MaskHeight, long MaskOffsetX, long MaskOffsetY, IMG CustomMask, IMG &ImgOut) |
This method performs the (white) top-hat operation on the input image ImgIn. More... | |
cvbres_t BlackhatImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method performs the black-hat operation on the input image ImgIn.
The black-hat transform is equivalent to the subtraction of the initial source image from the closed image using a given structure element.
The black-hat transform is useful for enhancing details, especially, in the presence of shading.
[in] | ImgIn | Handle to input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle to result image. |
cvbres_t ClosingImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method first dilates the input image ImgIn and then erodes it.
The Closing operation is usually used for deleting small holes lying inside an object. Inner edges get smoothed out and distances smaller than the filter mask are bypassed. Any non-black pixel in that mask image represents a pixel belonging to the structure element.
[in] | ImgIn | Handle of input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle of result image. |
cvbres_t DilateImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method is the opposite morphological operation of the erosion (see ErodeImage).
It applies a structuring element (defined by some or all of the parameters MaskType, MaskWidth, MaskHeight, MaskOffsetX and MaskOffsetY plus CustomMask) to each pixel of the image and sets the value of the corresponding output pixel to the maximum value of all the pixels that are part of the structure element. Any non-black pixel in that mask image represents a pixel belonging to the structure element.
[in] | ImgIn | Handle of input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle of result image. |
cvbres_t ErodeImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
The morphological technique of erosion is also known as "grow", "bolden", and "expand".
It applies a structuring element (defined by some or all of the parameters MaskType, MaskWidth, MaskHeight, MaskOffsetX and MaskOffsetY plus CustomMask) to each pixel of the image and sets the value of the corresponding output pixel to the minimum value of all the pixels that are part of the structure element. Any non-black pixel in that mask image represents a pixel belonging to the structure element.
[in] | ImgIn | Handle of input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle of result image. |
cvbres_t MorphologicalGradientImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method calculates the morphological gradient of an image.
The morphological gradient is similar to the difference between the dilated source image and the eroded source image. The result image describes the contrast changes/intensity in the close neighbourhood of a pixel. This function is useful for edge detection and segmentation applications.
[in] | ImgIn | Handle to input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle to result image. |
cvbres_t OpeningImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method first erodes the input image ImgIn and then dilates it.
The Opening operator is used for deleting small regions lying outside of the object. Whereas outer edges are smoothed and thin bridges are broken. The size of morphological mask is defined by the parameters MaskHeight and MaskWidth.
The mask has a model point, that is defined by the parameters MaskOffsetX and MaskOffsetY. The mask is set directly on every pixel and its new intensity is calculated in respect to the neighbouring pixels covered by the mask.
[in] | ImgIn | Handle of input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle of result image. |
cvbres_t TophatImage | ( | IMG | ImgIn, |
TMorphologyMask | MaskType, | ||
long | MaskWidth, | ||
long | MaskHeight, | ||
long | MaskOffsetX, | ||
long | MaskOffsetY, | ||
IMG | CustomMask, | ||
IMG & | ImgOut | ||
) |
This method performs the (white) top-hat operation on the input image ImgIn.
The top-hat transform is defined as the difference between the source image and its opening by a given structure element. In most cases a structure element of the form of a "top-hat" is being used.
[in] | ImgIn | Handle to input image. |
[in] | MaskType | Type of mask to be used. See TMorphologyMask for more details. |
[in] | MaskWidth | Width of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskWidth is ignored and set to the width of the custom mask image. |
[in] | MaskHeight | Height of the mask. Valid values are between 1 and 256. Attention: If MaskType is set to MM_Custom, the MaskHeight is ignored and set to the height of the custom mask image. |
[in] | MaskOffsetX | X-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskWidth - 1. May be -1 in which case it will be set to width / 2. |
[in] | MaskOffsetY | Y-offset of the mask centre relative to the top left corner of the mask. Must be in the range of 0 to MaskHeight - 1. May be -1 in which case it will be set to height / 2. |
[in] | CustomMask | Handle of custom mask. This mask is used for MaskType = MM_Custom, otherwise this parameter is ignored. The mask is a monochrome image of 8 bit pixel depth with height and width not greater than 256. |
[out] | ImgOut | Image handle to result image. |