CVB++ 15.0
Cvb::Foundation Namespace Reference

Namespace for the Foundation package. More...

Namespaces

namespace  AddNoise
 Namespace for collection of noise-generating functions from the Foundation package.
 
namespace  Analysis
 Namespace for collection of miscellaneous image analysis functions.
 
namespace  Arithmetic
 Namespace for collection of arithmetic functions from the Foundation package.
 
namespace  BayerConversion
 Namespace for collection of functions converting images with a Bayer pattern.
 
namespace  Bitwise
 Namespace for collection of bitwise image functions from the Foundation package.
 
namespace  Blob
 Blob search methods.
 
namespace  CalibrationLineScan
 Namespace for collection of calibration linescan functions from the Foundation package.
 
namespace  Convert
 Various image conversion functions.
 
namespace  ConvertColorSpace
 Namespace for collection of color space conversion functions from the Foundation package.
 
namespace  Correlation
 Namespace for collection of functions that calculate different kinds of correlation values.
 
namespace  Curve
 Namespace for collection of 2D curve functions from the Foundation package.
 
namespace  Edge
 Collection of functions for edge detection.
 
namespace  Filter
 Namespace for collection of filter functions from the Foundation package.
 
namespace  GaussianPyramid
 Namespace for functions implementing a Gaussian pyramid approach from the Common Vision Blox Foundation package.
 
namespace  HistogramAnalyzer
 Collection of functions for analyzing the image histogram.
 
namespace  ImageExtensions
 Namespace for collection of image extension functions from the Foundation package.
 
namespace  Lut
 Namespace for collection of lookup table functions from the Foundation package.
 
namespace  Metric
 Namespace for metric calibration.
 
namespace  Moments
 Namespace for image moments related tools from the Foundation package.
 
namespace  Morphology
 Namespace for morphological filter operations available from the Common Vision Blox Foundation package.
 
namespace  Norm
 Namespace for collection of functions for calculating different norms over the gray values of an image.
 
namespace  Polarization
 Functions and type definitions of the polarization library.
 
namespace  Regression
 Various regression functions.
 
namespace  Scale
 Various image scaling functions.
 
namespace  TestImages
 Namespace for collection of test image generating functions from the Foundation package.
 
namespace  Threshold
 Namespace for collection of thresholding functions from the Foundation package.
 
namespace  Transform2D
 Namespace for collection of image 2D transformation functions from the Foundation package.
 

Classes

class  AlignmentConfiguration
 A set of parameters that configures an alignment operation. More...
 
class  AlignmentResult2D
 A set of parameters that stores the result of alignment operation. More...
 
class  BlobFilter
 Class to build a filter for the blob search. More...
 
class  BlobResult
 Container for a blob analysis result. More...
 
class  ColorTwistMatrix
 Matrix defining color transformations. More...
 
class  EdgeDetectionResult
 Result of the function DetectEdgesOfStripeTarget. More...
 
class  EdgeResult
 Edge search result More...
 
class  EdgeResultPair
 A pair of found edges. More...
 
class  Histogram
 A single histogram result. More...
 
class  HuMoments
 Results of Hu Moment calculation. More...
 
class  ImageMoments
 State object for calculating various image moments. More...
 
class  LineScanCalibrationConfiguration
 A set of parameters, which is used to configure linescan calibration calculated with function CreateLineScanCalibration. More...
 
class  LineScanCalibrator
 Result of the linescan calibration executed by the CreateLineScanCalibration function. More...
 
class  LutLevel
 Struct that combines a LUT (lookup table) level and the value assigned to this level. More...
 
class  NonLinearTransformation
 Object implementing the non linear polynomially approximated transform implemented in the CVB Foundation package. More...
 
class  PerspectiveTransformation
 Perspective transformation coefficients. More...
 
class  Projection
 Projection that the Edge analysis of Common Vision Blox is using. More...
 
class  ProjectionValue
 Single projection value. More...
 

Typedefs

using LineScanCalibratorPtr
 Convenience shared pointer for LineScanCalibrator.
 
typedef std::shared_ptr< ProjectionProjectionPtr
 Convenience shared pointer for Projection.
 
typedef std::shared_ptr< ProjectionProjectionPtr
 Convenience shared pointer for Projection.
 
typedef std::shared_ptr< ImageMomentsImageMomentsPtr
 Convenience shared pointer for ImageMoments.
 
typedef std::shared_ptr< NonLinearTransformationNonLinearTransformationPtr
 Convenience shared pointer for NonLinearTransformation.
 

Enumerations

enum class  PixelOverflow
 Defines how arithmetic overflows and underflows are handled.
 
enum class  SqrtPixelScaling
 Defines the post processing of the Sqrt function.
 
enum class  BayerPattern
 Bayer pattern of the sensor used to acquire the image to be converted. More...
 
enum class  GammaCorrection
 Different gamma corrections that can be applied while converting from Bayer pattern to RGB.
 
enum class  RGBConversion
 Available conversion modes from Bayer patterns to RGB images.
 
enum class  BlobBorderFilter
 Enumeration for filtering blobs that touch the boundaries of the AOI specified for blob extraction. More...
 
enum class  BlobRangeFilter
 Defines the attribute for a blob filter range.
 
enum class  PreDefinedPixelSizeMode
 Specifies if the predefined pixel resolution is used for the metric calibration.
 
enum class  ScanDirection
 Specifies the scanning direction. More...
 
enum class  CorrelationMethod
 Correlation calculation methods.
 
enum class  PreAlignmentMode
 Specifies if the pre-alignment is required.
 
enum class  StartSelectionMode
 Decides which start point should be used for the new curve.
 
enum class  EdgeSearchMode
 Determines the algorithm for finding an edge.
 
enum class  EdgeType
 Type of the edges to be searched.
 
enum class  ProjectionMode
 Options affecting the result of the projection.
 
enum class  EdgeFilter
 Edge filter modes. Currently only used by Canny().
 
enum class  FilterOrientation
 Orientation options for edge filters.
 
enum class  FixedFilterSize
 Filter size values for filters using a fixed or discrete sized kernel. More...
 
enum class  RobertsDirection
 Directions of the Roberts edge filter.
 
enum class  LutInterpolation
 Different approaches for interpolating between lookup table (LUT) values and levels.
 
enum class  MomentsCalculation
 Choose between speed and accuracy during image moment calculation.
 
enum class  MomentsNormalization
 Available normalization modes for moment calculations.
 
enum class  MomentsOrder
 Enumerated order for x and y central or spatial moments.
 
enum class  DistanceNorm
 Norm for calculating distances.
 
enum class  MorphologyMask
 Available morphology masks.
 
enum class  ValueNormalization
 Available normalization modes for norm calculations.
 
enum class  ImageResolution
 Possible up sampling modes for extracted polarization planes.
 
enum class  Pattern
 Possible patterns of raw polarization images.
 
enum class  PseudoColorMode
 Available colorization modes to visualize polarization.
 
enum class  TestImageDataType
 Data types usable for test image generation.
 
enum class  DynamicThresholdNorm
 Norm calculation approaches for dynamic thresholding.
 
enum class  StaticThresholding
 Comparisons for static thresholding.
 
enum class  Axis
 Axis enumeration.
 
enum class  Interpolation
 Interpolation modes available inside the Foundation package.
 
enum class  CalibrationPatternContrast
 Definition of the contrast of the pattern used for automatic calibration.
 
enum class  CalibrationPatternFormat
 Definition of the paper format used for printing calibration patterns.
 
enum class  CalibrationPatternOrientation
 Format orientation for the CalibrationPatternFormat.
 
enum class  CalibrationPatternStyle
 Definition of the calibration pattern style used for automatic calibration.
 

Functions

std::unique_ptr< ImageAddGaussNoise (const Image &image, double mean, double stdDev, int seed)
 Add noise with Gaussian distribution to an image.
 
std::unique_ptr< ImageAddUniformNoise (const Image &image, double lowest, double highest, int seed)
 Add noise with uniform distribution to an image.
 
void LocalEigenValuesAndVectors (const ImagePlane &plane, Filter::FixedFilterSize derivatorSize, Filter::FixedFilterSize blurSize, std::unique_ptr< Image > &lambda1, std::unique_ptr< Image > &lambda2, std::unique_ptr< Image > &eigenValue1x, std::unique_ptr< Image > &eigenValue1y, std::unique_ptr< Image > &eigenValue2x, std::unique_ptr< Image > &eigenValue2y)
 Calculate the local eigenvalues and eigenvectors of the Hesse matrix applied to the pixels of the input image.
 
std::unique_ptr< ImageLocalMinEigenValues (const ImagePlane &plane, Filter::FixedFilterSize derivatorSize, Filter::FixedFilterSize blurSize)
 Calculate the minimum local eigenvalues of the Hesse matrix applied to the pixels of the input image.
 
double WangQuality (const ImagePlane &plane1, const ImagePlane &plane2)
 Calculate the Wang quality for two images.
 
std::unique_ptr< ImageAbsolute (const Image &image)
 Determines the absolute values of the pixels in the input image.
 
std::unique_ptr< ImageAdd (const Image &image1, const Image &image2, PixelOverflow overflow)
 Add the pixel values of both input images to obtain the output image.
 
std::unique_ptr< ImageDivide (const Image &image1, const Image &image2, int upShift)
 Divide the pixel values of image1 by the pixel values of image 2 to obtain the output image and shift them up by upShift bits to preserve information.
 
std::unique_ptr< ImageMultiply (const Image &image1, const Image &image2, PixelOverflow overflow)
 Multiply the pixel values of both input images to obtain the output image.
 
std::unique_ptr< ImageSqrt (const Image &image, SqrtPixelScaling scaling)
 Calculates the square roots of pixel values of a source image and writes them into the destination image.
 
std::unique_ptr< ImageSquare (const Image &image, PixelOverflow overflow)
 Squares the pixel values of the input image to obtain the output image.
 
std::unique_ptr< ImageSubtract (const Image &image1, const Image &image2)
 Subtract the pixel values of image 2 from image 1 to obtain the output image.
 
std::unique_ptr< ImageSubtractAbs (const Image &image1, const Image &image2)
 Subtract the pixel values of image 2 from image 1 to obtain the output image.
 
std::unique_ptr< ImageBayerToMono (const Image &image, BayerPattern pattern, RGBConversion conversion, GammaCorrection gamma=GammaCorrection::Gamma100, WhiteBalanceFactors whiteBalance=WhiteBalanceFactors::Identity())
 Convert a monochrome image with a Bayer pattern to a proper monochrome image.
 
void BayerToRGB (const Image &imageSrc, Image &imageDst, BayerPattern pattern, RGBConversion conversion, GammaCorrection gamma=GammaCorrection::Gamma100, WhiteBalanceFactors whiteBalance=WhiteBalanceFactors::Identity())
 Convert a Bayer-pattern image to an RGB image.
 
std::unique_ptr< ImageCreateDestinationImage (int width, int height, RGBConversion mode)
 Create a destination image for Bayer to RGB conversions.
 
WhiteBalanceFactors GetWhiteBalance (const Image &image, BayerPattern pattern, Area2D aoi)
 Determine a suitable white balance from a monochrome image with Bayer pattern.
 
std::unique_ptr< ImageRGBToBayer (const Image &image, BayerPattern pattern)
 Convert an RGB image to a monochrome image with Bayer pattern.
 
std::unique_ptr< ImageAnd (const Image &image1, const Image &image2)
 Performs a bit-wise AND operation between the pixels of the two input images.
 
template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type DownShift (const Image &image, const RANGE &values)
 Bit-wise shift the input image with constant values.
 
std::unique_ptr< ImageNegate (const Image &image)
 Performs a bit-wise NOT operation on the pixels of the input image to create the output image.
 
std::unique_ptr< ImageOr (const Image &image1, const Image &image2)
 Performs a bit-wise OR operation between the pixels of the two input images.
 
template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type UpShift (const Image &image, const RANGE &values)
 Bit-wise shift the input image with constant values.
 
std::unique_ptr< ImageXor (const Image &image1, const Image &image2)
 Performs a bit-wise XOR operation between the pixels of the two input images.
 
std::vector< BlobResultBinarizeAndSearchBlobs (const ImagePlane &plane, ValueRange< int > binarizationThreshold)
 Searches for all blobs in the given image plane.
 
std::vector< BlobResultSearchBlobs (const Image &binarizedImage)
 Searches for all blobs in the given binarized image.
 
std::pair< Point2D< double >, Point2D< double > > CalculateTwoPointsForCalibrationOfMovement (const ImagePlane &imagePlane, const Area2D &aoi, Foundation::Transform2D::CalibrationPatternContrast contrast, int minContrast, const ValueRange< double > &pointSizeRange, const ScanDirection &scanDirection)
 Extracts two points which can be used for the calibration of the movement of linescan cameras.
 
std::unique_ptr< LineScanCalibratorCreateLineScanCalibration (const Point2D< double > &calibrationPoint1, const Point2D< double > &calibrationPoint2, double referenceDistanceCalibrationPoints, const EdgeDetectionResult &edgeDetectionResult, double referenceWidthStripes, const LineScanCalibrationConfiguration &configuration)
 Calibrates linescan cameras.
 
EdgeDetectionResult DetectEdgesOfStripeTarget (const Image &imageStripes, const Rect< int > &aoi, int numStripes, const ScanDirection &scanDirection, double threshold)
 This function detects edges from a calibration pattern with alternating black and white stripes.
 
std::unique_ptr< ImageConvertTo16BppSigned (const Image &image)
 Convert the input image to an image with 16 bits per pixel signed data.
 
std::unique_ptr< ImageConvertTo16BppUnsigned (const Image &image)
 Convert the input image to an image with 16 bits per pixel unsigned data.
 
std::unique_ptr< ImageConvertTo32BppFloat (const Image &image)
 Convert the input image to an image with 32 bits per pixel float data.
 
std::unique_ptr< ImageConvertTo32BppSigned (const Image &image)
 Convert the input image to an image with 32 bits per pixel signed data.
 
std::unique_ptr< ImageConvertTo8BppUnsigned (const Image &image)
 Convert the input image to an image with 8 bits per pixel unsigned data.
 
std::unique_ptr< ImageConvertToCieLab16 (const Image &image)
 Convert the input image to CIE Lab with DataType::Int16BppUnsigned() for better precision.
 
std::unique_ptr< ImageConvertToCieLab8 (const Image &image)
 Convert the input image to CIE Lab with DataType::Int8BppUnsigned().
 
std::unique_ptr< ImageConvertToCieLUV (const Image &image)
 Convert the input image to CIE LUV.
 
std::unique_ptr< ImageConvertToCieXYZ (const Image &image)
 Convert the input image to CIE XYZ.
 
std::unique_ptr< ImageConvertToHLS (const Image &image)
 Convert the input image to HLS.
 
std::unique_ptr< ImageConvertToHSV (const Image &image)
 Convert the input image to HSV.
 
std::unique_ptr< ImageConvertToMono (const Image &image)
 Convert the input image to mono.
 
std::unique_ptr< ImageConvertToRGB (const Image &image, ColorModel guessToColorModel=ColorModel::RGB)
 Convert the input image to RGB.
 
std::unique_ptr< ImageConvertToYCbCr (const Image &image)
 Convert the input image to YCbCr.
 
std::unique_ptr< ImageConvertToYCC (const Image &image)
 Convert the input image to YCC.
 
std::unique_ptr< ImageConvertToYUV (const Image &image)
 Convert the input image to YUV.
 
template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type SwapChannels (const Image &image, const RANGE &newArrangement)
 Create a new image by rearranging the planes of the input image.
 
std::unique_ptr< ImageTwistColors (const Image &image, ColorTwistMatrix matrix)
 Apply the color twist matrix to the input image.
 
std::unique_ptr< ImageCorrelate (const ImagePlane &imagePlane, const ImagePlane &templatePlane, Rect< int > aoi, CorrelationMethod method)
 Calculate the correlation between a plane and a template using a selectable calculation method.
 
std::vector< LocalMaximumFindMatches (const ImagePlane &imagePlane, const ImagePlane &templatePlane, double threshold, int locality, Rect< int > aoi, SubPixelMode subPixMode=SubPixelMode::ParabolicFast, Neighborhood subPixRadius=Neighborhood::Use3x3)
 Use the correlation coefficient calculation method to find locations in the input image plane that match the given template.
 
AlignmentResult2D AlignCurve (const std::vector< Point2D< double > > &curve, const std::vector< Point2D< double > > &curveToBeAligned, const AlignmentConfiguration &config=AlignmentConfiguration())
 Aligns two 2D curves via an iterative closest point method considering consensus correspondence for better shape alignment.
 
double CalculateEnclosedArea (const std::vector< Point2D< double > > &curve)
 Calculates the enclosed area of the given curve.
 
Matrix2D CalculateQuadraticDifferencesToClosestPoint (const std::vector< Point2D< double > > &curve, const std::vector< Point2D< double > > &points)
 Calculates the quadratic distance of the points to the closest point of the given curve.
 
std::vector< double > CalculateSignedDifferences (const std::vector< Point2D< double > > &curve, const std::vector< Point2D< double > > &points)
 Calculates signed differences along the y axis of given points to curve (curve - points).
 
std::vector< Point2D< double > > IntersectWithLine (const std::vector< Point2D< double > > &curve, const Line2D &line)
 Intersects a 2D curve with a line.
 
std::vector< Point2D< double > > MergeTwoCurves (const std::vector< Point2D< double > > &curveLHS, const std::vector< Point2D< double > > &curveRHS, const StartSelectionMode &mode)
 Merges two curves into one curve with interpolation.
 
std::vector< Point2D< double > > ResampleCurve (const std::vector< Point2D< double > > &curve, int resampledCurveLength)
 Resamples a 2-dimensional curve via linear interpolation assuming that the "speed" of the time mapping is constant.
 
std::vector< EdgeResultFindAllEdges (const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold, Area2D aoi, double density=1.0)
 Find all edges inside the aoi.
 
EdgeResult FindBestEdge (const ImagePlane &plane, EdgeType type, Area2D aoi, double density=1.0)
 Use the 2nd derivative method to find the edge with the highest intensity in the area of interest.
 
EdgeResultPair FindEdgePair (const ImagePlane &plane, EdgeSearchMode mode, EdgeType type1, double threshold1, EdgeType type2, double threshold2, Area2D aoi, double density=1.0)
 Find an edge pair (as specified) in the aoi.
 
EdgeResult FindFirstEdge (const ImagePlane &plane, EdgeSearchMode mode, EdgeType type, double threshold, Area2D aoi, double density=1.0)
 Find the first edge (as specified) in the aoi.
 
void WriteProjection (const ImagePlane &plane, Area2D aoi, double density=1.0)
 Write the projection that Edge is using internally as the basis for its calculations into an image plane (might be useful for debugging).
 
std::unique_ptr< ImageBoxMax (const Image &image, Size2D< int > maskSize, Point2D< int > maskOffset)
 This function sets each pixel in the output image to the maximum value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.
 
std::unique_ptr< ImageBoxMean (const Image &image, Size2D< int > maskSize, Point2D< int > maskOffset)
 This function sets each pixel in the output image to the average of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.
 
std::unique_ptr< ImageBoxMedian (const Image &image, Size2D< int > maskSize, Point2D< int > maskOffset)
 This function sets each pixel in the output image to the median value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.
 
std::unique_ptr< ImageBoxMin (const Image &image, Size2D< int > maskSize, Point2D< int > maskOffset)
 This function sets each pixel in the output image to the minimum value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.
 
std::unique_ptr< ImageCanny (const ImagePlane &imagePlane, Filter::EdgeFilter edgeFilter, int lowerThreshold, int upperThreshold)
 Edge filter using the Canny algorithm.
 
std::unique_ptr< ImageColorMedian (const Image &image, Filter::FixedFilterSize maskType)
 Apply a color-correct box median filter to an RGB image.
 
std::unique_ptr< ImageGauss (const Image &image, Filter::FixedFilterSize size)
 This function applies a low high pass Gaussian filter to an image.
 
std::unique_ptr< ImageHighPass (const Image &image, Filter::FixedFilterSize size)
 This function applies a square high pass filter to an image.
 
std::unique_ptr< ImageLaplace (const Image &image, Filter::FixedFilterSize size)
 This function applies a square high pass Laplace filter to an image.
 
std::unique_ptr< ImageLowPass (const Image &image, Filter::FixedFilterSize size)
 This function applies a square low pass filter to an image.
 
std::unique_ptr< ImagePrewitt (const Image &image, Filter::FilterOrientation orientation)
 Applies a Prewitt edge filter to the input image.
 
std::unique_ptr< ImageRoberts (const Image &image, Filter::RobertsDirection direction)
 Apply a Roberts edge detector to the input image.
 
std::unique_ptr< ImageScharr (const Image &image, Filter::FilterOrientation orientation)
 Applies a Scharr edge filter to the input image.
 
std::unique_ptr< ImageSharpen (const Image &image)
 This function applies a Filter::FixedFilterSize::Kernel3x3 sharpen filter to an image.
 
std::unique_ptr< ImageSobel (const Image &image, Filter::FilterOrientation orientation, Filter::FixedFilterSize maskSize)
 Applies a Sobel edge filter to the input image.
 
std::unique_ptr< ImageSobel2nd (const Image &image, Filter::FilterOrientation orientation, Filter::FixedFilterSize maskSize)
 Applies a 2nd order Sobel edge filter to the input image.
 
std::unique_ptr< ImageSobel2ndCross (const Image &image, Filter::FixedFilterSize maskSize)
 Applies a 2nd order Sobel cross edge filter to the input image.
 
std::unique_ptr< ImageWiener (const Image &image, Size2D< int > maskSize, Point2D< int > maskOffset, double noiseThreshold=0.0)
 This function performs adaptive filtering of an image degraded by constant power additive noise.
 
std::unique_ptr< ImageGaussianPyramidDown (const Image &image)
 This function down samples an image in the sense of a Gaussian pyramid.
 
std::unique_ptr< ImageGaussianPyramidUp (const Image &image)
 This function up samples an image in the sense of a Gaussian pyramid.
 
std::vector< HistogramCreateImageHistograms (const Image &image, Rect< int > aoi, double density=1.0)
 Creates a histogram for each plane of the aoi in the given image.
 
Histogram CreatePlaneHistogram (const ImagePlane &imagePlane, Rect< int > aoi, double density=1.0)
 Creates a histogram for the aoi in the given plane.
 
template<class HISTVAL, class RANGE>
TypedRange< std::vector< double >, double, RANGE >::type FilterHistogram (const std::vector< HISTVAL > &histogram, const RANGE &kernel)
 Filter a histogram array with the given kernel. At the beginning and end of the histogram, the histogram uses constant extension.
 
std::vector< int > FindHistogramPeaks (const std::vector< uint64_t > &histogram, int blurSize, int minDiff)
 Find peaks in the histogram identified by the supplied criteria.
 
uint64_t SumHistogramBetween (const std::vector< uint64_t > &histogram, int lowerLimit, int upperLimit)
 Count the number of pixels that lie between two limits in the histogram.
 
template<class RANGE>
TypedRange< void, double, RANGE >::type InitAOI (Image &image, Rect< int > aoi, const RANGE &values)
 Initialize the planes of AOI (area of interest) in this image to different values.
 
template<class RANGE>
TypedRange< void, double, RANGE >::type InitImage (Image &image, const RANGE &values)
 Initialize the planes of this image to different values.
 
std::unique_ptr< ImageSubImage (const Image &image, Area2D aoi, Interpolation interpolation=Interpolation::Linear)
 Extract the content of an AOI (area of interest) into a new image.
 
template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type ApplyLut (const ImagePlane &plane, const RANGE &values)
 Apply a lookup table to an 8 bit per pixel input image plane.
 
std::unique_ptr< ImageClose (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform a close operation with a selectable filter mask.
 
std::unique_ptr< ImageDilate (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform a dilation operation with a selectable filter mask.
 
std::unique_ptr< ImageDistanceTransform (const ImagePlane &plane, Filter::FixedFilterSize maskSize, DistanceNorm norm)
 This function calculates (and writes into the output image) the distance to the closest pixel in the source image with the value zero for all nonzero pixels in the input image.
 
std::unique_ptr< ImageErode (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform an erosion operation with a selectable filter mask.
 
std::unique_ptr< ImageOpen (const Image &image, MorphologyMask maskType, Size2D< int > maskSize, Point2D< int > maskOffset)
 Perform an open operation with a selectable filter mask.
 
double NormL1 (const ImagePlane &plane, ValueNormalization normalize, Rect< int > aoi)
 Calculate and return the L1 norm (sum of absolute values) over all the pixels inside the plane.
 
double NormL2 (const ImagePlane &plane, ValueNormalization normalize, Rect< int > aoi)
 Calculate and return the L2 norm (euclidean norm) over the pixels inside the plane.
 
double NormLInf (const ImagePlane &plane, ValueNormalization normalize, Rect< int > aoi)
 Calculate and return the L infinity norm (maximum norm) over the pixels inside the plane.
 
std::unique_ptr< ImageCalculateMinReflectionImage (const Image &polarizationImage)
 From an extracted polarizationImage the minimum reflection image is calculated and returned.
 
std::unique_ptr< ImageCalculateStokes0 (const Image &polarizationImage)
 From an extracted polarizationImage a new image is returned with the Stokes 0 as content.
 
std::unique_ptr< ImageCalculateStokes1 (const Image &polarizationImage)
 From an extracted polarizationImage a new image is returned with the Stokes 1 as content.
 
std::unique_ptr< ImageCalculateStokes2 (const Image &polarizationImage)
 From an extracted polarizationImage a new image is returned with the Stokes 2 as content.
 
std::unique_ptr< ImageCalculateStokesImage (const Image &polarizationImage)
 From an extracted polarizationImage a new image is returned with the Stokes 0 to 2 as planes.
 
std::unique_ptr< ImageColorizeStokesImage (const Image &stokesImage, const PseudoColorMode &colorMode)
 An extracted stokesImage is colorized in a chosen way to visualize the polarization.
 
std::unique_ptr< ImageConvertToPlanes (const Image &rawImage, const Pattern pattern, const ImageResolution resolution)
 Extracts the four polarization angles from a raw image to a four plane image.
 
template<class RANGE>
TypedRange< Circle, Point2D< double >, RANGE >::type CircleRegression (const RANGE &points)
 Create a circle, that fits best into a collection of points.
 
template<class RANGE>
TypedRange< Ellipse, Point2D< double >, RANGE >::type EllipseRegression (const RANGE &points)
 Create an ellipse, that fits best into a collection of points.
 
template<class RANGE>
TypedRange< Line2D, Point2D< double >, RANGE >::type LineRegression (const RANGE &points)
 Create a line, that fits best into a collection of points.
 
std::unique_ptr< ImageScaleTo16BppSigned (const Image &image)
 Convert the input image to an image with 16 bits per pixel signed data.
 
std::unique_ptr< ImageScaleTo16BppUnsigned (const Image &image)
 Convert the input image to an image with 16 bits per pixel unsigned data.
 
std::unique_ptr< ImageScaleTo32BppFloat (const Image &image, double minVal, double maxVal)
 Convert the input image to an image with 32 bits per pixel float data.
 
std::unique_ptr< ImageScaleTo32BppSigned (const Image &image)
 Convert the input image to an image with 32 bits per pixel signed data.
 
std::unique_ptr< ImageScaleTo8BppUnsigned (const Image &image)
 Convert the input image to an image with 8 bits per pixel unsigned data.
 
std::unique_ptr< ImageCreateJaehneImage (Size2D< int > size, int numPlanes, TestImageDataType dataType)
 Create a filter test image as suggested by Prof. Jaehne, suitable for investigating the isotropy characteristics of a filter.
 
std::unique_ptr< ImageCreateRampImage (Size2D< int > size, int numPlanes, TestImageDataType dataType, Axis axis, double offset=0.0, double slope=1.0)
 Create a gray ramp test image.
 
std::unique_ptr< ImageDynamicThreshold (const Image &image, int windowSize, int threshold, DynamicThresholdNorm norm=DynamicThresholdNorm::Mean)
 This function performs dynamic thresholding on the input image.
 
std::unique_ptr< ImageStaticThreshold (const Image &image, const Image &thresholds, StaticThresholding comparison)
 This function performs thresholding of an input image with pixel-by-pixel thresholds stored in the pixels of a thresholds image.
 
template<class RANGE>
TypedRange< std::unique_ptr< Image >, double, RANGE >::type StaticTransparentThreshold (const Image &image, const RANGE &thresholds, StaticThresholding comparison, const RANGE &values)
 Create a thresholded image using a transparency approach.
 
std::unique_ptr< ImageRangeThreshold (const ImagePlane &plane, ValueRange< int > range, Rect< int > aoi)
 A range based binarization algorithm to the given input.
 
void RangeThresholdToDst (const ImagePlane &plane, ValueRange< int > range, Image &imageDst, Rect< int > aoi)
 A range based binarization algorithm to the given input.
 
std::unique_ptr< ImageMatrixTransform (const Image &image, const Matrix2D &matrix, Interpolation interpolation=Interpolation::Linear)
 Use a matrix to transform an image.
 
std::unique_ptr< ImageMirror (const Image &image, Axis axis)
 Mirror the input image on the x and/or y axis.
 
std::unique_ptr< ImagePerspective (const Image &image, const PerspectiveTransformation &coeffs, Size2D< int > targetSize, Interpolation interpolation=Interpolation::Linear)
 Apply the perspective transformation coefficients to the image.
 
std::unique_ptr< ImageResize (const Image &image, Size2D< int > targetSize, Interpolation interpolation=Interpolation::Linear)
 Resize the input image.
 
std::unique_ptr< ImageRotate (const Image &image, Angle angle, Interpolation interpolation=Interpolation::Linear)
 Rotate the input image by the given angle.
 
std::unique_ptr< ImageShear (const Image &image, double shearX, double shearY, Interpolation interpolation=Interpolation::Linear)
 Shear the input image.
 
std::unique_ptr< ImageCreateCalibrationPattern (CalibrationPatternStyle style, CalibrationPatternContrast contrast, int width, int height, int numColumns, int numRows)
 Create a user-definable calibration pattern.
 
std::unique_ptr< ImageCreatePrintableCalibrationPattern (CalibrationPatternStyle style, CalibrationPatternContrast contrast, CalibrationPatternFormat paperSize, CalibrationPatternOrientation orientation, int numColumns, int numRows, double horizontalBorder, double verticalBorder, int dpi)
 Create a user-definable calibration pattern suitable for printing on a sheet of paper.
 
void ExtractCalibrationLists (const ImagePlane &plane, CalibrationPatternStyle style, CalibrationPatternContrast contrast, int gridSpacing, int minContrast, double maxRatio, Area2D aoi, std::vector< Point2D< double > > &originalPixels, std::vector< Point2D< double > > &transformedPixels)
 Automatically extracts the pixel lists required for creating a NonLinearTransformation object.
 

Detailed Description

Namespace for the Foundation package.

Remarks
CMake users: Link to imported target CVB::CvbFoundation
This adds all libraries in the Foundation package, for less see subnamespaces.

Enumeration Type Documentation

◆ BayerPattern

enum class BayerPattern
strong

Bayer pattern of the sensor used to acquire the image to be converted.

The enums refer to the top left pixel and the pixel next to it.

◆ BlobBorderFilter

enum class BlobBorderFilter : std::uint32_t
strong

Enumeration for filtering blobs that touch the boundaries of the AOI specified for blob extraction.

These values can be OR combined.

◆ FixedFilterSize

enum class FixedFilterSize
strong

Filter size values for filters using a fixed or discrete sized kernel.

Please refer to the respective filter's documentation, as not all filters support all filter kernel sizes. Functions, that used fixed size filter masks, are implicitly always assuming the mask to be centered around the center pixel.

◆ ScanDirection

enum class ScanDirection
strong

Specifies the scanning direction.

The scanning direction has to be set in the configuration object LineScanCalibrationConfiguration used by the linescan calibration CreateLineScanCalibration.

Function Documentation

◆ Absolute()

std::unique_ptr< Image > Absolute ( const Image & image)
inline

Determines the absolute values of the pixels in the input image.

Parameters
[in]imageInput image.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

Of course calling this function on an image with unsigned pixels will have no effect.

◆ Add()

std::unique_ptr< Image > Add ( const Image & image1,
const Image & image2,
PixelOverflow overflow )
inline

Add the pixel values of both input images to obtain the output image.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
[in]overflowDefines how arithmetic overflow is handled.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ AddGaussNoise()

std::unique_ptr< Image > AddGaussNoise ( const Image & image,
double mean,
double stdDev,
int seed )
inline

Add noise with Gaussian distribution to an image.

Parameters
[in]imageImage to add the noise to.
[in]meanMean value of the gaussian distribution.
[in]stdDevStandard deviation of the gaussian distribution.
[in]seedSeed value for the pseudo random number generator.
Returns
Result image with added noise.
Exceptions
Anyexception derived from std::exception including CvbException.

Pixel values that exceed the image's value range are saturated at the minimum and maximum value.

◆ AddUniformNoise()

std::unique_ptr< Image > AddUniformNoise ( const Image & image,
double lowest,
double highest,
int seed )
inline

Add noise with uniform distribution to an image.

Parameters
[in]imageImage to add the noise to.
[in]lowestLower bound of the uniform distribution.
[in]highestUpper bound of the uniform distribution.
[in]seedSeed value for the pseudo random number generator.
Returns
Result image with added noise.
Exceptions
Anyexception derived from std::exception including CvbException.

Pixel values that exceed the image's value range are saturated at the minimum and maximum value.

◆ AlignCurve()

AlignmentResult2D AlignCurve ( const std::vector< Point2D< double > > & curve,
const std::vector< Point2D< double > > & curveToBeAligned,
const AlignmentConfiguration & config = AlignmentConfiguration() )
inline

Aligns two 2D curves via an iterative closest point method considering consensus correspondence for better shape alignment.

Parameters
[in]curveReference curve.
[in]curveToBeAlignedCurve to be aligned to curve.
[in]configConfiguration of alignment.
Returns
Alignment result.
Exceptions
Anyexception derived from std::exception including CvbException.

The method used here is a version of the ICP (iterative closest point) method. It uses a consensus metric to find the correspondence between points to stabilize the iterations needed in the alignment method. It supports only rigid transformations for the alignment.

If not enough points within a given consent are found a classical ICP step is performed by finding correspondences solely based on nearest neighbours without any feasibility check.

◆ And()

std::unique_ptr< Image > And ( const Image & image1,
const Image & image2 )
inline

Performs a bit-wise AND operation between the pixels of the two input images.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ ApplyLut()

template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type ApplyLut ( const ImagePlane & plane,
const RANGE & values )
inline

Apply a lookup table to an 8 bit per pixel input image plane.

Parameters
[in]planePlane to which the lookup table is to be applied.
[in]valuesThe lookup table as a range of integers (must have at least 256 entries). Exceed is ignored.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ BayerToMono()

std::unique_ptr< Image > BayerToMono ( const Image & image,
BayerPattern pattern,
RGBConversion conversion,
GammaCorrection gamma = GammaCorrection::Gamma100,
WhiteBalanceFactors whiteBalance = WhiteBalanceFactors::Identity() )
inline

Convert a monochrome image with a Bayer pattern to a proper monochrome image.

Parameters
[in]imageImage to be converted.
[in]patternPattern in the top left corner of the sensor with which image was acquired.
[in]conversionConversion method.
[in]gammaGamma correction.
[in]whiteBalanceWhite balance.
Returns
Newly created image that contains the conversion result.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ BayerToRGB()

void BayerToRGB ( const Image & imageSrc,
Image & imageDst,
BayerPattern pattern,
RGBConversion conversion,
GammaCorrection gamma = GammaCorrection::Gamma100,
WhiteBalanceFactors whiteBalance = WhiteBalanceFactors::Identity() )
inline

Convert a Bayer-pattern image to an RGB image.

Parameters
[in]imageSrcMonochrome image with the Bayer pattern to be converted.
[in]imageDstDestination to receive the conversion results (preferably created by CreateDestinationImage()).
[in]patternPattern in the top left corner of the sensor with which imageDst was acquired.
[in]conversionConversion method.
[in]gammaGamma correction.
[in]whiteBalanceWhite balance.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ BinarizeAndSearchBlobs()

std::vector< BlobResult > BinarizeAndSearchBlobs ( const ImagePlane & plane,
ValueRange< int > binarizationThreshold )
inline

Searches for all blobs in the given image plane.

Parameters
[in]planeImage plane to process.
[in]binarizationThresholdMinimum and maximum gray values (inclusive) to be considered as an object.
Returns
Unordered blob results.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ BoxMax()

std::unique_ptr< Image > BoxMax ( const Image & image,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

This function sets each pixel in the output image to the maximum value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.

Parameters
[in]imageImage to be filtered.
[in]maskSizeFilter mask to be used.
[in]maskOffsetMask center pixel location.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

This has the effect of smoothing or blurring the input image.

◆ BoxMean()

std::unique_ptr< Image > BoxMean ( const Image & image,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

This function sets each pixel in the output image to the average of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.

Parameters
[in]imageImage to be filtered.
[in]maskSizeFilter mask to be used.
[in]maskOffsetMask center pixel location.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

This has the effect of smoothing or blurring the input image.

◆ BoxMedian()

std::unique_ptr< Image > BoxMedian ( const Image & image,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

This function sets each pixel in the output image to the median value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.

Parameters
[in]imageImage to be filtered.
[in]maskSizeFilter mask to be used.
[in]maskOffsetMask center pixel location.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

This has the effect of smoothing or blurring the input image.

◆ BoxMin()

std::unique_ptr< Image > BoxMin ( const Image & image,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

This function sets each pixel in the output image to the minimum value of all the input image pixels in the rectangular neighborhood defined by the maskSize and the maskOffset parameters.

Parameters
[in]imageImage to be filtered.
[in]maskSizeFilter mask to be used.
[in]maskOffsetMask center pixel location.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

This has the effect of smoothing or blurring the input image.

◆ CalculateEnclosedArea()

double CalculateEnclosedArea ( const std::vector< Point2D< double > > & curve)
inline

Calculates the enclosed area of the given curve.

Parameters
[in]curveCurve.
Returns
The enclosed area of the given curve.
Exceptions
Anyexception derived from std::exception including CvbException.

Uses the shoelace algorithm to calculate the enclosed area of the given curve. All points are assumed to be in order, clockwise or anti clockwise will not affect the outcome. This algorithm can only handle not self intersecting curves, e.g. a figure eight curve will not work with this algorithm.

For numerical stabilization all points are shifted to be centered around the origin.

If the curve is not closed, i.e. the first and last point in the given point set don't match, the curve is closed automatically by connecting the first and last point.

Note
The points on the curve are evaluated in the order in which they are listed. We assume an ordered point set (not ordered by axis, but ordered according to the curve).

◆ CalculateMinReflectionImage()

std::unique_ptr< Image > CalculateMinReflectionImage ( const Image & polarizationImage)
inline

From an extracted polarizationImage the minimum reflection image is calculated and returned.

The minimum reflection image is calculated by taking the minimum value of all the polarization angles that are contained in the input image.

Parameters
polarizationImageInput image with extracted polarization data. Usually from ConvertToPlanes.
Returns
The resulting image with one plane.

◆ CalculateQuadraticDifferencesToClosestPoint()

Matrix2D CalculateQuadraticDifferencesToClosestPoint ( const std::vector< Point2D< double > > & curve,
const std::vector< Point2D< double > > & points )
inline

Calculates the quadratic distance of the points to the closest point of the given curve.

Parameters
[in]curveCurve.
[in]pointsPoints.
Returns
The closest point of the given curve
Exceptions
Anyexception derived from std::exception including CvbException.
Note
The points have to be ordered by time, i.e. two consecutive points must adjoin another on the curve.

For the calculation of the signed differences the curve is assumed to be infinite. It is extended at the starting and endpoint.

◆ CalculateSignedDifferences()

std::vector< double > CalculateSignedDifferences ( const std::vector< Point2D< double > > & curve,
const std::vector< Point2D< double > > & points )
inline

Calculates signed differences along the y axis of given points to curve (curve - points).

Parameters
[in]curveCurve.
[in]pointsPoints.
Returns
Array of signed differences, the length is given be the size of the points.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
The points have to be ordered by time, i.e. two consecutive points must adjoin another on the curve.

For the calculation of the signed differences the curve is assumed to be infinite. It is extended at the starting and endpoint.

◆ CalculateStokes0()

std::unique_ptr< Image > CalculateStokes0 ( const Image & polarizationImage)
inline

From an extracted polarizationImage a new image is returned with the Stokes 0 as content.

From an extracted polarization image Stokes 0 is calculated and returned. Stokes 0 is calculated as (0 + 45 + 90 + 135) * 0.25.

Parameters
polarizationImageInput image with extracted polarization data. Usually from ConvertToPlanes.
Returns
The resulting image with one plane.

◆ CalculateStokes1()

std::unique_ptr< Image > CalculateStokes1 ( const Image & polarizationImage)
inline

From an extracted polarizationImage a new image is returned with the Stokes 1 as content.

From an extracted polarization image Stokes 1 is calculated and returned.

Parameters
polarizationImageInput image with extracted polarization data. Usually from ConvertToPlanes.
Returns
The resulting image with one plane.

◆ CalculateStokes2()

std::unique_ptr< Image > CalculateStokes2 ( const Image & polarizationImage)
inline

From an extracted polarizationImage a new image is returned with the Stokes 2 as content.

From an extracted polarization image Stokes 2 is calculated and returned in outImage.

Parameters
polarizationImageInput image with extracted polarization data. Usually from ConvertToPlanes.
Returns
The resulting image with one plane.

s

◆ CalculateStokesImage()

std::unique_ptr< Image > CalculateStokesImage ( const Image & polarizationImage)
inline

From an extracted polarizationImage a new image is returned with the Stokes 0 to 2 as planes.

From a extracted polarization image the three first Stokes are calculated and returned. Stokes 0 is calculated as (0 + 45 + 90 + 135) * 0.25. The index of the plane represents the Stokes number.

Parameters
polarizationImageInput image with extracted polarization data. Usually from ConvertToPlanes.
Returns
The resulting image with 3 planes.

◆ CalculateTwoPointsForCalibrationOfMovement()

std::pair< Point2D< double >, Point2D< double > > CalculateTwoPointsForCalibrationOfMovement ( const ImagePlane & imagePlane,
const Area2D & aoi,
Foundation::Transform2D::CalibrationPatternContrast contrast,
int minContrast,
const ValueRange< double > & pointSizeRange,
const ScanDirection & scanDirection )
inline

Extracts two points which can be used for the calibration of the movement of linescan cameras.

The output of this function serves as input for the linescan calibration process executed by the CreateLineScanCalibration function.

If the image contains more than two points, the points which are nearest to the top and bottom edge (or left and right edge if ScanDirection is Y) are chosen.

Parameters
[in]imagePlaneAn image plane containing the calibration points.
[in]aoiArea of interest where the calibration points can be found.
[in]contrastSelects whether the image shows white on black or black on white dots.
[in]minContrastMinimum gray value contrast between the object and the background of the calibration points. Value to be set depends on the quality of the image taken.
[in]pointSizeRangeThe minimum and maximum size of the markers in the image in [number of pixels].
[in]scanDirectionScan direction of the camera.
Returns
first: X and Y coordinate of top calibration point if the ScanDirection is X, otherwise left point.
second: X and Y coordinate of bottom calibration point if the ScanDirection is X, otherwise right point.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Canny()

std::unique_ptr< Image > Canny ( const ImagePlane & imagePlane,
Filter::EdgeFilter edgeFilter,
int lowerThreshold,
int upperThreshold )
inline

Edge filter using the Canny algorithm.

Parameters
[in]imagePlaneImage plane to be filtered.
[in]edgeFilterEdge filter method to be used.
[in]lowerThresholdLower threshold for hysteresis thresholding.
[in]upperThresholdUpper threshold for edge detection and hysteresis thresholding.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The algorithm uses three stages:

  1. imagePlane is differentiated in x and y direction using the edgeFilter. From the two derivatives the direction and magnitude is computed.
  2. The directional information is simplified and then the local maximum along an edge contour is determined that lies above the upperThreshold.
  3. The contours are then traced starting from the local maximum using hysteresis thresholding with the lowerThreshold to counter broken edges.

◆ CircleRegression()

template<class RANGE>
TypedRange< Circle, Point2D< double >, RANGE >::type CircleRegression ( const RANGE & points)
inline

Create a circle, that fits best into a collection of points.

Parameters
[in]pointsPoints to fit circle in.
Returns
Circle object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Close()

std::unique_ptr< Image > Close ( const Image & image,
MorphologyMask maskType,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

Perform a close operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ ColorizeStokesImage()

std::unique_ptr< Image > ColorizeStokesImage ( const Image & stokesImage,
const PseudoColorMode & colorMode )
inline

An extracted stokesImage is colorized in a chosen way to visualize the polarization.

Depending on the colorMode the polarization of the input image is visualized in different ways. See the comments for PseudoColorMode on information what colorization modes are available.

Parameters
stokesImageInput image with calculated stokes from a polarization image. Usually from CalculateStokesImage.
colorModeThe PseudoColorMode that will be used to colorize the image.
Returns
The resulting image is a mono or rgb image, depending on the selected colorMode

◆ ColorMedian()

std::unique_ptr< Image > ColorMedian ( const Image & image,
Filter::FixedFilterSize maskType )
inline

Apply a color-correct box median filter to an RGB image.

Parameters
[in]imageImage to apply the filter to.
[in]maskTypeMask size to use.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The input image must have an RGB color model.

◆ ConvertTo16BppSigned()

std::unique_ptr< Image > ConvertTo16BppSigned ( const Image & image)
inline

Convert the input image to an image with 16 bits per pixel signed data.

Parameters
[in]imageImage to be converted.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

Conversion means that when converting to a data type with higher value range, the image data will simply be padded with zeros but the actual values will be conserved. When converting to lower value ranges, the pixel values from the source image will be saturated at the value limits of the target format where necessary.

◆ ConvertTo16BppUnsigned()

std::unique_ptr< Image > ConvertTo16BppUnsigned ( const Image & image)
inline

Convert the input image to an image with 16 bits per pixel unsigned data.

Parameters
[in]imageImage to be converted.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

Conversion means that when converting to a data type with higher value range, the image data will simply be padded with zeros but the actual values will be conserved. When converting to lower value ranges, the pixel values from the source image will be saturated at the value limits of the target format where necessary.

◆ ConvertTo32BppFloat()

std::unique_ptr< Image > ConvertTo32BppFloat ( const Image & image)
inline

Convert the input image to an image with 32 bits per pixel float data.

Parameters
[in]imageImage to be converted.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

Conversion means that when converting to a data type with higher value range, the image data will simply be padded with zeros but the actual values will be conserved. When converting to lower value ranges, the pixel values from the source image will be saturated at the value limits of the target format where necessary.

◆ ConvertTo32BppSigned()

std::unique_ptr< Image > ConvertTo32BppSigned ( const Image & image)
inline

Convert the input image to an image with 32 bits per pixel signed data.

Parameters
[in]imageImage to be converted.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

Conversion means that when converting to a data type with higher value range, the image data will simply be padded with zeros but the actual values will be conserved. When converting to lower value ranges, the pixel values from the source image will be saturated at the value limits of the target format where necessary.

◆ ConvertTo8BppUnsigned()

std::unique_ptr< Image > ConvertTo8BppUnsigned ( const Image & image)
inline

Convert the input image to an image with 8 bits per pixel unsigned data.

Parameters
[in]imageImage to be converted.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

Conversion means that when converting to a data type with higher value range, the image data will simply be padded with zeros but the actual values will be conserved. When converting to lower value ranges, the pixel values from the source image will be saturated at the value limits of the target format where necessary.

◆ ConvertToCieLab16()

std::unique_ptr< Image > ConvertToCieLab16 ( const Image & image)
inline

Convert the input image to CIE Lab with DataType::Int16BppUnsigned() for better precision.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToCieLab8()

std::unique_ptr< Image > ConvertToCieLab8 ( const Image & image)
inline

Convert the input image to CIE Lab with DataType::Int8BppUnsigned().

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToCieLUV()

std::unique_ptr< Image > ConvertToCieLUV ( const Image & image)
inline

Convert the input image to CIE LUV.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToCieXYZ()

std::unique_ptr< Image > ConvertToCieXYZ ( const Image & image)
inline

Convert the input image to CIE XYZ.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToHLS()

std::unique_ptr< Image > ConvertToHLS ( const Image & image)
inline

Convert the input image to HLS.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToHSV()

std::unique_ptr< Image > ConvertToHSV ( const Image & image)
inline

Convert the input image to HSV.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToMono()

std::unique_ptr< Image > ConvertToMono ( const Image & image)
inline

Convert the input image to mono.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToPlanes()

std::unique_ptr< Image > ConvertToPlanes ( const Image & rawImage,
const Pattern pattern,
const ImageResolution resolution )
inline

Extracts the four polarization angles from a raw image to a four plane image.

From a raw polarization image this function extracts the polarization angles to outImage. The returned image holds the polarization data as 4 planes sorted by increasing angle: 0, 45, 90, 135

The expected pattern of the raw image with Pattern::Square_90_45_135_0 for example is a 2x2 pattern with: Top-left: 90, Top-right: 45, Bottom-left: 135, Bottom-right: 0.

If resolution is set to <see cref="Resolution::full/> the image is interpolated and has the same size as rawImage, otherwise it will be half the size. </remarks> <param name="rawImage">Input image with raw polarization data.</param> <param name="pattern">Indicates in which pattern the polarization angles are ordered in \a rawImage.</param> <param name="resolution">Resolution of outImage. If set to <see cref="Resolution::Full/> the image is interpolated and will equal the size of rawImage, otherwise it will be half the size.

Returns
The resulting image with 4 planes.

◆ ConvertToRGB()

std::unique_ptr< Image > ConvertToRGB ( const Image & image,
ColorModel guessToColorModel = ColorModel::RGB )
inline

Convert the input image to RGB.

Parameters
[in]imageInput image.
[in]guessToColorModelInput color model to use, if image's color model is ColorModel::RGBGuess.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the color model is ColorModel::RGBGuess, then guessToColorModel is used. With that you can build your own images consisting of the desired color space and convert it to RGB.

◆ ConvertToYCbCr()

std::unique_ptr< Image > ConvertToYCbCr ( const Image & image)
inline

Convert the input image to YCbCr.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToYCC()

std::unique_ptr< Image > ConvertToYCC ( const Image & image)
inline

Convert the input image to YCC.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ ConvertToYUV()

std::unique_ptr< Image > ConvertToYUV ( const Image & image)
inline

Convert the input image to YUV.

Parameters
[in]imageInput image.
Returns
New converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the input image is something other than RGB, an internal conversion to RGB happens, increasing the processing time accordingly.

◆ Correlate()

std::unique_ptr< Image > Correlate ( const ImagePlane & imagePlane,
const ImagePlane & templatePlane,
Rect< int > aoi,
CorrelationMethod method )
inline

Calculate the correlation between a plane and a template using a selectable calculation method.

Parameters
[in]imagePlaneImage plane to perform the correlation on.
[in]templatePlaneTemplate plane to perform the correlation with.
[in]aoiArea of interest to perform the correlation on.
[in]methodCorrelation method to use.
Returns
Accumulator image (DataType::Float32Bpp).
Exceptions
Anyexception derived from std::exception including CvbException.

The result of the correlation will be an accumulator image with 32 bit floating point pixels containing the results. Note that the accumulator will be smaller than the input aoi, the difference being width (or height) of the template - 1. The template will be anchored at its central pixel (fractional positions cut off). In other words: The pixel (0, 0) of the accumulator corresponds to image position (int)(template width / 2, template height / 2) and its value will be a representation of the correlation between the input image and the template, centered around this very pixel.

◆ CreateCalibrationPattern()

std::unique_ptr< Image > CreateCalibrationPattern ( CalibrationPatternStyle style,
CalibrationPatternContrast contrast,
int width,
int height,
int numColumns,
int numRows )
inline

Create a user-definable calibration pattern.

Parameters
[in]styleDot style to use (see CalibrationPatternStyle).
[in]contrastSelects whether to use white on black or black on white dots (see CalibrationPatternContrast).
[in]widthWidth of the output image in pixels.
[in]heightHeight of the output image in pixels.
[in]numColumnsNumber of dot columns in the image.
[in]numRowsNumber of dot rows in the image.
Returns
Calibration pattern image.
Exceptions
Anyexception derived from std::exception including CvbException.

The calibration pattern will consist of a regular spaced matrix of dots, the size of which will be determined by the input parameters. The distance between the dots in x- and y-direction will be 2.5 times the diameter of the dots.
If an asymmetric pattern was selected, the bigger dots will have 2.5 times the area of the smaller dots (meaning that their radius is sqrt(2.5) times the radius of the small dots).

◆ CreateDestinationImage()

std::unique_ptr< Image > CreateDestinationImage ( int width,
int height,
RGBConversion mode )
inline

Create a destination image for Bayer to RGB conversions.

Parameters
[in]widthWidth of the input image to convert for.
[in]heightHeight of the input image to convert for.
[in]modeConversion mode to be used.
Returns
BayerToRGB destination image.
Exceptions
Anyexception derived from std::exception including CvbException.

Bayer to RGB conversions are also implemented as in-place operations, however the destination image needs to have a suitable width and height to be eligible. The destination width and height depends on the size of the input image as well as the conversion method.

◆ CreateImageHistograms()

std::vector< Histogram > CreateImageHistograms ( const Image & image,
Rect< int > aoi,
double density = 1.0 )
inline

Creates a histogram for each plane of the aoi in the given image.

Parameters
[in]imageImage to create histograms for.
[in]aoiArea of interest in CoordinateSystemType::PixelCoordinates.
[in]densityPercentage of pixels to process where 0 is 0% and 1.0 is 100%.
Returns
Vector containing the histograms for each image plane.
Exceptions
Anyexception derived from std::exception including CvbException.

Using the Rect<int> as an overlay uses the CoordinateSystemType::PixelCoordinates.

◆ CreateJaehneImage()

std::unique_ptr< Image > CreateJaehneImage ( Size2D< int > size,
int numPlanes,
TestImageDataType dataType )
inline

Create a filter test image as suggested by Prof. Jaehne, suitable for investigating the isotropy characteristics of a filter.

Parameters
[in]sizeSize of the image to be generated.
[in]numPlanesNumber of planes the image should have.
[in]dataTypeData type the image should have.
Returns
The test image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ CreateLineScanCalibration()

std::unique_ptr< LineScanCalibrator > CreateLineScanCalibration ( const Point2D< double > & calibrationPoint1,
const Point2D< double > & calibrationPoint2,
double referenceDistanceCalibrationPoints,
const EdgeDetectionResult & edgeDetectionResult,
double referenceWidthStripes,
const LineScanCalibrationConfiguration & configuration )
inline

Calibrates linescan cameras.

This function estimates coefficients of a 3rd order polynomial which calibrates linescan cameras. The polynomial corrects lens distortion as well as the camera's direction of movement (described by a scaling factor).

For the estimation of the lens distortion correction a pattern with alternating black and white stripes where the width of the stripes referenceWidthStripes is precisely known has to be acquired. For the camera's direction of movement a target with two circular markers can be used. The distance between the calibration points referenceDistanceCalibrationPoints has to be known, too. Note, that referenceWidthStripes and referenceDistanceCalibrationPoints must be provided in the same units.

In a first step the edges of the stripe target have to be detected via function DetectEdgesOfStripeTarget.

Second the two markers have to be extracted from the image via function CalculateTwoPointsForCalibrationOfMovement. Note, that if the encoder step of your setup is precisely known (e.g. in [mm/scanline]), you do not need to acquire an image with markers. You may manually define fictive calibration points and the corresponding reference distance:

double encoderStep = ... // mm/scanline
auto calibrationPoint1 = Cvb::Point2D<double>(0, 0); // first point
auto calibrationPoint2 = Cvb::Point2D<double>(1, 0); // second point
referenceDistanceCalibrationPoints = encoderStep; // reference distance between calibration points in[mm]
Multi-purpose 2D vector class.
Definition point_2d.hpp:20
Parameters
[in]calibrationPoint1First calibration point (left or top).
[in]calibrationPoint2Second calibration point (right or bottom).
[in]referenceDistanceCalibrationPointsReference distance between the two calibration points (same units as referenceWidthStripes).
[in]edgeDetectionResultResult returned by DetectEdgesOfStripeTarget.
[in]referenceWidthStripesReference width of stripes in calibration pattern (same units as referenceDistanceCalibrationPoints).
[in]configurationConfiguration of linescan calibration.
Returns
A linescan calibrator including a transformation and its quality.

◆ CreatePlaneHistogram()

Histogram CreatePlaneHistogram ( const ImagePlane & imagePlane,
Rect< int > aoi,
double density = 1.0 )
inline

Creates a histogram for the aoi in the given plane.

Parameters
[in]imagePlaneImage plane to create histogram for.
[in]aoiArea of interest in CoordinateSystemType::PixelCoordinates.
[in]densityPercentage of pixels to process where 0 is 0% and 1.0 is 100%.
Returns
Histogram for the given plane.
Exceptions
Anyexception derived from std::exception including CvbException.

Using the Rect<int> as an overlay uses the CoordinateSystemType::PixelCoordinates.

◆ CreatePrintableCalibrationPattern()

std::unique_ptr< Image > CreatePrintableCalibrationPattern ( CalibrationPatternStyle style,
CalibrationPatternContrast contrast,
CalibrationPatternFormat paperSize,
CalibrationPatternOrientation orientation,
int numColumns,
int numRows,
double horizontalBorder,
double verticalBorder,
int dpi )
inline

Create a user-definable calibration pattern suitable for printing on a sheet of paper.

Parameters
[in]styleDot style to use (see CalibrationPatternStyle).
[in]contrastSelects whether to use white on black or black on white dots (see CalibrationPatternContrast).
[in]paperSizeSize of the paper on which to print the calibration pattern later on (see CalibrationPatternFormat).
[in]orientationChoose orientation; only relevant for CalibrationPatternStyle::AsymmetricDots.
[in]numColumnsNumber of dot columns in the image.
[in]numRowsNumber of dot rows in the image.
[in]horizontalBorderHorizontal borders to be applied (in inches).
[in]verticalBorderVertical borders to be applied (in inches).
[in]dpiDot density to use (in dots per inch).
Returns
Calibration pattern image.
Exceptions
Anyexception derived from std::exception including CvbException.

The calibration pattern will consist of a regularly spaced matrix of dots, the size of which will be determined by the input parameters. The size of the pattern image will be suitable for printing it on an piece of paper defined by the paperSize parameter. The calibration pattern will consist of a regular rectangular grid of dots. The distance between the dots in x- and y-direction will be 2.5 times the diameter of the dots. If an asymmetric pattern was selected, the bigger dots will have 2.5 times the area of the smaller dots (meaning that their radius is sqrt(2.5) times the radius of the small dots).
The horizontal and vertical border values should match the setting that is going to be used for printing the resulting image. Must not be negative. The meaning of horizontal/vertical refers to the paper size definition and is independent of orientation setting.
It usually makes sense to set the dpi parameter to the printer's physical dot density or half or quarter of that. Minimum value is 150.

◆ CreateRampImage()

std::unique_ptr< Image > CreateRampImage ( Size2D< int > size,
int numPlanes,
TestImageDataType dataType,
Axis axis,
double offset = 0.0,
double slope = 1.0 )
inline

Create a gray ramp test image.

Parameters
[in]sizeSize of the image to be generated.
[in]numPlanesNumber of planes the image should have.
[in]dataTypeData type the image should have.
[in]axisAxis along which the ramp should run.
[in]offsetOffset the ramp should have.
[in]slopeSlope the ramp should have.
Returns
The test image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ DetectEdgesOfStripeTarget()

EdgeDetectionResult DetectEdgesOfStripeTarget ( const Image & imageStripes,
const Rect< int > & aoi,
int numStripes,
const ScanDirection & scanDirection,
double threshold )
inline

This function detects edges from a calibration pattern with alternating black and white stripes.

The output of this function is used by function CreateLineScanCalibration calculating the linescan calibration. This function internally calls Edge::FindAllEdges, where all input parameter are described, too. For detailed information see the documentation of the CVB edge tool.

Note, that the given area of interest aoi must only cover areas with stripes.

Note
The given number of stripes numStripes is only used for memory allocation. It does not necessarily have to precisely match the number of stripes, but it must be equal to or greater than the actual number of stripes. If the selected value is too low, an error is thrown ("bad allocation").
Parameters
[in]imageStripesCalibration pattern with alternating black and white stripes.
[in]aoiArea of interest in the given image.
[in]numStripesNumber of stripes in the calibration pattern.
[in]scanDirectionScan direction of the camera.
[in]thresholdThreshold for gray value change.
Returns
Result of the edge detection.

◆ Dilate()

std::unique_ptr< Image > Dilate ( const Image & image,
MorphologyMask maskType,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

Perform a dilation operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ DistanceTransform()

std::unique_ptr< Image > DistanceTransform ( const ImagePlane & plane,
Filter::FixedFilterSize maskSize,
DistanceNorm norm )
inline

This function calculates (and writes into the output image) the distance to the closest pixel in the source image with the value zero for all nonzero pixels in the input image.

Parameters
[in]planeImage plane on which to calculate.
[in]maskSizeMask size to use for the approximator (only Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5 are acceptable).
[in]normDistance calculation norm to be used.
Returns
The transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

Distance is calculated approximatively using a set of principal distances, that is governed by the maskSize parameter and the distance norm.

◆ Divide()

std::unique_ptr< Image > Divide ( const Image & image1,
const Image & image2,
int upShift )
inline

Divide the pixel values of image1 by the pixel values of image 2 to obtain the output image and shift them up by upShift bits to preserve information.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
[in]upShiftResult shift parameter.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ DownShift()

template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type DownShift ( const Image & image,
const RANGE & values )
inline

Bit-wise shift the input image with constant values.

Parameters
[in]imageInput image.
[in]valuesValues to shift the image with (at least one per plane in image).
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ DynamicThreshold()

std::unique_ptr< Image > DynamicThreshold ( const Image & image,
int windowSize,
int threshold,
DynamicThresholdNorm norm = DynamicThresholdNorm::Mean )
inline

This function performs dynamic thresholding on the input image.

Parameters
[in]imageImage to be thresholded.
[in]windowSizeWindow size to calculate the dynamic threshold. Bigger window sizes will lead to higher processing times.
[in]thresholdThreshold offset to use.
[in]normEither DynamicThresholdNorm::Mean (default) or DynamicThresholdNorm::MinMax.
Returns
Thresholded image.
Exceptions
Anyexception derived from std::exception including CvbException.

Dynamic thresholding works by calculating the average gray value over a mask with given size (centered around the pixel in question) for each input pixel. If the difference between this average and the pixel, that is currently being looked at, is above the specified threshold, then the corresponding pixel in the output image is set to white, otherwise it is black.

This function is particularly useful, when dealing with images, that have a non-uniform illumination.

◆ EllipseRegression()

template<class RANGE>
TypedRange< Ellipse, Point2D< double >, RANGE >::type EllipseRegression ( const RANGE & points)
inline

Create an ellipse, that fits best into a collection of points.

Parameters
[in]pointsPoints to fit the ellipse in.
Returns
Ellipse object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Erode()

std::unique_ptr< Image > Erode ( const Image & image,
MorphologyMask maskType,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

Perform an erosion operation with a selectable filter mask.

Parameters
[in]imageImage to perform the operation on.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ ExtractCalibrationLists()

void ExtractCalibrationLists ( const ImagePlane & plane,
CalibrationPatternStyle style,
CalibrationPatternContrast contrast,
int gridSpacing,
int minContrast,
double maxRatio,
Area2D aoi,
std::vector< Point2D< double > > & originalPixels,
std::vector< Point2D< double > > & transformedPixels )
inline

Automatically extracts the pixel lists required for creating a NonLinearTransformation object.

Parameters
[in]planeImage plane to work on.
[in]styleCalibration pattern style visible in the image (see CalibrationPatternStyle).
[in]contrastSelects whether the image shows CalibrationPatternContrast::BlackOnWhite or CalibrationPatternContrast::WhiteOnBlack dots.
[in]gridSpacingSpacing of the calibration dot grid in the target image. Defines the distance of the points that will end up in the transformed pixels.
[in]minContrastMinimum gray value contrast between the object and the background of the calibration target pattern.
[in]maxRatioMaximum ratio between the biggest and the smallest calibration dot.
[in]aoiArea of interest in which to look for the calibration pattern's dots.
[out]originalPixelsPoint list to contain the locations of the calibration dots in the input image in pixel coordinates (output).
[out]transformedPixelsPixel list to contain the appropriate locations of the calibration dots in the target image of the calibration (output).
Exceptions
Anyexception derived from std::exception including CvbException.

Note that a more convenient alternative is to call the method NonLinearTransformation::FromCalibrationPattern. It will do the list extraction and the generation of the transformation object in a single function call. The image plane given to this method needs to contain a calibration pattern as generated by the function CreateCalibrationPattern: A regularly spaced matrix of dots, the distance between the dots in x- and y-direction should be 2.5 times the diameter of the dots, if an asymmetric pattern was used, the bigger dots should have 2.5 times the area of the smaller dots (meaning that their radius is sqrt(2.5) times the radius of the small dots). Note that, although the area of interest is given as a Area2D here (and in the processing of the Area2D the image's coordinate system will be respected), the actual output of this method uses CoordinateSystemType::PixelCoordinates! This seemingly inconsistent mix in this case is in fact useful, because a Area2D will better capture the actual location of a calibration pattern, especially if the image has been rotated, than a Rectangle style area of interest. But the calibration functions usually assume that the pixel lists are given in pixel coordinates. To avoid misunderstandings and complications in the interpretation of the image content, it is recommended to use a default coordinate system on the input image. The minimum contrast (minContrast) value to be set depends on the quality of the image taken from the pattern, but in a typical situation this contrast should not drop below 64 gray values, otherwise it might become difficult to extract the calibration points. The maximum ratio (maxRatio) value will be used to identify outliers when looking for calibration dots. It should be set high enough to allow for the area variations to be expected due to perspective distortions and small enough to eliminate the candidates that are either too big or too small to be valid calibration pattern dots. Typically, values of about 3.0 to 5.0 are big enough - even if there is notable perspective distortion visible in the images. If an asymmetric calibration pattern has been selected, the ratio used for calculation will be adapted accordingly.

◆ FilterHistogram()

template<class HISTVAL, class RANGE>
TypedRange< std::vector< double >, double, RANGE >::type FilterHistogram ( const std::vector< HISTVAL > & histogram,
const RANGE & kernel )
inline

Filter a histogram array with the given kernel. At the beginning and end of the histogram, the histogram uses constant extension.

Parameters
[in]histogramHistogram to be filtered.
[in]kernelKernel to be used.
Returns
Filter result.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindAllEdges()

std::vector< EdgeResult > FindAllEdges ( const ImagePlane & plane,
EdgeSearchMode mode,
EdgeType type,
double threshold,
Area2D aoi,
double density = 1.0 )
inline

Find all edges inside the aoi.

Parameters
[in]planePlane in which to search.
[in]modeSearch mode to use.
[in]typeType of edge to be searched for.
[in]thresholdThreshold to apply.
[in]aoiArea to scan.
[in]densitySearch density to use where 1.0 means scanning all pixels.
Returns
Found edges.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindBestEdge()

EdgeResult FindBestEdge ( const ImagePlane & plane,
EdgeType type,
Area2D aoi,
double density = 1.0 )
inline

Use the 2nd derivative method to find the edge with the highest intensity in the area of interest.

Parameters
[in]planePlane to scan.
[in]typeType of edge to be searched for.
[in]aoiArea to scan.
[in]densityDensity at which to scan the aoi where 1.0 means scanning all pixels.
Returns
The best result (or EdgeResult::Nothing() if nothing was found e.g. because the area is outside the image).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindEdgePair()

EdgeResultPair FindEdgePair ( const ImagePlane & plane,
EdgeSearchMode mode,
EdgeType type1,
double threshold1,
EdgeType type2,
double threshold2,
Area2D aoi,
double density = 1.0 )
inline

Find an edge pair (as specified) in the aoi.

Parameters
[in]planePlane to search in.
[in]modeSearch mode.
[in]type1Type of edge to be searched for.
[in]threshold1Threshold to apply when looking for the first edge (left to right in the aoi).
[in]type2Type of edge to be searched for.
[in]threshold2Threshold to apply when looking for the second edge (right to left in the aoi).
[in]aoiArea to scan.
[in]densityDensity at which to scan the aoi where 1.0 means scanning all pixels.
Returns
Search results (containing EdgeResult::Nothing() if not found).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindFirstEdge()

EdgeResult FindFirstEdge ( const ImagePlane & plane,
EdgeSearchMode mode,
EdgeType type,
double threshold,
Area2D aoi,
double density = 1.0 )
inline

Find the first edge (as specified) in the aoi.

Parameters
[in]planePlane to search in.
[in]modeSearch mode.
[in]typeType of edge to be searched for.
[in]thresholdEdge threshold to apply.
[in]aoiArea to scan.
[in]densityDensity at which to scan the aoi where 1.0 means scanning all pixels.
Returns
Found edge (or EdgeResult::Nothing() if no edge was found).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindHistogramPeaks()

std::vector< int > FindHistogramPeaks ( const std::vector< uint64_t > & histogram,
int blurSize,
int minDiff )
inline

Find peaks in the histogram identified by the supplied criteria.

Parameters
[in]histogramHistogram to analyze.
[in]blurSizeAveraging window size (must be >= 1).
[in]minDiffMinimum grey value difference between two peaks.
Returns
Peak positions in the histogram.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FindMatches()

std::vector< LocalMaximum > FindMatches ( const ImagePlane & imagePlane,
const ImagePlane & templatePlane,
double threshold,
int locality,
Rect< int > aoi,
SubPixelMode subPixMode = SubPixelMode::ParabolicFast,
Neighborhood subPixRadius = Neighborhood::Use3x3 )
inline

Use the correlation coefficient calculation method to find locations in the input image plane that match the given template.

Parameters
[in]imagePlaneImage plane in which to look for matches.
[in]templatePlaneTemplate to match.
[in]thresholdMinimum correlation coefficient to look for (valid values range from 0 to 1).
[in]localityMinimum distance between two valid matches (measured using the L1 norm).
[in]aoiRegion of interest in which to look for matches.
[in]subPixModeMode to be used for determining sub pixel accuracy (see description of SubPixelMode values).
[in]subPixRadiusNeighborhood to take account in the sub pixel calculation (see description of Neighborhood values).
Returns
List of the local maxima that have been found.
Exceptions
Anyexception derived from std::exception including CvbException.

If the matches fall within the locality distance (measured using the L1 norm), the one with the lower correlation coefficient will be removed from the result list.

◆ Gauss()

std::unique_ptr< Image > Gauss ( const Image & image,
Filter::FixedFilterSize size )
inline

This function applies a low high pass Gaussian filter to an image.

Parameters
[in]imageImage to be filtered.
[in]sizeEither Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GaussianPyramidDown()

std::unique_ptr< Image > GaussianPyramidDown ( const Image & image)
inline

This function down samples an image in the sense of a Gaussian pyramid.

Parameters
[in]imageImage to be down sampled.
Returns
Down-sampled image.
Exceptions
Anyexception derived from std::exception including CvbException.

It applies a Gaussian Cvb::Foundation::FixedFilterSize::Kernel5x5 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.

◆ GaussianPyramidUp()

std::unique_ptr< Image > GaussianPyramidUp ( const Image & image)
inline

This function up samples an image in the sense of a Gaussian pyramid.

Parameters
[in]imageImage to be up sampled.
Returns
Up-sampled image.
Exceptions
Anyexception derived from std::exception including CvbException.

It inserts odd columns and rows filled with 0, then applies a Gaussian Cvb::Foundation::FixedFilterSize::Kernel5x5 multiplied by 4 to the image.

◆ GetWhiteBalance()

WhiteBalanceFactors GetWhiteBalance ( const Image & image,
BayerPattern pattern,
Area2D aoi )
inline

Determine a suitable white balance from a monochrome image with Bayer pattern.

Parameters
[in]imageMonochrome image with Bayer pattern.
[in]patternPattern in the top left corner of the sensor with which the image was acquired.
[in]aoiArea in which to determine the white balance factors.
Returns
White balance factors.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ HighPass()

std::unique_ptr< Image > HighPass ( const Image & image,
Filter::FixedFilterSize size )
inline

This function applies a square high pass filter to an image.

Parameters
[in]imageImage to be filtered.
[in]sizeEither Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ InitAOI()

template<class RANGE>
TypedRange< void, double, RANGE >::type InitAOI ( Image & image,
Rect< int > aoi,
const RANGE & values )
inline

Initialize the planes of AOI (area of interest) in this image to different values.

Parameters
[in]imageImage to be initialized.
[in]aoiArea of interest to initialize.
[in]valuesValues to which the various planes are to be initialized (needs at least one value per plane).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ InitImage()

template<class RANGE>
TypedRange< void, double, RANGE >::type InitImage ( Image & image,
const RANGE & values )
inline

Initialize the planes of this image to different values.

Parameters
[in]imageImage to be initialized.
[in]valuesValues to which the various planes are to be initialized (needs at least one value per plane).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ IntersectWithLine()

std::vector< Point2D< double > > IntersectWithLine ( const std::vector< Point2D< double > > & curve,
const Line2D & line )
inline

Intersects a 2D curve with a line.

Parameters
[in]curveCurve to be intersected.
[in]lineLine to intersect with.
Returns
Calculated intersection points.
Exceptions
Anyexception derived from std::exception including CvbException.

The line is defined by the Hessian normal form:

Normal * x = d, with | Normal | = 1 and d > 0.

Note
The points have to be ordered by time, i.e. two consecutive points must adjoin another on the curve.

The curve is finite. It starts and ends at the first and last point respectively.

Attention
The number of intersection points will be calculated with this function and will be lower than the points defined by curve.

◆ Laplace()

std::unique_ptr< Image > Laplace ( const Image & image,
Filter::FixedFilterSize size )
inline

This function applies a square high pass Laplace filter to an image.

Parameters
[in]imageImage to be filtered.
[in]sizeEither Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ LineRegression()

template<class RANGE>
TypedRange< Line2D, Point2D< double >, RANGE >::type LineRegression ( const RANGE & points)
inline

Create a line, that fits best into a collection of points.

Parameters
[in]pointsPoints to fit line in.
Returns
Line2D object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ LocalEigenValuesAndVectors()

void LocalEigenValuesAndVectors ( const ImagePlane & plane,
Filter::FixedFilterSize derivatorSize,
Filter::FixedFilterSize blurSize,
std::unique_ptr< Image > & lambda1,
std::unique_ptr< Image > & lambda2,
std::unique_ptr< Image > & eigenValue1x,
std::unique_ptr< Image > & eigenValue1y,
std::unique_ptr< Image > & eigenValue2x,
std::unique_ptr< Image > & eigenValue2y )
inline

Calculate the local eigenvalues and eigenvectors of the Hesse matrix applied to the pixels of the input image.

Parameters
[in]planeImage plane to work on.
[in]derivatorSizeSize of the derivation operator (Sobel, valid inputs are Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5).
[in]blurSizeSize of the blurring operator (valid inputs are Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5).
[out]lambda1First eigenvalue for each pixel (output).
[out]lambda2Second eigenvalue for each pixel (output).
[out]eigenValue1xX-component of the first eigenvector (output).
[out]eigenValue1yY-component of the first eigenvector (output).
[out]eigenValue2xX-component of the second eigenvector (output).
[out]eigenValue2yY-component of the second eigenvector (output).
Exceptions
Anyexception derived from std::exception including CvbException.

◆ LocalMinEigenValues()

std::unique_ptr< Image > LocalMinEigenValues ( const ImagePlane & plane,
Filter::FixedFilterSize derivatorSize,
Filter::FixedFilterSize blurSize )
inline

Calculate the minimum local eigenvalues of the Hesse matrix applied to the pixels of the input image.

Parameters
[in]planeImage plane to work on.
[in]derivatorSizeSize of the derivation operator (Sobel, valid inputs are Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5).
[in]blurSizeSize of the blurring operator (valid inputs are Filter::FixedFilterSize::Kernel3x3 and Filter::FixedFilterSize::Kernel5x5).
Returns
Image with the minimal local eigenvaluesThe filtered image
Exceptions
Anyexception derived from std::exception including CvbException.

This approach helps identify locations inside the image that contain curved edges.

◆ LowPass()

std::unique_ptr< Image > LowPass ( const Image & image,
Filter::FixedFilterSize size )
inline

This function applies a square low pass filter to an image.

Parameters
[in]imageImage to be filtered.
[in]sizeEither Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ MatrixTransform()

std::unique_ptr< Image > MatrixTransform ( const Image & image,
const Matrix2D & matrix,
Interpolation interpolation = Interpolation::Linear )
inline

Use a matrix to transform an image.

Parameters
[in]imageImage to transform.
[in]matrixMatrix with which the image is to be transformed.
[in]interpolationInterpolation to use (Linear by default). Supported values are NearestNeighbor, Linear and Cubic.
Returns
The transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ MergeTwoCurves()

std::vector< Point2D< double > > MergeTwoCurves ( const std::vector< Point2D< double > > & curveLHS,
const std::vector< Point2D< double > > & curveRHS,
const StartSelectionMode & mode )
inline

Merges two curves into one curve with interpolation.

Parameters
[in]curveLHSLeft hand side curve. This curve is assumed starting point if sorting is executed.
[in]curveRHSRight hand side curve.
[in]modeSpecifies if left and right order of the two curves is to be found by the algorithm.
Returns
Merged curve.
Exceptions
Anyexception derived from std::exception including CvbException.

Takes two curves and merges them into one combined curve. If they overlap, an interpolation method is used to find a suitable approximation. This interpolation is done when switching between the two curves while the points are interleaved. The order in which the points are interleaved is defined by the closest neighbour for each point from CurveRHS to CurveLHS.

This method works with curves in 2D.

If sorting is executed, then the pair of curves curveLHS and curveRHS are sorted from left to right. This means, the algorithm checks which starting point from the two staring points is the best starting point for the merged curve. To make this decision the distance from each possible starting point to the other given curve is calculated and the point with the highest distance is taken as the overall starting point for the new generated merged curve. This method does work well for regular curves (not self intercepting curves). It can be switched off to save computation time if the caller is sure about the correct order.

Note
The points on the curve are evaluated in the order in which they are listed. We assume an ordered point set (not ordered by axis, but ordered according to the curve).

◆ Mirror()

std::unique_ptr< Image > Mirror ( const Image & image,
Axis axis )
inline

Mirror the input image on the x and/or y axis.

Parameters
[in]imageImage to mirror.
[in]axisAxis(es) around which it is to be flipped.
Returns
The mirrored image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Multiply()

std::unique_ptr< Image > Multiply ( const Image & image1,
const Image & image2,
PixelOverflow overflow )
inline

Multiply the pixel values of both input images to obtain the output image.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
[in]overflowDefines how arithmetic overflow is handled.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ Negate()

std::unique_ptr< Image > Negate ( const Image & image)
inline

Performs a bit-wise NOT operation on the pixels of the input image to create the output image.

Parameters
[in]imageInput image.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ NormL1()

double NormL1 ( const ImagePlane & plane,
ValueNormalization normalize,
Rect< int > aoi )
inline

Calculate and return the L1 norm (sum of absolute values) over all the pixels inside the plane.

Parameters
[in]planePlane to calculate the norm on.
[in]normalizeNormalize results to [0...1] or not.
[in]aoiArea to calculate the norm in.
Returns
The calculated norm.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ NormL2()

double NormL2 ( const ImagePlane & plane,
ValueNormalization normalize,
Rect< int > aoi )
inline

Calculate and return the L2 norm (euclidean norm) over the pixels inside the plane.

Parameters
[in]planePlane to calculate the norm on.
[in]normalizeNormalize results to [0...1] or not.
[in]aoiArea to calculate the norm in.
Returns
The calculated norm.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ NormLInf()

double NormLInf ( const ImagePlane & plane,
ValueNormalization normalize,
Rect< int > aoi )
inline

Calculate and return the L infinity norm (maximum norm) over the pixels inside the plane.

Parameters
[in]planePlane to calculate the norm on.
[in]normalizeNormalize results to [0...1] or not.
[in]aoiArea to calculate the norm in.
Returns
The calculated norm.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Open()

std::unique_ptr< Image > Open ( const Image & image,
MorphologyMask maskType,
Size2D< int > maskSize,
Point2D< int > maskOffset )
inline

Perform an open operation with a selectable filter mask.

Parameters
[in]imageImage on which the operation is to be executed.
[in]maskTypeType of morphological mask to be used.
[in]maskSizeSize of the morphological mask.
[in]maskOffsetOffset of the mask reference point relative to the top left pixel of the mask; must lie within the defined maskSize.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Or()

std::unique_ptr< Image > Or ( const Image & image1,
const Image & image2 )
inline

Performs a bit-wise OR operation between the pixels of the two input images.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ Perspective()

std::unique_ptr< Image > Perspective ( const Image & image,
const PerspectiveTransformation & coeffs,
Size2D< int > targetSize,
Interpolation interpolation = Interpolation::Linear )
inline

Apply the perspective transformation coefficients to the image.

Parameters
[in]imageImage to transform.
[in]coeffsPerspective transformaton coefficients.
[in]targetSizeSize of the destination image.
[in]interpolationInterpolation to use (Linear by default). Supported values are NearestNeighbor, Linear and Cubic.
Returns
The transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Prewitt()

std::unique_ptr< Image > Prewitt ( const Image & image,
Filter::FilterOrientation orientation )
inline

Applies a Prewitt edge filter to the input image.

Parameters
[in]imageImage to filter.
[in]orientationOrientation of the filter.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

Note that the Prewitt filter zeros out negative edges - if you want to use a filter that preserves the negative edges, please use Sobel() or Scharr() instead.

◆ RangeThreshold()

std::unique_ptr< Image > RangeThreshold ( const ImagePlane & plane,
ValueRange< int > range,
Rect< int > aoi )
inline

A range based binarization algorithm to the given input.

Parameters
[in]planeImage plane to binarize.
[in]rangeThe gray value range for binarization.
[in]aoiArea of interest to binarize.
Returns
std::unique_ptr<Image> Resulting binarized image.
Exceptions
Anyexception derived from std::exception including CvbException.

The binarization algorithm is implemented in the blob analyzer.

◆ RangeThresholdToDst()

void RangeThresholdToDst ( const ImagePlane & plane,
ValueRange< int > range,
Image & imageDst,
Rect< int > aoi )
inline

A range based binarization algorithm to the given input.

Parameters
[in]planeImage plane to binarize.
[in]rangeThe gray value range for binarization.
[in]imageDstDestination image to receive the binarization result.
[in]aoiArea of interest to binarize.
Exceptions
Anyexception derived from std::exception including CvbException.

The binarization algorithm is implemented in the blob analyzer.

Please note, that despite the fact, that it is possible to specify an area of interest, the binarized data will always be located in the top left corner of the image.

This destination image must have one plane only with 8 bits per pixel and be compatible with the input aoi in terms of size.

◆ ResampleCurve()

std::vector< Point2D< double > > ResampleCurve ( const std::vector< Point2D< double > > & curve,
int resampledCurveLength )
inline

Resamples a 2-dimensional curve via linear interpolation assuming that the "speed" of the time mapping is constant.

Parameters
[in]curveCurve to be resampled.
[in]resampledCurveLengthLength of the resulting curve.
Returns
Resampled curve.
Exceptions
Anyexception derived from std::exception including CvbException.
Note
The points have to be ordered by time, i.e. two consecutive points must adjoin another on the curve.

◆ Resize()

std::unique_ptr< Image > Resize ( const Image & image,
Size2D< int > targetSize,
Interpolation interpolation = Interpolation::Linear )
inline

Resize the input image.

Parameters
[in]imageImage to resize.
[in]targetSizeSize to go with it.
[in]interpolationInterpolation to use (Linear by default). Supported values are NearestNeighbor, Linear and Cubic.
Returns
The resized image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RGBToBayer()

std::unique_ptr< Image > RGBToBayer ( const Image & image,
BayerPattern pattern )
inline

Convert an RGB image to a monochrome image with Bayer pattern.

Parameters
[in]imageImage to be converted.
[in]patternPattern in the top left corner of the sensor with which image was acquired.
Returns
Converted image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Roberts()

std::unique_ptr< Image > Roberts ( const Image & image,
Filter::RobertsDirection direction )
inline

Apply a Roberts edge detector to the input image.

Parameters
[in]imageImage to be filtered.
[in]directionFilter direction.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

Result values of the Roberts filter that are less than zero will be zeroed out.

◆ Rotate()

std::unique_ptr< Image > Rotate ( const Image & image,
Angle angle,
Interpolation interpolation = Interpolation::Linear )
inline

Rotate the input image by the given angle.

Parameters
[in]imageImage to rotate.
[in]angleAngle by which it is to be rotated.
[in]interpolationInterpolation to use (Linear by default). Supported values are NearestNeighbor, Linear and Cubic.
Returns
The rotated image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ ScaleTo16BppSigned()

std::unique_ptr< Image > ScaleTo16BppSigned ( const Image & image)
inline

Convert the input image to an image with 16 bits per pixel signed data.

Parameters
[in]imageImage to be scaled.
Returns
The scaled image.
Exceptions
Anyexception derived from std::exception including CvbException.

When scaling, the value range from the source image is adapted to that of the target image as good as possible.

◆ ScaleTo16BppUnsigned()

std::unique_ptr< Image > ScaleTo16BppUnsigned ( const Image & image)
inline

Convert the input image to an image with 16 bits per pixel unsigned data.

Parameters
[in]imageImage to be scaled.
Returns
The scaled image.
Exceptions
Anyexception derived from std::exception including CvbException.

When scaling, the value range from the source image is adapted to that of the target image as good as possible.

◆ ScaleTo32BppFloat()

std::unique_ptr< Image > ScaleTo32BppFloat ( const Image & image,
double minVal,
double maxVal )
inline

Convert the input image to an image with 32 bits per pixel float data.

Parameters
[in]imageImage to be scaled.
[in]minValMinimum value to occur in the output image.
[in]maxValMaximum value to occur in the output image.
Returns
The scaled image.
Exceptions
Anyexception derived from std::exception including CvbException.

When scaling, the value range from the source image is adapted to that of the target image as good as possible.

◆ ScaleTo32BppSigned()

std::unique_ptr< Image > ScaleTo32BppSigned ( const Image & image)
inline

Convert the input image to an image with 32 bits per pixel signed data.

Parameters
[in]imageImage to be scaled.
Returns
The scaled image.
Exceptions
Anyexception derived from std::exception including CvbException.

When scaling, the value range from the source image is adapted to that of the target image as good as possible.

◆ ScaleTo8BppUnsigned()

std::unique_ptr< Image > ScaleTo8BppUnsigned ( const Image & image)
inline

Convert the input image to an image with 8 bits per pixel unsigned data.

Parameters
[in]imageImage to be scaled.
Returns
The scaled image.
Exceptions
Anyexception derived from std::exception including CvbException.

When scaling, the value range from the source image is adapted to that of the target image as good as possible.

◆ Scharr()

std::unique_ptr< Image > Scharr ( const Image & image,
Filter::FilterOrientation orientation )
inline

Applies a Scharr edge filter to the input image.

Parameters
[in]imageImage to filter.
[in]orientationOrientation of the filter.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The Scharr filter's output, in case of an 8 bit monochrome input image, will be scaled to the range 0...255, with 128 corresponding to a filter result of zero.

◆ SearchBlobs()

std::vector< BlobResult > SearchBlobs ( const Image & binarizedImage)
inline

Searches for all blobs in the given binarized image.

Parameters
[in]binarizedImageImage consisting only of 0 and 255.
Returns
Unordered blob results.
Exceptions
Anyexception derived from std::exception including CvbException.

Image containing pixels with values 0 or 255. 255 marks an object.

◆ Sharpen()

std::unique_ptr< Image > Sharpen ( const Image & image)
inline

This function applies a Filter::FixedFilterSize::Kernel3x3 sharpen filter to an image.

Parameters
[in]imageImage to be filtered.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Shear()

std::unique_ptr< Image > Shear ( const Image & image,
double shearX,
double shearY,
Interpolation interpolation = Interpolation::Linear )
inline

Shear the input image.

Parameters
[in]imageImage to shear.
[in]shearXShear factor in x-direction.
[in]shearYShear factor in y-direction.
[in]interpolationInterpolation to use (Linear by default). Supported values are NearestNeighbor, Linear and Cubic.
Returns
The sheared image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Sobel()

std::unique_ptr< Image > Sobel ( const Image & image,
Filter::FilterOrientation orientation,
Filter::FixedFilterSize maskSize )
inline

Applies a Sobel edge filter to the input image.

Parameters
[in]imageImage to filter.
[in]orientationOrientation of the filter.
[in]maskSizeMask size (Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5).
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The Sobel filter's output, in case of an 8 bit monochrome input image, will be scaled to the range 0...255, with 128 corresponding to a filter result of zero.

◆ Sobel2nd()

std::unique_ptr< Image > Sobel2nd ( const Image & image,
Filter::FilterOrientation orientation,
Filter::FixedFilterSize maskSize )
inline

Applies a 2nd order Sobel edge filter to the input image.

Parameters
[in]imageImage to filter.
[in]orientationOrientation of the filter.
[in]maskSizeMask size (Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5).
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The Sobel filter's output, in case of an 8 bit monochrome input image, will be scaled to the range 0...255, with 128 corresponding to a filter result of zero.

◆ Sobel2ndCross()

std::unique_ptr< Image > Sobel2ndCross ( const Image & image,
Filter::FixedFilterSize maskSize )
inline

Applies a 2nd order Sobel cross edge filter to the input image.

Parameters
[in]imageImage to filter.
[in]maskSizeMask size (Filter::FixedFilterSize::Kernel3x3 or Filter::FixedFilterSize::Kernel5x5).
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

The Sobel filter's output, in case of an 8 bit monochrome input image, will be scaled to the range 0...255, with 128 corresponding to a filter result of zero.

◆ Sqrt()

std::unique_ptr< Image > Sqrt ( const Image & image,
SqrtPixelScaling scaling )
inline

Calculates the square roots of pixel values of a source image and writes them into the destination image.

Parameters
[in]imageInput image.
[in]scalingWhether or not to scale the result.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the parameter scaling is AsIs, the resulting image has pixel values as they come out of the calculation. If Yes, the results will be multiplied to fit the dynamic range of the image, effectively turning this function into a gamma correction with a gamma value of 1/2.

◆ Square()

std::unique_ptr< Image > Square ( const Image & image,
PixelOverflow overflow )
inline

Squares the pixel values of the input image to obtain the output image.

Parameters
[in]imageInput image.
[in]overflowDefines how arithmetic overflow is handled.
Returns
Result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the parameter overflow is set to Scale, the resulting pixel values are divided to fit the dynamic range of the image (truncated otherwise). Scaling effectively turns this function into a gamma correction with a gamma value of 2.

◆ StaticThreshold()

std::unique_ptr< Image > StaticThreshold ( const Image & image,
const Image & thresholds,
StaticThresholding comparison )
inline

This function performs thresholding of an input image with pixel-by-pixel thresholds stored in the pixels of a thresholds image.

Parameters
[in]imageImage to be thresholded.
[in]thresholdsImage containing the threshold values for the pixels of the input image.
[in]comparisonComparison to apply.
Returns
The thresholded image.
Exceptions
Anyexception derived from std::exception including CvbException.

Both images should be identical in size. However, if they are not, the smallest common rectangle (located at the top left pixel) of both images will be the size of the result image. Both input images should have identical dimensions (either 1 or 3 planes per image) and identical data types.

◆ StaticTransparentThreshold()

template<class RANGE>
TypedRange< std::unique_ptr< Image >, double, RANGE >::type StaticTransparentThreshold ( const Image & image,
const RANGE & thresholds,
StaticThresholding comparison,
const RANGE & values )
inline

Create a thresholded image using a transparency approach.

Parameters
[in]imageInput image.
[in]thresholdsThresholds to apply (one per plane).
[in]comparisonThresholding condition.
[in]valuesValue to set for pixels, that violate the thresholding condition (one per plane required).
Returns
Thresholded image.
Exceptions
Anyexception derived from std::exception including CvbException.

In the result image every pixel, that violates the comparison to its threshold, will be assigned the value specified in values argument. All others will be assigned the same value, they had in the input image.

◆ SubImage()

std::unique_ptr< Image > SubImage ( const Image & image,
Area2D aoi,
Interpolation interpolation = Interpolation::Linear )
inline

Extract the content of an AOI (area of interest) into a new image.

Parameters
[in]imageImage to work from.
[in]aoiArea of interest to be extracted.
[in]interpolationInterpolation mode to be used.
Returns
New image of the subregion.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Subtract()

std::unique_ptr< Image > Subtract ( const Image & image1,
const Image & image2 )
inline

Subtract the pixel values of image 2 from image 1 to obtain the output image.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

Negative results are saturated at DataType::MinVal. If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ SubtractAbs()

std::unique_ptr< Image > SubtractAbs ( const Image & image1,
const Image & image2 )
inline

Subtract the pixel values of image 2 from image 1 to obtain the output image.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

The stored results are the absolute value of the difference of both pixels. If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.

◆ SumHistogramBetween()

uint64_t SumHistogramBetween ( const std::vector< uint64_t > & histogram,
int lowerLimit,
int upperLimit )
inline

Count the number of pixels that lie between two limits in the histogram.

Parameters
[in]histogramHistogram to calculate the sum on.
[in]lowerLimitLower limit to count from.
[in]upperLimitUpper limit to count to (including).
Returns
Number of pixels with a gray value between lowerLimit and upperLimit.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ SwapChannels()

template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type SwapChannels ( const Image & image,
const RANGE & newArrangement )
inline

Create a new image by rearranging the planes of the input image.

Parameters
[in]imageInput image.
[in]newArrangementArray that defines the new plane arrangement. For example for an RGB image, the array [2,1,0] would cause the image planes to be rearranged to BGR plane order.
Returns
New transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ TwistColors()

std::unique_ptr< Image > TwistColors ( const Image & image,
ColorTwistMatrix matrix )
inline

Apply the color twist matrix to the input image.

Parameters
[in]imageImage to apply the matrix to.
[in]matrixMatrix defining the color twist transformation.
Returns
Transformed image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ UpShift()

template<class RANGE>
TypedRange< std::unique_ptr< Image >, int, RANGE >::type UpShift ( const Image & image,
const RANGE & values )
inline

Bit-wise shift the input image with constant values.

Parameters
[in]imageInput image.
[in]valuesValues to shift the image with (at least one per plane in image).
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ WangQuality()

double WangQuality ( const ImagePlane & plane1,
const ImagePlane & plane2 )
inline

Calculate the Wang quality for two images.

Parameters
[in]plane1Image plane 1 on which to calculate.
[in]plane2Image plane 2 on which to calculate.
Returns
The quality index (ranging from -1 to 1)
Exceptions
Anyexception derived from std::exception including CvbException.

The Wang Quality is a measure of similarity between two images as proposed in a publication by Z. Wang and A. C. Bovik (IEEE Signal Processing Letters, vol. 9, no. 3, pp. 81-84, March 2002).

◆ Wiener()

std::unique_ptr< Image > Wiener ( const Image & image,
Size2D< int > maskSize,
Point2D< int > maskOffset,
double noiseThreshold = 0.0 )
inline

This function performs adaptive filtering of an image degraded by constant power additive noise.

Parameters
[in]imageImage to be filtered.
[in]maskSizeFilter mask to be used.
[in]maskOffsetMask center pixel location.
[in]noiseThresholdNoise suppression threshold. Valid input ranges from 0 to 1, with 0 causing the function to determine the threshold automatically.
Returns
The filtered image.
Exceptions
Anyexception derived from std::exception including CvbException.

For each pixel of the input image, the function determines the local image mean and variance in the rectangular neighborhood (mask) defined by maskSize and maskOffset. The deviation from the local average is then diminished according to the local variance and the noise threshold parameters. The noise threshold parameter may be zero, in which case the function tries to determine itself what local noise threshold to apply. This normally yields the best results.

◆ WriteProjection()

void WriteProjection ( const ImagePlane & plane,
Area2D aoi,
double density = 1.0 )
inline

Write the projection that Edge is using internally as the basis for its calculations into an image plane (might be useful for debugging).

Parameters
[in]planePlane to write the projection to.
[in]aoiArea of interest to project.
[in]densityDensity at which to scan where 1.0 means scanning all pixels.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Xor()

std::unique_ptr< Image > Xor ( const Image & image1,
const Image & image2 )
inline

Performs a bit-wise XOR operation between the pixels of the two input images.

Parameters
[in]image1Input image 1.
[in]image2Input image 2.
Returns
The result image.
Exceptions
Anyexception derived from std::exception including CvbException.

If the sizes of the two input images differ, the result image will contain the biggest rectangle common to both input images.