TheWebMonks / meshmonk

Open mesh-to-mesh registration framework
Apache License 2.0
70 stars 25 forks source link

Unable to export the mapped mesh #3

Closed Patricklv closed 5 years ago

Patricklv commented 6 years ago

I run meshmonk on 64 bit Win 10 system.

When I run the demo file, I came across the Eigenvecdtor decomposre on Q failed issue, such issue has been reported by marvin521.

When I run the DemoFaceMapping.m file on two of my self-collected 3dMD facial surface mesh, I was able to view the mapping result as shown in the image below:

snipaste_2018-10-01_08-53-11

However, when I clicked the 'Save 3D' icon, I was returned error message:

Undefined function 'export' for input arguments of type 'shape3D'.

Error in viewer3D/constructToolbar>save_Callback (line 139)
                 export(obj.ShapeChildren{i});

Error while evaluating PushTool ClickedCallback.

Such issue happen when I tried the .m file on both of my sample.

Kind regards

jsnyde0 commented 6 years ago

@alorcas I think this is for you. Let me know if you can trace it back to core meshmonk algorithms.

Patricklv commented 6 years ago

@jsnyde0 Thank you very much for your reply. Although the 'Save 3D' icon did not work, I managed to obtain coordinates for vertices from the obj.TargetShape from Matlab workspace. If I understand it correctly, this file should contain vertices from the sample face after registration with the template face. This would imply the number of vertices obtained from all samples to be the same as long as the same template is used. I tried runing the DemoFaceMapping.m file by replacing the default demoFace with my own sample. I did this on two sample faces. Strangely, the resultant number of vertices differ, where one is 52107 while the other is 45139. I am new to Matlab. I wish to know where I was wrong. Many thanks indeed.

jsnyde0 commented 6 years ago

I think the problem again lies with scripting around the core library, so @alorcas can you take a look at this ?

alorcas commented 5 years ago

I run meshmonk on 64 bit Win 10 system.

When I run the demo file, I came across the Eigenvecdtor decomposre on Q failed issue, such issue has been reported by marvin521.

When I run the DemoFaceMapping.m file on two of my self-collected 3dMD facial surface mesh, I was able to view the mapping result as shown in the image below:

snipaste_2018-10-01_08-53-11

However, when I clicked the 'Save 3D' icon, I was returned error message:

Undefined function 'export' for input arguments of type 'shape3D'.

Error in viewer3D/constructToolbar>save_Callback (line 139)
                 export(obj.ShapeChildren{i});

Error while evaluating PushTool ClickedCallback.

Such issue happen when I tried the .m file on both of my sample.

Kind regards

Dear @Patricklv,

To save the mapped result from the viewer as a screenshot, you should press the 'camera icon' instead of the 'Save 3D' icon.

alorcas commented 5 years ago

@jsnyde0 Thank you very much for your reply. Although the 'Save 3D' icon did not work, I managed to obtain coordinates for vertices from the obj.TargetShape from Matlab workspace. If I understand it correctly, this file should contain vertices from the sample face after registration with the template face. This would imply the number of vertices obtained from all samples to be the same as long as the same template is used. I tried runing the DemoFaceMapping.m file by replacing the default demoFace with my own sample. I did this on two sample faces. Strangely, the resultant number of vertices differ, where one is 52107 while the other is 45139. I am new to Matlab. I wish to know where I was wrong. Many thanks indeed.

Dear @Patricklv,

You are right, after registering your images the mapped result should have the same number of vertices as the template used. You can find this information in the obj.FloatingShape, the obj.TargetShape is the original (not registered) image and that is why you see the difference in the number of Vertices.

Cheers,