ReadFramework
|
#include <ImageProcessor.h>
Public Types | |
enum | MorphShape { morph_square = 0, morph_disk } |
enum | MorphBorder { border_zero = 0, border_flip } |
Static Public Member Functions | |
static cv::Mat | createStructuringElement (int seSize, int shape) |
Creates the structuring element for morphological operations. More... | |
static cv::Mat | dilateImage (const cv::Mat &bwImg, int seSize, MorphShape shape=IP::morph_square, int borderValue=0) |
Dilates the image bwImg with a given structuring element. More... | |
static cv::Mat | erodeImage (const cv::Mat &bwImg, int seSize, MorphShape shape=IP::morph_square, int borderValue=255) |
Erodes the image bwimg with a given structuring element. More... | |
static cv::Mat | convolveIntegralImage (const cv::Mat &src, const int kernelSizeX, const int kernelSizeY=0, MorphBorder norm=IP::border_zero) |
Convolves an integral image by means of box filters. This functions applies box filtering. It is specifically useful for the computation of image sums, mean filtering and standard deviation with big kernel sizes. More... | |
static cv::Mat | get1DGauss (double sigma, int kernelsize=-1) |
Computes a 1D Gaussian filter kernel. The kernel's size is adjusted to the standard deviation. More... | |
static cv::Mat | threshOtsu (const cv::Mat &srcImg, int thType=CV_THRESH_BINARY_INV) |
Threshold an image using Otsu as threshold. More... | |
static double | getThreshOtsu (const cv::Mat &hist, const double otsuThresh=0) |
Gets the Otsu threshold based on a certain histogram. More... | |
static void | setBorderConst (cv::Mat &src, float val=0.0f) |
Sets the border to a constant value (1 pixel width). More... | |
static void | invertImg (cv::Mat &srcImg, cv::Mat mask=cv::Mat()) |
Inverts the img. More... | |
static cv::Mat | preFilterArea (const cv::Mat &img, int minArea, int maxArea=-1) |
Prefilters an binary image according to the blob size. Should be done to remove small blobs and to reduce the runtime of cvFindContours. More... | |
static cv::Mat | computeHist (const cv::Mat img, const cv::Mat mask=cv::Mat()) |
Computes the histogram of an image. More... | |
static cv::Mat | estimateMask (const cv::Mat &src, bool preFilter=true) |
Estimates the mask. More... | |
static void | mulMask (cv::Mat &src, cv::Mat mask=cv::Mat()) |
Applies a mask to the image. More... | |
static QPointF | calcRotationSize (double angleRad, const QPointF &srcSize) |
Calculates the image size of the rotated image. More... | |
static cv::Mat | rotateImage (const cv::Mat &src, double angleRad, int interpolation=cv::INTER_CUBIC, cv::Scalar borderValue=cv::Scalar(0)) |
Rotates an image according to the angle obtained. The new image bounds are minimized with respect to the angle obtained. positive angle values mean counterclockwise rotation More... | |
static cv::Mat | invert (const cv::Mat &src) |
static cv::Mat | grayscale (const cv::Mat &src) |
Returns the Luminance channel of Luv which is better than the RGB2Gray. More... | |
static cv::Mat | computeHist (const cv::Mat &data, int width, int numElements=-1, double *maxBin=0) |
Computes the histogram of data. Data can be any type (it will be reduced to CV_32F). More... | |
static void | draw (const std::vector< cv::Point > &pts, cv::Mat &img, unsigned char val=255) |
static double | statMomentMat (const cv::Mat &src, const cv::Mat &mask=cv::Mat(), double momentValue=0.5, int maxSamples=10000, int area=-1) |
Computes robust statistical moments of an image. The quantiles of an image (or median) are computed. More... | |
static QColor | statMomentColor (const cv::Mat &src, const cv::Mat &mask=cv::Mat(), double momentValue=0.5) |
static void | normalize (cv::Mat &src) |
enum rdf::IP::MorphBorder |
enum rdf::IP::MorphShape |
|
static |
Calculates the image size of the rotated image.
angleRad | The angle in radians. |
srcSize | Size of the source image. |
|
static |
Computes the histogram of an image.
img | The source img CV_32FC1. |
mask | The mask CV_8UC1 or CV_32FC1. |
|
static |
Computes the histogram of data. Data can be any type (it will be reduced to CV_32F).
data | The data. |
width | The length of the resulting histogram. |
numElements | The number elements if data has more elements, it will be downsampled accordingly. |
maxBin | The maximal bin of the resulting histogram. |
|
static |
Convolves an integral image by means of box filters. This functions applies box filtering. It is specifically useful for the computation of image sums, mean filtering and standard deviation with big kernel sizes.
src | The integral image CV_64FC1. |
kernelSizeX | The box filter's size. |
kernelSizeY | The box filter's size. |
norm | If BORDER_ZERO an image sum is computed, if BORDER_FLIP a mean filtering is applied. |
|
static |
Creates the structuring element for morphological operations.
seSize | Size of the structuring element. |
shape | The shape (either Square or Disk). |
|
static |
Dilates the image bwImg with a given structuring element.
bwImg | The bwImg: a grayscale image CV_8U (or CV_32F [0 1] but slower). |
seSize | The structuring element's size. |
shape | The shape (either Square or Disk). |
borderValue | The border value. |
|
static |
|
static |
Erodes the image bwimg with a given structuring element.
bwImg | The bwimg: a grayscale image CV_8U (or CV_32F [0 1] but slower). |
seSize | The structuring element's size. |
shape | The shape (either Square or Disk). |
borderValue | The border value. |
|
static |
Estimates the mask.
src | The source image. |
|
static |
Computes a 1D Gaussian filter kernel. The kernel's size is adjusted to the standard deviation.
sigma | The standard deviation of the Gaussian. |
|
static |
Gets the Otsu threshold based on a certain histogram.
hist | The histogram CV_32FC1. |
otsuThresh | The otsu threshold - deprecated. |
|
static |
Returns the Luminance channel of Luv which is better than the RGB2Gray.
src | The source. |
|
static |
|
static |
Inverts the img.
srcImg | The source img CV_32FC1 [0 1] or CV_8UC1. |
mask | The mask. |
|
static |
Applies a mask to the image.
src | The source img CV_8U or CV_32F. |
mask | The optional mask CV_8U or CV_32F. |
|
static |
|
static |
Prefilters an binary image according to the blob size. Should be done to remove small blobs and to reduce the runtime of cvFindContours.
img | The source img CV_8UC1. |
minArea | The blob size threshold in pixel. |
maxArea | The maximum area. |
|
static |
Rotates an image according to the angle obtained. The new image bounds are minimized with respect to the angle obtained. positive angle values mean counterclockwise rotation
src | The source image. |
angleRad | The angle in RAD. |
interpolation | The interpolation. |
borderValue | The border value. |
|
static |
Sets the border to a constant value (1 pixel width).
src | The source image CV_32F or CV_8U. |
val | The border value. |
|
static |
|
static |
Computes robust statistical moments of an image. The quantiles of an image (or median) are computed.
src | The source image CV_32FC1. |
mask | The mask CV_32FC1 or CV_8UC1. |
momentValue | The moment (e.g. 0.5 for median, 0.25 or 0.75 for quartiles). |
maxSamples | The maximum number of samples (speed up). |
area | The mask's area (speed up). |
|
static |
Threshold an image using Otsu as threshold.
srcImg | The source img CV_8UC1 or CV_8UC3. |