Monday, August 4, 2008

How to add a method in OCROPUS-0.2

i added a method in in file grouping.cc
method name is : crblpRecognizeLine(....)

i did it as the fellowing steps:

1. added my method body in the file grouping.cc in
struct NewGroupingLineOCR : IRecognizeLine {..};

2. added a fake body in file tesseract.cc in
struct TesseractRecognizeLine : IRecognizeLine {..};

as this: void crblpRecognizeLine(...){}

3. added a fake body in file glinerec.cc in
struct GLineRec : IRecognizeLine {..};

as this: void crblpRecognizeLine(...){}

4. added a prototype in file ocrinterfaces.h in
struct IRecognizeLine : IComponent {..};

as this: virtual void crblpRecognizeLine(...)=0;

5. added a prototype in file ocr.pkg in
struct IRecognizeLine : IComponent {..};

as this: virtual void crblpRecognizeLine(...)=0;

now compile
you can now call it from cpp or lua :-)

No comments: