image = | houghLines2dImg (inGreyImg2d) |
image = | houghLines2dImg (inGreyImg2d,houghLinesImgParams) |
computes the accumulator matrix used by the Hough lines detector
This algorithm computes, from a grey levels 2d image, the accumulation matrix used to detect straight lines in the input image, using Hough transform.
See HoughLines2d for more information
Example of Python code :
Example imports
import PyIPSDK
import PyIPSDK.IPSDKIPLFeatureDetection as fd
import PyIPSDK.IPSDKIPLFiltering as filter
Code Example
inImg = PyIPSDK.loadTiffImageFile(inputImgPath)
rhoStep = 2.0
thetaRange = PyIPSDK.createEvenlySpacedRange(math.pi/2, 3*math.pi/4, 15)
intensityThreshold = 210.0
imgParams = PyIPSDK.createHoughLinesImgParams(
rhoStep, thetaRange, intensityThreshold)
outImg = fd.houghLines2dImg(inImg, imgParams)
Example of C++ code :
Example informations
Header file
#include <IPSDKIPL/IPSDKIPLFeatureDetection/Processor/HoughLines2dImg/HoughLines2dImg.h>
Code Example
const ipReal64 rhoStep = 1.0;
M_PI / 2, 3 * M_PI / 4, 15);
const ipReal32 intensityThreshold = 10.0f;
rhoStep, thetaRange, intensityThreshold);
const ImageConstPtr pOutImg = houghLines2dImg(pInImg, pInHoughImgPrms);