npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ezsift.js

v1.0.0

Published

ezSIFT (open source SIFT algorithm) ported from C via Emscripten

Downloads

1

Readme

panorama

use ezSIFT to glue photos together

port ezSIFT to javascript with emscripten

build_ezsift_with_em.sh is used to generate ezsift.js

ezsift.cpp is main source file for ezsift.js to export APIs from ezSIFT (much code copied from feature_extract.cpp and image_match.cpp)

Currently we support APIs:

  • Module._createImage(w, h) -> img to create a 8bit image
  • Module._disposeImage(img) to release memory alloc
  • Module._putPixel(img, x, y, val), where 0 <= val < 256
  • Module._getPixel(img, x, y) -> val
  • Module._extractFeature(img) to extract feature into an internal list rKeypoints
  • Module._backupKeypoints(index), where 0 <= index < 10, to save current internal rKeypoints into a cell at index.
  • Module._restoreKeypoints(index), to load the saved list assigning to internal rKeypoints
  • Module._getKeypointsN() to get current the number of key points in rKeypoints
  • Module._keypointBegin() to assign the first key point to cursor in rKeypoints
  • Module._keypointNext() to get next key point in rKeypoints
  • Module._keypointHasNext() to check if has next key point
  • Module._keypointOctave() _keypointLayer() _keypointR() _keypointC() _keypointScale() _keypointOri() _keypointDescriptor(index), where 0 <= index < 128 to get different key point attributes
  • Module._keypointsMatch(indexA, indexB), where 0 <= indexA, indexB < 10, to match to saved key point list in 2 cells; save to internal list rMatch
  • Module._getMatchN() to get the number of matched key points in rMatch
  • Module._matchBegin() to assign the first matched key point to cursor in rMatch
  • Module._matchNext() to get next matched key point in rMatch
  • Module._matchHasNext() to check if has next matched key point
  • Module._matchR1() _matchC1() _matchR2() _matchC2() to get matched key point position (c1, r1) -> (c2, r2); in ezSIFT, c represents x meanwhile r represents y in real image

after get ezsift.js,

  • put into dist folder;
  • create a folder local and put 1.png 2.png into the folder;
  • run python -m SimpleHTTPServer or python3 -m http.server
  • open http://127.0.0.1:8000/test.html (canvasContext.getImageData() do not work when directly open test.html in file protocol due to cross-origin)

wait for seconds, you will see a canvas drawing matched points between 2 images.