[ocrfeeder] Set the columns' detection and width value dependent on the preferences



commit 146d20bad0b861e5bd40a77e4cf521f7a44b8fdd
Author: Joaquim Rocha <jrocha igalia com>
Date:   Tue Jul 13 16:59:32 2010 +0200

    Set the columns' detection and width value dependent on the preferences
    
    widgetModeler.ImageReviewer_Controler: Use the configurations'
    values to tell the LayoutAnalysis if it should perform the columns'
    detection improvement algorithm

 studio/widgetModeler.py |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/studio/widgetModeler.py b/studio/widgetModeler.py
index 9b00caf..d20364d 100644
--- a/studio/widgetModeler.py
+++ b/studio/widgetModeler.py
@@ -435,9 +435,16 @@ class ImageReviewer_Controler:
             window_size = None
         else:
             window_size = float(window_size)
+        improve_column_detection = \
+            self.configuration_manager.improve_column_detection
+        column_min_width = self.configuration_manager.column_min_width
+        if column_min_width == 'auto':
+            column_min_width = None
 
         layout_analysis = LayoutAnalysis(self.__getConfiguredOcrEngine(),
-                                         window_size)
+                                         window_size,
+                                         improve_column_detection,
+                                         column_min_width)
         return layout_analysis.recognize(image_reviewer.path_to_image,
                                          image_reviewer.page.resolution[1])
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]