-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathImage.java
More file actions
101 lines (74 loc) · 3.22 KB
/
Image.java
File metadata and controls
101 lines (74 loc) · 3.22 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
package com.arrayfire;
class Image {
private native static long erode(long a, long b);
private native static long dilate(long a, long b);
private native static long medfilt(long a, int w, int h);
private native static long bilateral(long a, float space, float color);
private native static long meanshift(long a, float space, float color, int iter);
private native static long histogram(long a, int nbins);
private native static long hist_mnmx(long a, int nbins, float min, float max);
private native static long rotate(long a, float theta, boolean crop, int method);
private native static long resize1(long a, float scale, int method);
private native static long resize2(long a, float scalex, float scaley, int method);
private native static long resize3(long a, int height, int width, int method);
public static void erode(Array res, Array a, Array b) throws Exception {
long ref = erode(a.ref, b.ref);
res.set(ref);
}
public static void dilate(Array res, Array a, Array b) throws Exception {
long ref = dilate(a.ref, b.ref);
res.set(ref);
}
public static void medianfilter(Array res, Array a, int width, int height) throws Exception {
long ref = medfilt(a.ref, width, height);
res.set(ref);
}
public static void bilateral(Array res, Array a, float space, float color) throws Exception {
long ref = bilateral(a.ref, space, color);
res.set(ref);
}
public static void meanshift(Array res, Array a, float space, float color, int iterations) throws Exception {
long ref = meanshift(a.ref, space, color, iterations);
res.set(ref);
}
public static void histogram(Array res, Array a, int nbins) throws Exception {
long ref = histogram(a.ref, nbins);
res.set(ref);
}
public static void histogram(Array res, Array a, int nbins, float min, float max) throws Exception {
long ref = hist_mnmx(a.ref, nbins, min, max);
res.set(ref);
}
public static void rotate(Array res, Array a, float theta, boolean crop) throws Exception {
long ref = rotate(a.ref, theta, crop, 0);
res.set(ref);
}
public static void rotate(Array res, Array a, float theta, boolean crop, int method) throws Exception {
long ref = rotate(a.ref, theta, crop, method);
res.set(ref);
}
public static void resize(Array res, Array a, float scale) throws Exception {
long ref = resize1(a.ref, scale, 0);
res.set(ref);
}
public static void resize(Array res, Array a, float scale, int method) throws Exception {
long ref = resize1(a.ref, scale, method);
res.set(ref);
}
public static void resize(Array res, Array a, float scalex, float scaley) throws Exception {
long ref = resize2(a.ref, scalex, scaley, 0);
res.set(ref);
}
public static void resize(Array res, Array a, float scalex, float scaley, int method) throws Exception {
long ref = resize2(a.ref, scalex, scaley, method);
res.set(ref);
}
public static void resize(Array res, Array a, int height, int width) throws Exception {
long ref = resize3(a.ref, height, width, 0);
res.set(ref);
}
public static void resize(Array res, Array a, int height, int width, int method) throws Exception {
long ref = resize3(a.ref, height, width, method);
res.set(ref);
}
}