docs: public static <I extends ImageGray<I>, D extends ImageGray<D>>
  	DetectLineSegmentsGridRansac<I,D> lineRansac(int regionSize ,
  												 double thresholdEdge ,
  												 double thresholdAngle ,
  												 boolean connectLines,
  												 Class<I> imageType ,
  												 Class<D> derivType ) {
  
  		ImageGradient<I,D> gradient = FactoryDerivative.sobel(imageType,derivType);
  
  		ModelManagerLinePolar2D_F32 manager = new ModelManagerLinePolar2D_F32();
  		GridLineModelDistance distance = new GridLineModelDistance((float)thresholdAngle);
  		GridLineModelFitter fitter = new GridLineModelFitter((float)thresholdAngle);
  
  		ModelMatcher<LinePolar2D_F32, Edgel> matcher =
  				new Ransac<>(123123, manager, fitter, distance, 25, 1);
  
  		GridRansacLineDetector<D> alg;
  		if( derivType == GrayF32.class )  {
  			alg = (GridRansacLineDetector)new ImplGridRansacLineDetector_F32(regionSize,10,matcher);
  		} else if( derivType == GrayS16.class ) {
  			alg = (GridRansacLineDetector)new ImplGridRansacLineDetector_S16(regionSize,10,matcher);
  		} else {
  			throw new IllegalArgumentException("Unsupported derivative type");
  		}
  
  		ConnectLinesGrid connect = null;
  		if( connectLines )
  			connect = new ConnectLinesGrid(Math.PI*0.01,1,8);
  
  		return new DetectLineSegmentsGridRansac<>(alg, connect, gradient, thresholdEdge, imageType, derivType);
  	}