Пример #1
0
#test mcsc wrapper
if 0:
    a = AllPointPickle()
    a.initilize_from_directory(DS1_PKL)

    mcsc = MultiCalSelfCam(DS1_CALIB)
    mcsc.create_from_cams(cam_ids=[],
                          cam_resolutions=a.resolutions.copy(),
                          cam_points=a.results.copy(),
                          cam_calibrations={},
                          num_cameras_fill=0)
    dest = mcsc.execute(blocking=True,
                        dest=tempfile.mkdtemp(prefix='mcsc'),
                        silent=False)
    MultiCalSelfCam.publish_calibration_points(dest)
    MultiCalSelfCam.save_to_pcd(dest, "/tmp/ds1.pcd")

#test roundtrip 2d -> 3d -> 2d
if 0:
    r = flydra.reconstruct.Reconstructor(cal_source=DS1_CALIB)

    cams = r.get_cam_ids()
    print "cameras", cams

    pts = a.get_points_in_cameras(r.get_cam_ids())

    pt = pts[0]
    print "2d points", pt

    X = r.find3d(pt, return_line_coords=False)
    print "3d point", X
Пример #2
0
def run_mcsc(path):
    mcsc = MultiCalSelfCam(path)
    dest = mcsc.execute(blocking=True, dest=tempfile.mkdtemp(),silent=False)
    pcd = '/tmp/mcscpoints.pcd'
    MultiCalSelfCam.save_to_pcd(dirname=dest, fname=pcd)
    print 'saved to pcd file', pcd
Пример #3
0
#test mcsc wrapper
if 0:
    a = AllPointPickle()
    a.initilize_from_directory(DS1_PKL)

    mcsc =  MultiCalSelfCam(DS1_CALIB)
    mcsc.create_from_cams(
            cam_ids=[],
            cam_resolutions=a.resolutions.copy(),
            cam_points=a.results.copy(),
            cam_calibrations={},
            num_cameras_fill=0)
    dest = mcsc.execute(blocking=True, dest=tempfile.mkdtemp(prefix='mcsc'), silent=False)
    MultiCalSelfCam.publish_calibration_points(dest)
    MultiCalSelfCam.save_to_pcd(dest, "/tmp/ds1.pcd")

#test roundtrip 2d -> 3d -> 2d
if 0:
    r = flydra.reconstruct.Reconstructor(cal_source=DS1_CALIB)

    cams = r.get_cam_ids()
    print "cameras",cams

    pts = a.get_points_in_cameras(r.get_cam_ids())

    pt = pts[0]
    print "2d points",pt

    X = r.find3d(pt,return_line_coords=False)
    print "3d point",X
def run_mcsc(path):
    mcsc = MultiCalSelfCam(path)
    dest = mcsc.execute(blocking=True, dest=tempfile.mkdtemp(), silent=False)
    pcd = '/tmp/mcscpoints.pcd'
    MultiCalSelfCam.save_to_pcd(dirname=dest, fname=pcd)
    print 'saved to pcd file', pcd