{"_id":"@ad113n/opencv-wasm","_rev":"1-3f38ec2919ad028d2f80c93933bfe2f8","name":"@ad113n/opencv-wasm","dist-tags":{"latest":"4.8.0"},"versions":{"4.7.0":{"name":"@ad113n/opencv-wasm","description":"OpenCV.js built with build_wasm flag","keywords":["opencv","wasm"],"version":"4.7.0","main":"opencv.js","exports":{".":{"default":"./opencv.js"},"./package.json":"./package.json"},"repository":{"type":"git","url":"git+https://github.com/opencv/opencv.git","directory":"packages/opencv"},"author":{"name":"CPlus"},"license":"ISC","gitHead":"40f3b3fd21a1f793df0104255d736ac74f1cdba5","bugs":{"url":"https://github.com/opencv/opencv/issues"},"homepage":"https://github.com/opencv/opencv#readme","_id":"@ad113n/opencv-wasm@4.7.0","_nodeVersion":"16.17.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-2HaXzHnlzrMUbgA68p8M2FWKIths7qWN4XcJpQocW+HM5KB6i+kQtY86ZoyoI1ufev9/lw/tNSt79hgliWe7oA==","shasum":"6867d8be3d5e701b44a02902e157543f5abc5210","tarball":"https://registry.npmjs.org/@ad113n/opencv-wasm/-/opencv-wasm-4.7.0.tgz","fileCount":2,"unpackedSize":9377440,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDDludaLVzMV/y6R9ShLm3HIK4IS4Vw8zmL38vhzCCnCgIhAOzjAKoyesFUIN7QwqdvLisySlwdHS/5Jf4Cxb0FRUqI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/mBRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp3iQ//bC61L9k/3j+AZJcLEK6b5AGNvdDABeXE7wmsltSuMmM0Wh+s\r\nrtxooyB9CjChthjS6+JaBh9mdmcfwBuc9YB864MFLDWgjBwhE2B9jxjwNuiA\r\nNLzda9wbZrfZ+UOx7izkO+yskKkvFAdBKySUmhBiEfCVLyo8d75jWyUjLfgj\r\nhh2MkQ+KqErZODhSArkUPKewpPoh1ro96UhBu0OW5XElU1Od44Bl7q8rSBfv\r\nC9tEv2u2zrKmzPGK9v93bsqoGHK7jrraTwY5SqDzA/CNVySOxlgdBEB8u9Cf\r\ncE+GD0z8jBzYUEdzGMUgezqDgUZ7YKtHud9DNnYu2QMmoFvjzP1CFKFCVpKd\r\naFaGYq5tb+hCSpmOhQ4UZZsSFQXgEasmf7muGB7mMuYwrW3/4ZJrq9tlauiZ\r\n8cpO09TOq6STw6sffSu1qTsznGXucOS+lxUbOQeSZi3a5ovjD/0Z7xdE0wNd\r\nhl4QYOj3y7BeFC1Rw+wxpxqRe/E/L0Fer0BSQcTLxK/KVwrxTBr+wNF+S7kZ\r\nH8v0yicOJuqs4EAZ79k02+cUEcEfRpbqZivLivcz2ybpcSMAEyLLbuvlUUB8\r\nvdHDbeQkjLlshKYr0afh3hvbJOsz9uCDu6IUpBMfy3jHW4IEtqpJpgwY6znL\r\n6+XgvNE9rjmfm/0IVm2eCVOjiroFIqtZB8M=\r\n=FO+O\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"ad113n","email":"ad113n@att.com"},"directories":{},"maintainers":[{"name":"ad113n","email":"ad113n@att.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opencv-wasm_4.7.0_1677615184922_0.25376195296606907"},"_hasShrinkwrap":false},"4.8.0":{"name":"@ad113n/opencv-wasm","version":"4.8.0","description":"Precompiled OpenCV 4.8.0 to JavaScript + WebAssembly for node.js environment","main":"index.js","directories":{"example":"examples"},"scripts":{"test":"npx mocha ./test/test.js"},"repository":{"type":"git","url":"git+https://echamudi@github.com/echamudi/opencv-wasm.git"},"author":{"name":"Ezzat Chamudi"},"license":"BSD-3-Clause","bugs":{"url":"https://github.com/echamudi/opencv-wasm/issues"},"homepage":"https://github.com/echamudi/opencv-wasm#readme","devDependencies":{"@types/mocha":"^8.2.0","@types/node":"^14.0.1","chai":"^4.2.0","jimp":"^0.10.2","js-beautify":"^1.13.4","mocha":"^7.1.2","pixelmatch":"^5.2.0"},"types":"./index.d.ts","gitHead":"49909153c67c29ee7535598fd55e256ffec34999","_id":"@ad113n/opencv-wasm@4.8.0","_nodeVersion":"18.16.0","_npmVersion":"9.5.1","dist":{"integrity":"sha512-zFf8p362Il2ytUQhMSj0kKEnal86JjpIPfx1Lr9/gy322yDfmK3otqIx2LxNBWeziJ31C3QvQEGxGiKgNOvf3Q==","shasum":"a32e3e017e0317ef63402a60a850009be8f175d0","tarball":"https://registry.npmjs.org/@ad113n/opencv-wasm/-/opencv-wasm-4.8.0.tgz","fileCount":11,"unpackedSize":814459,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIB8iGDksQOAukObCAEfNL+7S+BH4DEFww2bvdQap5hsgAiBlwTQiMMjQ9V2k6jI6shswT2XQplAwjUO1gf/VqYq9BA=="}]},"_npmUser":{"name":"ad113n","email":"ad113n@att.com"},"maintainers":[{"name":"ad113n","email":"ad113n@att.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/opencv-wasm_4.8.0_1690488345896_0.5624521122401822"},"_hasShrinkwrap":false}},"time":{"created":"2023-02-28T20:13:04.854Z","4.7.0":"2023-02-28T20:13:05.172Z","modified":"2023-07-27T20:05:46.245Z","4.8.0":"2023-07-27T20:05:46.059Z"},"maintainers":[{"name":"ad113n","email":"ad113n@att.com"}],"description":"Precompiled OpenCV 4.8.0 to JavaScript + WebAssembly for node.js environment","homepage":"https://github.com/echamudi/opencv-wasm#readme","repository":{"type":"git","url":"git+https://echamudi@github.com/echamudi/opencv-wasm.git"},"author":{"name":"Ezzat Chamudi"},"bugs":{"url":"https://github.com/echamudi/opencv-wasm/issues"},"license":"BSD-3-Clause","readme":"# OpenCV-Wasm\n\n[![Build Status](https://travis-ci.org/echamudi/opencv-wasm.svg?branch=master)](https://travis-ci.org/echamudi/opencv-wasm)\n\nPrecompiled OpenCV to JavaScript + WebAssembly for node.js and deno environment. 🦕\n\nIn this Wasm-compiled OpenCV, there's no need to have OpenCV installed in the machine. The entire OpenCV library is already inside this package (`opencv.js` and `opencv.wasm`).\n\nThis module has zero dependencies.\n\n## Examples\n\n| Code | Input | Output |\n|---|---|---|\n| [dilation.js](https://github.com/echamudi/opencv-wasm/blob/master/examples/dilation.js) (node)| ![image sample 1](https://github.com/echamudi/opencv-wasm/blob/master/examples/input/image-sample-1.jpg?raw=true) | ![dilation](https://github.com/echamudi/opencv-wasm/blob/master/examples/expected-output/dilation.png?raw=true) |\n| [templateMatching.js](https://github.com/echamudi/opencv-wasm/blob/master/examples/templateMatching.js) (node) | source:<br>![image sample 2](https://github.com/echamudi/opencv-wasm/blob/master/examples/input/image-sample-2.png?raw=true) <br>template:<br> ![image sample 2 template](https://github.com/echamudi/opencv-wasm/blob/master/examples/input/image-sample-2-template.png?raw=true) | ![template matching](https://github.com/echamudi/opencv-wasm/blob/master/examples/expected-output/template-matching.png?raw=true) |\n\n## Installation\n\n### node\n\n```\nnpm install opencv-wasm\n```\nCode example:\n```js\nconst { cv, cvTranslateError } = require('opencv-wasm');\n\nlet mat = cv.matFromArray(2, 3, cv.CV_8UC1, [1, 2, 3, 4, 5, 6]);\nconsole.log('cols =', mat.cols, '; rows =', mat.rows);\nconsole.log(mat.data8S);\n\ncv.transpose(mat, mat);\nconsole.log('cols =', mat.cols, '; rows =', mat.rows);\nconsole.log(mat.data8S);\n\n/*\ncols = 3 ; rows = 2\nInt8Array(6) [ 1, 2, 3, 4, 5, 6 ]\ncols = 2 ; rows = 3\nInt8Array(6) [ 1, 4, 2, 5, 3, 6 ]\n*/\n```\n\n### deno\n\n```ts\nimport { cv, cvTranslateError } from 'https://deno.land/x/opencv@v4.3.0-10/mod.ts';\n// Change the @<version> with the latest or any version you desire.\n// Check the available versions here: https://deno.land/x/opencv.\n```\nCode example:\n```ts\nimport { cv, cvTranslateError } from 'https://deno.land/x/opencv@v4.3.0-10/mod.ts';\n\nlet mat = cv.matFromArray(2, 3, cv.CV_8UC1, [1, 2, 3, 4, 5, 6]);\nconsole.log('cols =', mat.cols, '; rows =', mat.rows);\nconsole.log(mat.data8S);\n\ncv.transpose(mat, mat);\nconsole.log('cols =', mat.cols, '; rows =', mat.rows);\nconsole.log(mat.data8S);\n\n/*\ncols = 3 ; rows = 2\nInt8Array(6) [ 1, 2, 3, 4, 5, 6 ]\ncols = 2 ; rows = 3\nInt8Array(6) [ 1, 4, 2, 5, 3, 6 ]\n*/\n```\n\n## Usage\n\nBecause this module is using the same code as the official OpenCV.js for the web, you can use the same documentation at the web: https://docs.opencv.org/4.3.0/d5/d10/tutorial_js_root.html\n\nThere are some minor initialization changes, because this module will be loaded synchronously instead of the OpenCV's default (asynchronously). \n\nYou can check the files inside [examples](https://github.com/echamudi/opencv-wasm/tree/master/examples) folder as reference on how to initialize, loading images, and saving images.\n\n## Error Handling\n\nBy default, mistakes in code will produce error code. You can use the following snippet to translate the error code into meaningful statement from OpenCV.\n\n```js\nconst { cv, cvTranslateError } = require('opencv-wasm');\n\ntry {\n    // Your OpenCV code\n} catch (err) {\n    console.log(cvTranslateError(cv, err));\n}\n```\n\n## Versioning\n\nThis npm module uses the following versioning number:\n```\n<opencv version>-<this module version>\n```\nFor Example\n```\n4.3.0-9\nOpenCV version 4.3.0\nOpenCV-Wasm Module version 9\n```\n\n## Development\n\n### Building\n\nRun the following script on macOS or Linux (tested on Ubuntu). You need docker on the system.\n\n```\nnpm install\n(cd ./utils && sh ./build.sh)\n(cd utils && node generateCvProps.js)\n```\n\n### Testing\n\nAfter completing the build script, you can run the test provided by OpenCV, and the test from this repo.\n\n```sh\n# OpenCV's test\n(cd ./build_wasm_test/bin && npm install)\n(cd ./build_wasm_test/bin && node tests.js)\n\n# This repo's test\nnpm test\n```\n\n## Authors\n\n* **Ezzat Chamudi** - [echamudi](https://github.com/echamudi)\n\nSee also the list of [contributors](https://github.com/echamudi/opencv-wasm/graphs/contributors) who participated in this project.\n\n## License\n\nCopyright © 2020 [Ezzat Chamudi](https://github.com/echamudi) and [OpenCV-Wasm Project Authors](https://github.com/echamudi/opencv-wasm/graphs/contributors)\n\nOpenCV-Wasm code is licensed under [BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause). Images, logos, docs, and articles in this project are released under [CC-BY-SA-4.0](https://creativecommons.org/licenses/by-sa/4.0/legalcode).\n\n[OpenCV License](https://opencv.org/license/).\n\nLibraries, dependencies, and tools used in this project are tied with their licenses.\n","readmeFilename":"README.md"}