[sikuli] 186/385: OCR TODO native

Gilles Filippini pini at moszumanska.debian.org
Sun Jun 29 19:26:10 UTC 2014


This is an automated email from the git hooks/post-receive script.

pini pushed a commit to tag upstream/1.1.0_beta1
in repository sikuli.

commit dc5cc76a473a4db57901d08f55bb9a43bfd60120
Author: Raimund Hocke <info at its-me-raiman.de>
Date:   Thu Jan 30 20:56:34 2014 +0100

    OCR TODO native
---
 Natives/src/main/native/Vision/tessocr.cpp | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Natives/src/main/native/Vision/tessocr.cpp b/Natives/src/main/native/Vision/tessocr.cpp
index e983eb3..2061e23 100755
--- a/Natives/src/main/native/Vision/tessocr.cpp
+++ b/Natives/src/main/native/Vision/tessocr.cpp
@@ -405,9 +405,9 @@ OCR::init(const char* datapath){
    setenv("TESSDATA_PREFIX", datapath, 1);
 #endif
    int ret = _tessAPI.Init(datapath, _lang.c_str());
-   //cout << (ret==0?"done":"failed") << endl;
-
-//   _tessAPI.SetAccuracyVSpeed(AVS_MOST_ACCURATE); // FIXME: doesn't work?
+	 //TODO
+	 //int ret = _tessAPI.Init(datapath, _lang.c_str(), OEM_TESSERACT_ONLY);
+	 //   _tessAPI.SetAccuracyVSpeed(AVS_MOST_ACCURATE); // FIXME: doesn't work?
    isInitialized = true;
 }
 
@@ -490,6 +490,9 @@ float preprocess_for_ocr(const Mat& in_img, Mat& out_img){
    if (in_img.rows < MIN_HEIGHT){
       scale = MIN_HEIGHT / float(in_img.rows);
       resize(in_img, out_img, Size(in_img.cols*scale,in_img.rows*scale));
+			//TODO
+			//resize(in_img, out_img, Size(in_img.cols*scale,in_img.rows*scale), 0, 0, INTER_CUBIC);
+			//copyMakeBorder (in_img, out_img, 0, (scale-1)*in_img.rows, 0, (scale-1)*in_img.cols, BORDER_REPLICATE);
    }else {
       out_img = in_img;
    }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git



More information about the pkg-java-commits mailing list