IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit

Computes the Harris corner detection response on a 3d image. More...

IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::harrisCorner3dImg (const ipsdk::image::ImageConstPtr &pInImg3d)
 wrapper function for Computes the Harris corner detection response on a 3d image More...
 
IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::harrisCorner3dImg (const ipsdk::image::ImageConstPtr &pInImg3d, const ipsdk::ipReal32 inGradStdDev)
 wrapper function for Computes the Harris corner detection response on a 3d image More...
 
IPSDKIPLFEATUREDETECTION_API void ipsdk::imaproc::fd::harrisCorner3dImg (const ipsdk::image::ImageConstPtr &pInImg3d, const ipsdk::ipReal32 inGradStdDev, const attr::GaussianCoverageConstPtr &pInOptGradientGaussianCoverage, const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr &pInCornerDetectionParams, const ipsdk::image::ImagePtr &pOutImg)
 wrapper function for Computes the Harris corner detection response on a 3d image More...
 

Detailed Description

Computes the Harris corner detection response on a 3d image.

This algorithm is the 3d extension of the Harris corner detection 2d image algorithm [1] proposed by I. Laptev [2] and computes the cornerness for each pixel of the input 3d image. This algorithm also support a extension of Shi-Tomasi [3] [4] corner detector algorithm to 3d case.

As an extension of 2d case, $M$ is defined as follows :

\[ M = \sum_{x, y, z \in \aleph}{\omega(x, y, z) \begin{bmatrix} I_x^2 & IxIy & IxIz\\ IxIy & Iy^2 & IyIz\\ IxIz & IyIz & Iz^2 \end{bmatrix}} \]

With $Ix$, $Iy$ and $Iz$ are the spatial derivatives of the input image along the directions $x$, $y$, and $z$ respectively and $\omega(x, y, z)$ is a Gaussian weight in the neighbourhood $\aleph$.

See Harris corner detection 2d image for more details on the algorithm and for an illustration of the Harris corner detection algorithm in the 2d case.

[1] C. Harris and M. Stephens (1988). "A combined corner and edge detector". Proceedings of the 4th Alvey Vision Conference. pp. 147 - 151.
[2] I. Laptev. "On space-time interest points". IJCV , 64(2-3):107 - 123, 2005.
[3] J. Shi and C. Tomasi (June 1994). "Good Features to Track". 9th IEEE Conference on Computer Vision and Pattern Recognition. Springer
[4] C. Tomasi and T. Kanade (2004). "Detection and Tracking of Point Features". Pattern Recognition. 37: 165 - 168

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::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::OutImg [Output] image for processing operation promoteUnary (_pOutImg, _pInImg3d, ipsdk::imaproc::ePromoteUnaryType::ePUT_UpperSigned)

Global Rule description

Global rule description for algorithm :
matchSize (_pInImg3d,_pOutImg) && 
matchSizeAndType (_pOutImg,_pOutWk1Img) && 
matchSizeAndType (_pOutWk1Img,_pOutWk2Img,_pOutWk3Img,_pOutWk4Img,_pOutWk5Img,_pOutWk6Img)

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd

Code Example

# Harris corner detection
outImg = fd.harrisCorner3dImg(inImg)

Example of C++ code :

Example informations

Associated library

IPSDKIPLFeatureDetection

Header file

Code Example

// Sample with a generated output image
// ------------------------------------
ImagePtr pAutoOutImg = harrisCorner3dImg(pInImg);
// Sample with a provided output image
// ------------------------------------
// create output image
const ipUInt64 sizeX = pInImg->getSizeX();
const ipUInt64 sizeY = pInImg->getSizeY();
const ipUInt64 sizeZ = pInImg->getSizeZ();
ImageGeometryPtr pOutputImageGeometry = geometry3d(outType, sizeX, sizeY, sizeZ);
boost::shared_ptr<MemoryImage> pOutImg(boost::make_shared<MemoryImage>());
pOutImg->init(*pOutputImageGeometry);
// compute harris image
harrisCorner3dImg(pInImg, stdDev, createGaussianCoverage(gaussRatio, 2), createHarrisParams(sensitivity), pOutImg);
See also
HarrisCorner3dImgLvl1
HarrisCorner3dImgLvl2
HarrisCorner3dImgLvl3

Function Documentation

◆ harrisCorner3dImg() [1/3]

IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::harrisCorner3dImg ( const ipsdk::image::ImageConstPtr pInImg3d)

wrapper function for Computes the Harris corner detection response on a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ harrisCorner3dImg() [2/3]

IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::harrisCorner3dImg ( const ipsdk::image::ImageConstPtr pInImg3d,
const ipsdk::ipReal32  inGradStdDev 
)

wrapper function for Computes the Harris corner detection response on a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ harrisCorner3dImg() [3/3]

IPSDKIPLFEATUREDETECTION_API void ipsdk::imaproc::fd::harrisCorner3dImg ( const ipsdk::image::ImageConstPtr pInImg3d,
const ipsdk::ipReal32  inGradStdDev,
const attr::GaussianCoverageConstPtr pInOptGradientGaussianCoverage,
const ipsdk::imaproc::attr::CornerDetectionParamsConstPtr pInCornerDetectionParams,
const ipsdk::image::ImagePtr pOutImg 
)

wrapper function for Computes the Harris corner detection response on a 3d image

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure