Beispiel #1
0
def test5():

    red = mut.makeRed(1000)
    path = "./data/restore-pass-comp9"
    mut.mkdir_p(path)
    for i in xrange(1000):
        m1 = m3d.model3d_plus()
        m1.read_ply("./pcacolors-comp9/restore/ply/resotre%04d.ply" % i)
        m1.write_color_ply(path + "/restore%04d.ply" % i, red)
Beispiel #2
0
def test5():

    red = mut.makeRed(1000)
    path = './data/restore-pass-comp9'
    mut.mkdir_p(path)
    for i in xrange(1000):
        m1 = m3d.model3d_plus()
        m1.read_ply("./pcacolors-comp9/restore/ply/resotre%04d.ply" % i)
        m1.write_color_ply(path + '/restore%04d.ply' % i, red)
Beispiel #3
0
def test4():

    m1 = m3d.model3d_changeLo()
    m2 = m3d.model3d_changeLo()

    m1.read_ply("./data/cloth4ply/mrshape/ball%04d.ply" % 50)
    m2.read_ply("./data/cloth4ply/mrvert/cloth%04d.ply" % 50)

    print "fnum", m1.face_num

    v, f = mut.data5()
    # m1.input_data(v,f)
    v, f = mut.data6()
    # m2.input_data(v,f)

    m1.calc_all()
    m2.calc_all()
    m1.calc_local_coord()

    # m1.write_ply('m1.ply')
    # m2.write_ply('m2.ply')

    # m1.check_local_axis_2(0,'chccklo',m2)

    dtemp = md.calc_f2f_distance_in_localcoord(m1, m2)
    re_dists = md.change_distanceList(dtemp)
    remesh = md.apply_distance(re_dists, m1)

    print "local dist", dtemp

    print "exchange", re_dists

    checkver = remesh.vertexes - m2.vertexes

    np.savetxt("checkdistance0000.txt", checkver, delimiter=",")

    md.set_scale(0.00000000000000001, -0.00000000000000001)
    color = md.dist2color2(checkver[0, :])
    print color
    remesh.write_color_ply("checkdist.ply", color)
    remesh.write_color_ply("red.ply", mut.makeRed(remesh.ver_num))

    std = np.std(checkver)
    print "std", std

    er = checkver / m2.vertexes
    er = np.absolute(er)
    print er

    print er.mean()
    print er.max()
    std = np.std(er)
    print "std", std

    np.savetxt("error0300.txt", er, delimiter=",")

    """"
Beispiel #4
0
def test4():

    m1 = m3d.model3d_changeLo()
    m2 = m3d.model3d_changeLo()

    m1.read_ply("./data/cloth4ply/mrshape/ball%04d.ply" % 50)
    m2.read_ply("./data/cloth4ply/mrvert/cloth%04d.ply" % 50)

    print 'fnum', m1.face_num

    v, f = mut.data5()
    #m1.input_data(v,f)
    v, f = mut.data6()
    #m2.input_data(v,f)

    m1.calc_all()
    m2.calc_all()
    m1.calc_local_coord()

    #m1.write_ply('m1.ply')
    #m2.write_ply('m2.ply')

    #m1.check_local_axis_2(0,'chccklo',m2)

    dtemp = md.calc_f2f_distance_in_localcoord(m1, m2)
    re_dists = md.change_distanceList(dtemp)
    remesh = md.apply_distance(re_dists, m1)

    print "local dist", dtemp

    print "exchange", re_dists

    checkver = remesh.vertexes - m2.vertexes

    np.savetxt("checkdistance0000.txt", checkver, delimiter=',')

    md.set_scale(0.00000000000000001, -0.00000000000000001)
    color = md.dist2color2(checkver[0, :])
    print color
    remesh.write_color_ply('checkdist.ply', color)
    remesh.write_color_ply('red.ply', mut.makeRed(remesh.ver_num))

    std = np.std(checkver)
    print 'std', std

    er = checkver / m2.vertexes
    er = np.absolute(er)
    print er

    print er.mean()
    print er.max()
    std = np.std(er)
    print 'std', std

    np.savetxt("error0300.txt", er, delimiter=',')
    """"