mirror of
https://github.com/opencv/opencv.git
synced 2025-08-06 06:26:29 +08: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:
parent
290da93845
commit
0b5d0b83be
@ -145,7 +145,7 @@ features2d = {'Feature2D': ['detect', 'compute', 'detectAndCompute', 'descriptor
|
||||
|
||||
photo = {'': ['createAlignMTB', 'createCalibrateDebevec', 'createCalibrateRobertson', \
|
||||
'createMergeDebevec', 'createMergeMertens', 'createMergeRobertson', \
|
||||
'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard'],
|
||||
'createTonemapDrago', 'createTonemapMantiuk', 'createTonemapReinhard', 'inpaint'],
|
||||
'CalibrateCRF': ['process'],
|
||||
'AlignMTB' : ['calculateShift', 'shiftMat', 'computeBitmaps', 'getMaxBits', 'setMaxBits', \
|
||||
'getExcludeRange', 'setExcludeRange', 'getCut', 'setCut'],
|
||||
|
@ -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);
|
||||
}
|
||||
});
|
Loading…
Reference in New Issue
Block a user