IPSDK  4_1_0_2
IPSDK : Image Processing Software Development Kit
Computation of accumulator matrix for Hough spheres detection

detects spheres in 3d images of gradient using Hough algorithm More...

IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::houghSpheres3dImg (const image::ImageConstPtr &pInGxImg, const image::ImageConstPtr &pInGyImg, const image::ImageConstPtr &pInGzImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange)
 wrapper function for detects circles in images of gradient using Hough algorithm More...
 
IPSDKIPLFEATUREDETECTION_API void ipsdk::imaproc::fd::houghSpheres3dImg (const image::ImageConstPtr &pInGxImg, const image::ImageConstPtr &pInGyImg, const image::ImageConstPtr &pInGzImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const ipsdk::imaproc::attr::eCircleIntensityType &eCircleIntensityType, const ipReal64 maxAngleWithGradDir, const ipUInt32 nbMaxPtsPerCircle, const image::ImagePtr &pOutImg)
 wrapper function for detects circles in images of gradient using Hough algorithm More...
 

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.

Attributes description

Attribute description for algorithm :

Name ToolTip Default Initializer
ipsdk::imaproc::attr::InGxGreyImg3d [Input] 3d grey levels image of gradient computed along x-axis X
ipsdk::imaproc::attr::InGyGreyImg3d [Input] 3d grey levels image of gradient computed along y-axis X
ipsdk::imaproc::attr::InGzGreyImg3d [Input] 3d grey levels image of gradient computed along z-axis X
ipsdk::imaproc::attr::InOptCircleIntensityType [Input Optional] circle intensity type for detection algorithms X
ipsdk::imaproc::attr::InOptMaxAngleWithGradDir [Input Optional] maximum angle with gradient direction, in radians X
ipsdk::imaproc::attr::InOptNbMaxPtsPerCircle [Input Optional] maximum number of points per circle X
ipsdk::imaproc::attr::InOptHoughCirclesRadiusRange [Input Optional] range of radius of circles to detect using Hough circles algorithm X
ipsdk::imaproc::attr::OutRealImg [Output] image for processing operation (data contained in image buffer are reals) ipsdk::imaproc::duplicateInOut (_pOutRealImg, _pInGxGreyImg3d, ipsdk::image::eImageBufferType::eIBT_Real32)

Global Rule description

Global rule description for algorithm :
ipsdk::imaproc::matchSizeAndType (_pInGxGreyImg3d,_pInGyGreyImg3d) && 
ipsdk::imaproc::matchSizeAndType (_pInGxGreyImg3d,_pInGzGreyImg3d) && 
ipsdk::imaproc::matchSize (_pInGxGreyImg3d,_pOutRealImg) && ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(ipsdk::imaproc::eMatchImageSizeType::eMIST_3d,ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,_pInGxGreyImg3d,_pInOptHoughCirclesRadiusRange)

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

Associated library

IPSDKIPLFeatureDetection

Header file

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);
See also
HoughSpheres3dImgLvl1
HoughSpheres3dImgLvl2
HoughSpheres3dImgLvl3

Function Documentation

◆ houghSpheres3dImg() [1/2]

IPSDKIPLFEATUREDETECTION_API image::ImagePtr ipsdk::imaproc::fd::houghSpheres3dImg ( const image::ImageConstPtr pInGxImg,
const image::ImageConstPtr pInGyImg,
const image::ImageConstPtr pInGzImg,
const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr pRadiusRange 
)

wrapper function for detects circles in images of gradient using Hough algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure

◆ houghSpheres3dImg() [2/2]

IPSDKIPLFEATUREDETECTION_API void ipsdk::imaproc::fd::houghSpheres3dImg ( const image::ImageConstPtr pInGxImg,
const image::ImageConstPtr pInGyImg,
const image::ImageConstPtr pInGzImg,
const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr pRadiusRange,
const ipsdk::imaproc::attr::eCircleIntensityType eCircleIntensityType,
const ipReal64  maxAngleWithGradDir,
const ipUInt32  nbMaxPtsPerCircle,
const image::ImagePtr pOutImg 
)

wrapper function for detects circles in images of gradient using Hough algorithm

Exceptions
ipsdk::processor::IPSDKBaseProcessingExceptionon failure