Documentation of 'org.neuroph.imgrec.ImageSampler' Java class
ImageSampler
org.neuroph.imgrec

Class ImageSampler



  • public class ImageSampler
    extends java.lang.Object
    This class uses a given Robot object to sample images from the screen at an arbitrary sampling resolution. The coordinates of the scanning rectangle is (x, y) expressed as a fraction of the screen resolution, with the width also being a fraction. For example, when the screen is 800x600 resolution, to scan a rectangle with xy coordinates (400,300) to xy (600, 400), use the following rectangle as an argument: new Rectangle2D.Double(0.5, 0.5, 0.25, 0.16667) Scanning using sampling is faster than scanning using a screenshot, but is prone to introduce tearing and shearing into the scanned image. Scanning from a screenshot has no tearing or shearing at the cost of speed. Also provides method for downsampling (scaling) image. This class is based on the code from tileclassification by Jon Tait.
    • Constructor Detail

      • ImageSampler

        public ImageSampler()
    • Method Detail

      • downSampleImage

        public static Image downSampleImage(Dimension samplingResolution,
                                            Image bigImage,
                                            int returnImageType)
      • downSampleImage

        public static Image downSampleImage(Dimension samplingResolution,
                                            Image image)

DMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.