ImageDctHashSearchCriteria
Inheritance: java.lang.Object, com.groupdocs.watermark.search.SearchCriteria, com.groupdocs.watermark.search.ImageSearchCriteria
public class ImageDctHashSearchCriteria extends ImageSearchCriteria
Represents a search criteria for finding images in a document.
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();
Constructors
Constructor | Description |
---|---|
ImageDctHashSearchCriteria(String filePath) | Initializes a new instance of the [ImageDctHashSearchCriteria](../../com.groupdocs.watermark.search/imagedcthashsearchcriteria) class with a specified file path. |
ImageDctHashSearchCriteria(InputStream stream) | Initializes a new instance of the [ImageDctHashSearchCriteria](../../com.groupdocs.watermark.search/imagedcthashsearchcriteria) class with a specified stream. |
ImageDctHashSearchCriteria(System.IO.Stream stream) |
ImageDctHashSearchCriteria(String filePath)
public ImageDctHashSearchCriteria(String filePath)
Initializes a new instance of the [ImageDctHashSearchCriteria](../../com.groupdocs.watermark.search/imagedcthashsearchcriteria)
class with a specified file path.
Parameters:
Parameter | Type | Description |
---|---|---|
filePath | java.lang.String | The file path to load image from. |
ImageDctHashSearchCriteria(InputStream stream)
public ImageDctHashSearchCriteria(InputStream stream)
Initializes a new instance of the [ImageDctHashSearchCriteria](../../com.groupdocs.watermark.search/imagedcthashsearchcriteria)
class with a specified stream.
Parameters:
Parameter | Type | Description |
---|---|---|
stream | java.io.InputStream | The stream to load image from. |
ImageDctHashSearchCriteria(System.IO.Stream stream)
public ImageDctHashSearchCriteria(System.IO.Stream stream)
Parameters:
Parameter | Type | Description |
---|---|---|
stream | com.aspose.ms.System.IO.Stream |