PRNet icon indicating copy to clipboard operation
PRNet copied to clipboard

Can I take snapshot of 3D face after rotating different angle in Python

Open varun-tangoit opened this issue 7 years ago • 5 comments

Hey Hi,

Thanks for the great help to make 2d images into 3d objects, i works good. We have favour, that we want to process 3d object rotate every angle and take snapshot. That would be done in python iteself not in meshlab or anyother tools because mannually it won't possible. Can you give me some suggestion or sample coding, How i would remodify/reuse the vertices based on rotated angles and getting 3D object into 2d images like reverse way in python. Please help me im stuck on this.!!

varun-tangoit avatar Nov 21 '18 10:11 varun-tangoit

It seems that you can refer to face3d to do offline render. #87

cleardusk avatar Nov 21 '18 15:11 cleardusk

can you please tell me how to pass 3D object and take snapshot or image? I think we wont able to 3d object inside on this. or where i can modify those code. I'm stuck on this how to pass and run this program. Please help me!!

varun-tangoit avatar Nov 21 '18 16:11 varun-tangoit

Anybody can hep me out. Im stuck on this. I don't know how to proceed furtuer. Thanks

varun-tangoit avatar Nov 22 '18 07:11 varun-tangoit

@varun-tangoit if you want to transform a 3 obj (vertices, colors, triangle) into 2d image check the function transform_test from here: https://github.com/YadiraF/face3d/blob/master/examples/3_transform.py Specially the following code:

        image_vertices = mesh.transform.to_image(projected_vertices, h, w, True)
	rendering = mesh.render.render_colors(image_vertices, triangles, colors, h, w)
	rendering = np.minimum((np.maximum(rendering, 0)), 1)

ileniTudor avatar Nov 22 '18 13:11 ileniTudor

Hey Hi:

Do you finish the work that is calling snapshot function of meshlab by using python

ziwenjie avatar Nov 16 '21 02:11 ziwenjie