### Post by asgr on Aug 11, 2017 18:20:07 GMT 8

Thew new functionprofoundMakeSegimPropagate propagates all identified segments across the full image, only ignoring masked regions. This serves to identify which segment every pixel is most likely to belong to using a number of image related criteria.

This function propgates out the identified segments into the rest of the image, only region identified in the mask will not be assigned to a segment. To assign pixels a mixture of the Euclidian distance and the local gradient is used (as described below). The purpose of this routine is to identify all pixels in the image with their most likely segment (whether nominally object or sky pixel). The true sky pixels identified as belonging to a segment should also provide the best possible local estimate of the sky level.

For internal completeness, the below description is taken almost verbatim from the EBImage popagate function.

The method operates by computing a discretized approximation of the Voronoi regions for given seed points on a Riemann manifold with a metric controlled by local image features.

Under this metric, the infinitesimal distance d between points v and v+dv is defined by:

d^2 = ( (t(dv)*g)^2 + lambda*t(dv)*dv )/(lambda + 1) , where g is the gradient of image x at point v.

lambda controls the weight of the Euclidean distance term. When lambda tends to infinity, d tends to the Euclidean distance. When lambda tends to 0, d tends to the intensity gradient of the image.

The gradient is computed on a neighborhood of 3x3 pixels.

Segmentation of the Voronoi regions in the vicinity of flat areas (having a null gradient) with small values of lambda can suffer from artifacts coming from the metric approximation.

To give you an idea of what it does, try running:

image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))

profound=profoundProFound(image, skycut=1.5, magzero=30, verbose=TRUE, plot=TRUE)

profoundMakeSegimPropagate(image$imDat,segim=profound$segim, plot=TRUE)

A

This function propgates out the identified segments into the rest of the image, only region identified in the mask will not be assigned to a segment. To assign pixels a mixture of the Euclidian distance and the local gradient is used (as described below). The purpose of this routine is to identify all pixels in the image with their most likely segment (whether nominally object or sky pixel). The true sky pixels identified as belonging to a segment should also provide the best possible local estimate of the sky level.

For internal completeness, the below description is taken almost verbatim from the EBImage popagate function.

The method operates by computing a discretized approximation of the Voronoi regions for given seed points on a Riemann manifold with a metric controlled by local image features.

Under this metric, the infinitesimal distance d between points v and v+dv is defined by:

d^2 = ( (t(dv)*g)^2 + lambda*t(dv)*dv )/(lambda + 1) , where g is the gradient of image x at point v.

lambda controls the weight of the Euclidean distance term. When lambda tends to infinity, d tends to the Euclidean distance. When lambda tends to 0, d tends to the intensity gradient of the image.

The gradient is computed on a neighborhood of 3x3 pixels.

Segmentation of the Voronoi regions in the vicinity of flat areas (having a null gradient) with small values of lambda can suffer from artifacts coming from the metric approximation.

To give you an idea of what it does, try running:

image=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))

profound=profoundProFound(image, skycut=1.5, magzero=30, verbose=TRUE, plot=TRUE)

profoundMakeSegimPropagate(image$imDat,segim=profound$segim, plot=TRUE)

A