Tesseract
3.02
|
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 "img.h" 00026 #include "pdblock.h" 00027 #include "coutln.h" 00028 #include "crakedge.h" 00029 00030 #define BUCKETSIZE 16 00031 00032 00033 extern double_VAR_H (edges_threshold_greyfraction, 0.07, 00034 "Min edge diff for grad vector"); 00035 extern BOOL_VAR_H (edges_show_paths, FALSE, "Draw raw outlines"); 00036 extern BOOL_VAR_H (edges_show_needles, FALSE, "Draw edge needles"); 00037 extern INT_VAR_H (edges_children_per_grandchild, 10, 00038 "Importance ratio for chucking outlines"); 00039 extern INT_VAR_H (edges_children_count_limit, 45, 00040 "Max holes allowed in blob"); 00041 extern INT_VAR_H (edges_maxedgelength, 16000, "Max steps in any outline"); 00042 extern double_VAR_H (edges_childarea, 0.5, 00043 "Max area fraction of child outline"); 00044 extern double_VAR_H (edges_boxarea, 0.8, 00045 "Min area fraction of grandchild for box"); 00046 void complete_edge(CRACKEDGE *start, //start of loop 00047 C_OUTLINE_IT* outline_it); 00048 ScrollView::Color check_path_legal( //certify outline 00049 CRACKEDGE *start //start of loop 00050 ); 00051 inT16 loop_bounding_box( //get bounding box 00052 CRACKEDGE *&start, //edge loop 00053 ICOORD &botleft, //bounding box 00054 ICOORD &topright); 00055 #endif