forked from justadudewhohacks/opencv4nodejs
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathximgprocTests.js
More file actions
38 lines (34 loc) · 918 Bytes
/
Copy pathximgprocTests.js
File metadata and controls
38 lines (34 loc) · 918 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
const cv = global.dut;
const {
generateAPITests,
assertMetaData,
} = global.utils;
module.exports = () => {
describe('guidedFilter', () => {
if (!cv.xmodules.ximgproc) {
it('compiled without ximgproc');
return;
}
const getDut = () => new cv.Mat(100, 100, cv.CV_8UC3);
const guide = new cv.Mat(100, 100, cv.CV_8UC3);
const radius = 3;
const eps = 100;
const ddepth = -1;
generateAPITests({
getDut,
methodName: 'guidedFilter',
methodNameSpace: 'Mat',
getRequiredArgs: () => ([
guide,
radius,
eps
]),
getOptionalArgs: () => ([
ddepth
]),
expectOutput: (res) => {
assertMetaData(res)(100, 100, cv.CV_8UC3);
}
});
});
}