| GIMP Application Reference Manual | ||||
|---|---|---|---|---|
#define SIOX_DEFAULT_SMOOTHNESS #define SIOX_DEFAULT_SENSITIVITY_L #define SIOX_DEFAULT_SENSITIVITY_A #define SIOX_DEFAULT_SENSITIVITY_B #define SIOX_DRB_ADD #define SIOX_DRB_SUBTRACT SioxState; void (*SioxProgressFunc) (gpointer progress_data, gdouble fraction); 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, gint x1, gint y1, gint x2, gint y2, 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);
void (*SioxProgressFunc) (gpointer progress_data, gdouble fraction);
|
|
|
SioxState* siox_init (TileManager *pixels, const guchar *colormap, gint offset_x, gint offset_y, gint x, gint y, gint width, gint height);
Initializes the SIOX segmentator. Creates and returns a SioxState struct that has to be passed to all function calls of this module as it maintaines the state.
|
the tiles to extract the foreground from |
|
colormap in case pixels are indexed, NULL otherwise
|
|
horizontal offset of pixels with respect to the mask
|
|
vertical offset of pixels with respect to the mask
|
|
horizontal offset into the mask |
|
vertical offset into the mask |
|
width of working area on mask |
|
height of working area on mask |
Returns : |
void siox_foreground_extract (SioxState *state, SioxRefinementType refinement, TileManager *mask, gint x1, gint y1, gint x2, gint y2, gint smoothness, const gdouble sensitivity[3], gboolean multiblob, SioxProgressFunc progress_callback, gpointer progress_data);
Writes the resulting segmentation into mask. The region of
interest as specified using x1, y1, x2 and y2 defines the
bounding box of the background and undecided areas. No changes to
the mask are done outside this rectangle.
|
current state struct as constructed by siox_init |
|
SioxRefinementType |
|
a mask indicating sure foreground (255), sure background (0) and undecided regions ([1..254]). |
|
region of interest |
|
region of interest |
|
region of interest |
|
region of interest |
|
boundary smoothness (a good value is 3) |
|
a double array with three entries specifing the accuracy, a good value is: { 0.64, 1.28, 2.56 } |
|
allow multiple blobs (true) or only one (false) |
|
|
|
void siox_done (SioxState *state);
Frees the memory assciated with the state.
|
The state of this tool. |
void siox_drb (SioxState *state, TileManager *mask, gint x, gint y, gint brush_radius, gint brush_mode, gfloat threshold);
drb - detail refinement brush, a brush mask for subpixel classification.
FIXME: Now it is assumed that the brush is a square. Should be able to be whatever GIMP offers. TODO: This is still an experimental method. There are more tests needed to evaluate performance of this!
|
current state struct as constructed by siox_init |
|
|
|
|
|
|
|
the radius of the brush |
|
at this time either SIOX_DRB_ADD or SIOX_DRB_SUBTRACT |
|
a threshold to be defined by the user. Range for SIOX_DRB_ADD: ]0..1] default: 1.0, range for for SIOX_DRB_SUBTRACT: [0..1[, default: 0.0 |