Subdiv2DTest.java 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  1. package org.opencv.test.imgproc;
  2. import org.opencv.core.MatOfFloat6;
  3. import org.opencv.core.Point;
  4. import org.opencv.core.Rect;
  5. import org.opencv.imgproc.Subdiv2D;
  6. import org.opencv.test.OpenCVTestCase;
  7. public class Subdiv2DTest extends OpenCVTestCase {
  8. protected void setUp() throws Exception {
  9. super.setUp();
  10. }
  11. public void testEdgeDstInt() {
  12. fail("Not yet implemented");
  13. }
  14. public void testEdgeDstIntPoint() {
  15. fail("Not yet implemented");
  16. }
  17. public void testEdgeOrgInt() {
  18. fail("Not yet implemented");
  19. }
  20. public void testEdgeOrgIntPoint() {
  21. fail("Not yet implemented");
  22. }
  23. public void testFindNearestPoint() {
  24. fail("Not yet implemented");
  25. }
  26. public void testFindNearestPointPoint() {
  27. fail("Not yet implemented");
  28. }
  29. public void testGetEdge() {
  30. fail("Not yet implemented");
  31. }
  32. public void testGetEdgeList() {
  33. fail("Not yet implemented");
  34. }
  35. public void testGetTriangleList() {
  36. Subdiv2D s2d = new Subdiv2D( new Rect(0, 0, 50, 50) );
  37. s2d.insert( new Point(10, 10) );
  38. s2d.insert( new Point(20, 10) );
  39. s2d.insert( new Point(20, 20) );
  40. s2d.insert( new Point(10, 20) );
  41. MatOfFloat6 triangles = new MatOfFloat6();
  42. s2d.getTriangleList(triangles);
  43. assertEquals(2, triangles.rows());
  44. /*
  45. int cnt = triangles.rows();
  46. float buff[] = new float[cnt*6];
  47. triangles.get(0, 0, buff);
  48. for(int i=0; i<cnt; i++)
  49. Log.d("*****", "["+i+"]: " + // (a.x, a.y) -> (b.x, b.y) -> (c.x, c.y)
  50. "("+buff[6*i+0]+","+buff[6*i+1]+")" + "->" +
  51. "("+buff[6*i+2]+","+buff[6*i+3]+")" + "->" +
  52. "("+buff[6*i+4]+","+buff[6*i+5]+")"
  53. );
  54. */
  55. }
  56. public void testGetVertexInt() {
  57. fail("Not yet implemented");
  58. }
  59. public void testGetVertexIntIntArray() {
  60. fail("Not yet implemented");
  61. }
  62. public void testGetVoronoiFacetList() {
  63. fail("Not yet implemented");
  64. }
  65. public void testInitDelaunay() {
  66. fail("Not yet implemented");
  67. }
  68. public void testInsertListOfPoint() {
  69. fail("Not yet implemented");
  70. }
  71. public void testInsertPoint() {
  72. fail("Not yet implemented");
  73. }
  74. public void testLocate() {
  75. fail("Not yet implemented");
  76. }
  77. public void testNextEdge() {
  78. fail("Not yet implemented");
  79. }
  80. public void testRotateEdge() {
  81. fail("Not yet implemented");
  82. }
  83. public void testSubdiv2D() {
  84. fail("Not yet implemented");
  85. }
  86. public void testSubdiv2DRect() {
  87. fail("Not yet implemented");
  88. }
  89. public void testSymEdge() {
  90. fail("Not yet implemented");
  91. }
  92. }