PANDORE Version 6 | GREYC-IMAGE |
pvarianceaggregation builds a new region map from aggregation of connected pixels to regions of the input region map rg_in. A pixel p is aggregated to a region R if:
The variance degree is calculated from:
variance(R)= SUM((im_in[i] - mean(R))^2, i in R) / N
where im_in[i] are pixels of the region R, and N is the number of pixels of the region R.
The variance of the region is not updated with the new pixel to avoid moving away too much from the initial situation. One prefer iterative executions of the operator to update the inner mean. For example, operator can be iterated until pstatus returns 0.
The output region map rg_out has the same number of labels than the input region map.
Returns the number of aggregation or FAILURE.
Aggregates pixels to tangram pieces:
pbinarization 96 1e30 tangram.pan a.pan plabeling 8 a.pan b.pan pvarianceaggregation 8 1 b.pan tangram.pan out.pan
Croissance des régions d'une carte selon la variance intérieure.
Author: Régis Clouard