CAD feature alignment

Some nearly symmetrical objects have minor, yet crucial, features that determine their correct orientation. Feature alignment functionality precisely orients these objects by prioritizing these features in the alignment process.
Image 1 - Incorrectly (left) and correctly (right) found object with a feature on its side
This functionality can also be useful to localize objects that are nearly translationally invariant, often containing repetitive patterns. These objects tend to be localized as shifted, but using the feature alignment, the correct pose of the object can be determined.

image1

The key requirement for the use of Feature alignment is for the feature to be clearly visible on the scan. Use of this feature is fully optional - it might be possible to fine-tune the localization even without the use of this feature.

Contents

1 Model feature

A model feature is a part of the object that can be used to determine the exact pose of the object. For the localization to be able to use a feature for alignment it needs to be marked on the 3D model of the object by drawing a region of interest around it.

The tab Model Features of the Localization interface serves this purpose.

1.1 Model feature list

The Model feature list summarizes all defined features on the model of the object. It is possible to define up to 5 model features for a single object.

Controls

  • Status indicator - indicates whether there are pending unsaved changes to a model feature

  • Visibility toggle - enables showing/hiding a model feature

  • Copy button - enables copying an existing model feature

  • Delete button - enables removing an existing model feature

Image 2 - Model feature list

image2

1.2 Model feature properties

A model feature is defined by a set of properties:

  • Name - for simple identification of the model feature

  • Weight - defines the importance of the model feature relative to the other features.

  • Size (Width/Height/Depth) - defines the dimensions of the model feature

  • Position - defines the position of the model feature relative to the origin of the model of the object

  • Rotation - defines the rotation of the model feature relative to the origin of the model of the object

Image 3 - Model feature properties
Properties Size / Position / Rotation of a model feature can be easily adjusted in the 3D visualizer. After selecting the feature in the Model feature list the drawing controls appear at the bottom of the visualizer:

image3

  • Move button

  • Rotate button

  • Resize button

Image 4 - Model feature drawing controls

image4

1.3 Example

Consider a cylindrical object with a feature on its side. To prioritize the feature a region of interest is drawn around it (red box on the image below).

The region of interest (ROI) should only cover the actual feature, not other parts of the model. See the image below - left; incorrectly defined ROI covers also the wall of the symmetrical cylinder; right - correctly defined ROI only covers the actual model feature.
Image 5 - Model feature definition

image5

2 Feature alignment

A feature alignment is a blueprint for the localization engine to generate potentially better candidates for precise object localization. It utilizes different types of symmetries that can be applied to the object.
Every feature alignment blueprint uses selected model features and evaluates the overlap inside the regions of interest that define them.

2.1 Feature alignment list

The Feature alignment list summarizes all defined feature alignments. It is possible to define up to 3 feature alignments for a single object.

Alignment execution order

Feature alignments are executed in the order as defined in the list. To change the order of the alignments drag an alignment up/down the list.

After the localization engine finds the object, it generates candidates for better alignment using the first alignment in the list. Only after the best of these candidates is found (the one with the highest overlap in the ROIs defining the model features), the second alignment is executed and so on.

Controls

  • Status indicator - indicates whether there are pending unsaved changes to a model feature

  • Activity indicator - indicates whether the alignment is enabled/disabled or enabled with no model features selected (which effectively disables it)

  • Alignment type indicator - indicates the alignment type (Rotation, Flip and Rotation or Translation)

  • Activity toggle - enables/disables the alignment

  • Copy button - enables copying an existing feature alignment

  • Delete button - enables removing an existing feature alignment

Image 6 - Feature alignment list

image6

2.2 Feature alignment types

A feature alignment is defined by a set of properties. The common ones are:

  • Name - for simple identification of the feature alignment

  • Type - defines the type of symmetry of the object leveraged by the alignment

  • Model features - defines which model features are used by the alignment

Image 7 - Common properties of all feature alignment types
The rest of the properties differ based on the alignment type.

image7

The term axis of symmetry , when used in Feature alignment, refers to the symmetrical axis that an object typically possesses before the introduction of a feature making it asymmetrical.

2.2.1 Rotation

Properties unique to the Rotation alignment type:

  • Invariance axis - defines the axis of rotation symmetry of the object.

    • Basic mode - selection of axis parallel with X/Y/Z axis of the model origin

    • Advanced mode - selection of an arbitrary axis.
      Tip: To define the axis, either direct input of vector values can be used or adjusting the marker in the 3D visualizer (recommended).
  • Position - defines the position of the invariance axis relative to the origin of the model of the object (used when the origin is not lying on the axis of symmetry).
    Tip: To define the position, either direct input of offset values can be used or adjusting the marker in the 3D visualizer (recommended).
  • Steps - defines the number of candidates generated and tested for better alignment. Candidates are always generated uniformly in full range of the rotation symmetry (360°), Therefore the angular displacement difference between the neighbouring candidates is computed as 360°/Steps.

Image 8 - Properties unique to the Rotation alignment type
Generated candidates can be viewed by dragging the Steps slider in the bottom left corner of the 3D visualizer.

image8

Example

Consider a cylindrical object with a feature on its side. The object can be localized incorrectly as rotated around its axis of rotation symmetry (blue) - the feature does not align with the point cloud.

Image 9 - Cylindrical object with a feature on its side, localized incorrectly
Rotation alignment can be used to rotate the original candidate found by the localization engine to the correct position.

image9

  1. Definition of the model feature
    Image 10 - Definition of the model feature

    image10

  2. Definition of alignment
    The axis is aligned with the axis of rotation symmetry of the model. When the model is being rotated, the model feature is rotating around the axis, the best candidate has the highest overlap in the model feature region:
    Image 11 - A preview of one of the candidates for the best feature alignment (left), correctly found object (right)

    image11

2.2.2 Flip and Rotation

Properties unique to the Flip and Rotation alignment type:

  • Invariance axis - defines the axes of rotation symmetry of the object.

    • The Primary axis (blue) - defines the axis of line symmetry of the object

    • The Secondary axis (orange) - defines the axis of rotation symmetry of the object
      These axes are always perpendicular to one another.
    • Basic mode - selection of axes parallel with X/Y/Z axis of the model origin

    • Advanced mode - selection of arbitrary axes.
      Tip: To define the axis, either direct input of vector values can be used or, recommended, adjusting the marker in the 3D visualizer.
  • Position - defines the position of the invariance axes relative to the origin of the model of the object (used when the origin is not lying on the axes of symmetry).
    Tip: To define the position, either direct input of offset values can be used or, recommended, adjusting the marker in the 3D visualizer.
  • Steps - defines the number of candidates generated and tested for better alignment around the Secondary axis (axis of rotation symmetry). Candidates are always generated uniformly in full range of the rotation symmetry (360°), Therefore the angular displacement difference between the neighbouring candidates is computed as 360°/Steps.

Image 12 - Properties unique to the Flip and Rotation alignment type
Generated candidates can be viewed by dragging the Steps slider in the bottom left corner of the 3D visualizer. To preview the candidates generated after flipping the object around the Primary axis by 180°, check the checkbox “Flip around primary axis”.

image12

Comparison with doubled Rotation alignment

Flip and Rotation alignment is not a substitute for the double Rotation alignment where the first Rotation alignment would flip the model by 180° (around its axis of line symmetry) and the second one would rotate the model around the axis of its rotation symmetry. The same applies when the order of alignments is reversed (first rotation around the axis of symmetry and then flipping by 180° around the axis of line symmetry).

The difference in execution with Flip and Rotation alignment is that all combinations of rotating the model and flipping it are tested whereas with doubled Rotation they are not.

Execution order for doubled Rotation alignment:

  1. Rotate the object using the first alignment and select the best candidate

  2. Take the best candidate from the first alignment and rotate the object using the second alignment and select the best candidate

Execution order for Flip and Rotation alignment:

  1. Rotate the object around its axis of rotation symmetry and for every rotation invariance also flip the model around its axis of line symmetry

Example

Consider a long cylindrical object with a feature on one of its ends. The object can be localized as flipped around its axis of line symmetry (green or red) - the feature being on the left or right side. It can be also localized incorrectly as rotated around its axis of rotation symmetry (blue) - even if the model was localized with the feature on the correct side, the feature does not align with the point cloud.

Flip and Rotation alignment can be used to find the correct position of the feature by searching for it on both ends - flipping the model around its axis of line symmetry while also rotating it around its axis of rotation symmetry.

Image 13 - Cylindrical object with a feature on its side, localized incorrectly
Rotation alignment can be used to rotate the original candidate found by the localization engine to the correct position.

image13

  1. Definition of the model feature
    Image 14 - Definition of the model feature

    image14

  2. Definition of alignment

  • The primary axis is aligned with the axis of line symmetry of the model

  • The secondary axis is aligned with the axis of rotation symmetry of the model
    When the model is being rotated around the Secondary axis without the model being flipped around the Primary axis, the model feature is rotating on the left side of the model:
    Image 15 - A preview of one of the candidates for the best feature alignment, located on the left side of the object
    When the model is being rotated around the Secondary axis with the model being flipped around the Primary axis, the model feature is rotating on the right side of the model:
    Image 16 - A preview of one of the candidates for the best feature alignment, located on the right side of the object

    image15

    image16

2.2.3 Translation

Properties unique to the Translation alignment type:

  • Invariance axis - defines the axis of translation symmetry of the object

    • Basic mode - selection of axis parallel with X/Y/Z axis of the model origin

    • Advanced mode - selection of an arbitrary axis.
      Tip: To define the axis, either direct input of vector values can be used or, recommended, adjusting the marker in the 3D visualizer.
  • Position - defines the position of the invariance axis relative to the origin of the model of the object (used when the origin is not lying on the axis of symmetry).
    Tip: To define the position, either direct input of offset values can be used or, recommended, adjusting the marker in the 3D visualizer.
  • Steps - defines the number of candidates generated and tested for better alignment

  • Size - defines the size of the translation difference between two neighboring candidates generated by the alignment

The number of Steps and Size are closely related. E.g. 20 steps with a size of 5 millimeters will generate 10 candidates on each side along the symmetry axis spaced by 5 millimeters. That means the alignment is able to correct a translation error of the original candidate found by the localization engine of a maximum of 50 millimeters on each side.
Image 17 - Properties unique to the Translation alignment type
Generated candidates can be viewed by dragging the Steps slider in the bottom left corner of the 3D visualizer.

image17

Example

Consider a longitudinal object. The object can be localized as shifted alongside its axis of translation symmetry (red).
Image 18 - Longitudinal object localized incorrectly - shifted alongside its axis of translation symmetry
Translation alignment can be used to shift the original candidate found by the localization engine to the correct position.

image18

image19

  1. Definition of the model feature
    A model feature is defined on both ends of the model - when the model is localized correctly (without being shifted to one of the sides), the cumulative overlap value in both model feature regions is the highest. The cumulative overlap value drops when the model is found as shifted to one of the sides.
    Image 19 - Definition of the model feature

    image20

  2. Definition of alignment
    The axis is aligned with the axis of translation symmetry of the model When the model is being shifted to one of the sides, the model features are moving along the axis, the best candidate has the highest cumulative overlap in both model feature regions:
    Image 20 - A preview of one of the candidates for the best feature alignment (top), correctly found object (bottom)

    image21

    image22

3 Model feature alignment localization settings

Localization settings contain the section Model feature alignment , which offers settings for fine-tuning the model feature alignment.
Image 21 - Localization settings related to the Model feature alignment
Minimal overlap initial evaluation [%]
Description:
The value defines the minimal required cumulative overlap in all model feature regions.
It is evaluated only for the original candidate before the model feature alignment process to save processing time.
If the overlap is lower, the candidate is rejected.

image23

This setting can be used to quickly reject the original candidate for the localized object because it cannot be improved by the feature alignment process.

Default value:
0
Example:
Consider a longitudinal object. The object can be localized shifted alongside its axis of translation symmetry, therefore, we employ the translation symmetry alignment. However, sometimes it is also slightly rotated while still having a considerably high overlap value based on surface matching.
  • Blue - point cloud

  • Green - original candidate with model feature regions (red)

Image 22 - Minimal overlap initial evaluation - the original candidate is quickly rejected because it cannot be improved by the translation symmetry alignment
An original candidate such as this one cannot be improved by the translation alignment. To quickly reject such candidates the Minimal overlap initial evaluation threshold can be increased.
Original candidates will be:

image24

  • Accepted for feature alignment process if they are just shifted alongside the axis of translation symmetry because the cumulative overlap in all model feature regions will yield considerably high values - higher than the value of Minimal overlap initial evaluation threshold.

  • Rejected for feature alignment process if they rotated (and possibly also shifted alongside the axis of translation symmetry) because the cumulative overlap in all model feature regions will yield considerably low values - lower than the value of Minimal overlap initial evaluation threshold.

Minimal overlap [%]
Description:
The value defines the minimal required cumulative overlap in all model feature regions.
It is evaluated for the best of the generated alignment candidates which was chosen during the model feature alignment process.
If the overlap is lower, the candidate is rejected. Therefore it ensures only candidates with a sufficiently high cumulative overlap within the model feature region(s) are accepted.
This parameter can also be used when a model feature is defined without any feature alignment.
Since the localization engine generates multiple original candidates which might end-up as the best fit for the localized object, it is possible to quickly reject those with sufficiently high general overlap but no or too small overlap in the model feature region.
Default value:
0
Example:
Consider a cylindrical object with a feature on its side. The object can be localized incorrectly rotated around its axis of rotation symmetry - the feature does not align with the point cloud.
In a situation where there is none or not good-enough visibility of the feature, increasing the Minimal overlap threshold will cause rejection of all generated alignment candidates, which in the end means the object will not be localized.
  • Left - object pose “guessed” by the localization engine with Minimal overlap = 0%

  • Right - object not found with Minimal overlap = 40%

Image 23 - Minimal overlap used to not localize the object when the feature is not visible
Model feature alignment method
Description:
Since the feature alignment process generates candidates with a fixed step, even the best candidate might not completely match the captured point cloud of the object feature.
It might not be necessary to further fine-tune the pose of a generated alignment candidate to improve the matching. However, if applicable, this setting allows to do so by using the fine alignment algorithm before the computation of the final overlap in the model feature region.
Available options are:

image25

  • Without fine alignment - The fine alignment algorithm is not applied.

  • With fine alignment - The fine alignment algorithm is applied.

  • Recurrent with fine alignment - The fine alignment algorithm is applied and feature alignment is repeated one more time.

Default value:
Without fine alignment
Example:
Consider a cylindrical object with a feature on its side. Using the Rotation feature alignment the feature was successfully localized. However, by employing the fine alignment algorithm on the best of the generated alignment candidates, it can be further improved.
  • Left - object pose found by the localization engine with Model feature alignment method set to Without fine alignment

  • Right - object pose found by the localization engine with Model feature alignment method set to With fine alignment (improved)

Image 24 - Improved localization accuracy with fine alignment executed after Model feature alignment

image26

Model feature alignment point set
Description:
This setting defines the set of points used for computation of overlap within the model feature regions. Depending on the object a different set might yield better results.
Available options are:
  • Surface - useful for model features which do not have well-defined edges (surface is mostly rounded).

  • Edges - useful for model features which do have well-defined edges.

Default value:
Surface