Skip to content

Build Rodrigues in Javascript #15584

@frastlin

Description

@frastlin
System information (version)
  • OpenCV => 4.1.1
  • Operating System / Platform => Windows 64 Bit with Windows subsystem for Linux
  • Compiler => Emscripten
Detailed description

I would like the Rodrigues function to be built in Javascript.

Steps to reproduce

Insert the following code into the bottom of test_calib3d.js, compile OpenCV.js and the following test fails.

QUnit.test('Rodrigues', async function(assert) {
const rvec0 = cv.matFromArray(1, 3, cv.CV_64F, [1,1,1])
let rMat0 = new cv.Mat()
let rvec1 = new cv.Mat()

cv.Rodrigues(rvec0, rMat0)

assert.ok(rMat0.data64F.length == 9)
assert.ok(0.23 > rMat0.data64F[0] > 0.22)

cv.Rodrigues(rMat0, rvec1)

assert.ok(rvec1.data64F.length == 3)
assert.ok(1.01 > rvec1.data64F[0] > 0.9)
});

All tests should pass.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions