ZEISS Knowledge Base
Help
ZEISS Knowledge Base

Objects contacts analysis

This article describes how to perform the objects contacts analysis in arivis Vision4D.

Introduction

Identifying the contacts between adjacent objects belonging to the same TAG, is a complex task that requires to detect the space on which two objects edges are touching or overlapping each other. Objects can be in contact either sharing a single voxel rather than more volume.

The python script is available as stand alone code as well as operator.

Please Contact the arivis application support to know how to get either the stand alone script or the operator script.

The process to achive the contacts analysis is executed  as two separate processes:

  • Identifying the overlapping object bounding boxes
  • Verifying if the objects withing the touching bounding boxes are really in contact or overlapped.

Contacts analysis theory

The first step evaluates the Objects candidates checking their bounding box. If the bounding boxes of two, contiguous objects are overlapped, these objects are potentially in contact between them.

This approach does not warrant a perfect contact detection. As you can see here below, the bounding boxes can overlap each other but the related objects are not in contact. It speed-up the next step, the contact refining, allowing to check only the objects potentially in contact.

The second step (optional) converts the shape of the objects candidates in their binary representation. The binary maskes are added and, if a common volume is detected, the contact is confirmed.

Set the stand alone Script options

Open Python Script Editor. From the Extra menu, select the Script Editor item.

Load the Python Script “ContactBetweenObjects_RevC(4_0).py” browsing the folder on which the file has been saved.

Here below how to set the stand alone script options.

TAG_SEGMENTS: Define the TAG name to which the source objects belong to.

NOTE: the TAG name is case sensitive

REFINE_CONTACTS: If True, the refine contacts step is executed. Otherwise, only the bounding boxes are used to find the objects connections.

SAVE_CSV: Sets it True to save the connections information (Parent ID, Children Ids, Children volumes) to a CSV file.

PATH_CSV: Sets a local folder where the CSV file is saved.

Be sure the folder exist in your hard disk.

NOTE: Uses a single ‘/’ or a double ‘\\’ slash as folder separators

CSV_EXT: Sets the CSV file extension (TXT or CSV).

Impressum
Carl-Zeiss-Strasse 22
73447 Oberkochen
Germany
Legal