Tesseract  3.02
tesseract-ocr/image/imgs.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  * File:        imgs.h  (Formerly images.h)
00003  * Description: Header file for IMAGE member functions.
00004  * Author:      Ray Smith
00005  * Created:     Mon Jun 11 15:32:53 BST 1990
00006  *
00007  * (C) Copyright 1990, 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           IMGS_H
00021 #define           IMGS_H
00022 
00023 #include          "img.h"
00024 #include          "params.h"
00025 
00026 extern INT_VAR_H (image_default_resolution, 300, "Image resolution dpi");
00027 
00028 inT32 check_legal_image_size(                     //get rest of image
00029                              inT32 x,             //x size required
00030                              inT32 y,             //ysize required
00031                              inT8 bits_per_pixel  //bpp required
00032                             );
00033                                  //copy rectangle
00034 extern DLLSYM void copy_sub_image(IMAGE *source,     //source image
00035                                   inT32 xstart,      //start coords
00036                                   inT32 ystart,
00037                                   inT32 xext,        //extent to copy
00038                                   inT32 yext,
00039                                   IMAGE *dest,       //destination image
00040                                   inT32 xdest,       //destination coords
00041                                   inT32 ydest,
00042                                   BOOL8 adjust_grey  //shift to new bpp
00043                                  );
00044                                  //enlarge rectangle
00045 extern DLLSYM void enlarge_sub_image(IMAGE *source,     //source image
00046                                      inT32 xstart,      //scaled start coords
00047                                      inT32 ystart,
00048                                      IMAGE *dest,       //destination image
00049                                      inT32 xdest,       //dest coords
00050                                      inT32 ydest,
00051                                      inT32 xext,        //destination extent
00052                                      inT32 yext,
00053                                      inT32 scale,       //scale factor
00054                                      BOOL8 adjust_grey  //shift to new bpp
00055                                     );
00056                                  //reduce rectangle
00057 extern DLLSYM void fast_reduce_sub_image(IMAGE *source,     //source image
00058                                          inT32 xstart,      //start coords
00059                                          inT32 ystart,
00060                                          inT32 xext,        //extent to copy
00061                                          inT32 yext,
00062                                          IMAGE *dest,       //destination image
00063                                          inT32 xdest,       //destination coords
00064                                          inT32 ydest,
00065                                          inT32 scale,       //reduction factor
00066                                          BOOL8 adjust_grey  //shift to new bpp
00067                                         );
00068                                  //reduce rectangle
00069 extern DLLSYM void reduce_sub_image(IMAGE *source,     //source image
00070                                     inT32 xstart,      //start coords
00071                                     inT32 ystart,
00072                                     inT32 xext,        //extent to copy
00073                                     inT32 yext,
00074                                     IMAGE *dest,       //destination image
00075                                     inT32 xdest,       //destination coords
00076                                     inT32 ydest,
00077                                     inT32 scale,       //reduction factor
00078                                     BOOL8 adjust_grey  //shift to new bpp
00079                                    );
00080 extern DLLSYM void invert_image(              /*invert the image */
00081                                 IMAGE *image  /*image ot invert */
00082                                );
00083                                  //bias rectangle
00084 extern DLLSYM void bias_sub_image(IMAGE *source,  //source image
00085                                   inT32 xstart,   //start coords
00086                                   inT32 ystart,
00087                                   inT32 xext,     //extent to copy
00088                                   inT32 yext,
00089                                   uinT8 bias      //number to add
00090                                  );
00091                                  //copy rectangle
00092 extern DLLSYM void starbase_to_normal(IMAGE *source,       //source image
00093                                       inT32 xstart,        //start coords
00094                                       inT32 ystart,
00095                                       inT32 xext,          //extent to copy
00096                                       inT32 yext,
00097                                       IMAGE *dest,         //destination image
00098                                       inT32 xdest,         //destination coords
00099                                       inT32 ydest,
00100                                       BOOL8 preserve_grey  //shift to new bpp
00101                                      );
00102 #endif