1 /* 2 * Copyright (C) 2008 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 #ifndef bim_HISTOEQ_EM_H 18 #define bim_HISTOEQ_EM_H 19 20 /* ---- includes ----------------------------------------------------------- */ 21 22 #include "b_BasicEm/Context.h" 23 #include "b_ImageEm/UInt8Image.h" 24 25 /* ---- related objects --------------------------------------------------- */ 26 27 struct bim_UInt8Image; 28 struct bts_Int16Rect; 29 30 /* ---- typedefs ----------------------------------------------------------- */ 31 32 /* ---- constants ---------------------------------------------------------- */ 33 34 /* ---- external functions ------------------------------------------------- */ 35 36 /** Histogram equalization of image */ 37 void bim_UInt8Image_equalize( struct bbs_Context* cpA, 38 struct bim_UInt8Image* imagePtrA ); 39 40 /** Histogram equalization using histogram generated from subregion. 41 * While the histogram is taken only in the specified sub-section of the 42 * image, the equalization, i.e. remapping of the pixel values, is 43 * performed on the whole image. 44 * 45 * @param imagePtrA pointer to image to be equalized 46 * @param sectionPtrA section specifying region in image where histogram is 47 * generated from 48 */ 49 void bim_UInt8Image_equalizeSection( struct bbs_Context* cpA, 50 struct bim_UInt8Image* imagePtrA, 51 const struct bts_Int16Rect* sectionPtrA ); 52 53 /* ------------------------------------------------------------------------- */ 54 55 #endif /* bim_HISTOEQ_EM_H */ 56 57