Tesseract  3.02
tesseract-ocr/wordrec/makechop.h
Go to the documentation of this file.
00001 /* -*-C-*-
00002  ********************************************************************************
00003  *
00004  * File:        makechop.h  (Formerly makechop.h)
00005  * Description:
00006  * Author:      Mark Seaman, SW Productivity
00007  * Created:     Fri Oct 16 14:37:00 1987
00008  * Modified:     Mon Jul 29 13:33:23 1991 (Mark Seaman) marks@hpgrlt
00009  * Language:    C
00010  * Package:     N/A
00011  * Status:      Reusable Software Component
00012  *
00013  * (c) Copyright 1987, Hewlett-Packard Company.
00014  ** Licensed under the Apache License, Version 2.0 (the "License");
00015  ** you may not use this file except in compliance with the License.
00016  ** You may obtain a copy of the License at
00017  ** http://www.apache.org/licenses/LICENSE-2.0
00018  ** Unless required by applicable law or agreed to in writing, software
00019  ** distributed under the License is distributed on an "AS IS" BASIS,
00020  ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00021  ** See the License for the specific language governing permissions and
00022  ** limitations under the License.
00023  *
00024  *********************************************************************************/
00025 #ifndef MAKECHOP_H
00026 #define MAKECHOP_H
00027 
00028 /*----------------------------------------------------------------------
00029       I n c l u d e s
00030 ----------------------------------------------------------------------*/
00031 #include "chop.h"
00032 #include "olutil.h"
00033 
00034 /*----------------------------------------------------------------------
00035       M a c r o s
00036 ---------------------------------------------------------------------*/
00037 /**********************************************************************
00038  * is_split_outline
00039  *
00040  * Check to see if both sides of the split fall within the bounding
00041  * box of this outline.
00042  **********************************************************************/
00043 
00044 #define is_split_outline(outline,split)          \
00045 (outline->Contains(split->point1->pos) &&  \
00046         outline->Contains(split->point2->pos))    \
00047 
00048 
00049 /*----------------------------------------------------------------------
00050         Public Function Prototypes
00051 ----------------------------------------------------------------------*/
00052 void apply_seam(TBLOB *blob, TBLOB *other_blob, bool italic_blob, SEAM *seam);
00053 
00054 void form_two_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
00055                     const TPOINT& location);
00056 
00057 void make_double_split(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
00058                        SEAM *seam);
00059 
00060 void make_single_split(TESSLINE *outlines, SPLIT *split);
00061 
00062 void make_split_blobs(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
00063                       SEAM *seam);
00064 
00065 void make_triple_split(TBLOB *blob, TBLOB *other_blob, bool italic_blob,
00066                        SEAM *seam);
00067 
00068 void undo_seam(TBLOB *blob, TBLOB *other_blob, SEAM *seam);
00069 
00070 void undo_single_split(TBLOB *blob, SPLIT *split);
00071 #endif