<gh_stars>0
import open3d as o3d
import numpy as np
from sklearn import preprocessing
path = "E:\ztt\data\MVS\Points_MVS\Points\camp"



if __name__ == "__main__":

    meshpath ="E:\ztt\data\MVS\SampleSet\SampleSet\MVS Data\Surfaces\camp"
    #
    # mesh = o3d.io.read_triangle_mesh(meshpath + "/camp001_l3_surf_11_trim_8.ply")
    # o3d.visualization.draw_geometries([mesh])
    mesh = o3d.io.read_triangle_mesh("E:\ztt\data\MVS\SampleSet\SampleSet\MVS Data\Surfaces\camp" + "\camp001_l3_surf_11_trim_8.ply")
    z = np.asarray(mesh.vertices)
    index = np.random.permutation(range(1000))

    z2 = z[index,:]
    min_max_scaler = preprocessing.MinMaxScaler()
    X_minMax = min_max_scaler.fit_transform(z)
    test_pcd = o3d.geometry.PointCloud()
    test_pcd.points = o3d.utility.Vector3dVector(z2)


    o3d.visualization.draw_geometries([test_pcd])
    print(mesh)
    # o3d.io.write_triangle_mesh("copy_of_knot.ply", mesh)

    # print("Testing IO for images ...")
    # img = o3d.io.read_image("../../TestData/lena_color.jpg")
    # print(img)
    # o3d.io.write_image("copy_of_lena_color.jpg", img)
    z =1
import open3d as o3d
import numpy as np
from sklearn import preprocessing
path = "E:\ztt\data\MVS\Points_MVS\Points\camp"



if __name__ == "__main__":

    meshpath ="E:\ztt\data\MVS\SampleSet\SampleSet\MVS Data\Surfaces\camp"
    #
    # mesh = o3d.io.read_triangle_mesh(meshpath + "/camp001_l3_surf_11_trim_8.ply")
    # o3d.visualization.draw_geometries([mesh])
    mesh = o3d.io.read_triangle_mesh("E:\ztt\data\MVS\SampleSet\SampleSet\MVS Data\Surfaces\camp" + "\camp001_l3_surf_11_trim_8.ply")
    z = np.asarray(mesh.vertices)
    index = np.random.permutation(range(1000))

    z2 = z[index,:]
    min_max_scaler = preprocessing.MinMaxScaler()
    X_minMax = min_max_scaler.fit_transform(z)
    test_pcd = o3d.geometry.PointCloud()
    test_pcd.points = o3d.utility.Vector3dVector(z2)


    o3d.visualization.draw_geometries([test_pcd])
    print(mesh)
    # o3d.io.write_triangle_mesh("copy_of_knot.ply", mesh)

    # print("Testing IO for images ...")
    # img = o3d.io.read_image("../../TestData/lena_color.jpg")
    # print(img)
    # o3d.io.write_image("copy_of_lena_color.jpg", img)
    z =1
# # mesh = o3d.io.read_triangle_mesh(meshpath + "/camp001_l3_surf_11_trim_8.ply") # o3d.visualization.draw_geometries([mesh]) # o3d.io.write_triangle_mesh("copy_of_knot.ply", mesh) # print("Testing IO for images ...") # img = o3d.io.read_image("../../TestData/lena_color.jpg") # print(img) # o3d.io.write_image("copy_of_lena_color.jpg", img)