PANDORE Version 6 | GREYC-IMAGE |
pboundarymerging merges connected regions of the input image rg_in if the difference between the boundary contrast criterion of the region 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 boundary contrast is calculated as follows:
contrast(R1,R2)= 1/N * SUM(MAX(C(s,t), t in V(s) and t in R2 and s in R1))
where C(s,t)= | im_in[s] - im_in[t] | and N is the number of boundary pixels and V(s) is the neighbors of pixel s.
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 pboundarymerging -1 4 a.pan b.pan tangram.pan c.pan d.pan
Fusion prioritaire de régions selon le contraste aux frontières.
Author: Laurent Quesnel