-
-
Notifications
You must be signed in to change notification settings - Fork 71
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
goimagehash: Implement PerceptionHashExtend #18
Conversation
add a function that returns a hash computation of phash which the size can be set larger than uint64
Pull Request Test Coverage Report for Build 84
💛 - Coveralls |
Hi, Thank you for the contribution, this PR will be a lot of improvement for goimagehash. There are some things that I want to achieve with extension hash.
So my suggestions are these.
// BigImageHash is a struct of hash computation.
type BigImageHash struct {
hash string
kind Kind
}
goimagehash/hashcompute_test.go Line 14 in 81672d7
Can you please reflect my comments? |
@corona10 |
Thanks alot! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh and the furthermore
Please add your name on https://github.com/corona10/goimagehash/blob/master/AUTHORS.md
and also add on here https://github.com/corona10/goimagehash/blob/master/CODEOWNERS when you implement extension hash.
Thank you!
hashcompute_test.go
Outdated
h2 := &ExtImageHash{hash: []uint64{0x678be53815e510f7}} // 8 bits flipped | ||
|
||
for i := 0; i < b.N; i++ { | ||
h1.Distance(h2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Error return value of h1.Distance
is not checked (from errcheck
)
@corona10
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TokyoWolFrog
I left some comments! Most of the things look great!
Most important thing is that we should align the API signature of the hash structure.
Also we need to add func (h *ImageHash) GetHash() []uint64 Line 53 in 81672d7
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM to me!!
Just fix the issue which Golang CI mentioned.
#18 (comment)
Everything looks great! Thanks alot
add a function that returns a hash computation of phash which the size can be set larger than uint64