ImageProcessor.h
Go to the documentation of this file.
1 // ****************************************************************************
2 // This file is part of the Integrating Vision Toolkit (IVT).
3 //
4 // The IVT is maintained by the Karlsruhe Institute of Technology (KIT)
5 // (www.kit.edu) in cooperation with the company Keyetech (www.keyetech.de).
6 //
7 // Copyright (C) 2014 Karlsruhe Institute of Technology (KIT).
8 // All rights reserved.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are met:
12 //
13 // 1. Redistributions of source code must retain the above copyright
14 // notice, this list of conditions and the following disclaimer.
15 //
16 // 2. Redistributions in binary form must reproduce the above copyright
17 // notice, this list of conditions and the following disclaimer in the
18 // documentation and/or other materials provided with the distribution.
19 //
20 // 3. Neither the name of the KIT nor the names of its contributors may be
21 // used to endorse or promote products derived from this software
22 // without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE KIT AND CONTRIBUTORS “AS IS” AND ANY
25 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 // DISCLAIMED. IN NO EVENT SHALL THE KIT OR CONTRIBUTORS BE LIABLE FOR ANY
28 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 // ****************************************************************************
35 // ****************************************************************************
36 // Filename: ImageProcessor.h
37 // Author: Pedram Azad
38 // Date: 2004
39 // ****************************************************************************
40 // Changes: 28.09.2011, Jan Issac
41 // * Added methods ConvertImage for conversion from CFloatImage
42 // to CByteImage and vice versa
43 // ****************************************************************************
44 
48 #ifndef _IMAGE_PROCESSOR_H_
49 #define _IMAGE_PROCESSOR_H_
50 
51 
52 // ****************************************************************************
53 // Necessary includes
54 // ****************************************************************************
55 
56 #include "Math/Math2d.h"
57 #include "Math/Math3d.h"
58 #include "Structs/Structs.h"
60 
61 
62 // ****************************************************************************
63 // Forward declarations
64 // ****************************************************************************
65 
66 class CFloatMatrix;
67 class CDoubleMatrix;
68 class CRGBColorModel;
69 class CByteImage;
70 class CShortImage;
71 class CIntImage;
72 class CFloatImage;
73 class CColorParameterSet;
74 struct Mat3d;
75 
76 
77 
78 // ****************************************************************************
79 // ImageProcessor
80 // ****************************************************************************
81 
94 namespace ImageProcessor
95 {
109  bool ConvertImage(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bFast = false, const MyRegion *pROI = 0);
110 
122  bool ConvertImage(const CFloatImage *pInputImage, CByteImage *pOutputImage, bool equalize = false);
123 
134  bool ConvertImage(const CByteImage *pInputImage, CFloatImage *pOutputImage);
135 
148  bool ConvertImage(const CFloatMatrix *pInputImage, CByteImage *pOutputImage);
149 
161  bool ConvertImage(const CByteImage *pInputImage, CFloatMatrix *pOutputImage);
162 
176  bool ConvertImage(const CShortImage *pInputImage, CByteImage *pOutputImage);
177 
189  bool ConvertImage(const CByteImage *pInputImage, CShortImage *pOutputImage);
190 
203  bool ConvertImage(const CIntImage *pInputImage, CByteImage *pOutputImage);
204 
216  bool ConvertImage(const CByteImage *pInputImage, CIntImage *pOutputImage);
217 
228  bool ConvertMatrix(const CFloatMatrix *pInputImage, CDoubleMatrix *pOutputImage);
229 
240  bool ConvertMatrix(const CDoubleMatrix *pInputImage, CFloatMatrix *pOutputImage);
241 
250  bool CopyImage(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI = 0, bool bUseSameSize = false);
251 
260  bool CopyImage(const CShortImage *pInputImage, CShortImage *pOutputImage, const MyRegion *pROI = 0, bool bUseSameSize = false);
261 
270  bool CopyMatrix(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage);
271 
280  bool CopyMatrix(const CDoubleMatrix *pInputImage, CDoubleMatrix *pOutputImage);
281 
288  void Zero(CByteImage *pImage, const MyRegion *pROI = 0);
289 
295  void Zero(CShortImage *pImage);
296 
302  void Zero(CIntImage *pImage);
303 
309  void Zero(CFloatMatrix *pImage);
310 
316  void Zero(CDoubleMatrix *pImage);
317 
318 
330  bool FlipY(const CByteImage *pInputImage, CByteImage *pOutputImage);
331 
332 
347  bool AverageFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize = 3);
348 
361  bool GaussianSmooth(const CByteImage *pInputImage, CFloatMatrix *pOutputImage, float fVariance, int nKernelSize);
362 
377  bool GaussianSmooth(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage, float fVariance, int nKernelSize);
378 
393  bool GaussianSmooth(const CByteImage *pInputImage, CByteImage *pOutputImage, float fVariance, int nKernelSize);
394 
406  bool GaussianSmooth5x5(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage, float fVariance);
407 
431  bool GaussianSmooth3x3(const CByteImage *pInputImage, CByteImage *pOutputImage);
432 
456  bool GaussianSmooth5x5(const CByteImage *pInputImage, CByteImage *pOutputImage);
457 
477  bool HighPassX3(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage);
478 
499  bool HighPassY3(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage);
500 
520  bool SobelX(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
521 
536  bool SobelX(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
537 
557  bool SobelY(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
558 
573  bool SobelY(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
574 
594  bool PrewittX(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
595 
610  bool PrewittX(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
611 
631  bool PrewittY(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
632 
647  bool PrewittY(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
648 
668  bool Laplace1(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
669 
684  bool Laplace1(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
685 
705  bool Laplace2(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue = true);
706 
721  bool Laplace2(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bAbsoluteValue = true);
722 
742  bool GeneralFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, const int *pKernel, int nMaskSize, int nDivider = 1, bool bAbsoluteValue = false);
743 
760  bool GeneralFilter(const CByteImage *pInputImage, CShortImage *pOutputImage, const int *pKernel, int nMaskSize, int nDivider = 1, bool bAbsoluteValue = false);
761 
777  bool GeneralFilter(const CByteImage *pInputImage, CFloatMatrix *pOutputImage, const int *pKernel, int nMaskSize, int nDivider = 1, bool bAbsoluteValue = false);
778 
792  bool CalculateGradientImagePrewitt(const CByteImage *pInputImage, CByteImage *pOutputImage);
793 
807  bool CalculateGradientImageSobel(const CByteImage *pInputImage, CByteImage *pOutputImage);
808 
825  bool CalculateGradientImage(const CByteImage *pInputImage, CByteImage *pOutputImage);
826 
847  bool CalculateGradientImageBinary(const CByteImage *pInputImage, CByteImage *pOutputImage);
848 
849 
864  bool ApplyAffinePointOperation(const CByteImage *pInputImage, CByteImage *pOutputImage, float a, float b);
865 
879  bool NormalizeColor(const CByteImage *pInputImage, CByteImage *pOutputImage);
880 
895  bool HistogramEqualization(const CByteImage *pInputImage, CByteImage *pOutputImage);
896 
913  bool HistogramStretching(const CByteImage *pInputImage, CByteImage *pOutputImage, float p1 = 0.1f, float p2 = 0.9f);
914 
929  bool Spread(const CByteImage *pInputImage, CByteImage *pOutputImage);
930 
931 
949  bool ApplyHomography(const CByteImage *pInputImage, CByteImage *pOutputImage, const Mat3d& A, bool bInterpolation = true);
950 
957  bool ApplyHomography(const CByteImage *pInputImage, CByteImage *pOutputImage, float a1, float a2, float a3, float a4, float a5, float a6, float a7, float a8, bool bInterpolation = true);
958 
971  bool Resize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI = 0, bool bInterpolation = true);
972 
986  bool Rotate(const CByteImage *pInputImage, CByteImage *pOutputImage, float mx, float my, float theta, bool bInterpolation = true);
987 
994  bool DetermineHomography(const Vec2d *pSourcePoints, const Vec2d *pTargetPoints, int nPoints, float &a1, float &a2, float &a3, float &a4, float &a5, float &a6, float &a7, float &a8);
995 
1002  bool DetermineAffineTransformation(const Vec2d *pSourcePoints, const Vec2d *pTargetPoints, int nPoints, float &a1, float &a2, float &a3, float &a4, float &a5, float &a6);
1003 
1014  bool CalculateSaturationImage(const CByteImage *pInputImage, CByteImage *pOutputImage);
1015 
1032  bool FilterRGB(const CByteImage *pInputImage, CByteImage *pOutputImage, CRGBColorModel *pColorModel, float fThreshold);
1033 
1052  bool CalculateHSVImage(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI = 0);
1053 
1072  bool FilterHSV(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char hue, unsigned char tol_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI = 0);
1073 
1092  bool FilterHSV2(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char min_hue, unsigned char max_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI = 0);
1093 
1108  bool FilterColor(const CByteImage *pInputImage, CByteImage *pOutputImage, ObjectColor cColor, CColorParameterSet* pColorParameterSet, bool bImageIsHSV=true);
1109 
1110 
1118  void ZeroFrame(CByteImage *pImage);
1119 
1127  void ZeroFrame(CShortImage *pImage);
1128 
1136  void ZeroFrame(CIntImage *pImage);
1137 
1149  bool CopyFrame(const CByteImage *pInputImage, CByteImage *pOutputImage);
1150 
1168  bool AdaptFrame(const CByteImage *pInputImage, CByteImage *pOutputImage);
1169 
1181  bool Invert(const CByteImage *pInputImage, CByteImage *pOutputImage);
1182 
1195  bool Amplify(const CByteImage *pInputImage, CByteImage *pOutputImage, float fFactor);
1196 
1208  bool Rotate180Degrees(const CByteImage *pInputImage, CByteImage *pOutputImage);
1209 
1223  bool Canny(const CByteImage *pInputImage, CByteImage *pOutputImage, int nLowThreshold, int nHighThreshold);
1224 
1236  bool Canny(const CByteImage *pInputImage, CVec2dArray &resultPoints, CVec2dArray &resultDirections, int nLowThreshold, int nHighThreshold);
1237 
1252  bool ThresholdBinarize(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold);
1253 
1268  bool ThresholdBinarizeInverse(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold);
1269 
1284  bool ThresholdBinarize(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nMinThreshold, unsigned char nMaxThreshold);
1285 
1300  bool ThresholdFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold);
1301 
1316  bool ThresholdFilterInverse(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold);
1317 
1330  bool CalculateHarrisMap(const CByteImage *pInputImage, CIntImage *pOutputImage);
1331 
1348  int CalculateHarrisInterestPoints(const CByteImage *pInputImage, Vec2d *pInterestPoints, int nMaxPoints, float fQualityLevel = 0.01f, float fMinDistance = 5.0f);
1349 
1350 
1365  bool And(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1366 
1381  bool Xor(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1382 
1397  bool Or(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1398 
1399 
1415  bool Dilate(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize = 3, const MyRegion *pROI = 0);
1416 
1432  bool Erode(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize = 3, const MyRegion *pROI = 0);
1433 
1452  int RegionGrowing(const CByteImage *pInputImage, MyRegion &resultRegion, int x, int y, int nMinimumPointsPerRegion = 0, int nMaximumPointsPerRegion = 0, bool bCalculateBoundingBox = true, bool bStorePixels = false);
1453 
1472  bool FindRegions(const CByteImage *pImage, RegionList &regionList, int nMinimumPointsPerRegion = 0, int nMaximumPointsPerRegion = 0, bool bCalculateBoundingBox = true, bool bStorePixels = false);
1473 
1489  bool FindRegions(const CByteImage *pImage, CRegionArray &regionList, int nMinimumPointsPerRegion = 0, int nMaximumPointsPerRegion = 0, bool bCalculateBoundingBox = true, bool bStorePixels = false);
1490 
1509  bool HoughTransformLines(const CByteImage *pImage, CByteImage *pVisualizationImage, Vec2dList &resultLines, int nLinesToExtract, int nMinHits = 1);
1510 
1531  bool HoughTransformCircles(const CByteImage *pImage, CByteImage *pVisualizationImage, Vec3dList &resultCircles, int rmin, int rmax, int nCirclesToExtract, int nMinHits = 1);
1532 
1557  void HoughTransformLines(const CVec2dArray &edgePoints, const CVec2dArray &edgeDirections, int width, int height, int nLinesToExtract, int nMinHits, CVec2dArray &resultLines, CIntArray &resultHits, CByteImage *pVisualizationImage = 0);
1558 
1581  void HoughTransformLines(const CVec2dArray &edgePoints, const CVec2dArray &edgeDirections, int width, int height, int nLinesToExtract, int nMinHits, CStraightLine2dArray &resultLines, CIntArray &resultHits, CByteImage *pVisualizationImage = 0);
1582 
1609  bool HoughTransformCircles(const CVec2dArray &edgePoints, const CVec2dArray &edgeDirections, int width, int height, int rmin, int rmax, int nCirclesToExtract, int nMinHits, CVec3dArray &resultCircles, CIntArray &resultHits, CByteImage *pVisualizationImage = 0);
1610 
1635  bool HoughTransformCircles(const CVec2dArray &edgePoints, const CVec2dArray &edgeDirections, int width, int height, int rmin, int rmax, int nCirclesToExtract, int nMinHits, CCircle2dArray &resultCircles, CIntArray &resultHits, CByteImage *pVisualizationImage = 0);
1636 
1637 
1651  bool ThresholdBinarize(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage, float fThreshold);
1652 
1665  bool CalculateIntegralImage(const CByteImage *pInputImage, CIntImage *pIntegralImage);
1666 
1681  bool CalculateSummedAreaTable(const CByteImage *pInputImage, CIntImage *pSummedAreaTable);
1682 
1697  int GetAreaSum(const CIntImage *pIntegralImage, int min_x, int min_y, int max_x, int max_y);
1698 
1712  inline int GetAreaSumNoChecks(const CIntImage *pIntegralImage, int min_x, int min_y, int max_x, int max_y);
1713 
1722  int GetAreaSum(const CIntImage *pIntegralImage, const MyRegion *pRegion);
1723 
1736  bool CalculateBinarizedSummedAreaTable(const CByteImage *pInputImage, CIntImage *pSummedAreaTable);
1737 
1746  bool CalculateReverseSummedAreaTable(const CIntImage *pSummedAreaTable, CByteImage *pOutputImage);
1747 
1748 
1757  {
1762  };
1763 
1773  bool ConvertBayerPattern(const CByteImage *pInputImage, CByteImage *pOutputImage, BayerPatternType type);
1774 
1775 
1792  bool Add(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1793 
1810  bool AddWithSaturation(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1811 
1828  bool Subtract(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1829 
1846  bool SubtractWithSaturation(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1847 
1864  bool AbsoluteDifference(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1865 
1882  bool Average(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1883 
1898  bool Min(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1899 
1914  bool Max(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage);
1915 
1916 
1922  unsigned char MaxValue(const CByteImage *pImage);
1923 
1929  short MaxValue(const CShortImage *pImage);
1930 
1936  int MaxValue(const CIntImage *pImage);
1937 
1943  unsigned char MinValue(const CByteImage *pImage);
1944 
1950  short MinValue(const CShortImage *pImage);
1951 
1957  int MinValue(const CIntImage *pImage);
1958 
1966  bool MinMaxValue(const CByteImage *pImage, unsigned char &min, unsigned char &max);
1967 
1975  void MinMaxValue(const CShortImage *pImage, short &min, short &max);
1976 
1984  void MinMaxValue(const CIntImage *pImage, int &min, int &max);
1985 
1991  unsigned int PixelSum(const CByteImage *pImage);
1992 }
1993 
1994 
1995 
1996 #endif /* _IMAGE_PROCESSOR_H_ */
bool HighPassX3(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage)
Applies a 1x3 highpass filter to a CFloatMatrix and write the result to a CFloatMatrix.
unsigned int PixelSum(const CByteImage *pImage)
Returns the sum of all pixel values of a grayscale CByteImage.
unsigned char MaxValue(const CByteImage *pImage)
Returns the maximum value within a grayscale CByteImage.
bool AddWithSaturation(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the sum of the corresponding pixels in two instances of CByteImage...
bool DetermineAffineTransformation(const Vec2d *pSourcePoints, const Vec2d *pTargetPoints, int nPoints, float &a1, float &a2, float &a3, float &a4, float &a5, float &a6)
Deprecated.
BayerPatternType
The four possible variants for Bayer pattern conversion.
bool MinMaxValue(const CByteImage *pImage, unsigned char &min, unsigned char &max)
Computes the minimum and maximum value within a grayscale CByteImage.
bool ApplyAffinePointOperation(const CByteImage *pInputImage, CByteImage *pOutputImage, float a, float b)
Applies an affine point operation to a CByteImage and writes the result to a CByteImage.
bool ApplyHomography(const CByteImage *pInputImage, CByteImage *pOutputImage, const Mat3d &A, bool bInterpolation=true)
Applies a homography to a CByteImage and writes the result to a CByteImage.
bool CopyFrame(const CByteImage *pInputImage, CByteImage *pOutputImage)
Copies all pixels on a one pixel wide frame from one CByteImage to CByteImage.
bool HoughTransformLines(const CByteImage *pImage, CByteImage *pVisualizationImage, Vec2dList &resultLines, int nLinesToExtract, int nMinHits=1)
Performs the Hough transform for straight lines on a CByteImage.
bool CalculateGradientImageSobel(const CByteImage *pInputImage, CByteImage *pOutputImage)
Applies a combined Sobel filter for both x- and y-direction to a CByteImage and stores the result in ...
bool Laplace2(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the Laplace2 operator and writes the result to a CShortImage.
bool FilterColor(const CByteImage *pInputImage, CByteImage *pOutputImage, ObjectColor cColor, CColorParameterSet *pColorParameterSet, bool bImageIsHSV=true)
Performs color filtering with binarization for a CByteImage and writes the result to a grayscale CByt...
bool FindRegions(const CByteImage *pImage, RegionList &regionList, int nMinimumPointsPerRegion=0, int nMaximumPointsPerRegion=0, bool bCalculateBoundingBox=true, bool bStorePixels=false)
Performs region growing on a binary CByteImage, segmenting all regions in the image.
bool Max(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the maximum of the corresponding pixels in two instances of CByteI...
bool CalculateSaturationImage(const CByteImage *pInputImage, CByteImage *pOutputImage)
Calculates the saturation image for an RGB CByteImage and writes the result to a CByteImage.
bool NormalizeColor(const CByteImage *pInputImage, CByteImage *pOutputImage)
Applies histogram equalization to all channels of a color CByteImage.
bool ThresholdFilterInverse(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold)
Performs inverse threhold filtering to a CByteImage and writes the result to a CByteImage.
bool Dilate(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize=3, const MyRegion *pROI=0)
Applies a morphological dilate operation to a binary CByteImage and writes the result to a binary CBy...
bool ThresholdFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold)
Performs threhold filtering to a CByteImage and writes the result to a CByteImage.
std::vector< Vec2d > Vec2dList
Definition: Math2d.h:106
bool DetermineHomography(const Vec2d *pSourcePoints, const Vec2d *pTargetPoints, int nPoints, float &a1, float &a2, float &a3, float &a4, float &a5, float &a6, float &a7, float &a8)
Deprecated.
bool SobelX(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the SobelX operator and writes the result to a CShortImage.
bool FilterRGB(const CByteImage *pInputImage, CByteImage *pOutputImage, CRGBColorModel *pColorModel, float fThreshold)
Performs color filtering with binarization for an RGB CByteImage, given a CRGBColorModel, and writes the result to a grayscale CByteImage.
bool PrewittX(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the PrewittX operator and writes the result to a CShortImage.
unsigned char MinValue(const CByteImage *pImage)
Returns the minimum value within a grayscale CByteImage.
bool CalculateBinarizedSummedAreaTable(const CByteImage *pInputImage, CIntImage *pSummedAreaTable)
Calculates the binarized summed area table of a grayscale CByteImage and writes the result to a CIntI...
bool Invert(const CByteImage *pInputImage, CByteImage *pOutputImage)
Calculates the inverted image of a CByteImage and writes the result to a CByteImage.
bool ConvertBayerPattern(const CByteImage *pInputImage, CByteImage *pOutputImage, BayerPatternType type)
Converts an 8 bit Bayer pattern CByteImage to an RGB24 color CByteImage.
bool SobelY(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the SobelY operator and writes the result to a CShortImage.
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
Definition: ByteImage.h:80
bool GeneralFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, const int *pKernel, int nMaskSize, int nDivider=1, bool bAbsoluteValue=false)
Applies a user defined filter to a CByteImage and writes the result to a CByteImage.
bool CalculateHSVImage(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI=0)
Computes the HSV image for a RGB CByteImage and writes the result to a CByteImage.
int GetAreaSumNoChecks(const CIntImage *pIntegralImage, int min_x, int min_y, int max_x, int max_y)
Efficiently computes the sum of all pixel values in a rectangular area using integral image lookups...
bool HighPassY3(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage)
Applies a 3x1 highpass filter to a CFloatMatrix and writes the result to a CFloatMatrix.
bool CalculateGradientImage(const CByteImage *pInputImage, CByteImage *pOutputImage)
Applies a combined simple gradient filter for both x- and y-direction to a CByteImage and stores the ...
bool Xor(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Applies the bitwise operator XOR to two instance of CByteImage and writes the result to a CByteImage...
bool CalculateHarrisMap(const CByteImage *pInputImage, CIntImage *pOutputImage)
Calculates the Harris cornerness measure for every pixel in a CByteImage and writes the results to a ...
GLuint GLuint GLsizei GLenum type
Definition: glext.h:3121
bool CalculateReverseSummedAreaTable(const CIntImage *pSummedAreaTable, CByteImage *pOutputImage)
Reconstructs the original image, given a summed area table, and writes the result to a grayscale CByt...
bool ConvertImage(const CByteImage *pInputImage, CByteImage *pOutputImage, bool bFast=false, const MyRegion *pROI=0)
Converts a grayscale CByteImage to an RGB CByteImage image and vice versa.
bool ThresholdBinarizeInverse(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold)
Performs inverse threshold binarization to a CByteImage and writes the result to a CByteImage...
std::vector< Vec3d > Vec3dList
Definition: Math3d.h:126
bool FlipY(const CByteImage *pInputImage, CByteImage *pOutputImage)
Flips the rows in a CByteImage vertically and writes the result to a CByteImage.
bool SubtractWithSaturation(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the difference between the corresponding pixels in two instances o...
int RegionGrowing(const CByteImage *pInputImage, MyRegion &resultRegion, int x, int y, int nMinimumPointsPerRegion=0, int nMaximumPointsPerRegion=0, bool bCalculateBoundingBox=true, bool bStorePixels=false)
Performs a region growing on a binary CByteImage on the basis of one seed point and stores the comput...
GLenum GLint x
Definition: glext.h:3125
bool GaussianSmooth(const CByteImage *pInputImage, CFloatMatrix *pOutputImage, float fVariance, int nKernelSize)
Applies a Gaussian filter to a CByteImage and writes the result to a CFloatMatrix.
bool Average(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the average of the corresponding pixels in two instances of CByteI...
std::vector< MyRegion > RegionList
Definition: Structs.h:346
bool AverageFilter(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize=3)
Applies an average filter to a CByteImage and writes the result to a CByteImage.
bool CopyMatrix(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage)
Copies one CFloatMatrix to another.
Data structure for the representation of a matrix of values of the data type float.
Definition: FloatMatrix.h:56
bool AbsoluteDifference(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the absolute value of the difference between the corresponding pix...
bool Canny(const CByteImage *pInputImage, CByteImage *pOutputImage, int nLowThreshold, int nHighThreshold)
Applies the Canny edge detector to a CByteImage and writes the result to a CByteImage.
bool CopyImage(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI=0, bool bUseSameSize=false)
Copies one CByteImage to another.
Central namespace offering various image processing routines and functions.
void ZeroFrame(CByteImage *pImage)
Sets all pixels on a one pixel wide frame of a CByteImage to zero.
bool Min(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the minimum of the corresponding pixels in two instances of CByteI...
Data structure for the representation of single channel images of the data type signed short...
Definition: ShortImage.h:54
GLubyte GLubyte GLubyte a
Definition: glext.h:5166
bool Subtract(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the difference between the corresponding pixels in two instances o...
bool Amplify(const CByteImage *pInputImage, CByteImage *pOutputImage, float fFactor)
Multiplies each byte value of a CByteImage with a floating point factor and writes the result to a CB...
bool PrewittY(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the PrewittY operator and writes the result to a CShortImage.
bool ThresholdBinarize(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char nThreshold)
Performs threshold binarization to a CByteImage and writes the result to a CByteImage.
GLubyte GLubyte b
Definition: glext.h:5166
GLenum GLsizei width
Definition: glext.h:3122
GLenum GLsizei GLsizei height
Definition: glext.h:3132
bool CalculateGradientImageBinary(const CByteImage *pInputImage, CByteImage *pOutputImage)
Calculates a gradient image for a CByteImage and writes the result to a CByteImage, for the special case of binary images.
bool Rotate(const CByteImage *pInputImage, CByteImage *pOutputImage, float mx, float my, float theta, bool bInterpolation=true)
Rotates pInputImage to the dimensions specified by pOutputImage and stores the result in pOutputImage...
bool FilterHSV2(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char min_hue, unsigned char max_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI=0)
Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale...
bool Spread(const CByteImage *pInputImage, CByteImage *pOutputImage)
Performs a spread operation on pInputImage and stores the result in pOutputImage. ...
bool Rotate180Degrees(const CByteImage *pInputImage, CByteImage *pOutputImage)
Rotates a CByteImage by 180 degrees and writes the result to a CByteImage.
bool Add(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Sets each pixel in a CByteImage to the sum of the corresponding pixels in two instances of CByteImage...
bool Laplace1(const CByteImage *pInputImage, CShortImage *pOutputImage, bool bAbsoluteValue=true)
Filters a CByteImage with the Laplace1 operator and writes the result to a CShortImage.
bool GaussianSmooth5x5(const CFloatMatrix *pInputImage, CFloatMatrix *pOutputImage, float fVariance)
Applies a 5x5 Gaussian filter to a CFloatMatrix and writes the result to a CFloatMatrix.
bool AdaptFrame(const CByteImage *pInputImage, CByteImage *pOutputImage)
Sets all pixels on a one pixel wide outer frame in a CByteImage to the pixel values of the inner fram...
int CalculateHarrisInterestPoints(const CByteImage *pInputImage, Vec2d *pInterestPoints, int nMaxPoints, float fQualityLevel=0.01f, float fMinDistance=5.0f)
Computes interest points within a CByteImage by applying the Harris corner detector.
GLenum GLint GLint y
Definition: glext.h:3125
int GetAreaSum(const CIntImage *pIntegralImage, int min_x, int min_y, int max_x, int max_y)
Efficiently computes the sum of all pixel values in a rectangular area using integral image lookups...
Data structure for the representation of a 2D vector.
Definition: Math2d.h:82
bool Erode(const CByteImage *pInputImage, CByteImage *pOutputImage, int nMaskSize=3, const MyRegion *pROI=0)
Applies a morphological erode operation to a binary CByteImage and writes the result to a binary CByt...
bool HoughTransformCircles(const CByteImage *pImage, CByteImage *pVisualizationImage, Vec3dList &resultCircles, int rmin, int rmax, int nCirclesToExtract, int nMinHits=1)
Performs the Hough transform for circles on a CByteImage.
bool Or(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Applies the bitwise operator OR to two instance of CByteImage and writes the result to a CByteImage...
bool HistogramStretching(const CByteImage *pInputImage, CByteImage *pOutputImage, float p1=0.1f, float p2=0.9f)
Performs histogram stretching on pInputImage and stores the result in pOutputImage.
Data structure for the representation of single channel images of the data type signed int...
Definition: IntImage.h:55
Data structure for the representation of a matrix of values of the data type double.
Definition: DoubleMatrix.h:54
bool HistogramEqualization(const CByteImage *pInputImage, CByteImage *pOutputImage)
Performs histogram equalization for a CByteImage and writes the result to a CByteImage.
bool And(const CByteImage *pInputImage1, const CByteImage *pInputImage2, CByteImage *pOutputImage)
Applies the bitwise operator AND to two instance of CByteImage and writes the result to a CByteImage...
bool CalculateSummedAreaTable(const CByteImage *pInputImage, CIntImage *pSummedAreaTable)
Calculates the summed area table of a grayscale CByteImage and writes the result to a CIntImage...
bool GaussianSmooth3x3(const CByteImage *pInputImage, CByteImage *pOutputImage)
Applies a 3x3 Gaussian filter to a CByteImage and writes the result to a CByteImage.
void Zero(CByteImage *pImage, const MyRegion *pROI=0)
Sets all values in a CByteImage to zero.
bool ConvertMatrix(const CFloatMatrix *pInputImage, CDoubleMatrix *pOutputImage)
Converts a CFloatMatrix to a CDoubleMatrix.
bool CalculateGradientImagePrewitt(const CByteImage *pInputImage, CByteImage *pOutputImage)
Applies a combined Prewitt filter for both x- and y-direction to a CByteImage and stores the result i...
Data structure for the representation of a 3x3 matrix.
Definition: Math3d.h:93
Data structure for the representation of any image type (arbitrary number of channels) using the data...
Definition: FloatImage.h:62
Training and application of an RGB color model on the basis of the Mahalanobis distance.
Definition: RGBColorModel.h:63
ObjectColor
bool Resize(const CByteImage *pInputImage, CByteImage *pOutputImage, const MyRegion *pROI=0, bool bInterpolation=true)
Resizes a CByteImage and writes the result to a CByteImage.
bool FilterHSV(const CByteImage *pInputImage, CByteImage *pOutputImage, unsigned char hue, unsigned char tol_hue, unsigned char min_sat, unsigned char max_sat, unsigned char min_v, unsigned char max_v, const MyRegion *pROI=0)
Performs color filtering with binarization for an HSV CByteImage and writes the result to a grayscale...
bool CalculateIntegralImage(const CByteImage *pInputImage, CIntImage *pIntegralImage)
Calculates the integral image of a grayscale CByteImage and writes the result to a CIntImage...


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28