


PERIMETER estimate perimeter of a structure p = perimeter(img); Compute estimation of perimeter of structure in image IMG, using a discrete version of Crofton formula in 4 directions (horizontal, verticval, and 2 diagonals) of image. p = perimeter(img, method); Specifies the method to employ : - 'local4' : create polygon around the structure, using 4 connectivity, and compute perimeter of piolygon. This usually gives a great overestimation of the perimeter. - 'local8' : create polygon using 8 connectivity, giving a smaller overestimation. - 'crofton' (default) : count intersections with discete lines in 4 directions (horizontal, vertical, and 2 diagonals), and uses Crofton formula to estimate perimeter. - 'crofton2' : uses only 2 orthogoanl directions to count intersections. Works better for spheres, but not so good for others figures. TODO: there is a small biais for some configuration using 'crofton' This concerne only config with type [1 0;0 1] or [0 1;1 0] : the contribution of the diagonal line is not counted, leading to underestimation of perimeter of thin structures. --------- author : David Legland INRA - TPV URPOI - BIA IMASTE created the 03/04/2005
