Comments (4)
Not sure what you mean, the interface uses an image that is "in memory", so it is completely up to you to decide where the image originates from.
namespace CoenM.ImageHash
{
public interface IImageHash
{
ulong Hash(Image<Rgba32> image);
}
}
from imagehash.
I believe they want to create a hash out of a Bitmap so they can save it in a database perhaps. This removes the need to save all images that you already know are "good", just need to find similar ones.
I am in need of this too, but I will keep looking.
from imagehash.
It just slapped me in the face, you save the ulong
from the "good" images in a database for later use.
@leonpotgieter I hope this solves your issue.
from imagehash.
You can take a look at this test code from ImageSharp where a Bitmap
is converted to an Image<Rgba32>
inmemory.
After obtaining such Image<Rgb32>
you can call the Hash(Image<Rgb32> image)
method as @LambertWM described.
You can also try to save the Bitmap to a MemoryStream and use the following extension method.
public static ulong Hash(this IImageHash hashImplementation, Stream stream)
{
if (hashImplementation == null)
throw new ArgumentNullException(nameof(hashImplementation));
if (stream == null)
throw new ArgumentNullException(nameof(stream));
using (var image = Image.Load<Rgba32>(stream))
return hashImplementation.Hash(image);
}
from imagehash.
Related Issues (12)
- Always 32 bits set HOT 2
- DifferenceHash and PerceptualHash fails to compute hash HOT 5
- System.AggregateException using TPL HOT 1
- Any difference? HOT 5
- Zip download is missing files and won't build HOT 2
- Memory leak in PerceptualHash? HOT 3
- PerceptualHash and differences in computed hash value between Net5 and Net6 HOT 3
- Improve github release generation
- Improve Pull Request builds using devops
- Remove support for netstandard1.3
- Update readme example HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from imagehash.