CVB.Net 15.0
Process Class Reference

Collection of functions available for image processing. More...

Static Public Member Functions

static Image AffineTransform (this Image img, AffineMatrix2D m)
 Creates an affine transformation (homogeneous matrix transformation) of the whole image img . More...
 
static Image AffineTransform (this Image img, AffineMatrix2D m, Area2D a)
 Creates an affine transformation (homogeneous matrix transformation) of an area a of the given image img . More...
 
static Image LinearTransform (this Image img, Matrix2D m)
 Creates a linear transformation (matrix transformation). More...
 
static Image MapTo8Bit (this Image img, bool collective)
 Take an input image and scale the pixel values to fit into the 8 bit value range. More...
 
static Image MapTo8Bit (this Image img)
 Take an input image and scale the pixel values to fit into the 8 bit value range, using collective normalization. More...
 
static Image NormalizeMinMax (this Image img, double targetMin, double targetMax)
 Normalize an input image using min/max normalization (the gray values of the image will be stretched or compressed to fit the input target minimum and maximum values). More...
 
static Image NormalizeMeanVariance (this Image img, double targetMean, double targetVariance)
 Normalize an input image using mean/variance normalization (the gray values of the image will be stretched modified to generate a histogram as close as possible to the input target mean and variance values). More...
 
static Image PolarTransform (this Image img, Point2Dd center, double innerRadius, double outerRadius, Angle startAngle, Angle totalAngle)
 Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image). More...
 
static Image PolarTransform (this Image img, Point2Dd center, double innerRadius, double outerRadius)
 Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image). More...
 
static Image InversePolarTransform (this Image img, Angle startAngle, double innerRadius)
 Create an inverse polar transformed image (i.e. transform an unwrapped image back into a ring structure). More...
 
static void InversePolarTransform (this Image imgSrc, Point2Dd center, Angle startAngle, double innerRadius, Image imgDst)
 Calculates an inverse polar transformed image (i.e. transform an unwrapped image back into a ring structure). More...
 
static Image FlatfieldCorrection (this Image imgSrc, Image imgFlat, double gain)
 Performs a flat field correction on the imgSrc . More...
 
static Image FlatfieldCorrection (this Image imgSrc, Image imgFlat, Image imgDark, double gain)
 Performs a flat field correction on the imgSrc with optional correction of the fix pattern noise. More...
 
static Image DifferenceMap (Image rangeMap1, Image rangeMap2)
 Creates a difference map of the given range maps. More...
 
static unsafe void FillGaps (ImagePlane plane, GapFillingOptions options)
 Fills gaps of the given rangemap plane . Gaps will be filled by interpolating values of pixels surrounding the gap. If larger gaps should be ignored, the maximum size of gaps to be filled has to be set via the options . More...
 

Detailed Description

Collection of functions available for image processing.

Member Function Documentation

◆ AffineTransform() [1/2]

static Image AffineTransform ( this Image  img,
AffineMatrix2D  m 
)
static

Creates an affine transformation (homogeneous matrix transformation) of the whole image img .

Linear interpolation is used for the transformation.

Parameters
imgSource image.
mMatrix to transform img .
Returns
Newly created image.

◆ AffineTransform() [2/2]

static Image AffineTransform ( this Image  img,
AffineMatrix2D  m,
Area2D  a 
)
static

Creates an affine transformation (homogeneous matrix transformation) of an area a of the given image img .

Linear interpolation is used for the transformation.

Parameters
imgSource image.
mMatrix to transform img .
aArea of img to transform.
Returns
Newly created image.

◆ DifferenceMap()

static Image DifferenceMap ( Image  rangeMap1,
Image  rangeMap2 
)
static

Creates a difference map of the given range maps.

The following DataType.BytesPerPixel as input for unsigned integer DataType values are supported: 1, 2 and 4. For floating point DataType values only 4 and 8 DataType.BytesPerPixel are supported. Note, that only linear access is supported (check with function ImagePlane.TryGetLinearAccess).

The output difference map will be double for double input images, for all other images it will be float.

Parameters
rangeMap1Range map one.
rangeMap2Range map two.
Returns
Difference map of the given range maps.
Exceptions
ArgumentNullExceptionWhen one of the range maps is null.
ObjectDisposedExceptionWhen one of the range maps is already disposed.
CvbExceptionWhen creating the difference map failed.

◆ FillGaps()

static unsafe void FillGaps ( ImagePlane  plane,
GapFillingOptions  options 
)
static

Fills gaps of the given rangemap plane . Gaps will be filled by interpolating values of pixels surrounding the gap. If larger gaps should be ignored, the maximum size of gaps to be filled has to be set via the options .

The following DataType.BytesPerPixel as input for unsigned integer DataType values are supported: 1, 2 and 4. For floating point DataType values only 4 and 8 DataType.BytesPerPixel are supported. Note, that only linear access is supported (check with function ImagePlane.TryGetLinearAccess).

Only planes with at least 3 columns are supported. The image attached to the plane should be a 1-plane image.

Parameters
planeRangemap plane where gaps should be filled.
optionsOptions for gap filling.
Exceptions
ObjectDisposedExceptionWhen parent image of plane is already disposed.
CvbExceptionWhen an error during gap filling occurs.

◆ FlatfieldCorrection() [1/2]

static Image FlatfieldCorrection ( this Image  imgSrc,
Image  imgFlat,
double  gain 
)
static

Performs a flat field correction on the imgSrc .

Parameters
imgSrcImage to perform flat field correction on.
imgFlatThe flat image showing the background.
gainA gain value used to adjust the brightness of the output image. Usually roughly the average gray value of imgSrc is used.
Returns
Flatfield corrected image.

◆ FlatfieldCorrection() [2/2]

static Image FlatfieldCorrection ( this Image  imgSrc,
Image  imgFlat,
Image  imgDark,
double  gain 
)
static

Performs a flat field correction on the imgSrc with optional correction of the fix pattern noise.

Parameters
imgSrcImage to perform flat field correction on.
imgFlatThe flat image showing the background.
imgDarkOptional dark image.
gainA gain value used to adjust the brightness of the output image. Usually roughly the average gray value of imgSrc is used.
Returns
Flatfield corrected image.

◆ InversePolarTransform() [1/2]

static Image InversePolarTransform ( this Image  img,
Angle  startAngle,
double  innerRadius 
)
static

Create an inverse polar transformed image (i.e. transform an unwrapped image back into a ring structure).

Linear interpolation is being used for the transformation.

Parameters
imgSource image
startAngleOrientation of the start (the total azimuth will be determined from the input image)
innerRadiusInner radius of the ring (the outer radius will be determined from the input image)
Returns
the transformed image

◆ InversePolarTransform() [2/2]

static void InversePolarTransform ( this Image  imgSrc,
Point2Dd  center,
Angle  startAngle,
double  innerRadius,
Image  imgDst 
)
static

Calculates an inverse polar transformed image (i.e. transform an unwrapped image back into a ring structure).

Linear interpolation is being used for the transformation.

Parameters
imgSrcSource image
centerCenter for the inverse transformation (i.e. the point around which the ring will be constructed)
startAngleOrientation of the start (the total azimuth will be determined from the input image)
innerRadiusInner radius of the ring (the outer radius will be determined from the input image)
imgDstDestination image into which the unwrap result will be painted

◆ LinearTransform()

static Image LinearTransform ( this Image  img,
Matrix2D  m 
)
static

Creates a linear transformation (matrix transformation).

Linear interpolation is used for the transformation.

Parameters
imgSource image.
mMatrix to transform img .
Returns
Newly created image.

◆ MapTo8Bit() [1/2]

static Image MapTo8Bit ( this Image  img)
static

Take an input image and scale the pixel values to fit into the 8 bit value range, using collective normalization.

Parameters
imgimage to be mapped
Returns
newly create image
Exceptions
ArgumentNullExceptionIf the input img is null
ObjectDisposedExceptionIf the input img has already been disposed

◆ MapTo8Bit() [2/2]

static Image MapTo8Bit ( this Image  img,
bool  collective 
)
static

Take an input image and scale the pixel values to fit into the 8 bit value range.

Parameters
imgimage to be mapped
collectiveIf true, the same normalization factors will be used for all planes, if false the normalization will be carried out independently for each plane
Returns
newly create image
Exceptions
ArgumentNullExceptionIf the input img is null
ObjectDisposedExceptionIf the input img has already been disposed

◆ NormalizeMeanVariance()

static Image NormalizeMeanVariance ( this Image  img,
double  targetMean,
double  targetVariance 
)
static

Normalize an input image using mean/variance normalization (the gray values of the image will be stretched modified to generate a histogram as close as possible to the input target mean and variance values).

Parameters
imgimage to be normalized
targetMeantarget mean value to achieve
targetVariancetarget variance value to achieve
Returns
newly created image
Exceptions
ArgumentNullExceptionIf the input img is null
ObjectDisposedExceptionIf the input img has already been disposed

◆ NormalizeMinMax()

static Image NormalizeMinMax ( this Image  img,
double  targetMin,
double  targetMax 
)
static

Normalize an input image using min/max normalization (the gray values of the image will be stretched or compressed to fit the input target minimum and maximum values).

Parameters
imgimage to be normalized
targetMintarget minimum value to achieve
targetMaxtarget maximum value to achieve
Returns
newly created image
Exceptions
ArgumentNullExceptionIf the input img is null
ObjectDisposedExceptionIf the input img has already been disposed

◆ PolarTransform() [1/2]

static Image PolarTransform ( this Image  img,
Point2Dd  center,
double  innerRadius,
double  outerRadius 
)
static

Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image).

Linear interpolation is being used for the transformation.

Parameters
imgSource image
centerCenter image for the polar transform
innerRadiusInner radius of the ring
outerRadiusOuter radius of the ring
Returns
Newly created image.

◆ PolarTransform() [2/2]

static Image PolarTransform ( this Image  img,
Point2Dd  center,
double  innerRadius,
double  outerRadius,
Angle  startAngle,
Angle  totalAngle 
)
static

Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image).

Linear interpolation is being used for the transformation.

Parameters
imgSource image
centerCenter image for the polar transform
startAngleOrientation of the start angle
totalAngleThe total angle to cover
innerRadiusInner radius of the ring
outerRadiusOuter radius of the ring
Returns
Newly created image.