• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_TONE_DOWN_BG_SUPP_EM_H
18 #define bim_TONE_DOWN_BG_SUPP_EM_H
19 
20 /* ---- includes ----------------------------------------------------------- */
21 
22 #include "b_BasicEm/Basic.h"
23 #include "b_TensorEm/Int16Rect.h"
24 #include "b_ImageEm/UInt8Image.h"
25 
26 /* ---- related objects  --------------------------------------------------- */
27 
28 /* ---- typedefs ----------------------------------------------------------- */
29 
30 /* ---- constants ---------------------------------------------------------- */
31 
32 /* ---- object definition -------------------------------------------------- */
33 
34 /* ---- associated objects ------------------------------------------------- */
35 
36 /* ---- external functions ------------------------------------------------- */
37 
38 /* ---- \ghd{ constructor/destructor } ------------------------------------- */
39 
40 /* ---- \ghd{ operators } -------------------------------------------------- */
41 
42 /* ---- \ghd{ query functions } -------------------------------------------- */
43 
44 /* ---- \ghd{ modify functions } ------------------------------------------- */
45 
46 /* ---- \ghd{ memory I/O } ------------------------------------------------- */
47 
48 /* ---- \ghd{ exec functions } --------------------------------------------- */
49 
50 /** computes the mean BG gray level outside of the rectangle */
51 void bim_ToneDownBGSupp_BGGreyLevelOutside( struct bim_UInt8Image* imgA,
52 											struct bts_Int16Rect* rectA,
53 											int16 rectExpansionA,			/* this is a remnant of the original c++ class */
54 											uint32* meanBGGrayLevelA );		/* was mistakenly converted to c */
55 
56 /** computes the mean BG gray level right on the rectangle contours */
57 void bim_ToneDownBGSupp_BGGreyLevelContour( struct bim_UInt8Image* imgA,
58 											struct bts_Int16Rect* rectA,
59 											uint32* meanBGGrayLevelA );
60 
61 /** attenuates the image away from the rectangle boundary */
62 void bim_ToneDownBGSupp_suppress( struct bim_UInt8Image* imgA,
63 								  struct bts_Int16Rect* rectA,
64 								  int16 rectShrinkageA,
65 								  int32 toneDownFactorA,		/* bpb = [16.16] */
66 								  int32 cutOffAccuracyA );		/* bpb = [16.16], put in 0 for highest accuracy */
67 
68 #endif /* bim_TONE_DOWN_BG_SUPP_EM_H */
69 
70