Functions | |
cvbres_t | AddGaussNoise (IMG ImgIn, double Mean, double StdDev, long Seed, IMG &ImgOut) |
Add gaussian distributed noise to the image. More... | |
cvbres_t | AddUniformNoise (IMG ImgIn, double Lowest, double Highest, long Seed, IMG &ImgOut) |
Add uniformly distributed noise to the image. More... | |
cvbres_t | CreateFilterTestImage (long Width, long Height, long Dimension, long BitsPerPixel, cvbbool_t Signed, cvbbool_t Float, IMG &ImgOut) |
Creates an image with concentric circles with a frequency that increases as the radius of the circles increases. More... | |
cvbres_t | CreateGreyRamp (long Width, long Height, long Dimension, long BitsPerPixel, cvbbool_t Signed, cvbbool_t Float, double Offset, double Slope, cvbbool_t AxisHorizontal, cvbbool_t AxisVertical, IMG &ImgOut) |
Creates an n-channel image that can be used as a test image to examine the effect of applying different image processing functions. More... | |
cvbres_t | DistanceTransformation (IMG ImgIn, long Index, TFilterMask MaskSize, TDistanceNorm Norm, IMG &ImgOut) |
Calculates the distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image. More... | |
cvbres_t | EuclideanDistanceTransform (IMG ImgIn, cvbdim_t Index, IMG &ImgOut) |
Calculates the Euclidean distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image. More... | |
cvbres_t | FastMarchingDistanceTransform (IMG ImgIn, cvbdim_t Index, float Radius, IMG &ImgOut) |
Calculates the distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image using the fast marching method. More... | |
cvbres_t | InitializeImageRect (IMG ImgIn, long left, long top, long right, long bottom, double *ValuesIn) |
Initialises the pixels in a rectangular area of interest with values from an array. More... | |
cvbres_t | LocalEigenValuesAndVectors (IMG ImgIn, long Index, TFilterMask DerivatorSize, TFilterMask BlurSize, IMG &ImgLambda1, IMG &ImgLambda2, IMG &ImgEV1X, IMG &ImgEV1Y, IMG &ImgEV2X, IMG &ImgEV2Y) |
Computes, for every pixel in the input image, both eigen vectors and eigen values of the matrix More... | |
cvbres_t | LocalMinEigenValues (IMG ImgIn, long Index, TFilterMask DerivatorSize, TFilterMask BlurSize, IMG &ImgLambdaMin) |
Computes, for every pixel in the input image the minimum eigen vector of the matrix More... | |
cvbres_t | PyramidDownSample (IMG ImgIn, IMG &ImgOut) |
Down-samples an image in the sense of a Gaussian pyramid. More... | |
cvbres_t | PyramidUpSample (IMG ImgIn, IMG &ImgOut) |
Up-samples an image in the sense of a Gaussian pyramid. More... | |
cvbres_t | SwapRGBChannels (IMG ImgIn, long Order[3], IMG &ImgOut) |
Changes the plane order of a multi-planar image in memory. More... | |
Add gaussian distributed noise to the image.
This function generates random noise with Gaussian distribution that has the mean value and standard deviation and adds it to a source image. The resulting pixel values that exceed the image data range are saturated to the respective data-range limits. To obtain an image which contains pure noise with Gaussian distribution, call \ref AddGaussNoise using a source image with zero (black) data as input. \n\n Sample: Image with added gaussian noise with mean = 32 and stddev = 32: <table border="0"> <tr> <td> <img class="ToDisplay" src="Bracket.gif" align="left" alt="Bracket original"> </td>
[in] | ImgIn | Handle of image object. |
[in] | Mean | Mean of the gaussian distribution. |
[in] | StdDev | Standard deviation of the gaussian distribution. |
[in] | Seed | Initial seed value for the pseudo-random number generator. |
[out] | ImgOut | Handle of result image. |
Add uniformly distributed noise to the image.
This function generates noise with uniform distribution over the range [low, high] and adds them to a source image. \n The resulting pixel values that exceed the image data range are saturated to the respective data-range limits. To obtain an image which contains pure noise with uniform distribution, call \ref AddUniformNoise using a source image with zero (black) data as input. \n\n Sample: Image with added uniform noise between 0 and 64: <table border="0"> <tr> <td> <img class="ToDisplay" src="Bracket.gif" align="left" alt="Bracket original"> </td>
[in] | ImgIn | Handle of image object. |
[in] | Lowest | Lower bound for the uniformly distributed noise values. |
[in] | Highest | Upper bound for the uniformly distributed noise values. |
[in] | Seed | Initial seed value for the pseudo-random number generator. |
[out] | ImgOut | Handle of result image. |
cvbres_t CreateFilterTestImage | ( | long | Width, |
long | Height, | ||
long | Dimension, | ||
long | BitsPerPixel, | ||
cvbbool_t | Signed, | ||
cvbbool_t | Float, | ||
IMG & | ImgOut | ||
) |
Creates an image with concentric circles with a frequency that increases as the radius of the circles increases.
Such an image may be useful to test the characteristics (especially the anisotropy) of an image filter: <table border="0"> <tr> <td> <img class="ToDisplay" src="FilterTest384x384.gif" align="left" alt="Test filter image"> </td>
[in] | Width | Width of the image to be created. |
[in] | Height | Height of the image to be created. |
[in] | Dimension | Number of planes in the image to be created (1 for monochrome, 3 for RGB image...). |
[in] | BitsPerPixel | Number of bits per pixel of the output image. Attention: Only 8 bits, 16 bits and 32 bits are allowed! |
[in] | Signed | TRUE indicates a signed image, FALSE creates an unsigned image. |
[in] | Float | TRUE creates a floating point image, FALSE an image with integer values. |
[out] | ImgOut | Handle of result image. |
cvbres_t CreateGreyRamp | ( | long | Width, |
long | Height, | ||
long | Dimension, | ||
long | BitsPerPixel, | ||
cvbbool_t | Signed, | ||
cvbbool_t | Float, | ||
double | Offset, | ||
double | Slope, | ||
cvbbool_t | AxisHorizontal, | ||
cvbbool_t | AxisVertical, | ||
IMG & | ImgOut | ||
) |
Creates an n-channel image that can be used as a test image to examine the effect of applying different image processing functions.
The destination image pixel values are computed according to one of the following formula: \n\n Horizontal-only ramp:\n dst(x,y) = offset + slope * x\n Vertical-only ramp:\n dst(x,y) = offset + slope * y \n Horizontal and vertical ramp: \n dst(x,y) = offset + slope * x * y <table border="0"> <tr> <td> <img class="ToDisplay" src="ImageRamp.gif" align="left" alt="Test range image"> </td>
[in] | Width | Width of the image to be created. |
[in] | Height | Height of the image to be created. |
[in] | Dimension | Number of planes in the image to be created (1 for monochrome, 3 for RGB image...). |
[in] | BitsPerPixel | Number of bits per pixel of the output image. Attention: Only 8 bits, 16 bits and 32 bits are allowed! |
[in] | Signed | TRUE indicates a signed image, FALSE creates an unsigned image. |
[in] | Float | TRUE creates a floating point image, FALSE an image with integer values. |
[in] | Offset | Gray-wedge offset value. |
[in] | Slope | Gray-wedge slope coefficient. |
[in] | AxisHorizontal | Specifies the horizontal direction of the image intensity ramp. |
[in] | AxisVertical | Specifies the vertical direction of the image intensity ramp. |
[out] | ImgOut | Handle of result image. |
cvbres_t DistanceTransformation | ( | IMG | ImgIn, |
long | Index, | ||
TFilterMask | MaskSize, | ||
TDistanceNorm | Norm, | ||
IMG & | ImgOut | ||
) |
Calculates the distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image.
The distance is calculated approximately using a set of principal distances that is governed by the MaskSize parameter and the distance norm. \n\n Example: Distance transformation on Bracket.bmp. To get a suitable input image for the distance transformation, the inverse of the canny edge filter image is used: <table border="0"> <tr> <td> <img class="ToDisplay" src="Bracket.gif" align="left" alt="Bracket original"> </td>
Input image
Inverse of Canny edge filtered image
Distance transformation with L2 norm and 3x3 mask
[in] | ImgIn | Handle of image object. |
[in] | Index | Plane index in the image to work on. |
[in] | MaskSize | Size of the distance approximator to be used. Possible sizes are FM_3x3 and FM_5x5. |
[in] | Norm | Norm to be used to build the approximator. Allowable values are DN_LInf, DN_L1 and DN_L2. |
[out] | ImgOut | Handle of result image. |
Calculates the Euclidean distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image.
[in] | ImgIn | Handle of image object. |
[in] | Index | Plane index in the image to work on. |
[out] | ImgOut | Handle of result image. The result image contains floating point values. |
Calculates the distance to the closest pixel in the source image with value zero for all non-zero pixels in the input image using the fast marching method.
[in] | ImgIn | Handle of image object. |
[in] | Index | Plane index in the image to work on. |
[in] | Radius | Radius of the neighborhood of the marked area. If the Radius is positive, then the FMM (fast marching method) distance with the negative sign is calculated in the Euclidean radius neighborhood. |
[out] | ImgOut | Handle of result image. The result image contains floating point values. |
cvbres_t InitializeImageRect | ( | IMG | ImgIn, |
long | left, | ||
long | top, | ||
long | right, | ||
long | bottom, | ||
double * | ValuesIn | ||
) |
Initialises the pixels in a rectangular area of interest with values from an array.
[in] | ImgIn | Handle of image object. |
[in] | left | Left edge of the area of interest. |
[in] | top | Top edge of the area of interest. |
[in] | right | Right edge of the area of interest. |
[in] | bottom | Bottom edge of the area of interest. |
[in] | ValuesIn | Buffer with intensity values with which to initialize the selected area of interest in the image. |
cvbres_t LocalEigenValuesAndVectors | ( | IMG | ImgIn, |
long | Index, | ||
TFilterMask | DerivatorSize, | ||
TFilterMask | BlurSize, | ||
IMG & | ImgLambda1, | ||
IMG & | ImgLambda2, | ||
IMG & | ImgEV1X, | ||
IMG & | ImgEV1Y, | ||
IMG & | ImgEV2X, | ||
IMG & | ImgEV2Y | ||
) |
Computes, for every pixel in the input image, both eigen vectors and eigen values of the matrix
D stands for the derivative operator (it is the Sobel operator that is applied internally here) in x or y direction. Summation occurs over the blur window around a pixel. The output is a set of 6 floating-point images, containing the two eigen values (not sorted by size) and the associated eigen vectors for each pixel of the input image. In cases where the matrix is singular or when one eigen value is much bigger than the other, all 6 output values are set to zero.
This kind of operation is useful when it comes to detecting e. g. curvatures in the image, because the eigen values tend to differ significantly from zero only in regions where the are curved edges. Perfectly straight edges or random noise will result in eigen values close to zero.
|
Input image |
| | |
Eigen Value 1 | Eigen Vector 1, X component | Eigen Vector 1, Y component |
| | |
Eigen Value 2 | Eigen Vector 2, X component | Eigen Vector 2, Y component |
[in] | ImgIn | Handle of image object. |
[in] | Index | Plane index to work on. |
[in] | DerivatorSize | Size of the kernel of the Sobel operator to be used for the derivation operations internally. Allowable values are FM_3x3, FM_5x5 . |
[in] | BlurSize | Mask size for blurring/summation. Allowable values are FM_3x3, FM_5x5 . |
[out] | ImgLambda1 | First eigen values for each pixel of the input image. Attention: Note that the pixel format is floating point. |
[out] | ImgLambda2 | Second eigen values for each pixel of the input image. Attention: Note that the pixel format is floating point. |
[out] | ImgEV1X | X-component of the eigen vector associated with the first eigen value for each pixel of the input image. Attention: Note that the pixel format is floating point. |
[out] | ImgEV1Y | Y-component of the eigen vector associated with the first eigen value for each pixel of the input image. Attention: Note that the pixel format is floating point. |
[out] | ImgEV2X | X-component of the eigen vector associated with the second eigen value for each pixel of the input image. Attention: Note that the pixel format is floating point. |
[out] | ImgEV2Y | Y-component of the eigen vector associated with the second eigen value for each pixel of the input image. Attention: Note that the pixel format is floating point. |
cvbres_t LocalMinEigenValues | ( | IMG | ImgIn, |
long | Index, | ||
TFilterMask | DerivatorSize, | ||
TFilterMask | BlurSize, | ||
IMG & | ImgLambdaMin | ||
) |
Computes, for every pixel in the input image the minimum eigen vector of the matrix
D stands for the derivative operator (it is the Sobel operator that is applied internally here) in x or y direction. Summation occurs over the blur window around a pixel. The output is a floating-point image, containing the smallest of the two eigen values for each pixel of the input image.
This kind of operation is useful when it comes to detecting e. g. curvatures in the image, because the eigen values tend to differ significantly from zero only in regions where the are curved edges. Perfectly straight edges or random noise will result in eigen values close to zero.
| |
Input image | Minimum Eigen Values |
[in] | ImgIn | Handle of image object. |
[in] | Index | Plane index to work on. |
[in] | DerivatorSize | Size of the kernel of the Sobel operator to be used for the derivation operations internally. Allowable values are FM_3x3, FM_5x5 . |
[in] | BlurSize | Mask size for blurring/summation. Allowable values are FM_3x3, FM_5x5 . |
[out] | ImgLambdaMin | Minimum eigen values for each pixel of the input image. Attention: Note that the pixel format is floating point. |
Down-samples an image in the sense of a Gaussian pyramid.
It applies a 5x5 Gaussian Kernel to the image, then down-samples the image by omitting every odd row and column, producing an output image whose size is halved in each dimension.
[in] | ImgIn | Handle of image object. |
[out] | ImgOut | Handle of the result image. |
Up-samples an image in the sense of a Gaussian pyramid.
It inserts odd columns and rows filled with 0, then applies a 5x5 Gaussian Kernel multiplied by 4 to the image.
[in] | ImgIn | Handle of image object. |
[out] | ImgOut | Handle of the result image. |
Changes the plane order of a multi-planar image in memory.
The change is not virtual - the actual bytes in memory are swapped according to the function parameters. The new plane order is determined by the array parameter order.\n\n For example, if sequence of planes in source image is A, B, C and Order[0]=2, Order[1]=0, Order[2]=1, then the order of planes in the destination image will be C, A, B. Some or all components of Order may have the same values.
[in] | ImgIn | Handle of image object. |
[in] | Order | Sequence of the channels in the destination image. Attention: The size of the array must be 3 and should have o other values than 0, 1 and 2. |
[out] | ImgOut | Handle of result image. |