CVB++ 14.0
Image Class Reference

The Common Vision Blox image. More...

#include <cvb/image.hpp>

Inherited by DeviceImage, StreamImage, PanoramicMappedImage, and WrappedImage.

Public Member Functions

 Image (Size2D< int > size, int numPlanes=1, DataType dataType=DataType::Int8BppUnsigned())
 Constructs an uninitialized image with the given parameters. More...
 
 Image (int width, int height, int numPlanes=1, DataType dataType=DataType::Int8BppUnsigned())
 Constructs an uninitialized image with the given parameters. More...
 
 Image (const String &fileName)
 Loads an image with the given file name. More...
 
void * Handle () const noexcept
 Classic API image handle. More...
 
int PlanesCount () const noexcept
 Get the number of planes for this image. More...
 
bool PlaneDataTypesIdentical () const noexcept
 Check if all planes have the same data type. More...
 
ImagePlane Plane (int plane) const
 Indexed access to the individual plane information. More...
 
std::vector< ImagePlanePlanes () const noexcept
 Access all planes for this image. More...
 
std::vector< double > GetPixel (Point2D< int > position) const
 Gets the pixel values for all planes at a give position. More...
 
int Height () const noexcept
 Height of the image in pixels. More...
 
int Width () const noexcept
 Width of the image in pixels. More...
 
Cvb::ColorModel ColorModel () const noexcept
 Color model realized by this image. More...
 
void Save (const String &fileName) const
 Write the current content of the image into a file. More...
 
std::unique_ptr< ImageMap (Rect< int > rect) const
 Creates a mapped image of the region of this image. More...
 
std::unique_ptr< ImageMap (Rect< int > sourceRect, Size2D< int > targetSize) const
 Creates a mapped image of the region of that image scaled to the size. More...
 
std::unique_ptr< ImageClone () const
 Creates a new image object, that is a copy of the current instance. More...
 
void Copy (Image &targetImage, Rect< int > sourceRect, Point2D< int > targetPosition) const
 Copies the image data from the source rectangle of this image to the target position inside the target image. More...
 
void Copy (Image &targetImage) const
 Copies the image data from this image to the target image. More...
 
Size2D< int > Size () const noexcept
 Size of the image in pixels. More...
 
Rect< int > Bounds () const noexcept
 Bounding rectangle of the image in pixels. More...
 
void RaisePixelContentChanged () const
 Inform clients listening to the pixel content changed event, that the image data has been completely updated (full area). More...
 
void RaisePixelContentChanged (Rect< int > rect) const
 Inform clients listening to the pixel content changed event, that the image data has been updated in the given rectangle. More...
 
EventCookie RegisterEventPixelContentChanged (std::function< void(const Image &, Rect< int >)> handler)
 Register a listener to the pixel content changed event. More...
 
void UnregisterEventPixelContentChanged (EventCookie eventCookie) noexcept
 Manually unregister a listener from the pixel content changed event. More...
 
Point2D< double > ImageToPixelCoordinates (Point2D< double > point) const noexcept
 Convert a point from image to pixel coordinates. More...
 
Area2D ImageToPixelCoordinates (Area2D area) const noexcept
 Convert an Area2D from image to pixel coordinates. More...
 
Point2D< double > PixelToImageCoordinates (Point2D< double > point) const noexcept
 Convert a point from pixel to image coordinates. More...
 
Area2D PixelToImageCoordinates (Area2D area) const noexcept
 Convert an Area2D from pixel to image coordinates. More...
 
AffineMatrix2D CoordinateSystem () const noexcept
 Get the coordinate system of the image. More...
 
void SetCoordinateSystem (AffineMatrix2D affineMatrix) noexcept
 Set the coordinate system of the image. More...
 

Static Public Member Functions

static std::unique_ptr< ImageLoad (const String &fileName)
 Loads an image with the given file name. More...
 
static std::unique_ptr< ImageCreate (Size2D< int > size, int numPlanes=1, DataType dataType=DataType::Int8BppUnsigned())
 Creates an uninitialized image with the given parameters. More...
 
static std::unique_ptr< ImageCreate (int width, int height, int numPlanes=1, DataType dataType=DataType::Int8BppUnsigned())
 Creates an uninitialized image with the given parameters. More...
 
template<class RANGE >
static TypedRange< std::unique_ptr< Image >, ImagePtr, RANGE >::type FromImages (MappingOption mapping, const RANGE &images)
 Create an image that is the result of concatenating a series of input images. More...
 
template<class... IMAGES>
static VarArgRange< std::unique_ptr< Image >, constImage &, IMAGES... >::type FromImages (MappingOption mapping, const IMAGES &... images)
 Create an image that is the result of concatenating a series of input images. More...
 
template<class RANGE >
static TypedRange< std::unique_ptr< Image >, ImagePlane, RANGE >::type FromPlanes (MappingOption mapping, const RANGE &planes)
 Create an image that is the result of concatenating a series of input planes. More...
 
template<class... PLANES>
static VarArgRange< std::unique_ptr< Image >, ImagePlane &&, PLANES... >::type FromPlanes (MappingOption mapping, PLANES &&... planes)
 Create an image that is the result of concatenating a series of input planes. More...
 
static std::unique_ptr< ImageFromHandle (HandleGuard< Image > &&guard)
 Creates an image from a classic API handle. More...
 
template<class T , class... ARGS>
static std::unique_ptr< T > FromHandle (HandleGuard< Image > &&guard, ARGS &&... args)
 Creates an image from a classic API handle (typed). More...
 

Related Functions

(Note that these are not member functions.)

std::unique_ptr< ImageAffineTransform (const Image &image, AffineMatrix2D affineMatrix, Area2D area)
 Creates an affine transformation (homogeneous matrix transformation) of an area of the given image. More...
 
std::unique_ptr< ImageAffineTransform (const Image &image, AffineMatrix2D affineMatrix)
 Creates an affine transformation (homogeneous matrix transformation) of the whole image. More...
 
std::unique_ptr< ImageLinearTransform (const Image &image, Matrix2D matrix)
 Creates a linear transformation (matrix transformation). More...
 
std::unique_ptr< ImageMapTo8Bit (const Image &image, PlaneNormalization planeNormalization=PlaneNormalization::Identical)
 Take an input image and scale the pixel values to fit into the 8 bit value range. More...
 
std::unique_ptr< ImageNormalizeMinMax (const Image &image, double targetMin, double targetMax)
 Normalize an input image using min/max normalization (the gray values of the image will be stretched or compressed to fit the input target minimum and maximum values). More...
 
std::unique_ptr< ImageNormalizeMeanVariance (const Image &image, double targetMean, double targetVariance)
 Normalize an input image using mean/variance normalization (the gray values of the image will be stretched modified to generate a histogram as close as possible to the input target mean and variance values). More...
 
std::unique_ptr< ImagePolarTransform (const Image &image, Point2D< double > center, double innerRadius, double outerRadius, Angle startAngle, Angle totalAngle)
 Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image). More...
 
std::unique_ptr< ImagePolarTransform (const Image &image, Point2D< double > center, double innerRadius, double outerRadius)
 Create a polar transformation (i.e. unwrap a ring structure from inside source image into a rectangular image). More...
 
std::unique_ptr< ImageInversePolarTransform (const Image &image, Angle startAngle, double innerRadius)
 
void InversePolarTransformToDst (const Image &imageSrc, Point2D< double > center, Angle startAngle, double innerRadius, Image &imageDst)
 Create an inverse polar transformed image (i.e. transform an unwrapped image back into a ring structure). More...
 

Detailed Description

The Common Vision Blox image.

Examples
ShapeFinder2/QtShapeFinder2.

Constructor & Destructor Documentation

◆ Image() [1/3]

Image ( Size2D< int >  size,
int  numPlanes = 1,
DataType  dataType = DataType::Int8BppUnsigned() 
)
inline

Constructs an uninitialized image with the given parameters.

Parameters
[in]sizeSize of the image in pixels.
[in]numPlanesNumber of (color) info.
[in]dataTypePixel data type.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Image() [2/3]

Image ( int  width,
int  height,
int  numPlanes = 1,
DataType  dataType = DataType::Int8BppUnsigned() 
)
inline

Constructs an uninitialized image with the given parameters.

Parameters
[in]widthWidth of the image in pixels.
[in]heightHeight of the image in pixels.
[in]numPlanesNumber of (color) info.
[in]dataTypePixel data type.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Image() [3/3]

Image ( const String fileName)
inline

Loads an image with the given file name.

Parameters
[in]fileNameThe file name.
Exceptions
Anyexception derived from std::exception including CvbException.

Member Function Documentation

◆ Bounds()

Rect< int > Bounds ( ) const
inlinenoexcept

Bounding rectangle of the image in pixels.

Returns
Bounding rectangle of the image.
Exceptions
Doesnot throw any exception.

◆ Clone()

std::unique_ptr< Image > Clone ( ) const
inline

Creates a new image object, that is a copy of the current instance.

Returns
A new image object that is a deep copy of this image data.
Exceptions
Anyexception derived from std::exception including CvbException.

This method performs a deep copy of the image data the current instance currently points to.

Note
This means that if you clone a driver image, you receive a new plain CvbImage without any driver interfaces.

◆ ColorModel()

Cvb::ColorModel ColorModel ( ) const
inlinenoexcept

Color model realized by this image.

Returns
The realized color model.
Exceptions
Doesnot throw any exception.

◆ CoordinateSystem()

AffineMatrix2D CoordinateSystem ( ) const
inlinenoexcept

Get the coordinate system of the image.

Returns
The coordinate system.
Exceptions
Doesnot throw any exception.

◆ Copy() [1/2]

void Copy ( Image targetImage) const
inline

Copies the image data from this image to the target image.

Parameters
[in]targetImageImage Image to copy to.
Exceptions
Anyexception derived from std::exception including CvbException.

This is equivalent to calling CvbImage::Copy(targetImage, Bounds(), CvbPoint());

◆ Copy() [2/2]

void Copy ( Image targetImage,
Rect< int >  sourceRect,
Point2D< int >  targetPosition 
) const
inline

Copies the image data from the source rectangle of this image to the target position inside the target image.

Parameters
[in]targetImageImage to copy to.
[in]sourceRectSource rectangle in pixels to copy from.
[in]targetPositionPosition in the target image in pixels to copy to.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Create() [1/2]

std::unique_ptr< Image > Create ( int  width,
int  height,
int  numPlanes = 1,
DataType  dataType = DataType::Int8BppUnsigned() 
)
inlinestatic

Creates an uninitialized image with the given parameters.

Parameters
[in]widthWidth of the image in pixels.
[in]heightHeight of the image in pixels.
[in]numPlanesNumber of (color) info.
[in]dataTypePixel data type.
Returns
Pointer to the created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Create() [2/2]

static std::unique_ptr< Image > Create ( Size2D< int >  size,
int  numPlanes = 1,
DataType  dataType = DataType::Int8BppUnsigned() 
)
inlinestatic

Creates an uninitialized image with the given parameters.

Parameters
[in]sizeSize of the image in pixels.
[in]numPlanesNumber of (color) info.
[in]dataTypePixel data type.
Returns
Pointer to the created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromHandle() [1/2]

static std::unique_ptr< Image > FromHandle ( HandleGuard< Image > &&  guard)
inlinestatic

Creates an image from a classic API handle.

Parameters
[in]guardLife time guard for C-API handle.
Returns
The image created from the classic API handle.
Exceptions
Anyexception derived from std::exception including CvbException.

The image takes ownership of the handle, so you must share it before using this function.

◆ FromHandle() [2/2]

static std::unique_ptr< T > FromHandle ( HandleGuard< Image > &&  guard,
ARGS &&...  args 
)
inlinestatic

Creates an image from a classic API handle (typed).

Parameters
[in]guardLife time guard for C-API handle.
[in]argsOptional further arguments.
Exceptions
Anyexception derived from std::exception including CvbException.

The image takes ownership of the handle, so you must share it before using this function. Use with extreme caution, as the handle must fulfill the requirements of the specified derived image type. As the are no checks if this is the case, you may get objects with undefined behavior.

◆ FromImages() [1/2]

static VarArgRange< std::unique_ptr< Image >, constImage &, IMAGES... >::type FromImages ( MappingOption  mapping,
const IMAGES &...  images 
)
inlinestatic

Create an image that is the result of concatenating a series of input images.

Parameters
[in]mappingSelects the relationship between the result image and the input images.
[in]imagesImages to be concatenated; all images in the input array must have equal size.
Returns
A Concatenated image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromImages() [2/2]

static TypedRange< std::unique_ptr< Image >, ImagePtr, RANGE >::type FromImages ( MappingOption  mapping,
const RANGE &  images 
)
inlinestatic

Create an image that is the result of concatenating a series of input images.

Parameters
[in]mappingSelects the relationship between the result image and the input images.
[in]imagesImages to be concatenated; all images in the input array must have equal size.
Returns
A Concatenated image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromPlanes() [1/2]

TypedRange< std::unique_ptr< Image >, ImagePlane, RANGE >::type FromPlanes ( MappingOption  mapping,
const RANGE &  planes 
)
inlinestatic

Create an image that is the result of concatenating a series of input planes.

Parameters
[in]mappingSelects the relationship between the result image and the input planes.
[in]planesPlanes to be concatenated. All planes in the input array must have equal size.
Returns
A concatenated image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ FromPlanes() [2/2]

VarArgRange< std::unique_ptr< Image >, ImagePlane &&, PLANES... >::type FromPlanes ( MappingOption  mapping,
PLANES &&...  planes 
)
inlinestatic

Create an image that is the result of concatenating a series of input planes.

Parameters
[in]mappingSelects the relationship between the result image and the input planes.
[in]planesPlanes to be concatenated. All planes in the input array must have equal size.
Returns
A concatenated image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ GetPixel()

std::vector< double > GetPixel ( Point2D< int >  position) const
inline

Gets the pixel values for all planes at a give position.

Parameters
[in]positionPixel position.
Returns
A vector containing all pixel values.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Handle()

void * Handle ( ) const
inlinenoexcept

Classic API image handle.

Returns
Classic API handle.
Exceptions
Doesnot throw any exception.

It is normally not necessary to work with this handle.

◆ Height()

int Height ( ) const
inlinenoexcept

Height of the image in pixels.

Returns
Height in pixels.
Exceptions
Doesnot throw any exception.

◆ ImageToPixelCoordinates() [1/2]

Area2D ImageToPixelCoordinates ( Area2D  area) const
inlinenoexcept

Convert an Area2D from image to pixel coordinates.

Parameters
[in]areaArea in image coordinates.
Returns
Same area in pixel coordinates.
Exceptions
Doesnot throw any exception.

◆ ImageToPixelCoordinates() [2/2]

Point2D< double > ImageToPixelCoordinates ( Point2D< double >  point) const
inlinenoexcept

Convert a point from image to pixel coordinates.

Parameters
[in]pointPoint in image coordinates.
Returns
Same point in pixel coordinates.
Exceptions
Doesnot throw any exception.

◆ Load()

CVB_BEGIN_INLINE_NS std::unique_ptr< Image > Load ( const String fileName)
inlinestatic

◆ Map() [1/2]

std::unique_ptr< Image > Map ( Rect< int >  rect) const
inline

Creates a mapped image of the region of this image.

Parameters
[in]rectRegion to create the map from.
Returns
Pointer to mapped image.
Exceptions
Anyexception derived from std::exception including CvbException.

This is equivalent to calling CvbImage::Map(rect, rect.Size());

◆ Map() [2/2]

std::unique_ptr< Image > Map ( Rect< int >  sourceRect,
Size2D< int >  targetSize 
) const
inline

Creates a mapped image of the region of that image scaled to the size.

Parameters
[in]sourceRectRegion to create the map from.
[in]targetSizeTarget size of the mapped image.
Returns
Pointer to mapped image.
Exceptions
Anyexception derived from std::exception including CvbException.

As this is simply a view to another image, no interpolation is done, when the mapped pixels are accessed. Smaller sizes lead to pixel skipping, while larger sizes lead to replicated pixels.

◆ PixelToImageCoordinates() [1/2]

Area2D PixelToImageCoordinates ( Area2D  area) const
inlinenoexcept

Convert an Area2D from pixel to image coordinates.

Parameters
[in]areaArea in pixel coordinates.
Returns
Same area in image coordinates.
Exceptions
Doesnot throw any exception.

◆ PixelToImageCoordinates() [2/2]

Point2D< double > PixelToImageCoordinates ( Point2D< double >  point) const
inlinenoexcept

Convert a point from pixel to image coordinates.

Parameters
[in]pointPoint in pixel coordinates.
Returns
Same point in image coordinates.
Exceptions
Doesnot throw any exception.

◆ Plane()

ImagePlane Plane ( int  plane) const
inline

Indexed access to the individual plane information.

Parameters
[in]planeIndex of the plane to be accessed.
Returns
Plane information object.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PlaneDataTypesIdentical()

bool PlaneDataTypesIdentical ( ) const
inlinenoexcept

Check if all planes have the same data type.

Returns
True if all image info in this collection have the same data type, false otherwise.
Exceptions
Doesnot throw any exception.

◆ Planes()

std::vector< ImagePlane > Planes ( ) const
inlinenoexcept

Access all planes for this image.

Returns
Vector containing all planes for this image.
Exceptions
Doesnot throw any exception.

◆ PlanesCount()

int PlanesCount ( ) const
inlinenoexcept

Get the number of planes for this image.

Returns
Number of planes.
Exceptions
Doesnot throw any exception.

◆ RaisePixelContentChanged() [1/2]

void RaisePixelContentChanged ( ) const
inline

Inform clients listening to the pixel content changed event, that the image data has been completely updated (full area).

Exceptions
Anyexception derived from std::exception including CvbException.

◆ RaisePixelContentChanged() [2/2]

void RaisePixelContentChanged ( Rect< int >  rect) const
inline

Inform clients listening to the pixel content changed event, that the image data has been updated in the given rectangle.

Parameters
[in]rectAffected area.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ RegisterEventPixelContentChanged()

EventCookie RegisterEventPixelContentChanged ( std::function< void(const Image &, Rect< int >)>  handler)
inline

Register a listener to the pixel content changed event.

Parameters
[in]handlerListener to pixel content changed event.
Returns
Event cookie to manually unregister the listener.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ Save()

void Save ( const String fileName) const
inline

Write the current content of the image into a file.

Parameters
[in]fileNameFile name into which to save the image.
Exceptions
Anyexception derived from std::exception including CvbException.

The file format to be used is determined by the extension of the file name.

◆ SetCoordinateSystem()

void SetCoordinateSystem ( AffineMatrix2D  affineMatrix)
inlinenoexcept

Set the coordinate system of the image.

Parameters
[in]affineMatrixThe new coordinate system.
Exceptions
Doesnot throw any exception.

◆ Size()

Size2D< int > Size ( ) const
inlinenoexcept

Size of the image in pixels.

Returns
Size of the image.
Exceptions
Doesnot throw any exception.

◆ UnregisterEventPixelContentChanged()

void UnregisterEventPixelContentChanged ( EventCookie  eventCookie)
inlinenoexcept

Manually unregister a listener from the pixel content changed event.

Parameters
[in]eventCookieEvent cookie obtained from registering the listener.
Exceptions
Doesnot throw any exception.

◆ Width()

int Width ( ) const
inlinenoexcept

Width of the image in pixels.

Returns
Width in pixels.
Exceptions
Doesnot throw any exception.

Friends And Related Function Documentation

◆ AffineTransform() [1/2]

std::unique_ptr< Image > AffineTransform ( const Image image,
AffineMatrix2D  affineMatrix 
)
related

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

Parameters
[in]imageSource image.
[in]affineMatrixMatrix to transform the image.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ AffineTransform() [2/2]

std::unique_ptr< Image > AffineTransform ( const Image image,
AffineMatrix2D  affineMatrix,
Area2D  area 
)
related

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

Parameters
[in]imageSource image.
[in]affineMatrixMatrix to transform the image,
[in]areaArea of the image to transform.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ InversePolarTransform()

std::unique_ptr< Image > InversePolarTransform ( const Image image,
Angle  startAngle,
double  innerRadius 
)
related
Parameters
[in]imageSource image.
[in]startAngleOrientation of the start (the total azimuth will be determined from the input image).
[in]innerRadiusInner radius of the ring (the outer radius will be determined from the input image).
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

Linear interpolation is being used for the transformation.

◆ InversePolarTransformToDst()

void InversePolarTransformToDst ( const Image imageSrc,
Point2D< double >  center,
Angle  startAngle,
double  innerRadius,
Image imageDst 
)
related

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

Parameters
[in]imageSrcSource image
[in]centerCenter for the inverse transformation (i.e. the point around which the ring will be constructed).
[in]startAngleOrientation of the start (the total azimuth will be determined from the input image).
[in]innerRadiusInner radius of the ring (the outer radius will be determined from the input image).
[in]imageDstDestination image into which the unwrap result will be painted.
Exceptions
Anyexception derived from std::exception including CvbException.

Linear interpolation is being used for the transformation.

◆ LinearTransform()

std::unique_ptr< Image > LinearTransform ( const Image image,
Matrix2D  matrix 
)
related

Creates a linear transformation (matrix transformation).

Parameters
[in]imageSource image.
[in]matrixMatrix to transform the image.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

Linear interpolation is used for the transformation.

◆ MapTo8Bit()

std::unique_ptr< Image > MapTo8Bit ( const Image image,
PlaneNormalization  planeNormalization = PlaneNormalization::Identical 
)
related

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

Parameters
[in]imageImage to be mapped.
[in]planeNormalizationPlane normalization mode.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ NormalizeMeanVariance()

std::unique_ptr< Image > NormalizeMeanVariance ( const Image image,
double  targetMean,
double  targetVariance 
)
related

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

Parameters
[in]imageImage to be normalized.
[in]targetMeanTarget mean value to achieve.
[in]targetVarianceTarget variance value to achieve.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ NormalizeMinMax()

std::unique_ptr< Image > NormalizeMinMax ( const Image image,
double  targetMin,
double  targetMax 
)
related

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

Parameters
[in]imageImage to be normalized.
[in]targetMinTarget minimum value to achieve.
[in]targetMaxTarget maximum value to achieve.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

◆ PolarTransform() [1/2]

std::unique_ptr< Image > PolarTransform ( const Image image,
Point2D< double >  center,
double  innerRadius,
double  outerRadius 
)
related

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

Parameters
[in]imageSource image.
[in]centerCenter image for the polar transform.
[in]innerRadiusInner radius of the ring.
[in]outerRadiusOuter radius of the ring.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

Linear interpolation is being used for the transformation.

◆ PolarTransform() [2/2]

std::unique_ptr< Image > PolarTransform ( const Image image,
Point2D< double >  center,
double  innerRadius,
double  outerRadius,
Angle  startAngle,
Angle  totalAngle 
)
related

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

Parameters
[in]imageSource image.
[in]centerCenter image for the polar transform.
[in]innerRadiusInner radius of the ring.
[in]outerRadiusOuter radius of the ring.
[in]startAngleOrientation of the start angle.
[in]totalAngleThe total angle to cover.
Returns
Pointer to newly created image.
Exceptions
Anyexception derived from std::exception including CvbException.

Linear interpolation is being used for the transformation.