-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgaussian_blur.js
57 lines (56 loc) · 1.1 KB
/
gaussian_blur.js
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
module.exports = {
name: "gaussian_blur",
ns: "jsfeat",
async: true,
description: "Gaussian blur",
phrases: {
active: "Applying gaussian blur"
},
ports: {
input: {
src: {
title: "Source",
type: "function"
},
dest: {
title: "Destination",
async: true,
type: "function",
fn: function __DEST__(data, source, state, input, $, output, jsfeat) {
var r = function() {
jsfeat.imgproc.gaussian_blur($.src, $.dest, $.kernel_size, $.sigma)
output({
out: $.write('dest', $.dest)
});
}.call(this);
return {
state: state,
return: r
};
}
},
kernel_size: {
title: "Kernel Size",
type: "number",
"default": 0
},
sigma: {
title: "Sigma",
type: "number",
"default": 0
}
},
output: {
out: {
title: "Out",
type: "function"
}
}
},
dependencies: {
npm: {
jsfeat: require('jsfeat')
}
},
state: {}
}