IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Extracts the corners in a 3d image. More...

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg3d, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipUInt32 featuresDist)
 wrapper function for Extracts the corners in a 3d image More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg3d, const ipsdk::ipReal32 inGradStdDev, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipUInt32 featuresDist)
 wrapper function for Extracts the corners in a 3d image More...
 
IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d (const ipsdk::image::ImageConstPtr &pInImg3d, const ipsdk::ipReal32 inGradStdDev, const attr::GaussianCoverageConstPtr &pInOptGradientGaussianCoverage, const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr &pInCornerDetectionParams, const ipsdk::ipUInt64 inNbTotPoints, const ipsdk::ipReal64 inThreshold, const ipsdk::ipUInt32 inFeaturesDistX, const ipsdk::ipUInt32 inFeaturesDistY, const ipsdk::ipUInt32 inFeaturesDistZ)
 wrapper function for Extracts the corners in a 3d image More...
 

Detailed Description

Extracts the corners in a 3d image.

This algorithm computes the Harris corner detection on a 3d input image, combining the Harris corner detection 3d image and Local Extrema Extraction 3d algorithms in an efficient way.
For this reason, it is possible to specify the parameters needed by these two algorithms.

Two wrappers can be called : the harrisCorner3d wrapper is only used to detect the corners on a grey level 3d volumes, whereas the multiSlice_harrisCorner3d wrapper must be used for more complex data (sequence and/or color).

See Harris corner detection 2d for an illustration of the Harris corner detection algorithm in the 3d case.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InImg3d [Input] 3d image for operation X
ipsdk::imaproc::attr::InOptGradStdDev [Input Optional] standard deviation used for gradient computation X
ipsdk::imaproc::attr::InOptGradientGaussianCoverage [Input Optional] Parameter allowing to specify a gaussian distribution coverage for processing X
ipsdk::imaproc::attr::InOptCornerDetectionParams3d [Input Optional] parameters used during corner detection process X
ipsdk::imaproc::attr::InLocalExtremaConfig [Input] Attribute for local extrema calculation configuration X
ipsdk::imaproc::attr::InFeaturesDistX [Input] distance between detected features along x axis (tchebychev distance) X
ipsdk::imaproc::attr::InFeaturesDistY [Input] distance between detected features along y axis (tchebychev distance) X
ipsdk::imaproc::attr::InFeaturesDistZ [Input] distance between detected features along z axis (tchebychev distance) X
ipsdk::imaproc::attr::OutWk1Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk1Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutWk2Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk2Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutWk3Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk3Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutWk4Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk4Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutWk5Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk5Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutWk6Img [Output] Temporary working image for algorithm promoteUnary (_pOutWk6Img, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)
ipsdk::imaproc::attr::OutPIVoxels3d [Output] plan indexed collection of positions and intensities of 3d voxels ipsdk::imaproc::fromImageButVolume (_pOutPIVoxels3d, _pInImg3d)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchImagePlans (_pOutPIVoxels3d,_pInImg3d,eImagePlansMatchPolicy::eIPMP_CT) && 
ipsdk::imaproc::matchSize (_pInImg3d,_pOutWk1Img) && 
ipsdk::imaproc::matchSizeAndType (_pOutWk1Img,_pOutWk2Img,_pOutWk3Img,_pOutWk4Img,_pOutWk5Img,_pOutWk6Img)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd

Code Example

# Gaussian gradient and smoothing parameters
stdDev = 0.5
gaussRatio = 0.99
# half size neighbourhood definition
halfKnlSizeX = 5
halfKnlSizeY = 5
halfKnlSizeZ = 1
# local maximum parameters definition
threshold = 2000
nbTotPoints = 100
# Algorithm sensitivity definition
sensitivity = 0.003
# Harris corner detection
outVoxels3d = fd.harrisCorner3d(inImg, stdDev, PyIPSDK.createGaussianCoverage(gaussRatio, 2), PyIPSDK.createHarrisParams(sensitivity), nbTotPoints, threshold, halfKnlSizeX, halfKnlSizeY, halfKnlSizeZ)
# retrieve coordinates of maximum detected extrema
maxVoxel3d = PyIPSDK.toPyDict(outVoxels3d)['Coll'][0]
print("Corner intensity " + str(maxVoxel3d['Intensity'] ) + " found on coordinates x=" + str(maxVoxel3d['X'] ) + ", y=" + str(maxVoxel3d['Y'] ) + " and z=" + str(maxVoxel3d['Z'] ))

Example of C++ code :

Example informations

Associated library

IPSDKIPLFeatureDetection

Header file

Code Example

// ------------ Calculation on a mono-slice grey level image ------------ //
// Extrcat the local extrema, in a given neighbourhood
Voxels3dPtr pCornerColl = harrisCorner3d(pInImg, stdDev, createGaussianCoverage(gaussRatio, 2), createHarrisParams(sensitivity), nbTotPoints, threshold, halfKnlSizeX, halfKnlSizeY, halfKnlSizeZ);
// Retrieve the extrema collection
const std::vector< boost::shared_ptr<Voxel3d> > cornerColl = pCornerColl->getNodeColl<Voxels3d::Coll>();
const ipUInt64 nbCorners = cornerColl.size();
// ------------ Calculation on a multi-slice grey level image ------------ //
// Extrcat the local extrema, in a given neighbourhood
PlanIndexedVoxels3dPtr pCornerColl_multiSlice = multiSlice_harrisCorner3d(pInImg_multiSlice, stdDev, createGaussianCoverage(gaussRatio, 2), createHarrisParams(sensitivity), nbTotPoints, threshold, halfKnlSizeX, halfKnlSizeY, halfKnlSizeZ);
// Retrieve the extrema collection for the frame 0, the channel 0 and the slice 1
const std::vector< boost::shared_ptr<Voxel3d> > cornerColl_multiSlice = pCornerColl_multiSlice->getValue(0, 1, 0).getNodeColl<Voxels3d::Coll>();
See also
HarrisCorner3dLvl1
HarrisCorner3dLvl2

Function Documentation

◆ harrisCorner3d() [1/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg3d,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipUInt32  featuresDist 
)

wrapper function for Extracts the corners in a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ harrisCorner3d() [2/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg3d,
const ipsdk::ipReal32  inGradStdDev,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipUInt32  featuresDist 
)

wrapper function for Extracts the corners in a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ harrisCorner3d() [3/3]

IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::Voxels3dPtr ipsdk::imaproc::fd::harrisCorner3d ( const ipsdk::image::ImageConstPtr pInImg3d,
const ipsdk::ipReal32  inGradStdDev,
const attr::GaussianCoverageConstPtr pInOptGradientGaussianCoverage,
const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr pInCornerDetectionParams,
const ipsdk::ipUInt64  inNbTotPoints,
const ipsdk::ipReal64  inThreshold,
const ipsdk::ipUInt32  inFeaturesDistX,
const ipsdk::ipUInt32  inFeaturesDistY,
const ipsdk::ipUInt32  inFeaturesDistZ 
)

wrapper function for Extracts the corners in a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure