{"_id":"@deluksic/opencv-calibration-wasm","_rev":"8-9216d42e58f5e1a5313e2977dc468f68","name":"@deluksic/opencv-calibration-wasm","dist-tags":{"latest":"0.2.5"},"versions":{"0.1.0":{"name":"@deluksic/opencv-calibration-wasm","version":"0.1.0","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.1.0","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"cf0f4ace539656f2867a5ff1735afc2ade2a643f","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.1.0.tgz","fileCount":7,"integrity":"sha512-56K0D2Inte8LZTwX7a0esKhwmnFDo6WpsPu72ApMm+mtuO1iwfL9+EX0EMWDo8PUFPLZx0bakMwZmYJ+D7a1Cg==","signatures":[{"sig":"MEUCIDvV2q6g7gEsDNlB2HFWzTvv4Y8FxKRc6IZyDVCaDuQRAiEAgTXpdpIq5qaosQmtAAQv8mfW3mlJP4rDNAzxSnkquIA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1651232},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs"},"./wasm/calibrate.mjs":"./dist/wasm/calibrate.mjs","./wasm/calibrate.wasm":"./dist/wasm/calibrate.wasm"},"scripts":{"build":"npm run prepare:dist && npm run build:wasm","example":"node ./examples/run-fixture.mjs","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh","prepare:dist":"bash ./scripts/prepare-dist.sh","prepublishOnly":"npm run build"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.1.0_1777129119948_0.4403242220904173","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@deluksic/opencv-calibration-wasm","version":"0.1.1","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.1.1","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"e49ccb935e1aa1086ea80ab8f51acaf087f3285d","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.1.1.tgz","fileCount":7,"integrity":"sha512-hx1D7Jb5kYTMiLvf/4fD/QPpqUtgK5v2HXQQNTuABcgAbBWPJN6SZWDyCIFXqTkuJziChWAGAk6SUQONvvLlag==","signatures":[{"sig":"MEQCIHTJEO2E3YITvd9ET4GhLuF21dHoJ8GCWopxaV7uIqpKAiBgg4zzYBdhZVTF4meZQid3BPKGS+MtYwzcSSpZRxMOBg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1857760},"main":"./dist/index.mjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.mjs"},"./wasm/calibrate.mjs":"./dist/wasm/calibrate.mjs","./wasm/calibrate.wasm":"./dist/wasm/calibrate.wasm"},"gitHead":"dbf76a45602759dfb4850632b5e2143734a18a96","scripts":{"build":"npm run prepare:dist && npm run build:wasm","example":"node ./examples/run-fixture.mjs","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh","prepare:dist":"bash ./scripts/prepare-dist.sh","prepublishOnly":"npm run build"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.1.1_1777131921006_0.006177981898051854","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.0","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.2.0","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"bd21cda46f3f4bbba6dfa362dfb174caeab6c926","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.0.tgz","fileCount":7,"integrity":"sha512-Lkr5ITPpv6veqOkFqtMe1rAXpDPlUpIAxb5AVQTe3vz1mZwItNqqn/96H1pdJwdDIuo8cF2VE5mHlCfnUWpsYg==","signatures":[{"sig":"MEUCIQCcxiZIi9ykDUzvpqWTVTXRTtZ10j6FVuX/0yEM+Jf0kgIgLGgfbu/VCaNJPbusaBJMTCSzOnLnUB4JsjXcLctRQuM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1860260},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/calibrate.mjs":"./dist/wasm/calibrate.mjs","./wasm/calibrate.wasm":"./dist/wasm/calibrate.wasm"},"gitHead":"4f6d96afcc5f7fbe7db0fdeddaba0b8cf4f93acb","scripts":{"example":"node ./examples/run-fixture.mjs","build:ts":"rm -f dist/index.js dist/index.d.ts dist/index.mjs && tsc -p tsconfig.json","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.2.0_1777140102319_0.48148650254056946","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.1","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.2.1","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"66b2dbf7948acaec472a1dc226b49bb0c0d41935","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.1.tgz","fileCount":7,"integrity":"sha512-sD/u8sxutuUFK/sBbiNF0NDYzyAgDamfMIhIK2mp4QJIxH505KfeABwu+vOSDiBiS44drG4s6PlHnTDmJoaYhw==","signatures":[{"sig":"MEQCIFig/C0m8AOvwPtIXta+h5ous9riLDGxg8yBjO+YGTcnAiAbpZa873EDQhOXO+7OE+LutwQfi2i5Qc0W8gTmfUfNIA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1859820},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./dist/wasm/*"},"gitHead":"080cf7a2b5e7869430b9e525b47d7bc5913dd6a4","scripts":{"build":"pnpm build:ts && pnpm build:wasm","example":"node ./examples/run-fixture.js","build:ts":"rm -f dist/index.js dist/index.d.ts && tsc -p tsconfig.json","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.2.1_1777143029216_0.016072544137922584","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.2","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.2.2","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"294cc9744e92f3437746761f9dcf526921b4e1d0","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.2.tgz","fileCount":7,"integrity":"sha512-FSqzrm8NsqbXI6R5ouawbNGM70Yr/Eve/AvHw/pAXCvXH/1UZy6gsFCgsCd58NOLTbluJiPD3MLFmLHLpXBvtw==","signatures":[{"sig":"MEUCIDXaxoSpGCCNEqfp+HoEu9aety2HLtLrUsG1z/GAcLtWAiEAhuEp8dJo8fSMLH3AkAhrw1aqkWBzg7/mQiBYqxPRcis=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1980423},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./dist/wasm/*"},"gitHead":"cabafabe690dd56357be44f1a3b31837d5ccfae4","scripts":{"build":"pnpm build:ts && pnpm build:wasm","example":"node ./examples/run-fixture.mjs","build:ts":"rm -f dist/index.js dist/index.d.ts && tsc -p tsconfig.json","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.2.2_1777150981763_0.30954024054220874","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.3","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.2.3","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"50138bf49830dac06aee0f73f5273824d5c26b10","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.3.tgz","fileCount":7,"integrity":"sha512-/l3YhW+EkKc8LKZ69TCQdIk8YN3eIuJBPJKjhRVWq7zF79KrLc/7yAodDQju6NV6vov3gkVzlKJ7fBirRhldHA==","signatures":[{"sig":"MEUCIB6qw2Htlup1/c/Cfrp6TZmzMyACUDP24bPWkoTmWZPqAiEAgAHcBz59cCtTJf9e/TY5/LuQjA1/VAC5oSjqbhFPqB0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1980367},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./dist/wasm/*"},"gitHead":"71763327664a3e477a4792a641191dfcce5c2c11","scripts":{"build":"pnpm build:ts && pnpm build:wasm","example":"node ./examples/run-fixture.js","build:ts":"rm -f dist/index.js dist/index.d.ts && tsc -p tsconfig.json","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.2.3_1777152226520_0.8243202448074411","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.4","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","_id":"@deluksic/opencv-calibration-wasm@0.2.4","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"dist":{"shasum":"6f6e0f2c9032861f80928c5567fafdb82dff4c86","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.4.tgz","fileCount":7,"integrity":"sha512-vrYdFka5uNRHul/kageecyk/Ie6eLxx0gnff8SJoJeEjvG7q5hbowu/ZLXh2Ym+/XCIt30ci+fMDwVzYv1cbLg==","signatures":[{"sig":"MEYCIQC+xX7u5fMm2g54mMKScHV7cjh6VEpBbRcUr1iBVS39pQIhAIfwYmgiqCdlqo69E65hxLL5fkXfv7/GMY2FPZiAq96/","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1979292},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./dist/wasm/*"},"gitHead":"3aa4ed05b44247a4be5d191dcee954f0a3a996ec","scripts":{"build":"pnpm build:ts && pnpm build:wasm","example":"node ./examples/run-fixture.js","build:ts":"rm -f dist/index.js dist/index.d.ts && tsc -p tsconfig.json","build:wasm":"bash ./scripts/build-wrapper.sh","build:opencv":"bash ./scripts/build-opencv.sh"},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"_npmVersion":"10.9.4","description":"Browser-ready OpenCV calibrateCameraRO WASM package","directories":{},"_nodeVersion":"22.21.1","_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.9.3"},"_npmOperationalInternal":{"tmp":"tmp/opencv-calibration-wasm_0.2.4_1777154646906_0.7943711054781917","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@deluksic/opencv-calibration-wasm","version":"0.2.5","description":"Browser-ready OpenCV calibrateCameraRO WASM package","type":"module","main":"./dist/index.js","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./wasm/*":"./dist/wasm/*"},"scripts":{"build:ts":"rm -f dist/index.js dist/index.d.ts && tsc -p tsconfig.json","build:opencv":"bash ./scripts/build-opencv.sh","build:wasm":"bash ./scripts/build-wrapper.sh","build":"pnpm build:ts && pnpm build:wasm","example":"node ./examples/run-fixture.js"},"keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"license":"MIT","devDependencies":{"typescript":"^5.9.3"},"_id":"@deluksic/opencv-calibration-wasm@0.2.5","gitHead":"c6fcac078df8d6eade422bd36188ce88463dba1f","_nodeVersion":"22.21.1","_npmVersion":"10.9.4","dist":{"integrity":"sha512-YLAgkFQaior8VUZLgrqw1ugy1+mGu2/aV8QJ3ddE/+WuJLLkUZQEQIviWU2v30a9w3moiM/EBPy1XmzXQtJRQQ==","shasum":"b8a7da915683c7fba91cf4c7f75091fd15e9ba81","tarball":"https://registry.npmjs.org/@deluksic/opencv-calibration-wasm/-/opencv-calibration-wasm-0.2.5.tgz","fileCount":7,"unpackedSize":1473317,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIAeb1j4GXCM9dSuokR8gvPonwNMevbMzdek55HsFDaeAAiAo3AcqmUEMwOV4oZ+NHtAtFyMQapAkXAZSMUTC2BcMbg=="}]},"_npmUser":{"name":"deluksic","email":"deluksic@gmail.com"},"directories":{},"maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/opencv-calibration-wasm_0.2.5_1777814497442_0.2173462115248661"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-25T14:58:39.859Z","modified":"2026-05-03T13:21:37.786Z","0.1.0":"2026-04-25T14:58:40.176Z","0.1.1":"2026-04-25T15:45:21.216Z","0.2.0":"2026-04-25T18:01:42.592Z","0.2.1":"2026-04-25T18:50:29.459Z","0.2.2":"2026-04-25T21:03:02.055Z","0.2.3":"2026-04-25T21:23:46.827Z","0.2.4":"2026-04-25T22:04:07.135Z","0.2.5":"2026-05-03T13:21:37.634Z"},"license":"MIT","keywords":["opencv","wasm","camera-calibration","calibrateCameraRO"],"description":"Browser-ready OpenCV calibrateCameraRO WASM package","maintainers":[{"name":"deluksic","email":"deluksic@gmail.com"}],"readme":"# OpenCV Calibration WASM Build\n\nStandalone npm package for browser camera calibration using OpenCV `calibrateCameraRO` (and related functions) compiled to WebAssembly.\n\n## API\n\nExports:\n\n- `initCalibrator({ wasmPath })` — loads the WASM module and returns a **calibrator**.\n- `CALIBRATION_FLAGS` — OpenCV-compatible bitmasks.\n\nThe returned **calibrator** object:\n\n- `calibrator.calibrateCameraRO(input)` — intrinsics, extrinsics, and `newObjPoints` when object-release is active.\n- `calibrator.solvePnP(input)` — estimates per-frame pose (`rvec`, `tvec`) from 2D/3D correspondences.\n- `calibrator.projectPoints(input)` — projects 3D points to image space.\n- `calibrator.module` — low-level Emscripten module (advanced use only).\n\nThe wrapper stays close to OpenCV: you pass multiview `objectPoints` and `imagePoints`; calibration optimizes the joint model OpenCV uses.\nEach call to `initCalibrator` creates an independent calibrator instance bound to the provided `wasmPath`.\n\n## Basic usage\n\n```ts\nimport {\n  initCalibrator,\n  CALIBRATION_FLAGS\n} from \"@deluksic/opencv-calibration-wasm\";\nimport CALIBRATE_WASM_PATH from \"@deluksic/opencv-calibration-wasm/wasm/calibrate.wasm?url\";\n\nconst calibrator = await initCalibrator({ wasmPath: CALIBRATE_WASM_PATH });\n\nconst calib = calibrator.calibrateCameraRO({\n  objectPoints,\n  imagePoints,\n  imageSize: { width, height },\n  iFixedPoint: 1,\n  flags: CALIBRATION_FLAGS.CALIB_RATIONAL_MODEL,\n  criteria: { type: 3, maxCount: 30, epsilon: 1e-3 },\n  maxDistCoeffs: 14\n});\n\nconst reproj = calibrator.projectPoints({\n  objectPoints: Array.from({ length: calib.viewCount }, () => calib.newObjPoints),\n  rvecs: calib.rvecs,\n  tvecs: calib.tvecs,\n  cameraMatrix: calib.cameraMatrix,\n  distortionCoefficients: calib.distortionCoefficients\n});\n\nconst pose = calibrator.solvePnP({\n  objectPoints: objectPointsForOneFrame,\n  imagePoints: imagePointsForOneFrame,\n  cameraMatrix: calib.cameraMatrix,\n  distortionCoefficients: calib.distortionCoefficients\n});\n```\n\n## Calibration flags\n\nUse `CALIBRATION_FLAGS` instead of raw hex literals:\n\n- `CALIB_USE_INTRINSIC_GUESS`\n- `CALIB_FIX_ASPECT_RATIO`\n- `CALIB_FIX_PRINCIPAL_POINT`\n- `CALIB_ZERO_TANGENT_DIST`\n- `CALIB_FIX_FOCAL_LENGTH`\n- `CALIB_FIX_K1` ... `CALIB_FIX_K6`\n- `CALIB_RATIONAL_MODEL`\n- `CALIB_THIN_PRISM_MODEL`\n- `CALIB_FIX_S1_S2_S3_S4`\n- `CALIB_TILTED_MODEL`\n- `CALIB_FIX_TAUX_TAUY`\n- `CALIB_FIX_TANGENT_DIST`\n\n## Important OpenCV behavior\n\nWhen calibration runs in object-release mode (`iFixedPoint > 0` and `< pointsPerView - 1`):\n\n- The optimized model includes `newObjPoints`, not only camera parameters.\n- Reprojection should use those optimized object points for consistency with solved poses.\n- OpenCV asserts if `CALIB_USE_INTRINSIC_GUESS` is combined with object-release mode in this path. The wrapper throws a clear JS error for this case.\n\n## Repository layout\n\n- `src/native/wrapper.cpp` - C++ WASM wrapper\n- `src/index.ts` - high-level TypeScript API\n- `scripts/build-opencv.sh` - macOS reproducible OpenCV build\n- `scripts/build-wrapper.sh` - WASM wrapper build\n- `dist/` - package output for publish\n\n## Prerequisites (macOS)\n\n- `third_party/opencv` present\n- emsdk available via one of:\n  - `EMSDK` environment variable\n  - `third_party/emsdk`\n  - `emcmake` on `PATH`\n- `cmake` and `ninja`\n\n## Setup emsdk from `third_party/emsdk`\n\nIf you use the vendored emsdk, install and activate it once:\n\n```bash\ncd third_party/emsdk\n./emsdk install latest\n./emsdk activate latest\nsource ./emsdk_env.sh # or set PATH as instructed\n```\n\n## Build\n\n```bash\npnpm build:ts\npnpm build:opencv\npnpm build:wasm\n```\n\n`build:ts` removes `dist/index.js`, `dist/index.d.ts`, then runs `tsc`. It does not touch `dist/wasm/`.\n\nArtifacts:\n\n- `dist/index.js`\n- `dist/index.d.ts`\n- `dist/wasm/calibrate.js`\n- `dist/wasm/calibrate.wasm`\n\n## Example usage (Node smoke test)\n\n```bash\npnpm example\n```\n\n## Browser / Vite\n\nUse Vite's `?url` import for the `.wasm` file and pass that URL to `initCalibrator`.\n\n```ts\nimport { initCalibrator } from \"@deluksic/opencv-calibration-wasm\";\nimport CALIBRATE_WASM_PATH from \"@deluksic/opencv-calibration-wasm/wasm/calibrate.wasm?url\";\n\nconst calibrator = await initCalibrator({ wasmPath: CALIBRATE_WASM_PATH });\nconst result = calibrator.calibrateCameraRO(input);\n```\n\nProvide the `.wasm` URL to `initCalibrator({ wasmPath })` (for example via `?url` in Vite).\n","readmeFilename":"README.md"}