Skip to content

I recommend cutting off the minor ones. #31

@deepch

Description

@deepch

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions