Safe Haskell | None |
---|
Provides a way to estimate the value of a pixel at rational coordinates using a linear interpolation.
- class Interpolable p where
- interpol :: (PixelChannel p -> PixelChannel p -> PixelChannel p) -> p -> p -> p
- bilinearInterpol :: (Image i, Interpolable (ImagePixel i), Integral (ImageChannel i)) => i -> RPoint -> ImagePixel i
Documentation
class Interpolable p whereSource
Provides a way to apply the interpolation to every component of a pixel.
interpol :: (PixelChannel p -> PixelChannel p -> PixelChannel p) -> p -> p -> pSource
Given a function which interpolates two points over a single channel, returns a function which interpolates two points over every channel of two pixels.
bilinearInterpol :: (Image i, Interpolable (ImagePixel i), Integral (ImageChannel i)) => i -> RPoint -> ImagePixel iSource
Uses a bilinear interpolation to find the value of the pixel at the rational coordinates.
Estimates the value of a rational point p
using a
, b
, c
and d
:
x1 x2 y1 a ------ b - - - p - - - y2 c ------ d