Class Radius


  • public class Radius
    extends Border
    This class finds the best images to be used for sampling using a recursive rectangle algorithm. It looks for rectangles the boundaries of which can all be sampled from the same input image.
    • Field Detail

      • firstCall

        protected boolean firstCall
      • centers

        protected double[][] centers
    • Constructor Detail

      • Radius

        public Radius()
    • Method Detail

      • criterion

        protected double criterion​(int i,
                                   int nx,
                                   int ny,
                                   double x,
                                   double y)
        Being close to the center is the goal.
        Overrides:
        criterion in class Border
        Parameters:
        i - The index of the image being considered
        nx - The width of the candidate image
        ny - The height of the caandiate image
        x - The x-value of the requested point.
        y - The y-value of the requested point.
        Returns:
        The inverse of 4 r^2. This is a little faster to computer so we use this rather than inverse of the radius.