Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Tetragramm
GitHub Repository: Tetragramm/opencv
Path: blob/master/modules/imgproc/misc/java/test/Subdiv2DTest.java
16363 views
1
package org.opencv.test.imgproc;
2
3
import org.opencv.core.MatOfFloat6;
4
import org.opencv.core.Point;
5
import org.opencv.core.Rect;
6
import org.opencv.imgproc.Subdiv2D;
7
import org.opencv.test.OpenCVTestCase;
8
9
public class Subdiv2DTest extends OpenCVTestCase {
10
11
protected void setUp() throws Exception {
12
super.setUp();
13
}
14
15
public void testEdgeDstInt() {
16
fail("Not yet implemented");
17
}
18
19
public void testEdgeDstIntPoint() {
20
fail("Not yet implemented");
21
}
22
23
public void testEdgeOrgInt() {
24
fail("Not yet implemented");
25
}
26
27
public void testEdgeOrgIntPoint() {
28
fail("Not yet implemented");
29
}
30
31
public void testFindNearestPoint() {
32
fail("Not yet implemented");
33
}
34
35
public void testFindNearestPointPoint() {
36
fail("Not yet implemented");
37
}
38
39
public void testGetEdge() {
40
fail("Not yet implemented");
41
}
42
43
public void testGetEdgeList() {
44
fail("Not yet implemented");
45
}
46
47
public void testGetTriangleList() {
48
Subdiv2D s2d = new Subdiv2D( new Rect(0, 0, 50, 50) );
49
s2d.insert( new Point(10, 10) );
50
s2d.insert( new Point(20, 10) );
51
s2d.insert( new Point(20, 20) );
52
s2d.insert( new Point(10, 20) );
53
MatOfFloat6 triangles = new MatOfFloat6();
54
s2d.getTriangleList(triangles);
55
assertEquals(2, triangles.rows());
56
/*
57
int cnt = triangles.rows();
58
float buff[] = new float[cnt*6];
59
triangles.get(0, 0, buff);
60
for(int i=0; i<cnt; i++)
61
Log.d("*****", "["+i+"]: " + // (a.x, a.y) -> (b.x, b.y) -> (c.x, c.y)
62
"("+buff[6*i+0]+","+buff[6*i+1]+")" + "->" +
63
"("+buff[6*i+2]+","+buff[6*i+3]+")" + "->" +
64
"("+buff[6*i+4]+","+buff[6*i+5]+")"
65
);
66
*/
67
}
68
69
public void testGetVertexInt() {
70
fail("Not yet implemented");
71
}
72
73
public void testGetVertexIntIntArray() {
74
fail("Not yet implemented");
75
}
76
77
public void testGetVoronoiFacetList() {
78
fail("Not yet implemented");
79
}
80
81
public void testInitDelaunay() {
82
fail("Not yet implemented");
83
}
84
85
public void testInsertListOfPoint() {
86
fail("Not yet implemented");
87
}
88
89
public void testInsertPoint() {
90
fail("Not yet implemented");
91
}
92
93
public void testLocate() {
94
fail("Not yet implemented");
95
}
96
97
public void testNextEdge() {
98
fail("Not yet implemented");
99
}
100
101
public void testRotateEdge() {
102
fail("Not yet implemented");
103
}
104
105
public void testSubdiv2D() {
106
fail("Not yet implemented");
107
}
108
109
public void testSubdiv2DRect() {
110
fail("Not yet implemented");
111
}
112
113
public void testSymEdge() {
114
fail("Not yet implemented");
115
}
116
117
}
118
119