Timmy Welch
33ff96e45f
Add json marshaling/unmarshaling
2024-08-11 19:57:15 -07:00
Timmy Welch
5cd3cb8dcf
staticcheck fixes
2024-08-04 18:24:04 -07:00
Timmy Welch
53bce1cdc2
Add testing system
2024-05-01 17:59:11 -07:00
Timmy Welch
1ca06a1968
Make compliant with python imagehash
2024-04-05 17:29:30 -06:00
Donghee Na
d8115886f3
gh-63: Return error if other is nil ( #64 )
2024-01-21 22:47:06 +09:00
Eric Levine
8be960c20e
Fix typo on the GoDoc for LoadImageHash. ( #35 )
...
The GoDoc incorrectly specified that the LoadImageHash function produces an ExtImageHash. This function produces an ImageHash, so this corrects the typo.
2019-11-26 14:07:35 +09:00
Dong-hee Na
3e058be50d
hashcompute: Update Extend API ( #28 )
...
* hashcompute: Update Extend API
- AverageHashExtend -> ExtAverageHash
- PerceptionHashExtend -> ExtPerceptionHash
- DiffrenceHashExtend -> ExtDiffrenceHash
* imagehash: Update load api
2019-03-18 23:53:09 +09:00
Dong-hee Na
47321c08d3
imagehash: Create a new API Bits() ( #25 )
2019-03-17 15:42:07 +09:00
Dong-hee Na
84eb1859d0
imagehash: Add new serialization API dump/load. ( #24 )
...
Create a new APIs for serializing purpose which can use
standard io.Reader/io.Writer APIs.
ToString() API will be remain for debugging purpose and
ExtImageHashFromString, ImageHashFromString will be removed after next
version.
- New APIs are added: LoadExtImageHash, LoadImageHash, xxxHash.Dump
- These APIs are deprecated: ExtImageHashFromString, ImageHashFromString
2019-03-17 11:34:56 +09:00
Dong-hee Na
58a4aa88ab
hashcompute: Fix bit set index ( #22 )
2019-03-16 17:22:57 +09:00
Alex
c41a59a872
add PerceptionHashExtend function ( #18 )
...
goimagehash: Implement PerceptionHashExtend
2019-02-08 18:02:25 +09:00
Dominik Honnef
ad2b6ded3b
Use bits.OnesCount64 when available
...
Benchmark on i7-2600k, which has the POPCNT instruction:
name old time/op new time/op delta
DistanceIdentical-8 5.08ns ± 0% 1.01ns ± 1% -80.07% (p=0.008 n=5+5)
DistanceDifferent-8 81.5ns ± 2% 1.0ns ± 0% -98.76% (p=0.016 n=5+4)
Benchmark on Cavium Octeon, a MIPS64 platform with no dedicated
instruction:
name old time/op new time/op delta
DistanceIdentical-2 120ns ± 6% 144ns ± 5% +19.93% (p=0.008 n=5+5)
DistanceDifferent-2 656ns ± 4% 144ns ± 4% -78.09% (p=0.008 n=5+5)
2018-05-02 23:52:38 +09:00
Gustavo Brunoro
71a79d6ce7
added serialization unit tests
2017-11-17 09:56:54 +09:00
Gustavo Brunoro
40b64eda79
adds hex serialization methods to ImageHash
...
The ToString and FromString methods create a string representation
of an ImageHash, following the format:
`<first letter of type>:<hex representation of hash`
2017-11-17 09:56:54 +09:00
Dong-hee Na
22bcbf7685
goimagehash: Make go report card happy.
2017-08-04 01:05:13 +09:00
Dong-hee Na
b969cb59dc
goimagehash: Fix typo.
2017-08-03 22:40:42 +09:00
Dong-hee Na
2b9c664be8
Update docs.
2017-07-31 23:29:35 +09:00
Dong-hee Na
7aba8954cd
[goimagehash] First implement.
2017-07-31 22:47:14 +09:00