timhuff / canvas-phash Goto Github PK
View Code? Open in Web Editor NEWA Canvas-based pHash Implementation
A Canvas-based pHash Implementation
Hello,
I'm trying to switch to your implementation of phash from phash-image
, which gives me the hash of an image as a bigint. As phash-image uses libphash under the hood, its hashes are only 8-byte long. However the result of canvas-phash
's getImageHash()
is a 128-byte buffer.
Are all bits of the 128 bytes significant? In the end I want to store the hashes of many images in a mysql database and then search for similar images via sql. With a 128-byte hash I would have to either split the hash across multiple columns, or use a binary/string column and some conversion during querying which would affect performance.
What solution would you suggest for a situation like this?
Thanks for the great package.
I've noticed that images that i resize to 200-350(width) get a resulting buffer filled with zeros. the original image or a resized image to width 500 get a normal phash buffer.
any ideas?
Thanks
Canvas-phash doesn't work with node v6 at the moment because of the breaking changes in Buffer.
Error message
Unhandled rejection Error: If encoding is specified then the first argument must be a string
at new Buffer (buffer.js:69:13)
at /srv/missingdays/Projects/ed3/visual-testing/node_modules/canvas-phash/index.js:127:18
Can you please adapt your library to new version of node.js, without breaking node 4 support?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.