--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/Page.h Thu May 18 23:12:51 2006 +0200
@@ -0,0 +1,57 @@
+#ifndef __PAGE_H__
+#define __PAGE_H__
+extern "C" {
+#include <pam.h>
+}
+#include "Bitmap.h"
+#include "Histogram.h"
+#include "Text.h"
+
+typedef char *tRow;
+
+class Page
+{
+public:
+ Page(const char *filename);
+ ~Page();
+
+ int imageWidth() const { return width; };
+ int imageHeight() const { return height;};
+
+ //writeMap(char *filename) const;
+
+ /*
+ Angle skewAngle();
+ */
+ void rotateMap(float angle);
+ void rotateMap(float angle, Bitmap* &mapNew);
+
+ void calcHistogram();
+
+ /* Funció una mica inútil */
+ void tryAngles(float min, float max, float step);
+ float getSkew(int depth = 5, float margin = 3);
+
+ float ratioBlackWhite() const;
+
+ // OCR
+ void getText();
+
+ //static void Initialize();
+
+ void writeMap(const char *filename) const;
+ void readMap(const char *filename);
+
+private:
+ float std_dev_lines_angle(float angle);
+
+ int width;
+ int height;
+
+ pam pamImage;
+ Bitmap *map;
+ Text *text;
+
+ Histogram *hist;
+};
+#endif