Class AbstractImgHash
java.lang.Object
com.github.hypfvieh.imaging.AbstractImgHash
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbitmaskToHex(boolean[] bitMask, int _minLen) Converts a bitmask (array of boolean) to a hex string.protected int[]createPixelArray(BufferedImage _image) Convert the given image to an array of integer, where each array entry represents one pixel.protected double[][]createPixelArrayMatrix(BufferedImage _image) Creates a pixel array matrix from the given image.protected BufferedImageresizeAndGrayScale(int _width, int _height, BufferedImage _input) Convert the given image to grayscale and resize it to the given scale.
-
Constructor Details
-
AbstractImgHash
public AbstractImgHash()
-
-
Method Details
-
createPixelArray
Convert the given image to an array of integer, where each array entry represents one pixel. The image is read from top to bottom, left to right.- Parameters:
_image- image- Returns:
- int array or null if _image is null
-
createPixelArrayMatrix
Creates a pixel array matrix from the given image.- Parameters:
_image- image- Returns:
- array of double array or null if _image is null
-
resizeAndGrayScale
Convert the given image to grayscale and resize it to the given scale. Will return a newBufferedImageinstance.- Parameters:
_width- width_height- heigth_input- input image- Returns:
BufferedImageor null if _input is null
-
bitmaskToHex
Converts a bitmask (array of boolean) to a hex string.- Parameters:
bitMask- mask_minLen- length- Returns:
- string
-