Skip to content
natowi edited this page Apr 29, 2024 · 36 revisions

Good reference: http://www.archeo3d.net/?page_id=3693 (FR)

CCTAGs can be used to scale a model (Introduced in Meshroom Version 2020)

Notes on CCTAG Markers:

CCTAG scaling

  • Place two markers in your scene and capture the dataset (you should know the two marker IDs, as they can not be shown in the GUI at the moment) Measure the distance between the to Marker centre points. (Best use a distance of 10, 20,..., 100, ... mm)

  • Enable the DescriberType "CCTAG (3)" in FeatureExtraction (Do not disable SIFT here, it is still required)

  • Add the SfMTranform node:

sfmt1

OR

sfmt2

  • In SfMTranform only select cctag3

  • As Transformation Method select from_markers and add two markers. Insert the two marker IDs.

  • Let´s assume the distance between Marker0 and Marker1 is 100mm. To scale the Model to this known size, set the Marker1 x-coord to 1 (1 -> 100mm) and the Additional Scale to 1. (100*1). (The Coord. scale is 100mm per unit. In addition with the Additional Scale (multiplicand) other distances can be set). The origin of the coordinate system is set in the centre of the first Marker.

cctag

  • To apply the correct model orientation use a new SfMTranform node with Transformation Method manual transformation or Transformation Method "From_Single_Camera".

  • CCTAGs can also be used to align two models using the SFMAlignment node


https://groups.google.com/forum/#!topic/alicevision/t4kcSceAFD4 Similar to https://github.com/alicevision/meshroom/issues/1135


Using multiple markers for scaling and orientation

It is possible to use multiple markers for orientation and scaling. This is for advanced users. Before you try this, make sure the reconstruction works with the default graph. Then enable CCTAG3 on all required nodes: CCTAG describer in FeatureExtration, FeatureMatching, StructureFromMotion and SFMTransform. Check in the Feature viewer that enough CCTAG markers are detected. You may need to set FeatureExtraction to High or Ultra in difficult scenes.

At the moment it is not possible to display the marker ID in the Meshroom GUI. It is recommended to print markers with centre point and id or manually add the marker id on the paper as reference.

For the scaling and orientation to work, the CCTAG markers need to be positioned in a known distance.

Example for four markers on a paper sheet, placed in a square, clockwise, with object of interest in the middle:

cctag3: id0, id1, id2, id3, placed in a square with an equal distance of 200mm (set the scaling factor to 2)

In the FromMarker settings you now set the XYZ coordinates for the markers. Since the markers are placed on a flat paper, placed on a desk, the workplane is the XZ plane, therefore Y=0

clockwise (id0-3)

id0 -> X1 Y0 Z1

id1 -> X-1 Y0 Z1

id2 -> X-1 Y0 Z-1

id3 -> X1 Y0 Z-1

(3D viewer axis: x=red y=green z=blue line=positive direction)

cct

This will place the object in the middle of the area surrounded by the four cctags in the centre of the coordinate system.

cctag222


Improve CCTAG detection

As the CCTag encodes a unique ID, avoid the geometric validation on the FeatureMatching by using a different FeatureMatching node to perform the matching of the CCTags on which you could disable the geometric validation. Then connect the output of the 2 FeatureMatching nodes (one with CCTag and the other one with SIFT&AKAZE) on the input of the StructureFromMotion node. (https://groups.google.com/g/alicevision/c/t4kcSceAFD4)

cctag44 grafik

(Create a new node or duplicate the existing node, note: if you duplicate the existing node, you have to detach the describer types connection to ba able to change the settings)

Here you can find the advanced settings for geometric validation (Geometric filter type: no_filtering): grafik


With MR2023 it is now possible to debug the markers detected in the scene by writing all marker numbers and their relative distance to each other into the node log of the SMDistance node: grafik

So in combination this is good for testing the scaling process: grafik