IPSDK 0.2
IPSDK : Image Processing Software Development Kit
Computation of accumulator matrix for Hough spheres detectionSee full documentation
imagehoughSpheres3dImg (inGxImg,inGyImg,inGzImg,radiusRange)

Detailed Description

detects spheres in 3d images of gradient using Hough algorithm

This algorithm computes, from the 3 gradient images (respectively along x, y and z axis) of the same grey levels 3d image, the accumulator matrix used to detect spheres in an image, using 3d Hough algorithm.

See Hough spheres detection for more information and Computation of accumulator matrix for Hough circles detection for an example of the image returned by the algorithm in 2D case.

Example of Python code :

Example imports

import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd
import PyIPSDK.IPSDKIPLFiltering as filter

Code Example

# opening of input image
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
# associated gradient images computation
gxImg, gyImg, gzImg = filter.gaussianGradient3dImg(inImg, 1.0)
# radius range detection definition
radiusRange = PyIPSDK.createHoughCirclesRadiusRange(8, 12)
# hough circle detection computation
outImg = fd.houghSpheres3dImg(gxImg, gyImg, gzImg, radiusRange)

Example of C++ code :

Example informations

Header file

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

Code Example

// Load the input image
ImagePtr pInImg = loadTiffImageFile(inputPath);
// Compute the gradients
GradientXYZImg gradXYZ = gaussianGradient3dImg(pInImg, 1);
// Compute the Hough accumulation image
ImagePtr pSpheresImg = houghSpheres3dImg(gradXYZ._pXGradImg, gradXYZ._pYGradImg, gradXYZ._pZGradImg, pHoughRange);