Skip to content

DepthAttribute

Moscowsky Anton edited this page Feb 10, 2023 · 11 revisions

Depth

A pseudo-attribute that determines the distance to the object from the map by its bordering rectangle and counts the translation into three-dimensional coordinates. If the object is outside the depth map, then the translation will not be added, and if there are no other attributes for extracting the distance, a standard unit transform will be added to the object.

Modes Accuracy assessment 3D-translation 3D-rotation Contour extraction Additional info
E - - -

1. Modes

1.1. Detect

Not implemented

1.2. Check

Not implemented

1.3. Extract

Determines the distance to the object and calculates the translation vector in 3D space to the center of the object. Modes:

  • 0 - Takes median in rect of object
  • 1 - As 0 but reduce rect twice **Modes 0 and 1 works only for registered depth" (see depth_registration).
  • 2 - Recalculates center of object in depth map coordinates, can be used for different sized and unregistered depth maps, but object must have its translation calculated, for eg. by UnitTranslation.
  • 3 - Uses contour of object to create mask, inside of which median is calculated.

2. XML-description

2.1. Common parameters

  • Name (string, must be set) attribute unique name
  • Type (string, must be "Depth") attribute type
  • Weight (double, default: 1) attribute weight
  • Probability (double, default: 0.75) not used in this attribute
  • Contour (bool, default: true) not used in this attribute

2.2. Special parameters

  • mode (int, default: 0) Mode of extraction

2.3. Example

Important specify DEPTH in the Channel parameter in the object that uses this attribute.

<?xml version="1.0" ?>

<AttributeLib>
    
    <Attribute Name="COCO_Dnn" Type="Dnn" framework="tensorflow" weights="ssd_mobilenet_v1_coco_2017_11_17/frozen_inference_graph.pb" config="ssd_mobilenet_v1_coco_2017_11_17/config.pbtxt" labels="ssd_mobilenet_v1_coco_2017_11_17/mscoco_label_map.pbtxt" inputWidth="300" inputHeight="300" Probability="0.75" obj_id="-1"/>
    
    <Attribute Name="DepthKinect" Type="Depth" mode="0"/>    
    
</AttributeLib>

<SimpleObjectBase>             
    
    <SimpleObject Name="COCO_dnn_object_depth" ID="64">              
        <Attribute Type="Detect">COCO_Dnn</Attribute>
        <Attribute Type="Extract" Channel="DEPTH">DepthKinect</Attribute>                  
    </SimpleObject>    
    
</SimpleObjectBase>

depth example

Clone this wiki locally