Class LabeledImage
- java.lang.Object
-
- dev.brachtendorf.jimagehash.matcher.categorize.supervised.LabeledImage
-
- All Implemented Interfaces:
Comparable<LabeledImage>
public class LabeledImage extends Object implements Comparable<LabeledImage>
A labeled image used to benchmark hashing algorithms.Labeled images bind an image to a category. All images in the same category are expected to produce a match if an image matcher is queried.
- Since:
- 2.0.0, 2.1.1 moved to new file, 2.2.0 renamed to LabeledImage previously TestData
- Author:
- Kilian
-
-
Field Summary
Fields Modifier and Type Field Description protected BufferedImagebImageThe image to testprotected intcategoryThe category of the image.protected StringnameA character representation of the file for easy feedback
-
Constructor Summary
Constructors Constructor Description LabeledImage(int category, File f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(LabeledImage o)booleanequals(Object obj)BufferedImagegetbImage()intgetCategory()StringgetName()inthashCode()StringtoString()
-
-
-
Field Detail
-
name
protected String name
A character representation of the file for easy feedback
-
category
protected int category
The category of the image. Same categories equals similar images
-
bImage
protected BufferedImage bImage
The image to test
-
-
Constructor Detail
-
LabeledImage
public LabeledImage(int category, File f)- Parameters:
category- The image category. Images with the same category are expected to be classified as similar imagesf- The Fie pointing to the image
-
-
Method Detail
-
compareTo
public int compareTo(LabeledImage o)
- Specified by:
compareToin interfaceComparable<LabeledImage>
-
getName
public String getName()
- Returns:
- the name
-
getCategory
public int getCategory()
- Returns:
- the category
-
getbImage
public BufferedImage getbImage()
- Returns:
- the bImage
-
-