
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
js-aruco is a port to JavaScript of the ArUco library by jcmellado. This module adapts that browser library slightly to work in Node.js.
ArUco is a minimal library for Augmented Reality applications based on OpenCV.
Create an AR.Detector object:
var AR = require('js-aruco').AR;
var detector = new AR.Detector();
Call detect function:
var markers = detector.detect(imageData);
markers result will be an array of AR.Marker objects with detected markers.
AR.Marker objects have two properties:
id: Marker id.corners: 2D marker corners.imageData argument must be a valid ImageData canvas object. The pixel suite of modules may be helpful for constructing these in Node.
Create an POS.Posit object:
var POS = require('js-aruco').POS1;
var posit = new POS.Posit(modelSize, canvas.width);
modelSize argument must be the real marker size (millimeters).
Call pose function:
var pose = posit.pose(corners);
corners must be centered on canvas:
var corners = marker.corners;
for (var i = 0; i < corners.length; ++ i){
var corner = corners[i];
corner.x = corner.x - (canvas.width / 2);
corner.y = (canvas.height / 2) - corner.y;
}
pose result will be a POS.Pose object with two estimated pose (if any):
bestError: Error of the best estimated pose.bestRotation: 3x3 rotation matrix of the best estimated pose.bestTranslation: Translation vector of the best estimated pose.alternativeError: Error of the alternative estimated pose.alternativeRotation: 3x3 rotation matrix of the alternative estimated pose.alternativeTranslation: Translation vector of the alternative estimated pose.Note: POS namespace can be taken from require('js-aruco').POS1 or .POS2.
FAQs
JS port of ArUco AR marker library
We found that js-aruco demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.