Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

aruco-marker

Package Overview
Dependencies
Maintainers
0
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aruco-marker

Library for generating Aruco marker images

  • 3.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
0
Created
Source

Generate SVG Aruco Marker Images with JavaScript

aruco-marker is a JavaScript library that can generate marker images (fiducials) for the Aruco augmented reality marker library. Aruco codes can be recognized by the original Aruco C++ library, or in the browser by js-aruco. aruco-marker generates images as SVG, making them easy to scale to any size or print out. There is also a custom HTML element allowing you to easily embed codes anywhere on a page.

NPM version

Demos

There are two demos that show off marker generation either directly or via the custom HTML element:

Usage

aruco-marker is available for use in the browser, or in NodeJS. It is installable as aruco-marker from NPM.

import { arucoToSVGString } from 'aruco-marker';

const svgImage = arucoToSVGString(155, '500px'); // the size is optional
document.getElementById('marker').innerHTML = svgImage;

See demos/index.html for a complete example.

Custom Element

aruco-marker is available for use in the browser, or in NodeJS. It is installable as aruco-marker from NPM.

<script src="https://unpkg.com/aruco-marker/element"></script>

<aruco-marker markerid="155" size="500px"></aruco-marker>

SVG to Canvas

While SVG images are very flexible and are perfect for most applications, you can use drawImage to draw an SVG image to an HTML Canvas in order to obtain an image data URL if you need a raster image.

Developing

First, install NodeJS however you like for your system (on macOS, I use brew install node).

Then check out and build the project:

git clone https://github.com/bhollis/aruco-marker
cd aruco-marker
npm ci
npm run demo

License

Copyright (c) 2014 Benjamin Hollis. MIT Licensed, see MIT-LICENSE.txt for details.

Keywords

FAQs

Package last updated on 26 Aug 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc