CoenM.ImageSharp.ImageHash 1.2.30
ImageHash
Perceptual image hashing using the ImageSharp library. Includes three hashing algorithms (AverageHash, DifferenceHash, and PerceptualHash). See github for more information.
Calculate image hash
var hashAlgorithm = new AverageHash();
// or one of the other available algorithms:
// var hashAlgorithm = new DifferenceHash();
// var hashAlgorithm = new PerceptualHash();
string filename = "your filename";
using var stream = File.OpenRead(filename);
ulong imageHash = hashAlgorithm.Hash(stream);
Calculate image similarity
Note that to calculate the image similarity, both image hashes should have been calculated using the same hash algorihm.
// calculate the two image hashes
ulong hash1 = hashAlgorithm.Hash(imageStream1);
ulong hash2 = hashAlgorithm.Hash(imageStream2);
double percentageImageSimilarity = CompareHash.Similarity(hash1, hash2);
Showing the top 20 packages that depend on CoenM.ImageSharp.ImageHash.
Packages | Downloads |
---|---|
Aiursoft.NiBot.Core
Nuget package of 'Core' provided by Aiursoft
|
1 |
Aiursoft.NiBot.Core
Nuget package of 'Core' provided by Aiursoft
|
0 |
https://github.com/coenm/ImageHash/releases/tag/v1.2.30
.NET Framework 4.6.1
- SixLabors.ImageSharp (>= 2.0.0)
.NET Framework 4.7.2
- SixLabors.ImageSharp (>= 2.0.0)
.NET Core 2.1
- SixLabors.ImageSharp (>= 2.0.0)
.NET Core 3.1
- SixLabors.ImageSharp (>= 2.0.0)
.NET 5.0
- SixLabors.ImageSharp (>= 2.0.0)
.NET 6.0
- SixLabors.ImageSharp (>= 2.0.0)
.NET Standard 2.0
- SixLabors.ImageSharp (>= 2.0.0)
Version | Downloads | Last updated |
---|---|---|
1.3.6 | 130 | 06/23/2024 |
1.2.30 | 1 | 06/30/2024 |
1.1.5 | 1 | 06/30/2024 |
1.0.0 | 1 | 06/30/2024 |
1.0.0-beta0004 | 1 | 06/30/2024 |
1.0.0-beta0003 | 1 | 06/30/2024 |
1.0.0-beta0002 | 1 | 06/30/2024 |
1.0.0-beta.5 | 1 | 06/30/2024 |