Пример #1
0
 /// <summary>
 /// Creates a smart pointer to a LineSegmentDetector object and initializes it.
 /// </summary>
 /// <param name="refine">The way found lines will be refined, see cv::LineSegmentDetectorModes</param>
 /// <param name="scale">The scale of the image that will be used to find the lines. Range (0..1].</param>
 /// <param name="sigmaScale">Sigma for Gaussian filter. It is computed as sigma = _sigma_scale/_scale.</param>
 /// <param name="quant">Bound to the quantization error on the gradient norm.</param>
 /// <param name="angTh">Gradient angle tolerance in degrees.</param>
 /// <param name="logEps">Detection threshold: -log10(NFA) \> log_eps. 
 /// Used only when advancent refinement is chosen.</param>
 /// <param name="densityTh">Minimal density of aligned region points in the enclosing rectangle.</param>
 /// <param name="nBins">Number of bins in pseudo-ordering of gradient modulus.</param>
 /// <returns></returns>
 public static LineSegmentDetector Create(
     LineSegmentDetectorModes refine = LineSegmentDetectorModes.RefineNone,
     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)
 {
     IntPtr ptr = NativeMethods.imgproc_createLineSegmentDetector(
         (int)refine, scale, sigmaScale, quant, angTh, logEps, densityTh, nBins);
     return new LineSegmentDetector(ptr);
 }
Пример #2
0
 /// <summary>
 /// Creates a smart pointer to a LineSegmentDetector object and initializes it.
 /// </summary>
 /// <param name="refine">The way found lines will be refined, see cv::LineSegmentDetectorModes</param>
 /// <param name="scale">The scale of the image that will be used to find the lines. Range (0..1].</param>
 /// <param name="sigmaScale">Sigma for Gaussian filter. It is computed as sigma = _sigma_scale/_scale.</param>
 /// <param name="quant">Bound to the quantization error on the gradient norm.</param>
 /// <param name="angTh">Gradient angle tolerance in degrees.</param>
 /// <param name="logEps">Detection threshold: -log10(NFA) \> log_eps. 
 /// Used only when advancent refinement is chosen.</param>
 /// <param name="densityTh">Minimal density of aligned region points in the enclosing rectangle.</param>
 /// <param name="nBins">Number of bins in pseudo-ordering of gradient modulus.</param>
 /// <returns></returns>
 public static LineSegmentDetector Create(
     LineSegmentDetectorModes refine = LineSegmentDetectorModes.RefineNone,
     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)
 {
     IntPtr ptr = NativeMethods.imgproc_createLineSegmentDetector(
         (int)refine, scale, sigmaScale, quant, angTh, logEps, densityTh, nBins);
     return new LineSegmentDetector(ptr);
 }