2005-07-08 07:45:38 +08:00
|
|
|
/*
|
2005-07-14 03:37:27 +08:00
|
|
|
* SIOX: Simple Interactive Object Extraction
|
2005-07-08 07:45:38 +08:00
|
|
|
*
|
|
|
|
* For algorithm documentation refer to:
|
2005-07-08 07:48:58 +08:00
|
|
|
* G. Friedland, K. Jantz, L. Knipping, R. Rojas:
|
|
|
|
* "Image Segmentation by Uniform Color Clustering
|
|
|
|
* -- Approach and Benchmark Results",
|
|
|
|
* Technical Report B-05-07, Department of Computer Science,
|
|
|
|
* Freie Universitaet Berlin, June 2005.
|
2005-07-08 07:45:38 +08:00
|
|
|
* http://www.inf.fu-berlin.de/inst/pubs/tr-b-05-07.pdf
|
2005-07-08 07:48:58 +08:00
|
|
|
*
|
2005-07-14 03:30:25 +08:00
|
|
|
* See http://www.siox.org/ for more information.
|
|
|
|
*
|
2005-07-08 07:48:58 +08:00
|
|
|
* Algorithm idea by Gerald Friedland.
|
|
|
|
* This implementation is Copyright (C) 2005
|
|
|
|
* by Gerald Friedland <fland@inf.fu-berlin.de>
|
|
|
|
* and Kristian Jantz <jantz@inf.fu-berlin.de>.
|
|
|
|
*
|
2009-01-18 06:28:01 +08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
2005-07-08 07:45:38 +08:00
|
|
|
*
|
|
|
|
* This program 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 General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2009-01-18 06:28:01 +08:00
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2005-07-08 07:45:38 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
2005-07-14 03:37:27 +08:00
|
|
|
#ifndef __SIOX_H__
|
|
|
|
#define __SIOX_H__
|
2005-07-08 07:48:58 +08:00
|
|
|
|
|
|
|
|
2005-08-07 03:08:43 +08:00
|
|
|
#define SIOX_DEFAULT_SMOOTHNESS 3
|
|
|
|
|
2005-09-26 05:29:17 +08:00
|
|
|
#define SIOX_DEFAULT_SENSITIVITY_L 0.64
|
|
|
|
#define SIOX_DEFAULT_SENSITIVITY_A 1.28
|
|
|
|
#define SIOX_DEFAULT_SENSITIVITY_B 2.56
|
2005-07-08 07:45:38 +08:00
|
|
|
|
2005-10-12 08:24:26 +08:00
|
|
|
/* FIXME: turn this into an enum */
|
2005-10-18 02:23:31 +08:00
|
|
|
#define SIOX_DRB_ADD 0
|
|
|
|
#define SIOX_DRB_SUBTRACT 1
|
2005-10-12 08:24:26 +08:00
|
|
|
|
2005-07-08 07:45:38 +08:00
|
|
|
|
2005-07-30 00:09:16 +08:00
|
|
|
typedef void (* SioxProgressFunc) (gpointer progress_data,
|
|
|
|
gdouble fraction);
|
|
|
|
|
2005-10-18 02:23:31 +08:00
|
|
|
SioxState * siox_init (TileManager *pixels,
|
|
|
|
const guchar *colormap,
|
|
|
|
gint offset_x,
|
|
|
|
gint offset_y,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint width,
|
|
|
|
gint height);
|
|
|
|
void siox_foreground_extract (SioxState *state,
|
|
|
|
SioxRefinementType refinement,
|
|
|
|
TileManager *mask,
|
2006-03-22 21:18:22 +08:00
|
|
|
gint x1,
|
|
|
|
gint y1,
|
|
|
|
gint x2,
|
|
|
|
gint y2,
|
2005-10-18 02:23:31 +08:00
|
|
|
gint smoothness,
|
|
|
|
const gdouble sensitivity[3],
|
|
|
|
gboolean multiblob,
|
|
|
|
SioxProgressFunc progress_callback,
|
|
|
|
gpointer progress_data);
|
|
|
|
void siox_done (SioxState *state);
|
|
|
|
|
|
|
|
void siox_drb (SioxState *state,
|
|
|
|
TileManager *mask,
|
|
|
|
gint x,
|
|
|
|
gint y,
|
|
|
|
gint brush_radius,
|
|
|
|
gint brush_mode,
|
|
|
|
gfloat threshold);
|
2005-07-08 07:45:38 +08:00
|
|
|
|
|
|
|
|
2005-07-14 03:37:27 +08:00
|
|
|
#endif /* __SIOX_H__ */
|