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

I recommend cutting off the minor ones. #31

Open
deepch opened this issue Aug 17, 2019 · 1 comment
Open

I recommend cutting off the minor ones. #31

deepch opened this issue Aug 17, 2019 · 1 comment

Comments

@deepch
Copy link

deepch commented Aug 17, 2019

Not always in real life need to work so accurately. For example, if it is necessary to determine the motion in the picture such precision is excessive and the image will mean the same and the algorithm will say that change more than 10% that would be wrong.

ExtAverageHash
real live recommend add filter

if p > avg && math.Abs(p-avg) > 12.5 {

problem

output_2_3
output_1_3

no filter distance 183

add filter distance 0

TEST
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample1.jpg and _examples/sample2.jpg is expected 42 but got 35
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample1.jpg and _examples/sample4.jpg is expected 38 but got 30
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample2.jpg and _examples/sample3.jpg is expected 40 but got 38
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample2.jpg and _examples/sample4.jpg is expected 6 but got 5
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample1.jpg and _examples/sample2.jpg is expected 149 but got 137
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample1.jpg and _examples/sample4.jpg is expected 152 but got 140
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample2.jpg and _examples/sample3.jpg is expected 155 but got 150
hashcompute_test.go:298: ExtAverageHash: Distance between _examples/sample2.jpg and _examples/sample4.jpg is expected 27 but got 25

p > avg

I'm not sure if this is the right thing to do, you probably need to look at deviations of more than % of the average then it will work both ways.

@corona10
Copy link
Owner

@deepch
Thank you for the suggestion.
It will be great to add filter option which can accept the variant of purpose.
Let's think about it!

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

No branches or pull requests

2 participants