IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Length of contact 2dSee full documentation

measure allowing to compute length of contact between shapes

This measure allows to compute the portion of contour of a shape which is in contact with its neighbors.

Length of contact for a shape composed of a collection of segments $Shape=\{S_i\}_{i=1..n}$ is computed as followed :

We parse all segments from shape and for each we check whether segment fulfil contact policy requirement with another shape. If this is the case we considers that whole segment length is in contact with other shapes.

Measure parameters

Distance of contact

Given the fact that input data are discreet, notion of contact is defined with respect to a distance threshold ContactDist parameter. Length of contact will be accounted for distances lower or equal to this user parameter.

Contact policy

On following figures, we represents :

Contact policy parameter ContactPolicy takes the following values :

Segments sub sampling

At last, measure parameter SegmentSubSamplingStep allows if set to requiere sub sampling of shape segments.

This parameter allows to make computation much more precise with the drawback of greater computation cost.

Process holes

An additional parameter flag ProcessHoles allows to specify whether shape holes should be taken into account during computation. Please see Distance to nearest neighbor 2d for an explanation of effects of this flag.

Asymmetry of measure

Note that this measure is not symmetric since length of contact of a first particle to a second one may not be the same as the length of contact of second particle to the first one. This fact is illustrated by following figure where length of contact of left shape is paint in green while length of contact of right shape is paint in orange :

lengthOfContact2dMsr_notSymmetric.png

Examples

In next figures, shapes (ie. the polygonal approximation of their boundary), are colored with respect to the length of associated contact.

Here is an example of the effect of contact distance threshold parameter ContactDist on computation results (please take care of scale bar values), in this case :

Here is an example of the effect of contact policy parameter ContactPolicy on computation results (please take care of scale bar values), in this case :

Here is an example of the effect of contact policy parameter ContactPolicy on computation results (please take care of scale bar values), in this case :

measure allowing to compute length of contact between shapes

Measure synthesis :

Measure Type Measure Unit Type Parameter Type Result Type Shape Requirements
Geometry2d.png
Geometry 2d
length.png
Length
parameter.png
LengthOfContact2dMsrParams
Value.png
Value (ipsdk::ipReal64)
BoundaryApproximation.png
Boundary Approximation
See Shape measurement for additional information on these pictograms