LineSegmentDetector.create constructor
LineSegmentDetector.create({})
Creates a smart pointer to a LineSegmentDetector object and initializes it.
The LineSegmentDetector algorithm is defined using the standard values. Only advanced users may want to edit those, as to tailor it for their own application.
Parameters
- refine The way found lines will be refined, see LineSegmentDetectorModes
- scale The scale of the image that will be used to find the lines. Range (0..1].
- sigma_scale Sigma for Gaussian filter. It is computed as sigma = sigma_scale/scale.
- quant Bound to the quantization error on the gradient norm.
- ang_th Gradient angle tolerance in degrees.
- log_eps Detection threshold: -log10(NFA) > log_eps. Used only when advance refinement is chosen.
- density_th Minimal density of aligned region points in the enclosing rectangle.
- n_bins Number of bins in pseudo-ordering of gradient modulus.
https://docs.opencv.org/4.x/dd/d1a/group__imgproc__feature.html#gae0bba3b867a5f44d1b823aef4f57ee8d
Implementation
factory LineSegmentDetector.create({
int refine = LineSegmentDetector.REFINE_NONE,
double scale = 0.8,
double sigmaScale = 0.6,
double quant = 2.0,
double angTh = 22.5,
double logEps = 0,
double densityTh = 0.7,
int nBins = 1024,
}) {
final p = calloc<cvg.LineSegmentDetector>();
cimgproc.cv_LineSegmentDetector_create1(
refine,
scale,
sigmaScale,
quant,
angTh,
logEps,
densityTh,
nBins,
p,
);
return LineSegmentDetector._(p);
}