1
Python and Java API / Meshing (buildModel command) from Depth Maps ignores face_count
« on: February 08, 2019, 06:55:43 PM »
Hi.
I am testing a short Python script for the new meshing option that makes the model from Depth Maps
(without building Dense Cloud), and have a problem with the face_count parameter, which seems to
be ignored as if no decimation happens.
For a project with 285 photos (Metashape 1.5.1), in my Python script, I align photos, and run the following
line with different values for quality and face_count.
my_chunk.buildModel (face_count=mycount, source=Metashape.DepthMapsData, quality=myquality)
And for the following combinations, I always get a resulting mesh model that has the similar number of faces.
[mycount, myquality ----> number of faces in the mesh result]
1000000, Metashape.LowestQuality ----> 91.9 million faces
LowFaceCount, Metashape.LowestQuality ----> 92.1 million faces
MediumFaceCount, Metashape.LowestQuality ----> 91.8 million faces
MediumFaceCount, Metashape.MediumQuality ----> 91.9 million faces
The face_count value seems ignored, and also changing the quality does not affect the mesh size.
On top of that, processing with MediumQuality takes naturally more time than LowestQuality, but
the resulting mesh does not seem to be very different, at least visually.
I add that if I use Build Mesh UI command from the Workflow menu instead of using Python script,
I get a reasonable result like below.
1000000, Metashape.LowestQuality ----> 999,945 faces
LowFaceCount, Metashape.LowestQuality ----> 19,469 faces
MediumFaceCount, Metashape.LowestQuality ----> 68,193 faces
MediumFaceCount, Metashape.MediumQuality ----> 1,073,548 faces
I am wondering why this is happening. I would appreciate if anyone has an advise.
Thank you.
I am testing a short Python script for the new meshing option that makes the model from Depth Maps
(without building Dense Cloud), and have a problem with the face_count parameter, which seems to
be ignored as if no decimation happens.
For a project with 285 photos (Metashape 1.5.1), in my Python script, I align photos, and run the following
line with different values for quality and face_count.
my_chunk.buildModel (face_count=mycount, source=Metashape.DepthMapsData, quality=myquality)
And for the following combinations, I always get a resulting mesh model that has the similar number of faces.
[mycount, myquality ----> number of faces in the mesh result]
1000000, Metashape.LowestQuality ----> 91.9 million faces
LowFaceCount, Metashape.LowestQuality ----> 92.1 million faces
MediumFaceCount, Metashape.LowestQuality ----> 91.8 million faces
MediumFaceCount, Metashape.MediumQuality ----> 91.9 million faces
The face_count value seems ignored, and also changing the quality does not affect the mesh size.
On top of that, processing with MediumQuality takes naturally more time than LowestQuality, but
the resulting mesh does not seem to be very different, at least visually.
I add that if I use Build Mesh UI command from the Workflow menu instead of using Python script,
I get a reasonable result like below.
1000000, Metashape.LowestQuality ----> 999,945 faces
LowFaceCount, Metashape.LowestQuality ----> 19,469 faces
MediumFaceCount, Metashape.LowestQuality ----> 68,193 faces
MediumFaceCount, Metashape.MediumQuality ----> 1,073,548 faces
I am wondering why this is happening. I would appreciate if anyone has an advise.
Thank you.