Skip to content

Commit

Permalink
Add matlab render demo
Browse files Browse the repository at this point in the history
  • Loading branch information
cleardusk committed Oct 4, 2018
1 parent 8e4d087 commit f29e5e9
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
Binary file added visualize/demo.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 7 additions & 0 deletions visualize/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
`image00427.mat` is generated by `visualize.py` in root directory. `render_demo.m` is a simple matlab demo to render 3D face mesh.

`tri.mat` provides the 3D mesh triangle indices.

The rendered result:

![Rendered result](demo.jpg)
6 changes: 5 additions & 1 deletion visualize/render_demo.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,8 @@

tri = tri.tri;
vertex = vertex.vertex;
render_face_mesh(vertex, tri);
render_face_mesh(vertex, tri);

A = getframe(gcf);
mimg = A.cdata;
imwrite(mimg, 'demo.jpg', 'quality', 95);

0 comments on commit f29e5e9

Please sign in to comment.