class ngraph::runtime::reference::GetNearestPixel

Overview

Calculation of nearest pixel. More…

#include <interpolate.hpp>

class GetNearestPixel
{
public:
    // construction

    GetNearestPixel();
    GetNearestPixel(Nearest_mode mode);

    // methods

    int64_t operator () (float original, bool is_downsample) const;
};

Detailed Documentation

Calculation of nearest pixel.

Construction

GetNearestPixel()

Constructs calculation of a nearest pixel in the default mode.

GetNearestPixel(Nearest_mode mode)

Constructs calculation of nearest pixel for the specified mode.

Parameters:

mode

the mode of the calculation of the nearest pixel

Methods

int64_t operator () (float original, bool is_downsample) const

Performing the nearest pixel calculation.

Parameters:

original

original coordinate

is_downsample

true if it has downsample and false otherwise

Returns:

the nearest pixel