Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add pHash #709

Merged
merged 20 commits into from
Jan 19, 2025
Merged

add pHash #709

merged 20 commits into from
Jan 19, 2025

Conversation

cospectrum
Copy link
Contributor

@cospectrum cospectrum commented Jan 8, 2025

Relates: #703

@cospectrum
Copy link
Contributor Author

cospectrum commented Jan 8, 2025

I know there are possible optimizations. It's a starting point.

Copy link
Contributor

@theotherphil theotherphil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall this looks great, thanks a lot. I’ll merge after the two comments have been resolved.

Cargo.toml Outdated
@@ -54,6 +55,9 @@ features = ["property-testing", "katexit"]
opt-level = 3
debug = true

[profile.dev]
opt-level = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What’s the reason for this change? It would be a shame to make debug builds take even longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To speed up proptests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to opt-level = 1

//! [Perceptual hashing] algorithms for images.
//!
//! [Perceptual hashing]: https://en.wikipedia.org/wiki/Perceptual_hashing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The rest of this library uses “image” over “img” for module and function names - please can you rename this to image_hash or maybe perceptual_hashing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

renamed to image_hash

@cospectrum
Copy link
Contributor Author

I updated MSRV because [email protected] requires rustc 1.80.1.

@theotherphil
Copy link
Contributor

Nice, thanks!

@theotherphil theotherphil merged commit 33a88f8 into image-rs:master Jan 19, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants