Classes | |
| class | ColorspaceConverter |
| class | Image |
| This class template represents a 2D image. More... | |
| class | ImageFormatTraits |
| The ImageFormatTraits class template specifies the characteristics of the available image formats. More... | |
| class | ImageFormatTraits< GRAY1 > |
| class | ImageFormatTraits< GRAY8 > |
| class | ImageFormatTraits< GRAY16 > |
| class | ImageFormatTraits< GRAY32 > |
| class | ImageFormatTraits< GRAY64 > |
| class | ImageFormatTraits< GRAY_SIGNED16 > |
| class | ImageFormatTraits< GRAY_SIGNED32 > |
| class | ImageFormatTraits< GRAY_FLOAT32 > |
| class | ImageFormatTraits< GRAY_FLOAT64 > |
| class | ImageFormatTraits< RGB8 > |
| class | ImageFormatTraits< RGB16 > |
| class | ImageFormatTraits< RGB_SIGNED16 > |
| class | ImageFormatTraits< RGB_SIGNED32 > |
| class | ImageFormatTraits< RGB_FLOAT32 > |
| class | ImageFormatTraits< RGB_FLOAT64 > |
| class | ImageFormatTraits< HSV_FLOAT64 > |
| class | ImageFormatTraits< RGBA8 > |
| class | ImageFormatTraits< BGRA8 > |
| class | Kernel |
| This class template represents a 2D convolution kernel. More... | |
| class | Snake |
| class | OpticalFlow |
| This class uses the method of Lucas and Kanade[1] to estimate the optical flow between two images. More... | |
| struct | PixelBGRA |
| struct | PixelHSV |
| struct | PixelRGB |
| struct | PixelRGBA |
Typedefs | |
| typedef PixelBGRA< UnsignedInt8 > | PixelBGRA8 |
| typedef PixelBGRA< UnsignedInt16 > | PixelBGRA16 |
| typedef PixelBGRA< Int16 > | PixelBGRASigned16 |
| typedef PixelBGRA< Int32 > | PixelBGRASigned32 |
| typedef PixelBGRA< Float32 > | PixelBGRAFloat32 |
| typedef PixelBGRA< Float64 > | PixelBGRAFloat64 |
| typedef PixelHSV< UnsignedInt8 > | PixelHSV8 |
| typedef PixelHSV< UnsignedInt16 > | PixelHSV16 |
| typedef PixelHSV< Int16 > | PixelHSVSigned16 |
| typedef PixelHSV< Int32 > | PixelHSVSigned32 |
| typedef PixelHSV< Float32 > | PixelHSVFloat32 |
| typedef PixelHSV< Float64 > | PixelHSVFloat64 |
| typedef PixelRGB< UnsignedInt8 > | PixelRGB8 |
| typedef PixelRGB< UnsignedInt16 > | PixelRGB16 |
| typedef PixelRGB< Int16 > | PixelRGBSigned16 |
| typedef PixelRGB< Int32 > | PixelRGBSigned32 |
| typedef PixelRGB< Float32 > | PixelRGBFloat32 |
| typedef PixelRGB< Float64 > | PixelRGBFloat64 |
| typedef PixelRGBA< UnsignedInt8 > | PixelRGBA8 |
| typedef PixelRGBA< UnsignedInt16 > | PixelRGBA16 |
| typedef PixelRGBA< Int16 > | PixelRGBASigned16 |
| typedef PixelRGBA< Int32 > | PixelRGBASigned32 |
| typedef PixelRGBA< Float32 > | PixelRGBAFloat32 |
| typedef PixelRGBA< Float64 > | PixelRGBAFloat64 |
Enumerations | |
| enum | ImageFormat { GRAY1, GRAY8, GRAY16, GRAY32, GRAY64, GRAY_SIGNED16, GRAY_SIGNED32, GRAY_FLOAT32, GRAY_FLOAT64, RGB8, RGB16, RGB_SIGNED16, RGB_SIGNED32, RGB_FLOAT32, RGB_FLOAT64, HSV_FLOAT64, BGRA8, RGBA8, YUV420 } |
| This enum indicates the acceptable image format values. More... | |
| enum | SnakeStrategy { SNAKE_EUCLIDEAN_DISTANCE } |
Functions | |
| template<ImageFormat FORMAT> | |
| Image< GRAY1 > | applyCanny (const Image< FORMAT > &inputImage, size_t gaussianSize=5, double upperThreshold=0.0, double lowerThreshold=0.0) |
| template<ImageFormat FORMAT_OUT, ImageFormat FORMAT_IN> | |
| Image< FORMAT_OUT > | connectedComponents (const Image< FORMAT_IN > &inputImage) |
| template<ImageFormat FORMAT_OUT, ImageFormat FORMAT_IN> | |
| Image< FORMAT_OUT > | connectedComponents (const Image< FORMAT_IN > &inputImage, size_t &numberOfComponents) |
| This function is just like connectedComponents(const Image&), except that it also returns (by reference) the number of components in the image. | |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | dilate (const Image< FORMAT > &inputImage) |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | erode (const Image< FORMAT > &inputImage) |
| template<ImageFormat OutputFormat, ImageFormat IntermediateFormat, ImageFormat ImageFormat, class KernelType> | |
| Image< OutputFormat > | filter2D (const Kernel< KernelType > &kernel, const Image< ImageFormat > &image, const typename ImageFormatTraits< OutputFormat >::PixelType fillValue, ConvolutionStrategy convolutionStrategy=DLR_CONVOLVE_PAD_RESULT) |
| This function filters an image with the given kernel. | |
| template<ImageFormat OutputFormat, ImageFormat IntermediateFormat, ImageFormat ImageFormat, class KernelType> | |
| void | filter2D (Image< OutputFormat > &outputImage, const Kernel< KernelType > &kernel, const Image< ImageFormat > &image, const typename ImageFormatTraits< OutputFormat >::PixelType fillValue, ConvolutionStrategy convolutionStrategy=DLR_CONVOLVE_PAD_RESULT) |
| This function filters an image with the given kernel, placing the result into a pre-constructed Image instance. | |
| template<ImageFormat FORMAT> | |
| Array2D< double > | getEuclideanDistance (const Image< FORMAT > &inputImage, size_t maxNumberOfPasses) |
| template<ImageFormat FORMAT> | |
| Array2D< double > | getEuclideanDistance (const Image< FORMAT > &inputImage, size_t maxNumberOfPasses, size_t &numberOfPassesUsed) |
| Array1D< unsigned int > | getHistogram (const Image< GRAY8 > &inputImage) |
| This function computes the histogram of an image. | |
| Image< GRAY8 > | histogramEqualize (const Image< GRAY8 > &inputImage) |
| This function remaps the pixel values of the input image in such a way that output pixel value increases monotonically with input pixel value, and the histogram of the output image is nearly flat. | |
| Image< GRAY8 > | readPGM8 (const std::string &fileName) |
| Image< GRAY8 > | readPGM8 (const std::string &fileName, std::string &commentString) |
| Image< GRAY16 > | readPGM16 (const std::string &fileName) |
| Image< RGB8 > | readPPM8 (const std::string &fileName) |
| void | writePGM8 (const std::string &fileName, const Image< GRAY8 > &outputImage, const std::string &comment) |
| void | writePGM16 (const std::string &fileName, const Image< GRAY16 > &outputImage, const std::string &comment) |
| void | writePPM8 (const std::string &fileName, const Image< RGB8 > &outputImage, const std::string &comment) |
| template<class KERNEL_TYPE> | |
| Kernel< KERNEL_TYPE > | getGaussianKernel (size_t rows, size_t columns, double rowSigma=-1.0, double columnSigma=-1.0) |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | nonMaximumSuppress (const Image< FORMAT > &inputImage, const Array2D< Float64 > &gradX, const Array2D< Float64 > &gradY) |
| This function zeros any pixels of the input image which are not plausible edges. | |
| template<class TYPE> | |
| PixelBGRA< TYPE > | operator- (const PixelBGRA< TYPE > &pixel0, const PixelBGRA< TYPE > &pixel1) |
| This operator subtracts the values of the individual color components of its arguments. | |
| template<class TYPE> | |
| bool | operator== (const PixelBGRA< TYPE > &pixel0, const PixelBGRA< TYPE > &pixel1) |
| This operator returns true if the contents of the two argments are identical, false otherwise. | |
| template<class TYPE> | |
| PixelHSV< TYPE > | operator- (const PixelHSV< TYPE > &pixel0, const PixelHSV< TYPE > &pixel1) |
| This operator subtracts the values of the individual color components of its arguments. | |
| template<class TYPE> | |
| bool | operator== (const PixelHSV< TYPE > &pixel0, const PixelHSV< TYPE > &pixel1) |
| This operator returns true if the contents of the two argments are identical, false otherwise. | |
| template<class TYPE> | |
| PixelRGB< TYPE > | operator- (const PixelRGB< TYPE > &pixel0, const PixelRGB< TYPE > &pixel1) |
| This operator subtracts the values of the individual color components of its arguments. | |
| template<class TYPE> | |
| bool | operator== (const PixelRGB< TYPE > &pixel0, const PixelRGB< TYPE > &pixel1) |
| This operator returns true if the contents of the two argments are identical, false otherwise. | |
| template<class TYPE> | |
| PixelRGBA< TYPE > | operator- (const PixelRGBA< TYPE > &pixel0, const PixelRGBA< TYPE > &pixel1) |
| This operator subtracts the values of the individual color components of its arguments. | |
| template<class TYPE> | |
| bool | operator== (const PixelRGBA< TYPE > &pixel0, const PixelRGBA< TYPE > &pixel1) |
| This operator returns true if the contents of the two argments are identical, false otherwise. | |
| template<class InIter0, class InIter1> | |
| Transform3D | registerPoints3D (InIter0 fromPointsBegin, InIter0 fromPointsEnd, InIter1 toPointsBegin) |
| template<class InIter0, class InIter1, class InIter2> | |
| Transform3D | registerPoints3D (InIter0 fromPointsBegin, InIter0 fromPointsEnd, InIter1 toPointsBegin, InIter2 selectedFlagsBegin) |
| This function works just like the three-argument form of registerPoints3D(), except that only selected points are considered in the registration. | |
| template<class InIter0, class InIter1, class OutIter0> | |
| Transform3D | registerPoints3D (InIter0 fromPointsBegin, InIter0 fromPointsEnd, InIter1 toPointsBegin, OutIter0 selectedFlagsBegin, double inclusion, double maximumResidual=-1.0, size_t maximumIterations=5) |
| This function calls the four-argument form of registerPoints3D() repeatedly while trying to identify and ignore outliers. | |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | applySobelX (const Image< FORMAT > &inputImage, bool normalizeResult=false) |
| This function applies the sobel edge operator in the X direction. | |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | applySobelY (const Image< FORMAT > &inputImage, bool normalizeResult=false) |
| This function applies the sobel edge operator in the Y direction. | |
| template<ImageFormat FORMAT> | |
| bool | associateColorComponents (Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > &inputArray, Image< FORMAT > &outputImage) |
| template<ImageFormat FORMAT> | |
| Image< FORMAT > | associateColorComponents (Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > &inputArray) |
| template<ImageFormat OUTPUT_FORMAT, ImageFormat INPUT_FORMAT> | |
| Image< OUTPUT_FORMAT > | convertColorspace (const Image< INPUT_FORMAT > &inputImage) |
| This function takes an image in one colorspace and generates a corresponding image in a second colorspace. | |
| template<ImageFormat FORMAT> | |
| bool | dissociateColorComponents (Image< FORMAT > &inputImage, Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > &outputArray) |
| This function returns by reference an array which either shares or copies the data from the input image. | |
| template<ImageFormat FORMAT> | |
| Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > | dissociateColorComponents (Image< FORMAT > &inputImage) |
| template<ImageFormat Format> | |
| Image< Format > | subsample (const Image< Format > &inputImage, size_t rowStep=2, size_t columnStep=2) |
| This function subsamples its input to create a new, smaller image. | |
| template<class Type, ImageFormat FORMAT> | |
| Array2D< Type > | toArray (const Image< FORMAT > &inputImage) |
| This function creates a new array and copies into it the pixel data from the input image. | |
Feel free to play around with it, but please bear in mind that its interface is not stable.
This enum indicates the acceptable image format values.
Please see the ImageFormatTraits class template for the characteristics of these image formats.
| GRAY1 | |
| GRAY8 | |
| GRAY16 | |
| GRAY32 | |
| GRAY64 | |
| GRAY_SIGNED16 | |
| GRAY_SIGNED32 | |
| GRAY_FLOAT32 | |
| GRAY_FLOAT64 | |
| RGB8 | |
| RGB16 | |
| RGB_SIGNED16 | |
| RGB_SIGNED32 | |
| RGB_FLOAT32 | |
| RGB_FLOAT64 | |
| HSV_FLOAT64 | |
| BGRA8 | |
| RGBA8 | |
| YUV420 |
Definition at line 27 of file imageFormat.h.
| Image< FORMAT > dlr::computerVision::applySobelX | ( | const Image< FORMAT > & | inputImage, | |
| bool | normalizeResult = false | |||
| ) | [inline] |
This function applies the sobel edge operator in the X direction.
Specifically, convolves the image with the 3x3 kernel
[[-1, 0, 1],
[-2, 0, 2],
[-1, 0, 1]]
and then optionally rescales the result to be proportional to the image gradient with scale factor 1.0.
| inputImage | This argument is the image to be convolved. | |
| normalizeResult | This argument specifies whether or not to divide the resulting pixel values by 8. Setting this argument to true will result in lost precision on integer types. This feature is currently not implemented, so please leave normalizeResult at its default value of false. |
Definition at line 96 of file sobel.h.
References DLR_THROW.
Referenced by applyCanny(), and dlr::computerVision::Snake::setInterestImage().
| Image< FORMAT > dlr::computerVision::applySobelY | ( | const Image< FORMAT > & | inputImage, | |
| bool | normalizeResult = false | |||
| ) | [inline] |
This function applies the sobel edge operator in the Y direction.
Specifically, convolves the image with the 3x3 kernel
[[-1, -2, -1],
[ 0, 0, 0],
[ 1, 2, 1]]
and then optionally rescales the result to be proportional to the image gradient with scale factor 1.0.
| inputImage | This argument is the image to be convolved. | |
| normalizeResult | This argument specifies whether or not to divide the resulting pixel values by 8. Setting this argument to true will result in lost precision on integer types. This feature is currently not implemented, so please leave normalizeResult at its default value of false. |
Definition at line 192 of file sobel.h.
References DLR_THROW.
Referenced by applyCanny(), and dlr::computerVision::Snake::setInterestImage().
| Image< FORMAT > dlr::computerVision::associateColorComponents | ( | Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > & | inputArray | ) | [inline] |
WARNING: The returned image does no memory management. It is only valid until the original input image is destroyed.
| inputArray | This argument is the array from which to construct the return image. |
Definition at line 585 of file dlrComputerVision/utilities.h.
References associateColorComponents(), and DLR_THROW.
Referenced by associateColorComponents().
| bool dlr::computerVision::associateColorComponents | ( | Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > & | inputArray, | |
| Image< FORMAT > & | outputImage | |||
| ) | [inline] |
If possible, this function returns an Image which references the same memory as the input array, but in which each pixel is the aggregate of the appropriate number of elements from the array. For example, if this function is called with template argument RGB8, and an Nx(3*M) array of UnsignedInt8 is passed as the argument, then the return value will be an NxM Image<RGB8> which references the same memory as the argument. Imagine that the first three elements of the first row of the argument are 12, 14, and 72. In this case, the upper-left RGB value of the returned image image is {12, 14, 72}. This memory sharing only works if the compiler does not "pad" the pixel struct to byte align its members.
If memory sharing is not possible, then this function tests the size of argument outputImage, reinitializes it only if the size does not match the size of the input array, and then copies the data from inputArray to outputImage.
WARNING: If data sharing is possible, the returned image does no memory management. It is only valid until the original input data is destroyed.
If you use this function in conjunction with dissociateColorComponents(), you can simply ignore the question of whether the data sharing works or not. For example, you might use associateColorComponents to get an Image to operate on, do all of your image processing, and then use dissocateColorComponents to get back to a flat array. If data sharing is possible, all of your operations will have taken place in the original array. If data sharing isn't possible, then the two functions will take care of copying back and forth between the image and the flat array.
| inputArray | This argument is the array from which to construct the return image. | |
| outputImage | This argument is the image which will be modified or copied to. |
Definition at line 571 of file dlrComputerVision/utilities.h.
References associateColorComponents().
Referenced by associateColorComponents().
| Image< FORMAT_OUT > dlr::computerVision::connectedComponents | ( | const Image< FORMAT_IN > & | inputImage, | |
| size_t & | numberOfComponents | |||
| ) | [inline] |
This function is just like connectedComponents(const Image&), except that it also returns (by reference) the number of components in the image.
| inputImage | This argument is the segmented image. Pixels which are not part of a blob must have value of 0. All other values are considered to be blob pixels. All non-zero pixels are considered to be part of the same class. That is, adjacent pixels with different non-zero values will be considered to be part of the same blob. | |
| numberOfComponents | This argument returns by reference how many distinct components were identified in the image, not counting the background. |
Definition at line 156 of file connectedComponents.h.
| Image< FORMAT_OUT > dlr::computerVision::connectedComponents | ( | const Image< FORMAT_IN > & | inputImage | ) | [inline] |
| inputImage | This argument is the segmented image. Pixels which are not part of a blob must have value of 0. All other values are considered to be blob pixels. All non-zero pixels are considered to be part of the same class. That is, adjacent pixels with different non-zero values will be considered to be part of the same blob. |
Definition at line 145 of file connectedComponents.h.
| Image< OUTPUT_FORMAT > dlr::computerVision::convertColorspace | ( | const Image< INPUT_FORMAT > & | inputImage | ) | [inline] |
This function takes an image in one colorspace and generates a corresponding image in a second colorspace.
Use this function as follows:
Image<GRAY8> = convertColorspace<GRAY8, RGB16>(myRGB16Image);
or equivalently, the second template argument can be left implicit,
Image<GRAY8> = convertColorspace<GRAY8>(myRGB16Image);
This function only works for image formats in which there's a one-to-one mapping between input and output pixel types. When converting between formats which don't match this requirement, such as when converting from RGB8 to YUV420, please use a different routine.
| inputImage | This argument is the image to be converted. |
Definition at line 606 of file dlrComputerVision/utilities.h.
| Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > dlr::computerVision::dissociateColorComponents | ( | Image< FORMAT > & | inputImage | ) | [inline] |
WARNING: The returned array does no memory management. It is only valid until the original input image is destroyed.
| inputImage | This argument is the image from which to construct the return array. |
Definition at line 635 of file dlrComputerVision/utilities.h.
References dissociateColorComponents(), and DLR_THROW.
Referenced by dissociateColorComponents().
| bool dlr::computerVision::dissociateColorComponents | ( | Image< FORMAT > & | inputImage, | |
| Array2D< typename ImageFormatTraits< FORMAT >::ComponentType > & | outputArray | |||
| ) | [inline] |
This function returns by reference an array which either shares or copies the data from the input image.
If possible, this function returns an Array2D which references the same memory as the input image, but in which each pixel has been "flattened" so that the returned array has a separate element for each color component of each pixel. For example, if this function is called with an NxM Image<RGB8> as its argument, the returned value will be an Nx(3*M) array of 8-bit unsigned ints which references the same memorty. Imagine that the upper-left RGB value of the image is {12, 14, 72}. In this case, the first three elements of first row of the returned image will be 12, 14, and 72. This memory sharing only works if the compiler does not "pad" the pixel struct to byte align its members.
If memory sharing is not possible, then this function tests the size of argument outputArray, reinitializes it only if the size does not match the size of the input image, and then copies the data from inputImage to outputArray.
WARNING: If data sharing is possible, the returned array does no memory management. It is only valid until the original input data is destroyed.
If you use this function in conjunction with associateColorComponents(), you can simply ignore the question of whether the data sharing works or not. For example, you might use associateColorComponents to get an Image to operate on, do all of your image processing, and then use dissocateColorComponents to get back to a flat array. If data sharing is possible, all of your operations will have taken place in the original array. If data sharing isn't possible, then the two functions will take care of copying back and forth between the image and the flat array.
| inputImage | This argument is the image from which to construct the return array. |
Definition at line 621 of file dlrComputerVision/utilities.h.
References dissociateColorComponents().
Referenced by dissociateColorComponents(), and toArray().
| void dlr::computerVision::filter2D | ( | Image< OutputFormat > & | outputImage, | |
| const Kernel< KernelType > & | kernel, | |||
| const Image< ImageFormat > & | image, | |||
| const typename ImageFormatTraits< OutputFormat >::PixelType | fillValue, | |||
| ConvolutionStrategy | convolutionStrategy = DLR_CONVOLVE_PAD_RESULT | |||
| ) | [inline] |
This function filters an image with the given kernel, placing the result into a pre-constructed Image instance.
Argument "convolutionStrategy" indicates what to do with the edges of the filtered image (where the filter kernel only partially overlaps the input image). Currently filter() only supports DLR_CONVOLVE_PAD_RESULT.
| outputImage | This argument is used to return the result. The associated memory is not reallocated unless outputImage has a different number of rows and/or columns than image. | |
| kernel | This argument is the Kernel instance with which to filter. | |
| image | This argument is the Image to be filtered. | |
| fillValue | This argument specifies the value with which image edges should be padded. | |
| convolutionStrategy | This argument specifies how to handle the edges of the image. Please see the dlrNumeric documentation for more information. |
Definition at line 498 of file filter.h.
References dlr::numeric::DLR_CONVOLVE_PAD_RESULT, dlr::numeric::DLR_CONVOLVE_ROI_SAME, dlr::computerVision::Kernel< ELEMENT_TYPE >::getArray2D(), dlr::computerVision::Kernel< ELEMENT_TYPE >::getColumnComponent(), dlr::computerVision::Kernel< ELEMENT_TYPE >::getRowComponent(), and dlr::computerVision::Kernel< ELEMENT_TYPE >::isSeparable().
| Image< OutputFormat > dlr::computerVision::filter2D | ( | const Kernel< KernelType > & | kernel, | |
| const Image< ImageFormat > & | image, | |||
| const typename ImageFormatTraits< OutputFormat >::PixelType | fillValue, | |||
| ConvolutionStrategy | convolutionStrategy = DLR_CONVOLVE_PAD_RESULT | |||
| ) | [inline] |
This function filters an image with the given kernel.
Argument "convolutionStrategy" indicates what to do with the edges of the filtered image (where the filter kernel only partially overlaps the input image). Currently filter() only supports DLR_CONVOLVE_PAD_RESULT.
| kernel | This argument is the Kernel instance with which to filter. | |
| image | This argument is the Image to be filtered. | |
| fillValue | This argument specifies the value with which image edges should be padded. | |
| convolutionStrategy | This argument specifies how to handle the edges of the image. Please see the dlrNumeric documentation for more information. |
| Kernel< KERNEL_TYPE > dlr::computerVision::getGaussianKernel | ( | size_t | rows, | |
| size_t | columns, | |||
| double | rowSigma = -1.0, |
|||
| double | columnSigma = -1.0 | |||
| ) | [inline] |
The kernel will be normalized prior to return, so that the sum of its elements is equal to zero.
| rows | This argument specifies how many rows the kernel should have. | |
| columns | This argument specifies how many columns the kernel should have. | |
| rowSigma | This argument specifies the standard deviation of the kernel in the Y direction. If sigma is less than 0.0, then it will be automatically reset to rows / 6.0. | |
| columnSigma | This argument specifies the standard deviation of the kernel in the X direction. If sigma is less than 0.0, then it will be automatically reset columns / 6.0. |
Definition at line 95 of file kernels.h.
References DLR_THROW.
| Array1D< unsigned int > dlr::computerVision::getHistogram | ( | const Image< GRAY8 > & | inputImage | ) |
This function computes the histogram of an image.
That is, it counts the number of pixels with each possible value and returns a 1D array of counts.
| inputImage | This argument is the image to be histogrammed. |
Definition at line 26 of file histogramEqualize.cpp.
References DLR_THROW.
Referenced by histogramEqualize().
| Image< GRAY8 > dlr::computerVision::histogramEqualize | ( | const Image< GRAY8 > & | inputImage | ) |
This function remaps the pixel values of the input image in such a way that output pixel value increases monotonically with input pixel value, and the histogram of the output image is nearly flat.
| inputImage | This argument is the image to be equalized. |
Definition at line 50 of file histogramEqualize.cpp.
References getHistogram().
| Image< FORMAT > dlr::computerVision::nonMaximumSuppress | ( | const Image< FORMAT > & | inputImage, | |
| const Array2D< Float64 > & | gradX, | |||
| const Array2D< Float64 > & | gradY | |||
| ) | [inline] |
This function zeros any pixels of the input image which are not plausible edges.
Definition at line 53 of file nonMaximumSuppress.h.
References DLR_THROW.
Referenced by applyCanny().
| PixelRGBA< TYPE > dlr::computerVision::operator- | ( | const PixelRGBA< TYPE > & | pixel0, | |
| const PixelRGBA< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator subtracts the values of the individual color components of its arguments.
| pixel0 | The color component values of pixel1 will be subtracted from the color component values of this pixel. | |
| pixel1 | The color component values of this pixel will be subtracted from the color component values of pixel1. |
Definition at line 226 of file pixelRGBA.h.
References dlr::computerVision::PixelRGBA< TYPE >::alpha, dlr::computerVision::PixelRGBA< TYPE >::blue, dlr::computerVision::PixelRGBA< TYPE >::green, and dlr::computerVision::PixelRGBA< TYPE >::red.
| PixelRGB< TYPE > dlr::computerVision::operator- | ( | const PixelRGB< TYPE > & | pixel0, | |
| const PixelRGB< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator subtracts the values of the individual color components of its arguments.
| pixel0 | The color component values of pixel1 will be subtracted from the color component values of this pixel. | |
| pixel1 | The color component values of this pixel will be subtracted from the color component values of pixel1. |
Definition at line 217 of file pixelRGB.h.
References dlr::computerVision::PixelRGB< TYPE >::blue, dlr::computerVision::PixelRGB< TYPE >::green, and dlr::computerVision::PixelRGB< TYPE >::red.
| PixelHSV< TYPE > dlr::computerVision::operator- | ( | const PixelHSV< TYPE > & | pixel0, | |
| const PixelHSV< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator subtracts the values of the individual color components of its arguments.
| pixel0 | The color component values of pixel1 will be subtracted from the color component values of this pixel. | |
| pixel1 | The color component values of this pixel will be subtracted from the color component values of pixel1. |
Definition at line 219 of file pixelHSV.h.
References dlr::computerVision::PixelHSV< TYPE >::hue, dlr::computerVision::PixelHSV< TYPE >::saturation, and dlr::computerVision::PixelHSV< TYPE >::value.
| PixelBGRA< TYPE > dlr::computerVision::operator- | ( | const PixelBGRA< TYPE > & | pixel0, | |
| const PixelBGRA< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator subtracts the values of the individual color components of its arguments.
| pixel0 | The color component values of pixel1 will be subtracted from the color component values of this pixel. | |
| pixel1 | The color component values of this pixel will be subtracted from the color component values of pixel1. |
Definition at line 226 of file pixelBGRA.h.
References dlr::computerVision::PixelBGRA< TYPE >::alpha, dlr::computerVision::PixelBGRA< TYPE >::blue, dlr::computerVision::PixelBGRA< TYPE >::green, and dlr::computerVision::PixelBGRA< TYPE >::red.
| bool dlr::computerVision::operator== | ( | const PixelRGBA< TYPE > & | pixel0, | |
| const PixelRGBA< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator returns true if the contents of the two argments are identical, false otherwise.
| pixel0 | This argument is the first pixel value to be compared. | |
| pixel1 | This argument is the second pixel value to be compared. |
Definition at line 240 of file pixelRGBA.h.
References dlr::computerVision::PixelRGBA< TYPE >::alpha, dlr::computerVision::PixelRGBA< TYPE >::blue, dlr::computerVision::PixelRGBA< TYPE >::green, and dlr::computerVision::PixelRGBA< TYPE >::red.
| bool dlr::computerVision::operator== | ( | const PixelRGB< TYPE > & | pixel0, | |
| const PixelRGB< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator returns true if the contents of the two argments are identical, false otherwise.
| pixel0 | This argument is the first pixel value to be compared. | |
| pixel1 | This argument is the second pixel value to be compared. |
Definition at line 230 of file pixelRGB.h.
References dlr::computerVision::PixelRGB< TYPE >::blue, dlr::computerVision::PixelRGB< TYPE >::green, and dlr::computerVision::PixelRGB< TYPE >::red.
| bool dlr::computerVision::operator== | ( | const PixelHSV< TYPE > & | pixel0, | |
| const PixelHSV< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator returns true if the contents of the two argments are identical, false otherwise.
| pixel0 | This argument is the first pixel value to be compahue. | |
| pixel1 | This argument is the second pixel value to be compahue. |
Definition at line 232 of file pixelHSV.h.
References dlr::computerVision::PixelHSV< TYPE >::hue, dlr::computerVision::PixelHSV< TYPE >::saturation, and dlr::computerVision::PixelHSV< TYPE >::value.
| bool dlr::computerVision::operator== | ( | const PixelBGRA< TYPE > & | pixel0, | |
| const PixelBGRA< TYPE > & | pixel1 | |||
| ) | [inline] |
This operator returns true if the contents of the two argments are identical, false otherwise.
| pixel0 | This argument is the first pixel value to be compablue. | |
| pixel1 | This argument is the second pixel value to be compablue. |
Definition at line 240 of file pixelBGRA.h.
References dlr::computerVision::PixelBGRA< TYPE >::alpha, dlr::computerVision::PixelBGRA< TYPE >::blue, dlr::computerVision::PixelBGRA< TYPE >::green, and dlr::computerVision::PixelBGRA< TYPE >::red.
| Transform3D dlr::computerVision::registerPoints3D | ( | InIter0 | fromPointsBegin, | |
| InIter0 | fromPointsEnd, | |||
| InIter1 | toPointsBegin, | |||
| OutIter0 | selectedFlagsBegin, | |||
| double | inclusion, | |||
| double | maximumResidual = -1.0, |
|||
| size_t | maximumIterations = 5 | |||
| ) | [inline] |
This function calls the four-argument form of registerPoints3D() repeatedly while trying to identify and ignore outliers.
Iteration terminates when a call to the four-argument form of registerPoints3D() does not change the selected outlier list. Calling this function with argument inclusion set to 1.0 and argument maximumResidual less than zero is just the same as calling the four-argument form of of registerPoints3D with flagsBegin pointing to a sequence of all true.
| fromPointsBegin | This iterator, along with fromPointsEnd, defines one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by this iterator pair and transform them so that they match the corresponding elements of the "to" range as closely as possible in the least-squares sense. | |
| fromPointsEnd | See the documentation for argument fromPointsBegin. | |
| toPointsBegin | This argument defines the beginning of one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by arguments fromPointsBegin and fromPointsEnd, and transform them so that they match as closely as possible (in the least squares sense) the corresponding elements of the range starting from toPointsBegin and extending (fromPointsEnd - fromPointsBegin) elements. possible in the least-squares sense. | |
| flagsBegin | This output iterator will be used to return a sequence of bools indicating which points were used in the registration. For points which were included in the registration, the corresponding bool will be true. | |
| inclusion | This argument specifies the proportion of the dataset which is expected to be inliers. Setting this value to 1.0 or greater indicates that all of the points should be included in the registration, unless their inclusion is countermanded by argument maximumResidual. Setting this value less than 0.0 has the same effect as settint it to 1.0. To clarify(?): at each call to the three-argument form of registerPoints3D(), only floor(inclusion * (int)(fromPointsEnd - fromPointsBegin)) pairs of points will be used, and the points used will be those with the smallest residual prior to the call to the three-argument form of registerPoints3D(). | |
| maximumResidual | This argument specifies the largest expected residual between corresponding points after the registration. Pairs of points which differ by more than this amount will be assumed to be outliers and ignored during the next registration. Setting this argument less than zero indicates that all pairs of points should be included in the registration, unless some points are countermanded by argument inclusion. | |
| maximumIterations | This argument how many iterations are permissible. The loop (register -> compute outliers -> repeat) will terminate after this many iterations even if the set of points chosen as outliers is still changing. |
Definition at line 351 of file registerPoints3D.h.
References dlr::common::composeFunctor_1_2(), DLR_THROW, dlr::numeric::magnitudeSquared(), and registerPoints3D().
| Transform3D dlr::computerVision::registerPoints3D | ( | InIter0 | fromPointsBegin, | |
| InIter0 | fromPointsEnd, | |||
| InIter1 | toPointsBegin, | |||
| InIter2 | selectedFlagsBegin | |||
| ) | [inline] |
This function works just like the three-argument form of registerPoints3D(), except that only selected points are considered in the registration.
| fromPointsBegin | This iterator, along with fromPointsEnd, defines one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by this iterator pair and transform them so that they match the corresponding elements of the "to" range as closely as possible in the least-squares sense. | |
| fromPointsEnd | See the documentation for argument fromPointsBegin. | |
| toPointsBegin | This argument defines the beginning of one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by arguments fromPointsBegin and fromPointsEnd, and transform them so that they match as closely as possible (in the least squares sense) the corresponding elements of the range starting from toPointsBegin and extending (fromPointsEnd - fromPointsBegin) elements. | |
| flagsBegin | This argument defines the beginning of a sequence of boolean values indicating which points should be included in the registration. That is, flagsBegin is an iterator which must dereference to a bool, and the sequence from flagsBegin to flagsBegin + (fromPointsEnd - fromPointsBegin) must be valid. Points will be included in the registration iff the corresponding bool is true. |
Definition at line 238 of file registerPoints3D.h.
References dlr::numeric::argmax(), dlr::numeric::count(), DLR_THROW, dlr::linearAlgebra::eigenvectorsSymmetric(), dlr::numeric::matrixMultiply(), and dlr::numeric::quaternionToTransform3D().
| Transform3D dlr::computerVision::registerPoints3D | ( | InIter0 | fromPointsBegin, | |
| InIter0 | fromPointsEnd, | |||
| InIter1 | toPointsBegin | |||
| ) | [inline] |
Opt. Soc. Am., Vol. 4(4), April, 1987. Find the Rigid body tranform which takes one set of points and most nearly registers them with a second set.
| fromPointsBegin | This iterator, along with fromPointsEnd, defines one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by this iterator pair and transform them so that they match the corresponding elements of the "to" range as closely as possible in the least-squares sense. | |
| fromPointsEnd | See the documentation for argument fromPointsBegin. | |
| toPointsBegin | This argument defines the beginning of one of the two sets of points to be registered. The returned Transform3D instance will take points in the range specified by arguments fromPointsBegin and fromPointsEnd, and transform them so that they match as closely as possible (in the least squares sense) the corresponding elements of the range starting from toPointsBegin and extending (fromPointsEnd - fromPointsBegin) elements. possible in the least-squares sense. |
Definition at line 227 of file registerPoints3D.h.
Referenced by registerPoints3D().
| Image< Format > dlr::computerVision::subsample | ( | const Image< Format > & | inputImage, | |
| size_t | rowStep = 2, |
|||
| size_t | columnStep = 2 | |||
| ) | [inline] |
This function subsamples its input to create a new, smaller image.
The number of rows in the resulting image is the largest integer, r, such that rowStep * r <= inputImage.rows(). The number of columns in the resulting image is the largest integer, c, such that columnStep * c <= inputImage.columns(). The pixel values in the resulting image are the values at the intersection of every rowStep-th row and columnStep-th column of inputImage, starting with the value at (row, column) = (0, 0), which is always copied directly in to pixel (0, 0) of the result image. In other words, element (0, 0) of the resulting image is equal to element (0, 0) of inputImage, element (0, 1) of the resulting image is equal to element (0, columnStep) of inputImage, element (0, 2) of the resulting image is equal to element (0, 2 * columnStep) of inputImage, element (2, 4) of the resulting image is equal to element (2 * rowStep, 4 * columnStep) in inputImage.
| inputImage | This argument is the image to be subsampled. | |
| rowStep | This argument controls which rows of inputImage contribute to the result. | |
| columnStep | This argument controls which columns of inputImage contribute to the result. |
Definition at line 654 of file dlrComputerVision/utilities.h.
| Array2D< Type > dlr::computerVision::toArray | ( | const Image< FORMAT > & | inputImage | ) | [inline] |
This function creates a new array and copies into it the pixel data from the input image.
If the image format is one which has multiple interleaved color components, such as RGB8, then the returned array will have individual elements for each component of each pixel. For example, if the first row of an HSV8 image is [{h0, s0, v0}, {h1, s1, v1}, {h2, s2, v2}, ... ], then the first row of the array returned by toArray will be [h0, s0, v0, h1, s1, v1, h2, s2, v2, ...].
| inputImage | This argument is the image to be copied. |
Definition at line 738 of file dlrComputerVision/utilities.h.
References dissociateColorComponents().
1.5.2