Hello,

I am new to ocropus and after cloning its repository and trying to
build, I got a following error:

g++ -o ocr-line/glclass.os -c -DDATADIR='"../install/share/ocropus"' -
DDEFAULT_DATA_DIR='"../install/share/ocropus/models"' -
DDEFAULT_EXT_DIR='"../install/share/ocropus/extensions"' -g -fPIC -O2 -
Wall -Wno-sign-compare -Wno-write-strings -Wno-unknown-pragmas -
D__warn_unused_result__=__far__ -D_BACKWARD_BACKWARD_WARNING_H=1 -
fopenmp -fPIC -DHAVE_SQLITE3 -Iocr-binarize -Iocr-leptonica -Iocr-
voronoi -Iocr-commands -Iocr-utils -Iocr-layout -Iocr-line -Iocr-pfst -
Iocr-lineseg -I/usr/local/include ocr-line/glclass.cc
ocr-line/glclass.cc: In member function 'virtual void
glinerec::StandardExtractor::extract(colib::narray<colib::narray<float>
>&, colib::floatarray&)':
ocr-line/glclass.cc:2001: error: 'extract_holes' was not declared in
this scope
scons: *** [ocr-line/glclass.os] Error 1
scons: building terminated because of errors.

I investigated the repository history, and found out that the whole
StandardExtractor is new, coming from a recent commit:

Revision: 374
Branch: default
Author: Tom <[email protected]>  2010-05-15 18:21:12
Committer: Tom <[email protected]>  2010-05-15 18:21:12
Parent: 373:9d5027032cab (added new feature extractors)
Child:  375:1a5a7f36769e (changed upper limits for space costs to
1000)

    added new StandardExtractor for feature extraction
    now registering components under their C++ class names; old
registrations are #ifndef OBSOLETE
    moved some feature extraction code into ocr-utils.cc

It made the following change in ocr-line/glclass.cc:
----------------------------- ocr-line/glclass.cc
-----------------------------
@@ -3,6 +3,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include "glinerec.h"
+#include <ocropus/ocr-utils.h>
 #ifdef HAVE_GSL
 #include "gsl.h"
 #endif

and this missing extract_holes function is declared in this ocr-
utils.h:
---------------------------- ocr-utils/ocr-utils.h
----------------------------
@@ -60,5 +60,10 @@
     int junction_counts(bytearray &image,float presmooth=0.0,float
skelsmooth=0.0);
     int component_counts(bytearray &image,float presmooth=0.0);
     int hole_counts(bytearray &image,float presmooth=0.0);
+    void extract_holes(bytearray &holes,bytearray &binarized);
+    void compute_troughs(floatarray &troughs,bytearray
&binarized,float rsmooth=1.0);
+    void ridgemap(narray<floatarray> &maps,bytearray &binarized,
+                  float rsmooth=1.0,float asigma=0.7,float
mpower=0.5,
+                  float rpsmooth=1.0);
 }
 #endif

But the gclass.cc tries to include it from already installed OCRopus,
not locally, and since I don't have OCRopus includes installed, it
fails. I think that it should be included locally, for the build to be
successful:
diff -r e5f183e0bf9e ocr-line/glclass.cc
--- a/ocr-line/glclass.cc       Thu May 20 06:35:26 2010 +0200
+++ b/ocr-line/glclass.cc       Sat May 22 16:07:19 2010 +0200
@@ -3,7 +3,7 @@
 #include <unistd.h>
 #include <sys/stat.h>
 #include "glinerec.h"
-#include <ocropus/ocr-utils.h>
+#include "ocr-utils.h"
 #ifdef HAVE_GSL
 #include "gsl.h"
 #endif

Kind regards,
Juliusz Sompolski

-- 
You received this message because you are subscribed to the Google Groups 
"ocropus" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/ocropus?hl=en.

Reply via email to