Skip to main content

Module visual

Module visual 

Source
Expand description

Visual similarity detection for image and video deduplication.

This module provides:

  • Perceptual hashing (pHash, dHash, aHash)
  • SSIM (Structural Similarity Index Measure)
  • Histogram comparison
  • Feature extraction and matching
  • Near-duplicate detection with configurable thresholds

Structs§

FeaturePoint
Feature point for matching.
Image
Image representation for processing.
PerceptualHash
Perceptual hash result.
SsimConfig
Configuration for SSIM-based thumbnail duplicate detection.
SsimParams
SSIM (Structural Similarity Index) parameters.
VisualSimilarity
Visual similarity metrics.

Functions§

compare_histograms
Compare histograms using correlation.
compare_images
Compare visual similarity between two images.
compute_ahash
Compute average hash (aHash).
compute_dhash
Compute difference hash (dHash).
compute_histogram
Compute histogram for an image.
compute_phash
Compute perceptual hash (pHash) using DCT.
compute_ssim
Compute SSIM between two images.
compute_whash
Compute wavelet hash (wHash) using Haar wavelet decomposition.
extract_features
Extract feature points from an image (simplified SIFT-like).
find_ssim_duplicates
Find SSIM duplicates among a list of files using the default 8×8 config.
find_ssim_duplicates_with_config
Find SSIM duplicates among a list of files using a custom config.
match_features
Match features between two images.