friday-0.2.3.1: A functional image processing library for Haskell.

Safe HaskellNone
LanguageHaskell2010

Vision.Image.Transform

Description

Provides high level functions to do geometric transformations on images.

Every transformation is been declared INLINABLE so new image types could be specialized.

Synopsis

Documentation

data InterpolMethod Source #

Defines the set of possible methods for pixel interpolations when looking for a pixel at floating point coordinates.

Constructors

TruncateInteger

Selects the top left pixel (fastest).

NearestNeighbor

Selects the nearest pixel (fast).

Bilinear

Does a double linear interpolation over the four surrounding points (slow).

crop :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => Rect -> i1 -> i2 Source #

Maps the content of the image's rectangle in a new image.

resize :: (Image i1, Interpolable (ImagePixel i1), FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2, Integral (ImageChannel i1)) => InterpolMethod -> Size -> i1 -> i2 Source #

Resizes the Image using the given interpolation method.

horizontalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2 Source #

Reverses the image horizontally.

verticalFlip :: (Image i1, FromFunction i2, ImagePixel i1 ~ FromFunctionPixel i2) => i1 -> i2 Source #

Reverses the image vertically.

floodFill :: (PrimMonad m, MutableImage i, Eq (ImagePixel (Freezed i))) => Point -> ImagePixel (Freezed i) -> i (PrimState m) -> m () Source #

Paints with a new value the pixels surrounding the given point of the image which have the same value as the starting point.