Package org.datavec.image.util
Class ImageUtils
- java.lang.Object
-
- org.datavec.image.util.ImageUtils
-
public class ImageUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description ImageUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double[]translateCoordsScaleImage(double x, double y, double origImageW, double origImageH, double newImageW, double newImageH)Calculate coordinates in an image, assuming the image has been scaled from (oH x oW) pixels to (nH x nW) pixels
-
-
-
Method Detail
-
translateCoordsScaleImage
public static double[] translateCoordsScaleImage(double x, double y, double origImageW, double origImageH, double newImageW, double newImageH)Calculate coordinates in an image, assuming the image has been scaled from (oH x oW) pixels to (nH x nW) pixels- Parameters:
x- X position (pixels) to translatey- Y position (pixels) to translateorigImageW- Original image width (pixels)origImageH- Original image height (pixels)newImageW- New image width (pixels)newImageH- New image height (pixels)- Returns:
- New X and Y coordinates (pixels, in new image)
-
-