[Image] Add a sampling operator for floating point coordinates
Rodousse opened this issue · comments
Is your feature request related to a problem? Please describe.
The sampling is made as follow :
auto color = image(1,20) ;
auto sameColor = image(1.01,20.1) ; // equivalent to 'image(int(1.01), int(20.1))'
The color returned in both case will be the same.
Describe the solution you'd like
Using floating point in pixel accessor would perform a linear sampling, a nearest pixel sampling, or a custom made sampler.
Describe alternatives you've considered
A convenient way would be to use a functor to sample the image as follow :
auto color = image.at<LinearSamplingFunctor>(10.01,20.1);