1 /* despeckle.h: Bitmap despeckler for AutoTrace
2 
3    Copyright (C) 2001 David A. Bartold
4 
5    This library is free software; you can redistribute it and/or
6    modify it under the terms of the GNU Lesser General Public License
7    as published by the Free Software Foundation; either version 2.1 of
8    the License, or (at your option) any later version.
9 
10    This library is distributed in the hope that it will be useful, but
11    WITHOUT ANY WARRANTY; without even the implied warranty of
12    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13    Lesser General Public License for more details.
14 
15    You should have received a copy of the GNU Lesser General Public
16    License along with this library; if not, write to the Free Software
17    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
18    USA. */
19 
20 #ifndef DESPECKLE_H
21 #define DESPECKLE_H
22 
23 #include "types.h"
24 #include "bitmap.h"
25 #include "exception.h"
26 
27 /* Despeckle - Despeckle a 8 or 24 bit image
28  *
29  * Input Parameters:
30  *   Adaptive feature coalescing value and the despeckling level
31  *
32  *   Despeckling level: Integer from 0 to ~20
33  *     0 = perform no despeckling
34  *     An increase of the despeckling level by one doubles the size of features
35  *
36  *   Feature coalescing:
37  *     0 = Turn it off (whites may turn black and vice versa, etc)
38  *     3 = Good middle value
39  *     8 = Really tight
40  *
41  * Modified Parameters:
42  *   The bitmap is despeckled
43  */
44 
45 extern void
46 despeckle (bitmap_type *bitmap, int level, at_real tightness, at_exception_type * exp);
47 
48 #endif /* not DESPECKLE_H */
49