Interface RefinePolygonToGray<T extends ImageGray<T>>

All Known Implementing Classes:
RefinePolygonToGrayLine

public interface RefinePolygonToGray<T extends ImageGray<T>>
Refines a polygon using the gray scale image. This results in a more accurate fit than just the contour alone will provide and removes the shift that fitting to contour injects.
  • Method Details

    • setImage

      void setImage​(T image)
      Sets the input image
    • setLensDistortion

      void setLensDistortion​(int width, int height, @Nullable @Nullable PixelTransform<Point2D_F32> distToUndist, @Nullable @Nullable PixelTransform<Point2D_F32> undistToDist)
      Specifies lens distortion
    • clearLensDistortion

      void clearLensDistortion()
      Clears the previously set lens distortion
    • refine

      boolean refine​(Polygon2D_F64 input, Polygon2D_F64 output)
      Refines the initial polygon
      Parameters:
      input - 2D polygon version of contour polygon
      output - Storage for the refined polygon
      Returns:
      true if successful or false if it failed