forked from dlbeer/quirc
-
Notifications
You must be signed in to change notification settings - Fork 2
QR decoder library - For WebAssembly
License
mdchaney/quirc.wasm
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Quirc ===== QR codes are a type of high-density matrix barcodes, and quirc is a library for extracting and decoding them from images. It has several features which make it a good choice for this purpose: * It is fast enough to be used with realtime video: extracting and decoding from VGA frame takes about 50 ms on a modern x86 core. * It has a robust and tolerant recognition algorithm. It can correctly recognise and decode QR codes which are rotated and/or oblique to the camera. It can also distinguish and decode multiple codes within the same image. * Really fast - works on any modern phone, tablet, or laptop or desktop. * BSD-licensed, with almost no restrictions regarding use and/or modification. Background ---------- This distribution is based on the original quirc from Daniel Beer at: https://github.com/dlbeer/quirc as well as Joshua Koo's modifications for Emscripten at: https://github.com/zz85/quirc.js Joshua's branch has fallen behind the original, and some of the changes seem significant, so it's worth updating. Additionally, minor changes in Emscripten have caused the build to fail. Finally, WebAssembly is popular enough now to be a better build target. Building -------- You must have Emscripten installed and available in your path. Then, just use: % cd wasm % node build.js You will have quirc.js and quirc.wasm. The js file is a loader for the wasm. Note that these files already exist in the repository in the "wasm/test" directory. I've also included a simple web worker that will load the code and make it easy to decode QR codes in a separate thread. To test, simply start a web server in the test directory and browse to the "test.html" page. A simple web server is available if you have Python installed: % python -m SimpleHTTPServer 8080 Then, simply browse to: http://127.0.0.1:8080/test.html QR codes should be easily readable. Copyright --------- Copyright (C) 2010-2012 Daniel Beer <<[email protected]>> Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
About
QR decoder library - For WebAssembly
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published
Languages
- C 72.5%
- JavaScript 22.6%
- Makefile 2.3%
- C++ 2.0%
- HTML 0.6%