public class ImageDctHashSearchCriteria extends ImageSearchCriteria
This search criteria uses DCT based perceptual image hash for calculating image similarity.
Learn more:
The following example demonstrates how to search for images in the attached files (pdf).
WatermarkerSettings settings = new WatermarkerSettings(); settings.setSearchableObjects(new SearchableObjects()); settings.getSearchableObjects().setPdfSearchableObjects(PdfSearchableObjects.All); PdfLoadOptions loadOptions = new PdfLoadOptions(); Watermarker watermarker = new Watermarker("D:\\test.pdf", loadOptions); // Specify sample image to compare document images with ImageSearchCriteria criteria = new ImageDctHashSearchCriteria("D:\\sample.png"); // Search for similar images PossibleWatermarkCollection possibleWatermarks = watermarker.search(criteria); // Remove or modify found image watermarks // ... watermarker.close();
Constructor and Description |
---|
ImageDctHashSearchCriteria(InputStream stream)
Initializes a new instance of the
class with a specified stream. |
ImageDctHashSearchCriteria(String filePath)
Initializes a new instance of the
class with a specified file path. |
getMaxDifference, setMaxDifference
and, not, or
public ImageDctHashSearchCriteria(String filePath)
ImageDctHashSearchCriteria
class with a specified file path.filePath
- The file path to load image from.public ImageDctHashSearchCriteria(InputStream stream)
ImageDctHashSearchCriteria
class with a specified stream.stream
- The stream to load image from.