org.neuroph.imgrec
Class ImageSampler
- java.lang.Object
-
- org.neuroph.imgrec.ImageSampler
-
public class ImageSampler extends java.lang.ObjectThis 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 Summary
Constructors Constructor and Description ImageSampler()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static ImagedownSampleImage(Dimension samplingResolution, Image image)static ImagedownSampleImage(Dimension samplingResolution, Image bigImage, int returnImageType)
-
DMelt 3.0 © DataMelt by jWork.ORG