tesseract  3.03
/usr/local/google/home/jbreiden/tesseract-ocr-read-only/textord/edgloop.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  * File:        edgloop.h  (Formerly edgeloop.h)
00003  * Description: Functions to clean up an outline before approximation.
00004  * Author:                                      Ray Smith
00005  * Created:                                     Tue Mar 26 16:56:25 GMT 1991
00006  *
00007  * (C) Copyright 1991, Hewlett-Packard Ltd.
00008  ** Licensed under the Apache License, Version 2.0 (the "License");
00009  ** you may not use this file except in compliance with the License.
00010  ** You may obtain a copy of the License at
00011  ** http://www.apache.org/licenses/LICENSE-2.0
00012  ** Unless required by applicable law or agreed to in writing, software
00013  ** distributed under the License is distributed on an "AS IS" BASIS,
00014  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015  ** See the License for the specific language governing permissions and
00016  ** limitations under the License.
00017  *
00018  **********************************************************************/
00019 
00020 #ifndef           EDGLOOP_H
00021 #define           EDGLOOP_H
00022 
00023 #include          "scrollview.h"
00024 #include          "params.h"
00025 #include          "pdblock.h"
00026 #include          "coutln.h"
00027 #include          "crakedge.h"
00028 
00029 #define BUCKETSIZE      16
00030 
00031 
00032 extern INT_VAR_H (edges_children_per_grandchild, 10,
00033 "Importance ratio for chucking outlines");
00034 extern INT_VAR_H (edges_children_count_limit, 45,
00035 "Max holes allowed in blob");
00036 extern double_VAR_H (edges_childarea, 0.5,
00037 "Max area fraction of child outline");
00038 extern double_VAR_H (edges_boxarea, 0.8,
00039 "Min area fraction of grandchild for box");
00040 void complete_edge(CRACKEDGE *start,  //start of loop
00041                    C_OUTLINE_IT* outline_it);
00042 ScrollView::Color check_path_legal(                  //certify outline
00043                         CRACKEDGE *start  //start of loop
00044                        );
00045 inT16 loop_bounding_box(                    //get bounding box
00046                         CRACKEDGE *&start,  //edge loop
00047                         ICOORD &botleft,    //bounding box
00048                         ICOORD &topright);
00049 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines