This class performs image segmentation, constructing a list of connected regions in the image (a list of ImSegment
) that are above some image value threshold.
ImageSegmenter::ImageSegmenter | ( | ) |
ImageSegmenter::~ImageSegmenter | ( | ) | [virtual] |
list<ImSegment> ImageSegmenter::segment | ( | const SignificanceMap & | Sigma, | |
const float | threshold | |||
) | const [inline] |
Generate segmentation list consisting of consecutive regions in the significance map that have values above the threshold
References assemble(), evaluate(), and SignificanceMap::get_map().
Referenced by PointSourceDetector::detect(), and ContSourceDetector::detect().
void ImageSegmenter::expand | ( | list< ImSegment > & | lst, | |
const SignificanceMap & | Sigma, | |||
const float | new_thresh | |||
) | const |
Expand segments to include surrounding consecutive pixels at a lower threshold
References SignificanceMap::get_map(), ImSegment::id_, mark_pixels_n(), ImSegment::mx_, ImSegment::my_, and ImSegment::mz_.
Referenced by PointSourceDetector::detect().
bool ImageSegmenter::mark_pixels_n | ( | ImSegment & | obj, | |
MArray< char, 3 > & | M, | |||
const int | x, | |||
const int | y, | |||
const int | z, | |||
const MArray< float, 3 > & | I | |||
) | const [protected] |
NON-recursively add pixels surrounding a pixel (x,y,z) to an object if they are flagged in the mask as lying above threshold return true on success, false on failiure (object too large).
References ImSegment::addpixel(), MAX_PIX_QUEUE_SIZE, ImPixel::x_, ImPixel::y_, and ImPixel::z_.
Referenced by assemble(), and expand().
list< ImSegment > ImageSegmenter::assemble | ( | const MArray< float, 3 > & | I, | |
const float | threshold | |||
) | const [protected] |
Assemble pixels into image segments
References ImSegment::id_, mark_pixels_n(), MIN_PIXNUM, and ImSegment::pixnum_.
Referenced by segment().
References ImSegment::evaluate().
Referenced by segment().