![]() |
IPSDK
4_1_0_2
IPSDK : Image Processing Software Development Kit
|
detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation More...
detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation
This algorithm detects 2D lines in an input image using an extension of Hough algorithm based on gradient orientation. Differences with the implementation of regular Hough detector HoughLines2d are:
the algorithm takes as inputs 2 images, corresponding to the images of gradients, respectively along x-axis and y-axis. From these 2 images, the image of gradient magnitude is computed. It will be used to compute the accumulation matrix, but instead of accumulating intensity of each pixel on the whole range of possible line orientations of the
parameter space , the range is restricted to
, with:
a tolerance specified by the user (equals to
radians (10°) by default)
the gradient orientation at current pixel, in radians, computed from the 2 input images of gradient.Indeed, if the pixel is on a line, gradient orientation should be close to the orientation of the normal to the line. Thus, the accumulator matrix is not polluted with accumulation of intensities that are not relevant
(instead of
for HoughLines2d algorithm). Considering a straight-lined edge separating the space in 2 distinct half-spaces
and
, this extension enables to clearly distinguish the case where
is bright and
is dark from the case where
is dark and
is bright, what regular Hough transform cannot. We can deduce potential advantages of this property on 2 different examples:
and
, the 2 expected peaks may be merged into a single one, as shown in the following accumulator matrix obtained with RhoStep=1 pixel and ThetaStep=1° (which are the default parameters) :
Attribute description for algorithm :
| Name | ToolTip | Default Initializer |
|---|---|---|
| ipsdk::imaproc::attr::InGxGreyImg2d | [Input] 2d grey levels image of gradient computed along x-axis | X |
| ipsdk::imaproc::attr::InGyGreyImg2d | [Input] 2d grey levels image of gradient computed along y-axis | X |
| ipsdk::imaproc::attr::InOptHoughLinesGradientImgParams | [Input Optional] Parameters for Hough lines detection algorithm using 2 input gradient images | X |
| ipsdk::imaproc::attr::InOptHoughLinesExtractionParams | [Input Optional] Parameters used for step of extraction of lines in Hough lines algorithm | X |
| ipsdk::imaproc::attr::InOptHoughLinesOrientationTolerance | [Input Optional] Tolerance for orientation around estimated gradient direction | X |
| ipsdk::imaproc::attr::OutOptRealImg | [Output Optional] image for processing operation (data contained in image buffer are reals) | X |
| ipsdk::imaproc::attr::OutPIHoughLines2dPpties | [Output] plan indexed collection of positions and intensities of 2d pixels | ipsdk::imaproc::fromImage (_pOutPIHoughLines2dPpties, _pInGxGreyImg2d) |
Global rule description for algorithm :
ipsdk::processor::If (
ipsdk::processor::isSet (_pOutOptRealImg),
ipsdk::imaproc::customImageProperty (_pOutOptRealImg,
ipsdk::imaproc::fd::houghLines2dCheckOutImgSzXEquals (_pInGxGreyImg2d,_pInOptHoughLinesGradientImgParams)) &&
ipsdk::imaproc::customImageProperty (_pOutOptRealImg,
ipsdk::imaproc::fd::houghLines2dCheckOutImgSzYEquals (_pInGxGreyImg2d,_pInOptHoughLinesGradientImgParams,_pInOptHoughLinesExtractionParams)) &&
ipsdk::imaproc::customImageProperty (_pOutOptRealImg,
ipsdk::imaproc::fd::houghLines2dCheckOutImgBufferType (_pInGxGreyImg2d)) &&
ipsdk::imaproc::matchSize (eMatchImageSizeType::eMIST_T,_pInGxGreyImg2d,_pOutOptRealImg) &&
ipsdk::imaproc::matchVolumeGeometryType (_pInGxGreyImg2d,_pOutOptRealImg) &&
ipsdk::imaproc::matchColorGeometryType (_pInGxGreyImg2d,_pOutOptRealImg) &&
ipsdk::imaproc::noInSitu (_pInGxGreyImg2d,_pOutOptRealImg),
ipsdk::processor::none ())
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::fd::HoughLinesResult ipsdk::imaproc::fd::houghLinesGradient2d | ( | const image::ImageConstPtr & | pInGxImg, |
| const image::ImageConstPtr & | pInGyImg | ||
| ) |
wrapper function for detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::fd::HoughLinesResult ipsdk::imaproc::fd::houghLinesGradient2d | ( | const image::ImageConstPtr & | pInGxImg, |
| const image::ImageConstPtr & | pInGyImg, | ||
| const ipsdk::imaproc::attr::HoughLinesGradientImgParamsConstPtr & | pHoughLinesImgParams, | ||
| const ipsdk::imaproc::attr::HoughLinesExtractionParamsConstPtr & | pHoughLinesExtractionParams, | ||
| const ipsdk::ipReal32 | orientationTolerance | ||
| ) |
wrapper function for detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::fd::PlanIndexedHoughLinesResult ipsdk::imaproc::fd::multiSlice_houghLinesGradient2d | ( | const image::ImageConstPtr & | pInGxImg, |
| const image::ImageConstPtr & | pInGyImg | ||
| ) |
wrapper function for detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
| IPSDKIPLFEATUREDETECTION_API ipsdk::imaproc::fd::PlanIndexedHoughLinesResult ipsdk::imaproc::fd::multiSlice_houghLinesGradient2d | ( | const image::ImageConstPtr & | pInGxImg, |
| const image::ImageConstPtr & | pInGyImg, | ||
| const ipsdk::imaproc::attr::HoughLinesGradientImgParamsConstPtr & | pHoughLinesImgParams, | ||
| const ipsdk::imaproc::attr::HoughLinesExtractionParamsConstPtr & | pHoughLinesExtractionParams, | ||
| const ipsdk::ipReal32 | orientationTolerance | ||
| ) |
wrapper function for detection of 2D lines in gradient images using extension of Hough algorithm based on gradient orientation
| ipsdk::processor::IPSDKBaseProcessingException | on failure |
1.8.14