> ## Documentation Index
> Fetch the complete documentation index at: https://docs.abbyy.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Correct relations offsets

> Correct relations offsets by training on a reference layout: review new and old offset values, preview each relation on the image, and apply changes.

When specifying a [relative search area](/flexi-capture/fls/template/relations) for elements or [generating](/flexi-capture/fls/template/relations-generate) element relations, the offset value for the search area is defined. You can then correct relations offsets based on the reference layout of the selected pages. Offsets are calculated for all enabled relations with non-recurring elements.

## Prerequisites for offset correction

* The **Reference layout** must contain elements for which relations offsets are to be corrected.
* All pages to be included in the training set must be marked as **Use for Training** on the **Batch** tab.

## Correct relations offsets

<Steps>
  <Step title="Open the Choose Trained Relations Offsets dialog box">
    On the element's shortcut menu, select **Train Element** → **Correct Relations Offsets**. The **Choose Trained Relations Offsets** dialog box opens, showing the list of trained relations and their new and old offset values.

    <Frame>
      <img src="https://mintcdn.com/abbyy/r-nfa7jujx5b9gKX/images/flexi-capture/fls/offset_train.PNG?fit=max&auto=format&n=r-nfa7jujx5b9gKX&q=85&s=9913413a72650c90ecc81a62f4d61768" alt="Screenshot of the Choose Trained Relations Offsets dialog box, listing trained relations with their new and old offset values and a Show drop-down set to all relations, with Go to Page, Apply Changes, and Cancel buttons." width="443" height="363" data-path="images/flexi-capture/fls/offset_train.PNG" />
    </Frame>
  </Step>

  <Step title="Select which relations to view">
    From the **Show** drop-down list, select **modified relations only** to see only those relations which were modified during training, or select **all relations** to see all relations of the element.
  </Step>

  <Step title="Select the relations to apply">
    Select the checkbox to the left of the relation name to use the training result for this relation. You can select the checkbox next to the **Relation** caption to select all modified relations.
  </Step>

  <Step title="Preview a relation on the image">
    Select a relation in the list to view its visualization in the **Image** window. The reference element in the **Image** window is enclosed in a thick frame and the search area is highlighted with a green background. When selecting several relations, the intersection of the selected relations is displayed. The intersection area is highlighted with a green background, while the areas outside the intersection borders are highlighted in blue.

    <Note>
      If the corresponding checkbox is selected, the new offset value is displayed. For cleared checkboxes, the old offset values are displayed.
    </Note>
  </Step>

  <Step title="View relations on other pages of the training set">
    To view visualized relations on the next or previous page from the training set, click <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_All_Left.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=6f3826db16635949999496b43c4dde6e" alt="Previous page button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="27" height="18" data-path="images/flexi-capture/fls/Button_All_Left.gif" /> and <img src="https://mintcdn.com/abbyy/fmgRWFNHKYN2MLSg/images/flexi-capture/fls/Button_All_Right.gif?fit=max&auto=format&n=fmgRWFNHKYN2MLSg&q=85&s=749dfbf28d3479073569e0b2fb77236b" alt="Next page button" style={{display:"inline-block",verticalAlign:"middle",margin:0}} width="27" height="18" data-path="images/flexi-capture/fls/Button_All_Right.gif" /> in the bottom left corner of the window respectively. To go to the page with a specified number, click the **Go to Page...** button.
  </Step>

  <Step title="Click Apply Changes">
    The new offset values for the selected relations are saved.
  </Step>
</Steps>
