Documentation
 All Classes Functions Variables Properties
ImageProcess.h
1 #pragma once
2 #include "windows.h"
3 #include "string.h"
4 
5 //using namespace ImageXpro;
6 using namespace System::Collections::Generic;
7 
13 public ref class PageInfo
14  {
15  public:
20  static int NO_ENHANCEMEMNT = 1;
21 
25  static int BI_LINEAR = 2;
29  static int BI_CUBIC = 3;
30 
35  int Height;
36 
40  int Width;
41 
46  int Scale;
47 
52 
60  bool Deskew;
61 
65  bool AutoCrop;
66 
71  PageInfo(int _width , int _height)
72  {
73  Width = _width;
74  Height = _height;
75  Scale = -1;
76  }
77 
78 
82  PageInfo(float _scale)
83  {
84  Width = -1;
85  Height = -1;
86  Scale = _scale;
87  }
88 
89  };
96 public ref class ImageProcess
97 {
98 public:
102  ImageProcess(void);
103 
110  System::Drawing::Image^ DeskewImage(System::Drawing::Image^ srcImage);
111 
119  System::Drawing::Image^ RotateImage(System::Drawing::Image^ srcImage, int iRotate_Angle);
120 
126  System::Drawing::Image^ FlipImageH(System::Drawing::Image^ srcImage);
127 
133  System::Drawing::Image^ FlipImageV(System::Drawing::Image^ srcImage);
134 
135 
143  System::Drawing::Image^ ScaleImage(System::Drawing::Image^ srcImage, int iWidth, int iHeight);
144 
151  System::Drawing::Image^ CropImage(System::Drawing::Image^ srcImage, System::Drawing::Rectangle^ cropRect);
152 
159  System::Drawing::Image^ ImageContrast(System::Drawing::Image^ srcImage, float fValue);
160 
167  System::Drawing::Image^ ImageBrigthness(System::Drawing::Image^ srcImage, float fValue);
168 
177  System::Drawing::Image^ ImageIntensity(System::Drawing::Image^ srcImage, int iLow, int iHigh, int iGamma);
178 
179 
185  System::Drawing::Image^ GrayScaleImage(System::Drawing::Image^ srcImage);
186 
192  System::Drawing::Image^ SharpImage(System::Drawing::Image^ srcImage);
193 
200  System::Drawing::Image^ SmoothEdgesImage(System::Drawing::Image^ srcImage );
201 
207  System::Drawing::Image^ EdgeDetectorImage(System::Drawing::Image^ srcImage );
208 
214  System::Drawing::Image^ LaplacianEdgeDetection(System::Drawing::Image^ srcImage );
215 
216 
223  System::Drawing::Image^ AutoCrop(System::Drawing::Image^ srcImage, System::Drawing::Color ^cropColor);
224 
235  System::Drawing::Image^ WatermarkImage(System::Drawing::Image^ SrcImage, System::String^ WatermarkText,System::Drawing::Color^ textColor, System::Drawing::Font^ font, int iRotation_Angle, int iOpacity, bool bAutoAdjust);
236 
243  List<System::Drawing::Rectangle> ^ CompareImages(System::Drawing::Image^ baseImage, System::Drawing::Image^ newImage);
244 
250  System::Drawing::Image^ GaussianFilterImage(System::Drawing::Image^ srcImage);//Default weight is 4
251 
258  System::Drawing::Image^ GaussianFilterImage(System::Drawing::Image^ srcImage, int iWeight);
259 
266  System::Drawing::Image^ ProcessImage(System::Drawing::Image^ srcImage, PageInfo^ pgInfo);
267 
276  System::Drawing::Image^ BrightContIntImage(System::Drawing::Image^ srcImage, int iBrightness, int iContrast, int iIntensity);
277 
278 private:
279  //ImageXpro::IImageProcess^ m_imageProcessObj;
280  System::Drawing::Image^ ImplementInterPolate(System::Drawing::Image ^srcImage, System::Drawing::Drawing2D::InterpolationMode interPolateMode);
281  System::Drawing::Rectangle GetIntersactionRect(System::Drawing::Rectangle rect1, System::Drawing::Rectangle rect2);
282  float GetCorrectedScale(System::Drawing::Image ^srcImage, int newHeight, int newWidth);
283  void FillBMPDataAndInfo(System::Drawing::Image^ srcImage ,byte*& rgbValues, BITMAPINFO*& bmpInfo, int &dataLength);
284 };
285 
286 //Class for applying Gausian Filter
287 
288 
289 
290 
int Width
Scaled width of the result image.
Definition: ImageProcess.h:40
bool Deskew
Bool value to specify whether to implement Deskew operation or not.
Definition: ImageProcess.h:60
Definition: ImageProcess.h:13
Definition: ImageProcess.h:96
PageInfo(float _scale)
Constructor for ImageProcess specifies the scale by which the size of the new image is to be set...
Definition: ImageProcess.h:82
int Scale
Resize factor for the result image will be preffered over seprate height and width provided...
Definition: ImageProcess.h:46
int rotationAngle
The angle in degrees by which the source image will be rotated to produce the result.
Definition: ImageProcess.h:51
PageInfo(int _width, int _height)
Constructor for ImageProcess specifies the scaling width and height on the source image...
Definition: ImageProcess.h:71
int Height
Scaled height of the result image.
Definition: ImageProcess.h:35
int QuailtyFactor
The quality factor to be implemented on the source image. It can be assigned one of the pre-defined v...
Definition: ImageProcess.h:56