IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Harris corner detection 3d
Voxels3dharrisCorner3d (inImg3d,inNbTotPoints,featuresDist)
Voxels3dharrisCorner3d (inImg3d,inGradStdDev,inNbTotPoints,featuresDist)
Voxels3dharrisCorner3d (inImg3d,inGradStdDev,inOptGradientGaussianCoverage,inCornerDetectionParams,inNbTotPoints,inThreshold,inFeaturesDistX,inFeaturesDistY,inFeaturesDistZ)

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.

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

Header file

#include <IPSDKIPL/IPSDKIPLFeatureDetection/Processor/HarrisCorner3d/HarrisCorner3d.h>

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>();