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(com.aspose.ms.System.IO.Stream stream) |
ImageDctHashSearchCriteria(String filePath)
Initializes a new instance of the
class with a specified file path. |
accept, getFalseImages, getMaxDifference, getStream, getTrueImages, isSatisfiedBy, resetCache, setMaxDifferencegetPages, setPagesand, not, orpublic ImageDctHashSearchCriteria(InputStream stream)
ImageDctHashSearchCriteria class with a specified stream.stream - The stream to load image from.public ImageDctHashSearchCriteria(com.aspose.ms.System.IO.Stream stream)
public ImageDctHashSearchCriteria(String filePath)
ImageDctHashSearchCriteria class with a specified file path.filePath - The file path to load image from.Copyright © 2026. All rights reserved.