public class ImageHistogram extends Object implements Measurable
T-Plan Robot Enterprise, (C) 2009-2022 T-Plan Limited. All rights reserved.
Constructor and Description |
---|
ImageHistogram() |
Modifier and Type | Method and Description |
---|---|
long |
getLength() |
int |
getMinAlpha() |
int |
getNumberOfComparablePixels() |
Map<Integer,int[]> |
getPointers() |
float |
getProgress()
Get the task progress where 0 means "0% done" and 1 means "100% done".
|
int[] |
getSortedListOfColors(int maxColors)
Return an array of colors sorted descending based on pixel count.
|
List<Integer> |
getSortedListOfMajorColors(int maxColors)
Return an array of colors sorted ascending based on pixel count.
|
ImageHistogram |
load(Image img,
Rectangle rect) |
ImageHistogram |
load(int[] pixels) |
ImageHistogram |
load(int[] pixels,
Rectangle histRect,
Rectangle sourceRect) |
void |
setMinAlpha(int minAlpha) |
String |
toString() |
public long getLength()
public ImageHistogram load(Image img, Rectangle rect)
public ImageHistogram load(int[] pixels)
public ImageHistogram load(int[] pixels, Rectangle histRect, Rectangle sourceRect)
public List<Integer> getSortedListOfMajorColors(int maxColors)
maxColors
- maximum length of the array.public int[] getSortedListOfColors(int maxColors)
maxColors
- maximum length of the array.public float getProgress()
Measurable
getProgress
in interface Measurable
public int getNumberOfComparablePixels()
public int getMinAlpha()
public void setMinAlpha(int minAlpha)
minAlpha
- the minAlpha to set