friday-0.2.3.2: A functional image processing library for Haskell.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Vision.Image.Interpolate

Description

Provides a way to estimate the value of a pixel at rational coordinates using a linear interpolation.

Synopsis

Documentation

class Interpolable p where Source #

Provides a way to apply the interpolation to every component of a pixel.

Methods

interpol :: (PixelChannel p -> PixelChannel p -> PixelChannel p) -> p -> p -> p Source #

Given a function which interpolates two points over a single channel, returns a function which interpolates two points over every channel of two pixels.

Instances

Instances details
Interpolable Int16 Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Int32 Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Word16 Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Word32 Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Word8 Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable GreyPixel Source # 
Instance details

Defined in Vision.Image.Grey.Type

Interpolable HSVPixel Source # 
Instance details

Defined in Vision.Image.HSV.Type

Interpolable RGBPixel Source # 
Instance details

Defined in Vision.Image.RGB.Type

Interpolable RGBAPixel Source # 
Instance details

Defined in Vision.Image.RGBA.Type

Interpolable Bool Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Double Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Float Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Int Source # 
Instance details

Defined in Vision.Image.Interpolate

Interpolable Word Source # 
Instance details

Defined in Vision.Image.Interpolate

bilinearInterpol :: (Image i, Interpolable (ImagePixel i), Integral (ImageChannel i)) => i -> RPoint -> ImagePixel i Source #

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