|
iceWing
|
#include <gtk/gtk.h>#include "tools/tools.h"#include "gui/Gimage.h"#include "main/sfb_iw.h"#include "plugin_comm.h"Go to the source code of this file.
Data Structures | |
| struct | iwRegCOMinfo |
| struct | iwRegion |
Macros | |
| #define | IW_REG_DATA_SET 0 |
| #define | IW_REG_DATA_CONVERT 1 |
| #define | IW_REG_DATA_IDENT "regionData" |
Typedefs | |
| typedef struct _regCalcData | iwRegCalcData |
| typedef void *(* | iwRegDataFunc )(plugDefinition *plug, iwRegion *region, int mode) |
Enumerations | |
| enum | iwRegMode { IW_REG_INCLUSION = 1 << 0, IW_REG_NO_ZERO = 1 << 1 } |
| enum | iwRegThinning { IW_REG_THIN_OFF = 1 << 0, IW_REG_THIN_ABS = 1 << 1, IW_REG_THIN_DIST = 1 << 2 } |
Functions | |
| int | iw_reg_label (int xsize, int ysize, const uchar *color, gint32 *region) |
| iwRegCOMinfo * | iw_reg_label_with_calc (int xsize, int ysize, const uchar *color, gint32 *region, int *nregions, int minPixelCount) |
| iwRegCalcData * | iw_reg_data_create (void) |
| void | iw_reg_data_free (iwRegCalcData *data) |
| void | iw_reg_data_set_images (iwRegCalcData *data, iwImage *color, uchar **orig_img, uchar *confimg) |
| void | iw_reg_data_set_minregion (iwRegCalcData *data, int minPixelCount) |
| void | iw_reg_data_set_mode (iwRegCalcData *data, iwRegMode mode) |
| void | iw_reg_data_set_thinning (iwRegCalcData *data, iwRegThinning mode, float maxdist) |
| iwRegion * | iw_reg_calc_data (int xlen, int ylen, gint32 *image, int *num_reg, iwRegCalcData *data) |
| iwRegion * | iw_reg_calc (int xlen, int ylen, uchar *color, gint32 *image, uchar **orig_img, uchar *confimg, int *num_reg, int doEinschluss, int minPixelCount) |
| iwRegion * | iw_reg_calc_img (int xlen, int ylen, iwImage *color, gint32 *image, uchar **orig_img, uchar *confimg, int *num_reg, iwRegMode mode, int minPixelCount) |
| void | iw_reg_stretch (int width, int height, iwRegion *reg, int scale) |
| void | iw_reg_boundingbox (const Polygon_t *p, int *x1, int *y1, int *x2, int *y2) |
| void | iw_reg_upsample (int nregions, iwRegion *regions, float upw, float uph) |
| void | iw_reg_free (int nregions, iwRegion *regions) |
| iwRegion * | iw_reg_copy (int nregions, const iwRegion *regions) |
| #define IW_REG_DATA_SET 0 |
| #define IW_REG_DATA_CONVERT 1 |
| #define IW_REG_DATA_IDENT "regionData" |
| typedef struct _regCalcData iwRegCalcData |
| typedef void*(* iwRegDataFunc)(plugDefinition *plug, iwRegion *region, int mode) |
| enum iwRegMode |
| enum iwRegThinning |
| int iw_reg_label | ( | int | xsize, |
| int | ysize, | ||
| const uchar * | color, | ||
| gint32 * | region | ||
| ) |
Do a region labeling of the image color (size: xsize x ysize) and
write the result to region.
Return: Number of regions.
| iwRegCOMinfo* iw_reg_label_with_calc | ( | int | xsize, |
| int | ysize, | ||
| const uchar * | color, | ||
| gint32 * | region, | ||
| int * | nregions, | ||
| int | minPixelCount | ||
| ) |
Do a region labeling of the image color (size: xsize x ysize) and
write the result to region. Calculate pixel count, color, and COM
of the regions.
pixel count < minPixelCount -> Pixel count of the region = 0
Return value is a pointer to a static variable!
| iwRegCalcData* iw_reg_data_create | ( | void | ) |
Maintain the struct holding settings for the region calculation.
The different settings are:
color : Classified image (supported: 1 plane, IW_8U, IW_16U, and
IW_32S), used to get a color index
orig_img: Original color image, used to get the average region color
confimg : Confidence mapped image from the color classifier.
!= NULL: regionen->avgConf = average confidence value of
the region
minPixelCount: Minimal size of calculated regions
iwRegMode|iwRegThinning: See the flags above.
maxdist : Distance value for the modes IW_REG_THIN_ABS and
IW_REG_THIN_DIST.
| void iw_reg_data_free | ( | iwRegCalcData * | data | ) |
| void iw_reg_data_set_images | ( | iwRegCalcData * | data, |
| iwImage * | color, | ||
| uchar ** | orig_img, | ||
| uchar * | confimg | ||
| ) |
| void iw_reg_data_set_minregion | ( | iwRegCalcData * | data, |
| int | minPixelCount | ||
| ) |
| void iw_reg_data_set_mode | ( | iwRegCalcData * | data, |
| iwRegMode | mode | ||
| ) |
| void iw_reg_data_set_thinning | ( | iwRegCalcData * | data, |
| iwRegThinning | mode, | ||
| float | maxdist | ||
| ) |
| iwRegion* iw_reg_calc_data | ( | int | xlen, |
| int | ylen, | ||
| gint32 * | image, | ||
| int * | num_reg, | ||
| iwRegCalcData * | data | ||
| ) |
Calculate regions from the image "image".
xlen, ylen: Size of image
image : Region labeld image
num_reg : in : Number of labeld regions
out : Number of calculated regions
data : Additional settings for the region calculation.
| iwRegion* iw_reg_calc | ( | int | xlen, |
| int | ylen, | ||
| uchar * | color, | ||
| gint32 * | image, | ||
| uchar ** | orig_img, | ||
| uchar * | confimg, | ||
| int * | num_reg, | ||
| int | doEinschluss, | ||
| int | minPixelCount | ||
| ) |
| iwRegion* iw_reg_calc_img | ( | int | xlen, |
| int | ylen, | ||
| iwImage * | color, | ||
| gint32 * | image, | ||
| uchar ** | orig_img, | ||
| uchar * | confimg, | ||
| int * | num_reg, | ||
| iwRegMode | mode, | ||
| int | minPixelCount | ||
| ) |
| void iw_reg_stretch | ( | int | width, |
| int | height, | ||
| iwRegion * | reg, | ||
| int | scale | ||
| ) |
Stretch region reg by scale pixels in all directions and
restrict the region to a size of width x height.
| void iw_reg_boundingbox | ( | const Polygon_t * | p, |
| int * | x1, | ||
| int * | y1, | ||
| int * | x2, | ||
| int * | y2 | ||
| ) |
Return bounding box of polygon p.
| void iw_reg_upsample | ( | int | nregions, |
| iwRegion * | regions, | ||
| float | upw, | ||
| float | uph | ||
| ) |
Upsample regions by factor (upw,uph).
| void iw_reg_free | ( | int | nregions, |
| iwRegion * | regions | ||
| ) |
Free regions allocated with iw_reg_copy(). Attention: This works
only correctly for regions allocated with iw_reg_copy().
1.8.1