* addConstBorder(const ImageT
&src, uint width, uint height, P value=0, ImageT
* dst = NULL);
/** Copy the border of an image.
* @param src source gray image
* @param width width of the left and right border
* @param height height of the top and bottom border
* @param dst destination image
*/
template * copyBorder(const ImageT &src, uint width, uint height, ImageT * dst);
/**
* \}
* @name Threshold Functions
* \{
*/
/**
* Generate a binarized image from Image \c src .
* @param src source gray image
* @param threshold threshold
* @param dst optional buffer to be used as target. &src, P color, Rect &rect);
/**
* scale and shift image values as a new image with a destined range [min,max]
* @param src input image
* @param dst output image
* @param min target range minimum
* @param max target range maximum
*/
template &src, ImageT &dst , P min, P max);
/**
* scale and shift image values to destined range [min,max] (inplace)
* @param src image to modify
* @param min target range minimum
* @param max target range maximum
*/
template &src, P min, P max);
/**
* findLocalMinima find minima in images.
* @param src source image
* @param thresh minima must be below this threshold
* @param dist local minima have a displacement of rectangular distance to other minima
* @param minima vector of coordiantes of minima
**/
template &src, P thresh, int dist, std::vector &src, P thresh, int dist, std::vector & src,
const IppiPoint& seed,
const P& newVal,
IppiConnectedComp* compBuffer = NULL);
/**
* Floodfill algorithm for GrayImages
* fill area with the color \c newVal beginning with the starting point \c seed
* using a 4-neighborhood
* @param src source gray image
* @param seed start point
* @param newVal value to fill component with
* @param compBuffer optional buffer to be used as target. & src,
const IppiPoint& seed,
const P& newVal,
IppiConnectedComp* compBuffer = NULL);
/**
* Floodfill algorithm for GrayImages
* @param src source image
* @param startx start x coordinate for floodfill
* @param starty start y coordinate for floodfill
* @param newVal new value in filled area
* @param minDelta minimum Delta for neighbourpixel from actual pixelvalue
* @param maxDelta maximum Delta for neighbourpixel from actual pixelvalue
*/
template & src, int startx=0, int starty=0,
uint newVal=0, uint minDelta=50, uint maxDelta=50);
/**
* Floodfill algorithm for ColorImages treating all channels the same
* @param src source image
* @param startx start x coordinate for floodfill
* @param starty start y coordinate for floodfill
* @param newVal new value in filled area
* @param minDelta minimum Delta for neighbourpixel from actual pixelvalue
* @param maxDelta maximum Delta for neighbourpixel from actual pixelvalue
*/
template & src, int startx=0, int starty=0,
uint newVal=0, uint minDelta=50, uint maxDelta=50);
/**
* Floodfill algorithm for ColorImages
* @param src source image
* @param startx start x coordinate for floodfill
* @param starty start y coordinate for floodfill
* @param newValR new value in filled area for R channel
* @param newValG new value in filled area for G channel
* @param newValB new value in filled area for B channel
* @param minDeltaR minimum Delta for neighbourpixel from actual pixelvalue for R channel
* @param minDeltaG minimum Delta for neighbourpixel from actual pixelvalue for G channel
* @param minDeltaB minimum Delta for neighbourpixel from actual pixelvalue for B channel
* @param maxDeltaR maximum Delta for neighbourpixel from actual pixelvalue for R channel
* @param maxDeltaG maximum Delta for neighbourpixel from actual pixelvalue for G channel
* @param maxDeltaB maximum Delta for neighbourpixel from actual pixelvalue for B channel
*/
template & src, int startx=0, int starty=0,
uint newValR=0, uint newValG=0, uint newValB=0,
uint minDeltaR=50, uint minDeltaG=50, uint minDeltaB=50,
uint maxDeltaR=50, uint maxDeltaG=50, uint maxDeltaB=50);
} // namespace
#include "core/image/ImageT.h"
#include "core/image/ImageT.h"
#include "core/image/ColorImageT.h"
#include "core/image/Buffer.h"
//#ifdef __GNUC__
#include
* Create a new Image if \c dst == NULL.
* If \c dst != NULL then size must be equal to \c src 's size!
* @return Image
* @throw ImageException will be thrown if \c dst != NULL and the size of \c src and \c dst is not equal.
*/
Image* threshold(const Image& src, const int threshold, Image* dst=NULL);
/**
* Generate a threshold image from Image \c src .
* @param src source Image
* @param threshold threshold
* @param dst optional buffer to be used as target.
* Create a new Image if \c dst == NULL.
* If \c dst != NULL then size must be equal to \c src 's size!
* @param value set pixel less or equal to \c threshold to this value
* @return Image
* @throw ImageException will be thrown if \c dst != NULL and the size of \c src and \c dst is not equal.
*/
Image* lowerThreshold(const Image& src, const int threshold,
Image* dst=NULL, const int value=0);
/**
* Generate a threshold image from Image \c src .
* @param src source Image
* @param threshold threshold
* @param dst optional buffer to be used as target.
* Create a new Image if \c dst == NULL.
* If \c dst != NULL then size must be equal to \c src 's size!
* @param value set pixel greater than threshold to this value
* @return Image
* @throw ImageException will be thrown if \c dst != NULL and the size of \c src and \c dst is not equal.
*/
Image* upperThreshold(Image& src, const int threshold,
Image* dst=NULL, const int value=255);
/**
* Generate a binarized image from Image \c src .
* @param src source gray image
* @param threshold threshold
*/
void thresholdIP(Image& src, const int threshold);
/**
* Generate a threshold image from Image \c src .
* @param src source gray image
* @param threshold threshold
* @param value set pixel less or equal to \c threshold to this value
*/
void lowerThresholdIP(Image& src, const int threshold, const int value=0);
/**
* Generate a threshold image from Image \c src .
* @param src source gray image
* @param threshold threshold
* @param value set pixel greater than \c threshold to this value
*/
void upperThresholdIP(Image& src, const int threshold, const int value=255);
/**
* \}
* @name Minimum / Maximum Functions
* \{
*/
/**
* autoCropRect determine the rectangular area \c Rect within the pixels have larger values than a given value.
* @param src source image
* @param color color value
* @param rect returned \c Rect of the area which has larger values than the color value
**/
template
* create a new IppiConnectedComp if \c compBuffer == NULL.
* @return pointer to IppiConnectedComp
*/
template
* create a new IppiConnectedComp if \c compBuffer == NULL.
* @return pointer to IppiConnectedComp
*/
template