Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Diff of /trunk/contrib/brl/bbas/volm/tests/test_region_query.cxx [r36629] .. [r36630] Maximize Restore

  Switch to side-by-side view

--- a/trunk/contrib/brl/bbas/volm/tests/test_region_query.cxx
+++ b/trunk/contrib/brl/bbas/volm/tests/test_region_query.cxx
@@ -23,7 +23,7 @@
   float solid_angle = 2.0f;
   volm_spherical_container_sptr sph = new volm_spherical_container(solid_angle,vmin,dmax);
 
-  vcl_string depth_scene_path = "c:/Users/mundy/VisionSystems/Finder/VolumetricQuery/feb_test_queries/tile6_drainage/p1a_test10/p1a_res10_groundtruth_labelme.vsl";
+  vcl_string depth_scene_path = "Z://projects//FINDER//test1//p1a_test1_40//p1a_test1_40.vsl";
 
   depth_map_scene_sptr dms = new depth_map_scene;
   vsl_b_ifstream dis(depth_scene_path.c_str());
@@ -48,77 +48,6 @@
   srq.print(vcl_cout);
 
 
-#if 1
-  vsl_b_ifstream is("c:/Users/mundy/VisionSystems/Finder/VolumetricQuery/unit_sphere_2.vsl");
-  vsph_unit_sphere_sptr usph_ptr;
-  vsl_b_read(is, usph_ptr);
-  vcl_string reg_display_path = "c:/Users/mundy/VisionSystems/Finder/VolumetricQuery/feb_test_queries/tile6_drainage/p1a_test10/p1a_res10_groundtruth_region_display.wrl";
-  srq.display_query_regions(usph_ptr, reg_display_path, 1);
-#endif
-#if 1
-  /// test unit sphere equivalence
-  // create spherical shell for query rays
-  // parameter for coast
-  float cap_angle = 180.0f;
-  float point_angle = 2.0f;//for coast (2 really)
-  double radius = 1;
-  float top_angle = 75.0f;
-  float bottom_angle = 75.0f;
-
-  volm_spherical_shell_container_sptr sph_shell = new volm_spherical_shell_container(radius, cap_angle, point_angle, top_angle, bottom_angle);
-  vcl_cout << "spherical shell size = " <<sph_shell->get_container_size() << '\n';
-
-  vsph_unit_sphere usph(point_angle, top_angle, (180.0-bottom_angle));
-  vcl_cout << "unit sphere size = " << usph.size() << '\n';
-
-  vcl_cout << "\nStart comparison ----\n";
-  vcl_vector<vgl_point_3d<double> > shell_cart_pts = sph_shell->cart_points();
-  vcl_vector<vgl_vector_3d<double> > usph_cart_pts = usph.cart_vectors();
-  vcl_vector<vsph_sph_point_3d> shell_sph_pts = sph_shell->sph_points();
-  vcl_vector<vsph_sph_point_2d > usph_sph_pts = usph.sph_points();
-
-  double tol = 0.002;
-  unsigned nshell = shell_cart_pts.size();
-  unsigned nusph = usph_cart_pts.size();
-  vcl_cout << "Nsh =" << nshell << " Nusp = " << nusph << vcl_flush;
-  if (nshell != nusph) {
-    vcl_cout << ">>>>>>> BAD COUNT <<<<<<\n";
-  }
-  double max_mind = 0.0;
-  for (unsigned i = 0; i<nusph; ++i) {
-    double min_d = 10000.0;
-    vgl_vector_3d<double> usp = usph_cart_pts[i];
-    vsph_sph_point_2d uspp = usph_sph_pts[i];
-    vgl_vector_3d<double> v_close;
-    unsigned int jclose;
-    for (unsigned j = 0; j<nshell; ++j) {
-      vgl_point_3d<double> ssp = shell_cart_pts[j];
-      vgl_vector_3d<double> temp(ssp.x(), ssp.y(), ssp.z());
-      double dist = angle(usp, temp);
-      if (dist<min_d) {
-        min_d = dist;
-        v_close = temp;
-        jclose = j;
-      }
-    }
-    if (min_d > max_mind)
-      max_mind = min_d;
-    vsph_sph_point_3d shpp = shell_sph_pts[jclose];
-    double dist_sph = vcl_fabs(shpp.theta_-uspp.theta_) +
-      vcl_fabs(shpp.phi_-uspp.phi_);
-    if (min_d > tol || jclose!=i || dist_sph >tol)
-      vcl_cout << '[' << i << "]/[" << jclose << "]-[" << min_d << "]:(" << usp.x() << ' ' << v_close.x() << "),("
-               << usp.y() << ' ' << v_close.y() << "),("
-               << usp.z() << ' ' << v_close.z() << ")\n";
-  }
-  vcl_cout << "Max distance between corresponding verts = " << max_mind << '\n';
-
-  vcl_string vert_path = "c:/Users/mundy/VisionSystems/Finder/VolumetricQuery/verts.wrl";
-  usph.display_vertices(vert_path);
-  vcl_string edge_path = "c:/Users/mundy/VisionSystems/Finder/VolumetricQuery/edges.wrl";
-  usph.display_edges(edge_path);
-
-#endif // 1
 }
 
 TESTMAIN(test_region_query);