Fastimagehash
C/C++ replacement for the 'imagehash' python package
Install / Use
/learn @simon987/FastimagehashREADME
libfastimagehash
WIP: Not ready for production use!
libfastimagehash is a imagehash
replacement for C/C++.
See also:
- go bindings (with cgo).
- imagehash-web (Javascript version)
Example usage
#include <fastimagehash.h>
int main() {
unsigned char result[HASH_SIZE];
phash_file("image.jpeg", result, HASH_SIZE, HIGHFREQ_FACTOR);
}
Build from source
# Download dependencies
apt install libopencv-dev libfftw3-dev cmake
# Checkout source
git clone --recursive https://github.com/simon987/fastimagehash
# Build
cmake .
make
# Install as a system library
sudo make install
Built with
- opencv for image decoding & resizing
- wavelib for wavelet decomposition in
whash(With additional CFLAGS) - fftw3 for DCT in
phash - google/benchmark to measure performance
Disclaimer: The methods used to compute the image hashes
are identical to the imagehash python library, however, due to
some slight differences in the way OpenCV vs Pillow images are resized,
the final image hashes are not always exactly the same.
Related Skills
node-connect
347.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
108.4kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
347.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
347.6kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
