java.lang.Object
java.awt.Polygon
org.opensourcephysics.cabrillo.tracker.TRegion
All Implemented Interfaces:
Shape, Serializable

public class TRegion extends Polygon
This is a region determined by inside and outside pixel values.
Author:
Douglas Brown
See Also:
  • Constructor Details

    • TRegion

      public TRegion(BufferedImage image, int x0, int y0)
      Constructs a region starting from a specified image pixel position.
      Parameters:
      image - the image
      x0 - the starting x position
      y0 - the starting y position
  • Method Details

    • getCenter

      public TPoint getCenter()
      Gets the center point of the region.
      Returns:
      the center
    • findEdge

      public void findEdge()
      Finds and traces the edge that defines the inside/outside of the region.