From cca66b9ec4e494c1d919bff0f71a820d8afab1fa Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 20:24:48 +0200 Subject: Adding upstream version 1.2.2. Signed-off-by: Daniel Baumann --- src/3rdparty/autotrace/despeckle.h | 54 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 src/3rdparty/autotrace/despeckle.h (limited to 'src/3rdparty/autotrace/despeckle.h') diff --git a/src/3rdparty/autotrace/despeckle.h b/src/3rdparty/autotrace/despeckle.h new file mode 100644 index 0000000..3b206e7 --- /dev/null +++ b/src/3rdparty/autotrace/despeckle.h @@ -0,0 +1,54 @@ +/* despeckle.h: Bitmap despeckler for AutoTrace + + Copyright (C) 2001 David A. Bartold / Martin Weber + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public License + as published by the Free Software Foundation; either version 2.1 of + the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, but + WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + USA. */ + +#ifndef DESPECKLE_H +#define DESPECKLE_H + +#include "types.h" +#include "bitmap.h" +#include "exception.h" + +/* Despeckle - Despeckle a 8 or 24 bit image + * + * Input Parameters: + * Adaptive feature coalescing value, the despeckling level and noise removal + * + * Despeckling level (level): Integer from 0 to ~20 + * 0 = perform no despeckling + * An increase of the despeckling level by one doubles the size of features. + * The Maximum value must be smaller then the logarithm base two of the number + * of pixels. + * + * Feature coalescing (tightness): Real from 0.0 to ~8.0 + * 0 = Turn it off (whites may turn black and vice versa, etc) + * 3 = Good middle value + * 8 = Really tight + * + * Noise removal (noise_removal): Real from 1.0 to 0.0 + * 1 = Maximum noise removal + * You should always use the highest value, only if certain parts of the image + * disappear you should lower it. + * + * Modified Parameters: + * The bitmap is despeckled. + */ + +extern void despeckle(at_bitmap * bitmap, int level, gfloat tightness, gfloat noise_removal, at_exception_type * exp); + +#endif /* not DESPECKLE_H */ -- cgit v1.2.3