image = | houghSpheres3dImg (inGxImg,inGyImg,inGzImg,radiusRange) |
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
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
gxImg, gyImg, gzImg = filter.gaussianGradient3dImg(inImg, 1.0)
radiusRange = PyIPSDK.createHoughCirclesRadiusRange(8, 12)
outImg = fd.houghSpheres3dImg(gxImg, gyImg, gzImg, radiusRange)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLFeatureDetection/Processor/HoughSpheres3dImg/HoughSpheres3dImg.h>
Code Example
GradientXYZImg gradXYZ = gaussianGradient3dImg(pInImg, 1);
ImagePtr pSpheresImg = houghSpheres3dImg(gradXYZ._pXGradImg, gradXYZ._pYGradImg, gradXYZ._pZGradImg, pHoughRange);