---
title: "Detection2DStepSettings< OBJ_DET_2D_TYPE::SCALE_TO >"
product: "LumiScan VGR"
component: "lumiscan-vgr"
version: "1.8.4"
display_version: "1.8.4.6"
latest_version: true
language: "en"
url: "https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-scale-to.html"
---

# Detection2DStepSettings< OBJ_DET_2D_TYPE::SCALE_TO > – LumiScan VGR

Step of the 2D detection pipeline.

Scale all current oriented bounding boxes to a fixed aspect ratio from a fixed point that is relative to their current orientation and size.

## Member Functions

- **`virtual OBJ_DET_2D_TYPE type() const override`:** *JSON Type*: string +*Requirement*: Must be OBJ_DET_2D_TYPE::SCALE_TO. Type of the 2D detection step.

## Member Variables

- **`keepAspectRatio`:** `bool`, default: `{true}` *JSON Type*: bool Toggle if the aspect ratio should be kept. This value is ignored if one of the sides has size zero.

- **`newSize`:** `float`, default: `\{100.0\}` *JSON Type*: float +*Requirement*: Must be larger than zero. Size the oriented bounding box is scaled to in pixel.

- **`modifySide`:** `SCALE_TO_SIDE_MODIFY`, default: `\{SCALE_TO_SIDE_MODIFY::LONG\}` *JSON Type*: string +*Requirement*: Must be a SCALE_TO_SIDE_MODIFY. Determine which side of the oriented bounding box should be stay the same size.

- **`fixedPoint`:** `Eigen::Vector2f`, default: `\{0.0, 0.0\}` *JSON Type*: array +*Requirement*: Must have two elements. Fixed point in oriented bounding box frame (i.e. box corners are located at [±1, ±1]).

## Enumerations

**Table 1. SCALE_TO_SIDE_MODIFY**

| Value | Description |
| --- | --- |
| `LONG` | Long side of the oriented bounding box. |
| `SHORT` | Short side of the oriented bounding box. |
| `WIDTH` | "Width" side of the oriented bounding box |
| `HEIGHT` | "Height" side of the oriented bounding box |

**Table 2. OBJ_DET_2D_TYPE**

| Value | Description |
| --- | --- |
| `SET_FULL` | All current oriented bounding boxes are set to the full image size (top is up). >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SET_FULL>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-set-full.html). |
| `SET_ROI` | All current oriented bounding boxes are set to a specified ROI (top is up). >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SET_ROI>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-set-roi.html). |
| `SET_ROI_PIPELINE` | All current oriented bounding boxes are set to the ROI of the pipeline (top is up). >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SET_ROI_PIPELINE>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-set-roi-pipeline.html). |
| `SET_OTHER` | All current oriented bounding boxes are set to the result of another 2D detection pipeline. >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SET_OTHER>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-set-other.html). |
| `SET_NETWORK` | Applies an object detection network to all current oriented bounding boxes. Returns all detected >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SET_NETWORK>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-set-network.html). |
| `FILTER_CLASSIFICATION` | Applies a classification filter to all current oriented bounding boxes. Filters out all boxes >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::FILTER_CLASSIFICATION>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-filter-classification.html). |
| `TRANSLATE` | Translate all current oriented bounding boxes relative to their current orientation and size. >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::TRANSLATE>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-translate.html). |
| `ROTATE_ANGLE` | Rotate all current oriented bounding boxes by a fixed angle around a fixed point that is relative >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::ROTATE_ANGLE>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-rotate-angle.html). |
| `SCALE` | Scale all current oriented bounding boxes by a fixed value from a fixed point that is relative >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SCALE>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-scale.html). |
| `SCALE_TO` | Scale all current oriented bounding boxes to a fixed aspect ratio from a fixed point that is relative >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SCALE_TO>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-scale-to.html#). |
| `SCALE_ASPECT` | Scale all current oriented bounding boxes to a fixed aspect ratio from a fixed point that is relative >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::SCALE_ASPECT>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-scale-aspect.html). |
| `REORIENT_ASPECT` | Modify all oriented bounding boxes "up-direction", such that the long or short size becomes the top. Note that all box corners stay the same. >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::REORIENT_ASPECT>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-reorient-aspect.html). |
| `REORIENT_CLASSIFICATION` | Modify all oriented bounding boxes "up-direction" using a classification network. The network classes must be "Links", "Rechts", "Oben", "Unten". >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::REORIENT_CLASSIFICATION>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-reorient-classification.html). |
| `FEATURE_MATCHING` | Define a set of CorrectionFeature that define features of an object. If all features are uniquely detected in a current oriented bounding box it is optimized such that the distance to these defined features is minimized. Internally an iterative Gauss-Newton algorithm is applied. >>> See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::FEATURE_MATCHING>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-feature-matching.html). |
| `ADD_INSTANCES_FROM_FILE` | See [Detection2DStepSettings\<OBJ_DET_2D_TYPE::ADD_INSTANCES_FROM_FILE>](https://docs.hdvisionsystems.com/en/lumiscan-vgr/1.8.4/api/settings/detection-2d-step-settings-obj-det-2d-type-add-instances-from-file.html). |
