Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dupefind

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).

Status

🚧 Early MVP — currently validating directory listing (dirent) and image decoding (stb_image). Perceptual hashing and duplicate detection are not implemented yet.

Dependencies

  • stb_image.h (header-only, included in include/)
  • dirent.h (Windows only — POSIX-compatible implementation included in include/win32/, only needed for MSYS2/MinGW builds; not used on Linux)

Build

Requires gcc and make.

Linux

make

Produces the executable at build-linux/dupefind.

Windows (MSYS2 UCRT64)

Install MSYS2 and, from the UCRT64 terminal:

pacman -S mingw-w64-ucrt-x86_64-gcc mingw-w64-ucrt-x86_64-make

Add the following to your Windows PATH:

  • C:\msys64\ucrt64\bin
  • C:\msys64\usr\bin Then, from PowerShell or the MSYS2 terminal:
make

Produces the executable at build-windows\dupefind.exe.

Usage

./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.

Makefile commands

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

Roadmap

  • 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)

About

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).

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages