Path: blob/master/modules/imgproc/misc/java/test/Subdiv2DTest.java
16363 views
package org.opencv.test.imgproc;12import org.opencv.core.MatOfFloat6;3import org.opencv.core.Point;4import org.opencv.core.Rect;5import org.opencv.imgproc.Subdiv2D;6import org.opencv.test.OpenCVTestCase;78public class Subdiv2DTest extends OpenCVTestCase {910protected void setUp() throws Exception {11super.setUp();12}1314public void testEdgeDstInt() {15fail("Not yet implemented");16}1718public void testEdgeDstIntPoint() {19fail("Not yet implemented");20}2122public void testEdgeOrgInt() {23fail("Not yet implemented");24}2526public void testEdgeOrgIntPoint() {27fail("Not yet implemented");28}2930public void testFindNearestPoint() {31fail("Not yet implemented");32}3334public void testFindNearestPointPoint() {35fail("Not yet implemented");36}3738public void testGetEdge() {39fail("Not yet implemented");40}4142public void testGetEdgeList() {43fail("Not yet implemented");44}4546public void testGetTriangleList() {47Subdiv2D s2d = new Subdiv2D( new Rect(0, 0, 50, 50) );48s2d.insert( new Point(10, 10) );49s2d.insert( new Point(20, 10) );50s2d.insert( new Point(20, 20) );51s2d.insert( new Point(10, 20) );52MatOfFloat6 triangles = new MatOfFloat6();53s2d.getTriangleList(triangles);54assertEquals(2, triangles.rows());55/*56int cnt = triangles.rows();57float buff[] = new float[cnt*6];58triangles.get(0, 0, buff);59for(int i=0; i<cnt; i++)60Log.d("*****", "["+i+"]: " + // (a.x, a.y) -> (b.x, b.y) -> (c.x, c.y)61"("+buff[6*i+0]+","+buff[6*i+1]+")" + "->" +62"("+buff[6*i+2]+","+buff[6*i+3]+")" + "->" +63"("+buff[6*i+4]+","+buff[6*i+5]+")"64);65*/66}6768public void testGetVertexInt() {69fail("Not yet implemented");70}7172public void testGetVertexIntIntArray() {73fail("Not yet implemented");74}7576public void testGetVoronoiFacetList() {77fail("Not yet implemented");78}7980public void testInitDelaunay() {81fail("Not yet implemented");82}8384public void testInsertListOfPoint() {85fail("Not yet implemented");86}8788public void testInsertPoint() {89fail("Not yet implemented");90}9192public void testLocate() {93fail("Not yet implemented");94}9596public void testNextEdge() {97fail("Not yet implemented");98}99100public void testRotateEdge() {101fail("Not yet implemented");102}103104public void testSubdiv2D() {105fail("Not yet implemented");106}107108public void testSubdiv2DRect() {109fail("Not yet implemented");110}111112public void testSymEdge() {113fail("Not yet implemented");114}115116}117118119