class ov::reference::GetOriginalCoordinate

Overview

Calculation of the source coordinate using the resized coordinate. More…

#include <interpolate.hpp>

class GetOriginalCoordinate
{
public:
    // construction

    GetOriginalCoordinate();
    GetOriginalCoordinate(Transform_mode mode);

    // methods

    float operator () (
        float x_resized,
        float x_scale,
        float length_resized,
        float length_original
        ) const;
};

Detailed Documentation

Calculation of the source coordinate using the resized coordinate.

Construction

GetOriginalCoordinate()

Constructs calculation of a nearest pixel in the default mode.

GetOriginalCoordinate(Transform_mode mode)

Constructs calculation of the source coordinate.

Parameters:

mode

the mode of the calculation of the source coordinate.

Methods

float operator () (
    float x_resized,
    float x_scale,
    float length_resized,
    float length_original
    ) const

Performing the source coordinate calculation.

Parameters:

x_resized

resized coordinate

x_scale

scale for the considered axis

length_resized

length of the resized axis

length_original

original length of the axis

Returns:

the source coordinate