docs: public static <T extends ImageGray<T>>
  	DetectPolygonBinaryGrayRefine<T> polygon(@Nullable ConfigPolygonDetector config, Class<T> imageType)
  	{
  		config.checkValidity();
  
  		RefinePolygonToContour refineContour = config.refineContour ? new RefinePolygonToContour() : null;
  
  		RefinePolygonToGray<T> refineGray = config.refineGray != null ?
  				refinePolygon(config.refineGray,imageType) : null;
  
  		DetectPolygonFromContour<T> detector = polygonContour(config.detector,imageType);
  
  		return new DetectPolygonBinaryGrayRefine<>(detector,refineContour,refineGray,
  				config.minimumRefineEdgeIntensity,
  				config.adjustForThresholdBias);
  	}