tesseract  3.03
/usr/local/google/home/jbreiden/tesseract-ocr-read-only/training/degradeimage.h
Go to the documentation of this file.
00001 /**********************************************************************
00002  * File:        degradeimage.h
00003  * Description: Function to degrade an image (usually of text) as if it
00004  *              has been printed and then scanned.
00005  * Authors:     Ray Smith
00006  * Created:     Tue Nov 19 2013
00007  *
00008  * (C) Copyright 2013, Google Inc.
00009  * Licensed under the Apache License, Version 2.0 (the "License");
00010  * you may not use this file except in compliance with the License.
00011  * You may obtain a copy of the License at
00012  * http://www.apache.org/licenses/LICENSE-2.0
00013  * Unless required by applicable law or agreed to in writing, software
00014  * distributed under the License is distributed on an "AS IS" BASIS,
00015  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00016  * See the License for the specific language governing permissions and
00017  * limitations under the License.
00018  *
00019  **********************************************************************/
00020 #ifndef TESSERACT_TRAINING_DEGRADEIMAGE_H_
00021 #define TESSERACT_TRAINING_DEGRADEIMAGE_H_
00022 
00023 struct Pix;
00024 
00025 namespace tesseract {
00026 
00027 // Degrade the pix as if by a print/copy/scan cycle with exposure > 0
00028 // corresponding to darkening on the copier and <0 lighter and 0 not copied.
00029 // If rotation is not NULL, the clockwise rotation in radians is saved there.
00030 // The input pix must be 8 bit grey. (Binary with values 0 and 255 is OK.)
00031 // The input image is destroyed and a different image returned.
00032 struct Pix* DegradeImage(struct Pix* input, int exposure, float* rotation);
00033 
00034 }  // namespace tesseract
00035 
00036 #endif  // TESSERACT_TRAINING_DEGRADEIMAGE_H_
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines