Example #1
0
def test6():

    vi = md.readvisible("./data/visible/visibleFace0319.txt")
    m = m3d.model3d_changeLo()
    m.read_ply("./data/reduction_data/mrvert/rdmove0319-vert.ply")
    v, f = md.divide_face(m)
    c = md.showVisibleAsColor(vi)
    c2 = md.color2color_x_3(c)
    print v.shape
    mut.save_ply_file_color("visibleCheck.ply", v, f, c2)

    return 0
Example #2
0
def test6():

    vi = md.readvisible("./data/visible/visibleFace0319.txt")
    m = m3d.model3d_changeLo()
    m.read_ply("./data/reduction_data/mrvert/rdmove0319-vert.ply")
    v, f = md.divide_face(m)
    c = md.showVisibleAsColor(vi)
    c2 = md.color2color_x_3(c)
    print v.shape
    mut.save_ply_file_color("visibleCheck.ply", v, f, c2)

    return 0
Example #3
0
def saveResultPCA(outdir, applyMeshName, c_ratio_all, evr_all):

    m = m3d.model3d_changeLo()
    m.read_ply(applyMeshName)
    nv, nf = md.divide_face(m)

    dir_r = outdir + "colorPly/c_ratio"
    dir_e = outdir + "colorPly/c_evr"
    mut.mkdir_p(dir_r)
    mut.mkdir_p(dir_e)

    for i in xrange(comp_max - 1):
        md.set_scale(0, 1)
        col = md.dist2color2(c_ratio_all[:, i])
        col3 = md.color2color_x_3(col)

        mut.save_ply_file_color(dir_r + "/" + "ratio_c%03dframe0000.ply" % i, nv, nf, col3)

        col = md.dist2color2(evr_all[:, i])
        col3 = md.color2color_x_3(col)

        mut.save_ply_file_color(dir_e + "/" + "evr_c%03dframe0000.ply" % i, nv, nf, col3)
Example #4
0
def saveResultPCA(outdir, applyMeshName, c_ratio_all, evr_all):

    m = m3d.model3d_changeLo()
    m.read_ply(applyMeshName)
    nv, nf = md.divide_face(m)

    dir_r = outdir + "colorPly/c_ratio"
    dir_e = outdir + "colorPly/c_evr"
    mut.mkdir_p(dir_r)
    mut.mkdir_p(dir_e)

    for i in xrange(comp_max - 1):
        md.set_scale(0, 1)
        col = md.dist2color2(c_ratio_all[:, i])
        col3 = md.color2color_x_3(col)

        mut.save_ply_file_color(dir_r + "/" + "ratio_c%03dframe0000.ply" % i,
                                nv, nf, col3)

        col = md.dist2color2(evr_all[:, i])
        col3 = md.color2color_x_3(col)

        mut.save_ply_file_color(dir_e + "/" + "evr_c%03dframe0000.ply" % i, nv,
                                nf, col3)