Fixed the C++ port to compile on a Linux system.
authorralf.kistner@gmail.com <ralf.kistner@gmail.com@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 15 Feb 2010 17:00:07 +0000 (17:00 +0000)
committerralf.kistner@gmail.com <ralf.kistner@gmail.com@59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Mon, 15 Feb 2010 17:00:07 +0000 (17:00 +0000)
git-svn-id: http://zxing.googlecode.com/svn/trunk@1211 59b500cc-1b3d-0410-9834-0bbf25fbcc57

cpp/core/src/zxing/common/LocalBlockBinarizer.cpp
cpp/core/src/zxing/common/LocalBlockBinarizer.h
cpp/core/src/zxing/oned/Code128Reader.cpp
cpp/core/src/zxing/oned/Code39Reader.cpp
cpp/core/src/zxing/oned/OneDReader.cpp
cpp/magick/src/main.cpp

index 693f133..135902a 100644 (file)
@@ -33,6 +33,11 @@ LocalBlockBinarizer::LocalBlockBinarizer(Ref<LuminanceSource> source) :
 LocalBlockBinarizer::~LocalBlockBinarizer() {
 }
 
+Ref<BitArray> LocalBlockBinarizer::estimateBlackRow(int y, Ref<BitArray> row) {
+  //TODO: implement
+  return Ref<BitArray>();
+}
+
 // Calculates the final BitMatrix once for all requests. This could be called once from the
 // constructor instead, but there are some advantages to doing it lazily, such as making
 // profiling easier, and not doing heavy lifting when callers don't expect it.
index 6a2f9d3..bae80bc 100644 (file)
@@ -31,8 +31,10 @@ public:
   virtual ~LocalBlockBinarizer();
 
   virtual Ref<BitMatrix> estimateBlackMatrix();
-
+  Ref<BitArray> estimateBlackRow(int y, Ref<BitArray> row);
+  
 private:
+  
   void calculateThresholdForBlock(const unsigned char* luminances, int subWidth, int subHeight,
                                   int stride, const unsigned char* averages, const unsigned char* types, BitMatrix& matrix);
   void sharpenRow(unsigned char* luminances, int width, int height);
index d67ece3..943a574 100644 (file)
@@ -23,6 +23,7 @@
 #include <zxing/common/Array.h>
 #include <zxing/ReaderException.h>
 #include <math.h>
+#include <string.h>
 
 namespace zxing {
        namespace oned {
index 259e5c9..cb03dd9 100644 (file)
@@ -23,6 +23,7 @@
 #include <zxing/common/Array.h>
 #include <zxing/ReaderException.h>
 #include <math.h>
+#include <limits.h>
 
 namespace zxing {
        namespace oned {
index d8c6a31..21526f5 100644 (file)
@@ -21,6 +21,7 @@
 #include "OneDReader.h"
 #include <zxing/ReaderException.h>
 #include <math.h>
+#include <limits.h>
 
 namespace zxing {
        namespace oned {
index ff4e64b..ce82e11 100644 (file)
@@ -240,12 +240,12 @@ int main(int argc, char** argv) {
     int lresult = 1;
 
     if (outfolder == string("-")) {
-      //gresult = test_image_global(image, "");
+      gresult = test_image_global(image, "");
       lresult = test_image_local(image, "");
     } else {
       replace(infilename.begin(), infilename.end(), '/', '_');
       string prefix = string(outfolder) + string("/") + infilename;
-      //gresult = test_image_global(image, prefix + ".g");
+      gresult = test_image_global(image, prefix + ".g");
       lresult = test_image_local(image, prefix + ".l");
     }