mirror of
https://github.com/opencv/opencv.git
synced 2026-07-31 00:03:03 +04:00
Merge pull request #15275 from ilbalance:js_inpaint
* in embindgen.py added inpaint function * added test for inpaint function and fixed function in build_js * fixed test for inpaint function * rotate deleted, build_js.py fixed
This commit is contained in:
committed by
Alexander Alekhin
parent
290da93845
commit
0b5d0b83be
@@ -102,5 +102,15 @@ QUnit.test('test_photo', function(assert) {
|
||||
// let ldr = new cv.Mat();
|
||||
// let retval = tonemap.process(hdr, ldr);
|
||||
}
|
||||
|
||||
});
|
||||
// Inpaint
|
||||
{
|
||||
let src = new cv.Mat(100, 100, cv.CV_8UC3, new cv.Scalar(127, 127, 127, 255));
|
||||
let mask = new cv.Mat(100, 100, cv.CV_8UC1, new cv.Scalar(0, 0, 0, 0));
|
||||
let dst = new cv.Mat();
|
||||
cv.line(mask, new cv.Point(10, 50), new cv.Point(90, 50), new cv.Scalar(255, 255, 255, 255),5);
|
||||
cv.inpaint(src, mask, dst, 3, cv.INPAINT_TELEA);
|
||||
assert.equal(dst.rows, 100);
|
||||
assert.equal(dst.cols, 100);
|
||||
assert.equal(dst.channels(), 3);
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user