PANDORE Version 6 | GREYC-IMAGE |
pmumfordshahmerging merges connected regions of the input image rg_in if the difference between the energy variation of the region defined by Mumford and Shah is lower than the specified threshold.
Two regions are connected if there exists a link between the related nodes in the input graph gr_in.
The principle of the algorithm is as follows:
The algorithm uses the priority merging that consists in merging regions with the lower difference.
The output region map reg_out defines the new regions and the output graph gr_out defines the new relationship between regions.
The energy variation (DE) is calculated as follows :
Card(R1)*Card(R2)*(mean(R1)-mean(R2))2-2*alpha*boundary(R1,R2) dE = ------------------------------------------------------------------------ Card(R1)+Card(R2)
where alpha is a parameter;
mean(R1) is the mean of the region R1;
boundary is the length of the boundary between R1 and R2;
and Card(R1) is the number of pixels in the region R1.
Negative values mean that energy that results from the merging of R1 and R2 is lower than the sum of the energy of the two regions.
Returns the number of merging.
Merges regions yielded by a quadtree splitting process:
puniformityquadtree 0.9 tangram.pan a.pan prg2gr a.pan b.pan pmumfordshahmerging -1 5 1 a.pan b.pan tangram.pan c.pan d.pan
Fusion prioritaire de régions selon la variation d'énergie de Mumford Shah.
Author: Laurent Quesnel