Command-line tool written in C to detect duplicate or near-duplicate images using perceptual hashing (dHash). Work in progress, cross-platform (Linux and Windows).
🚧 Early MVP — currently validating directory listing (dirent) and image decoding (stb_image). Perceptual hashing and duplicate detection are not implemented yet.
stb_image.h(header-only, included ininclude/)dirent.h(Windows only — POSIX-compatible implementation included ininclude/win32/, only needed for MSYS2/MinGW builds; not used on Linux)
Requires gcc and make.
makeProduces the executable at build-linux/dupefind.
Install MSYS2 and, from the UCRT64 terminal:
pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-makeAdd the following to your Windows PATH:
C:\msys64\ucrt64\binC:\msys64\usr\binThen, from PowerShell or the MSYS2 terminal:
make
Produces the executable at build-windows\dupefind.exe.
./build-linux/dupefind <folder>Lists the files in the given folder and tries to load each one as an image via stb_image, printing dimensions on success. For now this only validates that directory listing and image decoding are working.
| Command | What it does |
|---|---|
make |
Builds the project |
make run |
Builds and runs against the testimg/ folder |
make clean |
Removes only object files (.o) |
make mrproper |
Removes the build folder for the current platform |
make mrproper-all |
Removes both the Linux and Windows build folders |
- Implement dHash (difference hash)
- Hash comparison via Hamming distance
- HEIC/HEIF support (via
libheif) - Video support (via
ffmpeg) - Efficient similarity search index (BK-tree) for large collections
- Persist already-computed hashes (SQLite)