IPSDK 4.1.0.2
IPSDK : Image Processing Software Development Kit
Harris corner detection 3d image
imageharrisCorner3dImg (inImg3d)
imageharrisCorner3dImg (inImg3d,inGradStdDev)

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

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

Header file

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

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