![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
measure allowing to retrieve shapes at a given distance of measured shape More...
Classes | |
| class | ipsdk::imaproc::shape::analysis::NearestNeighbors2dMsr |
| Measurement object for measure NearestNeighbors2d. More... | |
| class | ipsdk::imaproc::shape::analysis::NearestNeighbors2dMsrInfo |
| Information object for measure NearestNeighbors2d. More... | |
Typedefs | |
| typedef ipsdk::imaproc::shape::analysis::NeighborsDistanceMsrParams | ipsdk::imaproc::shape::analysis::NearestNeighbors2dMsrParams |
| parameters type associated to measure | |
measure allowing to retrieve shapes at a given distance of measured shape
This measure allows to collect index and distance of neighbors of a shape given a user parameter distance threshold MaxDist (we collect shape indexes for which distance is lower or equal to this value). It is based on a geometric analysis of shape neighborhood.
Polygon approximation of shapes are used to compute inter-shape distances.
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.
The following figure illustrate evolution of number of neighbors for several shapes with respect to MaxDist parameter value (please take care of scale bar values) :
In previous figure, shapes (ie. the polygonal approximation of their boundary), are colored with respect to the number of associated neighbors.
measure allowing to retrieve shapes at a given distance of measured shape
| Measure Type | Measure Unit Type | Parameter Type | Result Type | Shape Requirements |
|---|---|---|---|---|
Geometry 2d |
None |
|
Custom |
Boundary Approximation |
This is a geometry 2d measure
This measure can only be used in 2d case
Measure NearestNeighbors2d is not associated to any unit [ipsdk::shape::analysis::eMsrUnitFormat::eMUF_NoUnit]
Measure NearestNeighbors2d is associated to NearestNeighbors2dMsrParams parameters
Measure NearestNeighbors2d is associated to NearestNeighborsMsrResults results
Measure NearestNeighbors2d requires boundary approximation from shape data
Measure NearestNeighbors2d depends on following measures :
| Measure Mode | Measure Name | Measure Type | Measure Parameters |
|---|---|---|---|
| eMVP_2d | Shape2dRTree | Shape2dRTree | createHolesBasicPolicyMsrParams(_pMsrParams->getValue<NeighborsDistanceMsrParams::ProcessHoles>()) |
| eMVP_2d | Neighbors2dDistanceCollector | Neighbors2dDistanceCollector | boost::make_shared<NeighborsDistanceMsrParams>(*_pMsrParams) |
Generic example in 2d case :
1.8.14