Hi Jerry,
the result of the fit is a set of RenderParameters.
In the Tutorial (05_FaceFitting_06_ImageFitting) you have a line like this:
val bestSample = posteriorSamples.maxBy{ case Sample(it, x, value) => value } overlay.render(bestSample.sample)
This will render the fit back to an image.
What you want instead of redering is the set of paramters. Those are in bestSample.sample. You could also assign them to a variable which will be of type RenderParameters.
The RenderParameters contain everything to generate the scene and render an image (shape, color and expression parameters, as well as pose, camera and illumination).
You can then either change the pose, illumination or whatever you want on the RenderParameter and generate an image out of it (using modelRenderer.renderImage). Or you can render the 3D mesh using modelRenderer.renderMesh.
The modelRenderer you have in the tutorial:
val momoFile = new File("data/model2017-1_face12_nomouth.h5")
val momoURI = momoFile.toURI
val momo = MoMoIO.read(momoURI).get.neutralModel
val modelRenderer = MoMoRenderer(momo)
Best
Bernhard
Am Dienstag, 16. Januar 2018 22:21:59 UTC+1 schrieb Jerry Liu:
Hi there,
Sorry about another question so soon. I've been going through all of the tutorial, and I am really impressed by the GUI and visualization of the 3D model. In addition, I tried the fitting of the 2D image and the results for your example on ws_13.png was great. However, I can't seem to find information on how to use the fit after it is run on the ws_13.png image and visualize the 3D version of it. It seems the fit is just a 2D image and not a 3D model. Could you help guide me in this process?
Thanks again,
Jerry