--- title: "Adjust the camera arrangement" slug: "adjust-the-line-distance" updated: 2024-07-16T07:43:39Z published: 2024-07-16T07:43:39Z canonical: "docs-linescan.alliedvision.com/adjust-the-line-distance" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs-linescan.alliedvision.com/llms.txt > Use this file to discover all available pages before exploring further. # Adjust the camera arrangement ## Line Distance (ImageCalibrationLineDistance) ### What is line distance? allPIXA color linescan cameras have 3 color lines (RGB) to provide the best possible image quality. Therefore, a real sensor value is available for each pixel in all 3 color channels, no demosaicing with the resulting loss of resolution is necessary. All lines are physically arranged at different positions on the sensor. This results in a shift of the 3 color channels in the raw image. All allPIXA cameras provide an internal correction function for this physically caused effect. ![svg-camera-line-distance](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/svg-camera-line-distance.svg) ### Setting up the parameters In a standard setup where the camera is aligned perpendicular to the object and the resolution in the sensor direction equals the resolution in the transport direction, the Line Distance parameter is 2. | Step | Description | | --- | --- | | 1. Calculate the *LineDistance* parameter | ![line_distance_v1](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/line_distance_v1.PNG) or ![line_distance_v2](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/line_distance_v2.PNG) | | 1. Navigate in the feature tree to *Image Calibration Control* → *Camera Arrangement* | | | 1. Set the *LineDistance* parameter *ImageCalibrationLineDistance* | | | 1. There are different options available to set the transport direction with the parameter *ScanDirectionSource* and *ScanDirection* | | ### Effect of the Line Distance parameter > [!NOTE] > NOTE > > An incorrect ScanDirection also produces a subpixel shift or colored fringes. | With correct *LineDistance (subpixel compensation)* | Without correct *LineDistance (subpixel compensation)* | | --- | --- | | ![](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image.png) | ![](https://cdn.document360.io/eca58697-9c2f-461e-9f0a-e6205b74b693/Images/Documentation/image(1).png) | ## Scan Direction Source The camera has various options for automatically detection the scanning direction. The configuration can be done in the **camera feature tree** by executing the following steps: | Step | Description | | --- | --- | | 1. Navigate in the feature tree to *Image Calibration Control* → *Camera Arrangement* | | | 1. Set the *ScanDirectionSource* | **Internal**: Specifies internal scanning direction source **Line3**: Specifies scanning direction source by the level of Line3 **Encoder0**: Specifies scanning direction source by Encoder0, therefore EncoderSourceA and EncoderSourceB must be connected. | ## Scan Direction With the **Scan Direction** parameter the camera is able to control the processing of the output. It depends on the camera sensor and the mounting position. The configuration can be done in the **camerea feature tree** by executing the following steps: | Step | Description | | --- | --- | | 1. Navigate in the feature tree to *Image Calibration Control* → *Camera Arrangement* | | | 1. Set the *ScanDirection* | **Forward:** Specified the forward scanning direction, for example RGB output. **Backward:** Specified the backward scanning direction, for example BGR output. |