t2_segment_image - Segments the image into regions


#include "t2/t2_segment.h"

Example compile flags (system dependent):
   -L/home/kobus/misc/load/linux_x86_64_opteron -L/usr/lib/x86_64-linux-gnu
  -lKJB                               -lfftw3  -lgsl -lgslcblas -ljpeg  -lSVM -lstdc++                    -lpthread -lSLATEC -lg2c    -lacml -lacml_mv -lblas -lg2c      -lncursesw 

int t2_segment_image
	const KJB_image *ip,
	Segmentation_t2 **segment_info_ptr_ptr


This routine segments an image into regions. The segmentation is done under the control of a large number of options normally exposed to the user, and also accessable using kjb_set(). The routine makes minor changes to the image to ensure consistency between the segmentation and the image. If you do not want the image to be changed, you MUST make a copy. The routine fills a structure which includes: The number of segments An image size integer array with the segment number at each (i,j) An array of segments (Type Segment_t2*). Each segment contains (among other things!): Pixel count A list of pixels (values and their coordinates) Boundary pixel count A list of boundary pixels A matrix of outer boudary coordinates IN ORDER Segment averge R, G, B, r, g, sum_RGB An array of segment numbers of neighbours Coordinates of segment center of mass Coordinates of a pixel inside the segment


The number of image segments on sucess and ERROR on failure.


This software is not adequatedly tested. It is recomended that results are checked independantly where appropriate.


Kobus Barnard


Kobus Barnard