2

Hello guys) I need function solvePnP from opencv in opencv.js. But I can't find version with solvepnp included. Could you, please, help me to find opencv.js version with solvePnP or build it? Do you know where I can find solvePnP in other js library?

1 Answers1

2

There are a few options. The easiest is to install mjyc's fork using npm:

$ npm i @mjyc/opencv.js

or install directly version 4.0.1 directly from the GitHub releases page.

In your js:

const opencv = require('@mjyc/opencv.js');
opencv.solvePnP();

Please note that mjyc's fork is behind (4.0.1) OpenCV's own repository, which is currently at 4.5.1.

Alternatively you can install OpenCV by downloading it from the GitHub release page, then install one of the javascript bindings:

  1. peterbraden's Node bindings

  2. justadudewhohacks' Node bindings

There are a few others available on npmjs.com.

Codebling
  • 6,340
  • 2
  • 28
  • 52