IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Classes | Functions

measure allowing to compute length of contact between shapes More...

Classes

class  ipsdk::imaproc::shape::analysis::LengthOfContact2dMsr
 Measurement object for measure LengthOfContact2d. More...
 
class  ipsdk::imaproc::shape::analysis::LengthOfContact2dMsrInfo
 Information object for measure LengthOfContact2d. More...
 
class  ipsdk::imaproc::shape::analysis::LengthOfContact2dMsrParams
 Parameter object for measure LengthOfContact2d. More...
 

Functions

IPSDKIPLSHAPEANALYSIS_API LengthOfContact2dMsrParamsPtr ipsdk::imaproc::shape::analysis::createLengthOfContact2dMsrParams (const ipsdk::ipReal32 contactDist, const ipsdk::geom::eSegmentContactPolicy &segmentContactPolicy, const ipBool bProcessHoles)
 function allowing to create a new parameter object for LengthOfContact2d measure without segment subsampling
 
IPSDKIPLSHAPEANALYSIS_API LengthOfContact2dMsrParamsPtr ipsdk::imaproc::shape::analysis::createLengthOfContact2dMsrParams (const ipsdk::ipReal32 contactDist, const ipsdk::geom::eSegmentContactPolicy &segmentContactPolicy, const ipReal32 segmentSubSamplingStep, const ipBool bProcessHoles)
 function allowing to create a new parameter object for LengthOfContact2d measure with segment subsampling
 

Detailed Description

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 :

Note
User can note that with a fine sub sampling policy, results are much less sensitive to used contact policy.
Author
E.Noirfalise
Date
2017/07/06

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

Measure Type :

This is a geometry 2d measure

This measure can only be used in 2d case

Measure Unit Type:

Measure LengthOfContact2d is associated to a length measurement unit [ipsdk::shape::analysis::eMsrUnitFormat::eMUF_LengthUnit]

Measure Parameter Type :

Measure LengthOfContact2d is associated to LengthOfContact2dMsrParams parameters

Measure Result Type :

Measure LengthOfContact2d is associated to ipsdk::shape::analysis::ValueMeasureResult<ipsdk::ipReal64> results

Measure Shape Requirements :

Measure LengthOfContact2d requires boundary approximation from shape data

Measure Dependencies :

Measure LengthOfContact2d depends on following measures :

Measure Mode Measure Name Measure Type Measure Parameters
eMVP_2d Shape2dRTree Shape2dRTree createHolesBasicPolicyMsrParams(_pMsrParams->getValue<LengthOfContact2dMsrParams::ProcessHoles>())
eMVP_2d Neighbors2dDistanceCollector Neighbors2dDistanceCollector createNeighborsDistanceMsrParams(_pMsrParams->getValue<LengthOfContact2dMsrParams::ContactDist>(),