detects spheres in a 3d image using Hough algorithm
More...
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &intensityType) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &intensityType, const ipsdk::ipUInt64 nbSpheres) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const ipsdk::imaproc::attr::eCircleIntensityType &eCircleIntensityType, const ipUInt32 nbMaxPtsPerCircle, const ipsdk::imaproc::attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const ipsdk::imaproc::attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const ipsdk::imaproc::attr::eCircleIntensityType &eCircleIntensityType, const ipsdk::ipUInt64 nbSpheres, const ipUInt32 nbMaxPtsPerCircle, const ipsdk::imaproc::attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const ipsdk::imaproc::attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (const image::ImageConstPtr &pInGxImg, const image::ImageConstPtr &pInGyImg, const image::ImageConstPtr &pInGzImg, const ipsdk::imaproc::attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::houghSpheres3d (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 ipsdk::ipUInt64 nbSpheres, const ipReal64 maxAngleWithGradDir, const ipUInt32 nbMaxPtsPerCircle, const ipsdk::imaproc::attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const ipsdk::imaproc::attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams, const image::ImagePtr &pOutImg) |
| | wrapper function for detects spheres in a 3d image using Hough algorithm More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &intensityType) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &intensityType, const ipsdk::ipUInt64 nbSpheres) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &eCircleIntensityType, const ipUInt32 nbMaxPtsPerCircle, const attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &eCircleIntensityType, const ipsdk::ipUInt64 nbSpheres, const ipUInt32 nbMaxPtsPerCircle, const attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInGxImg, const image::ImageConstPtr &pInGyImg, const image::ImageConstPtr &pInGzImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr | ipsdk::imaproc::fd::multiSlice_houghSpheres3d (const image::ImageConstPtr &pInGxImg, const image::ImageConstPtr &pInGyImg, const image::ImageConstPtr &pInGzImg, const attr::HoughCirclesRadiusRangeConstPtr &pRadiusRange, const attr::eCircleIntensityType &eCircleIntensityType, const ipsdk::ipUInt64 nbSpheres, const ipReal64 maxAngleWithGradDir, const ipUInt32 nbMaxPtsPerCircle, const attr::AccumIntensityThresholdConstPtr &pAccumIntensityThreshold, const attr::RemoveTooCloseCirclesParamsConstPtr &pRemoveTooCloseCirclesParams, const image::ImagePtr &pOutImg) |
| | multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images More...
|
| |
detects spheres in a 3d image using Hough algorithm
This algorithm is a direct extension of Hough circles detection and uses a variant of the Standard Circle Hough Transform to detect spheres in a 3d grey levels image (or in a sequence of 3d grey levels images). Since the standard Hough approach would require 4D data for a 3D image, it is essential to implement a more efficient method to save memory space.
The current implementation executes the following steps:
a- compute the gradient images if necessary, respectively along x, y and z axis
b- compute the Hough image
c- extract the spheres centers from the Hough image by extracting the local maxima in the Hough image, beyond a threshold specified by the user
d- compute the radius associated to each detected sphere thanks to a histogram of radii for each sphere and associates to the sphere the radius for which the frequency is the greatest
e- for each couple of too close spheres, remove the one with the lower accumulation intensity in Hough image
See Hough circles detection for details of the implementation in 2D and an example of result in 2D. Please, note that only the "gradient" method is extended in 3D.
The current implementation has a limitation that must be kept in mind. As only one radius is associated to each sphere center position, the current implementation does not allow to detect concentric sphere.
Attributes description
Attribute description for algorithm :
Global Rule description
Global rule description for algorithm :
(ipsdk::processor::If (
ipsdk::processor::isSet (_pInOptGreyImg3d),
ipsdk::processor::Not (
ipsdk::processor::isSet (_pInOptGxGreyImg3d)) &&
ipsdk::processor::Not (
ipsdk::processor::isSet (_pInOptGyGreyImg3d)) &&
ipsdk::processor::Not (
ipsdk::processor::isSet (_pInOptGzGreyImg3d)) && ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(ipsdk::imaproc::eMatchImageSizeType::eMIST_3d,ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,_pInOptGreyImg3d,_pInOptHoughCirclesRadiusRange) &&
ipsdk::processor::If (
ipsdk::processor::isSet (_pOutOptGradXImg3d),
ipsdk::imaproc::matchSize (_pInOptGreyImg3d,_pOutOptGradXImg3d)) &&
ipsdk::processor::If (
ipsdk::processor::isSet (_pOutOptGradYImg3d),
ipsdk::imaproc::matchSize (_pInOptGreyImg3d,_pOutOptGradYImg3d)) &&
ipsdk::processor::If (
ipsdk::processor::isSet (_pOutOptGradZImg3d),
ipsdk::imaproc::matchSize (_pInOptGreyImg3d,_pOutOptGradZImg3d)) &&
ipsdk::processor::ifIsSet (_pOutOptRealImg1,
ipsdk::imaproc::matchSize (_pInOptGreyImg3d,_pOutOptRealImg1)) &&
ipsdk::processor::ifIsSet (_pOutOptRealImg2,
ipsdk::imaproc::matchSize (_pInOptGreyImg3d,_pOutOptRealImg2)),
ipsdk::processor::isSet (_pInOptGxGreyImg3d) &&
ipsdk::processor::isSet (_pInOptGyGreyImg3d) &&
ipsdk::processor::isSet (_pInOptGzGreyImg3d) &&
ipsdk::imaproc::matchSizeAndType (_pInOptGxGreyImg3d,_pInOptGyGreyImg3d) &&
ipsdk::imaproc::matchSizeAndType (_pInOptGxGreyImg3d,_pInOptGzGreyImg3d) && ipsdk::imaproc::matchSize<ipsdk::imaproc::attr::HoughCirclesRadiusRange::MaxRadius>(ipsdk::imaproc::eMatchImageSizeType::eMIST_3d,ipsdk::imaproc::eMatchImageSizeScale::eMISS_HalfSize,_pInOptGxGreyImg3d,_pInOptHoughCirclesRadiusRange) &&
ipsdk::processor::ifIsSet (_pOutOptRealImg1,
ipsdk::imaproc::matchSize (_pInOptGxGreyImg3d,_pOutOptRealImg1)) &&
ipsdk::processor::ifIsSet (_pOutOptRealImg2,
ipsdk::imaproc::matchSize (_pInOptGxGreyImg3d,_pOutOptRealImg2))))
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
radiusRange = PyIPSDK.createHoughCirclesRadiusRange(8, 12)
outHoughSpheres3dPpties = fd.houghSpheres3d(inImg, radiusRange)
maxHoughSpheres3dPpty = PyIPSDK.toPyDict(outHoughSpheres3dPpties)['Coll'][0]
print("Sphere with maximum accumulated intensity " + str(maxHoughSpheres3dPpty['AccumIntensity'] ) + " found on coordinates x=" + str(maxHoughSpheres3dPpty['X'] ) + ", y=" + str(maxHoughSpheres3dPpty['Y']) + ", z=" + str(maxHoughSpheres3dPpty['Z'] ) + " and with radius=" + str(maxHoughSpheres3dPpty['Radius'] ))
Example of C++ code :
Example informations
Associated library
IPSDKIPLFeatureDetection
Header file
Code Example
- See also
- HoughSpheres3dLvl1
-
HoughSpheres3dLvl2
◆ houghSpheres3d() [1/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ multiSlice_houghSpheres3d() [1/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ houghSpheres3d() [2/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ houghSpheres3d() [3/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ houghSpheres3d() [4/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ houghSpheres3d() [5/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ houghSpheres3d() [6/7]
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ houghSpheres3d() [7/7]
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::HoughSpheres3dPptiesPtr ipsdk::imaproc::fd::houghSpheres3d |
( |
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 ipsdk::ipUInt64 |
nbSpheres, |
|
|
const ipReal64 |
maxAngleWithGradDir, |
|
|
const ipUInt32 |
nbMaxPtsPerCircle, |
|
|
const ipsdk::imaproc::attr::AccumIntensityThresholdConstPtr & |
pAccumIntensityThreshold, |
|
|
const ipsdk::imaproc::attr::RemoveTooCloseCirclesParamsConstPtr & |
pRemoveTooCloseCirclesParams, |
|
|
const image::ImagePtr & |
pOutImg |
|
) |
| |
wrapper function for detects spheres in a 3d image using Hough algorithm
- Exceptions
-
◆ multiSlice_houghSpheres3d() [2/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ multiSlice_houghSpheres3d() [3/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ multiSlice_houghSpheres3d() [4/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ multiSlice_houghSpheres3d() [5/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ multiSlice_houghSpheres3d() [6/7]
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-
◆ multiSlice_houghSpheres3d() [7/7]
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::attr::PlanIndexedHoughSpheres3dPptiesPtr ipsdk::imaproc::fd::multiSlice_houghSpheres3d |
( |
const image::ImageConstPtr & |
pInGxImg, |
|
|
const image::ImageConstPtr & |
pInGyImg, |
|
|
const image::ImageConstPtr & |
pInGzImg, |
|
|
const attr::HoughCirclesRadiusRangeConstPtr & |
pRadiusRange, |
|
|
const attr::eCircleIntensityType & |
eCircleIntensityType, |
|
|
const ipsdk::ipUInt64 |
nbSpheres, |
|
|
const ipReal64 |
maxAngleWithGradDir, |
|
|
const ipUInt32 |
nbMaxPtsPerCircle, |
|
|
const attr::AccumIntensityThresholdConstPtr & |
pAccumIntensityThreshold, |
|
|
const attr::RemoveTooCloseCirclesParamsConstPtr & |
pRemoveTooCloseCirclesParams, |
|
|
const image::ImagePtr & |
pOutImg |
|
) |
| |
multi slice version of wrapper function for detection of spheres in image using Hough algorithm This wrapper can be used with multi slices input images
- Exceptions
-