CV-0.3.5.3: OpenCV based machine vision library

Safe HaskellSafe-Infered

CV.Pixelwise

Description

 This module is an applicative wrapper for images. It introduces Pixelwise type that can be converted from and to grayscale images and which has an applicative and functor instances.

Synopsis

Documentation

data Pixelwise x

A wrapper for allowing functor and applicative instances for non-polymorphic image types.

Constructors

MkP 

Fields

sizeOf :: (Int, Int)
 
eltOf :: (Int, Int) -> x
 

fromImage :: (Num (P b), GetPixel b, Sized b, Size b ~ Size (Pixelwise (P b))) => b -> Pixelwise (P b)

fromFunction :: (Int, Int) -> ((Int, Int) -> x) -> Pixelwise x

Convert a function into construct into a Pixelwise construct

toImage :: (SetPixel (Image a b), CreateImage (Image a b)) => Pixelwise (SP (Image a b)) -> Image a b

Convert an image to pixelwise construct.

remap :: (((Int, Int) -> b) -> (Int, Int) -> x) -> Pixelwise b -> Pixelwise x

Re-arrange pixel positions and values

remapImage :: (CreateImage (Image a b), SetPixel (Image a b), Num (P (Image a b)), GetPixel (Image a b)) => (((Int, Int) -> P (Image a b)) -> (Int, Int) -> SP (Image a b)) -> Image a b -> Image a b

mapImage :: (CreateImage (Image a b), SetPixel (Image a b), Num (P (Image a b)), GetPixel (Image a b)) => (P (Image a b) -> SP (Image a b)) -> Image a b -> Image a b

mapPixels :: (t -> x) -> Pixelwise t -> Pixelwise x

imageFromFunction :: (SetPixel (Image a b), CreateImage (Image a b)) => (Int, Int) -> ((Int, Int) -> SP (Image a b)) -> Image a b

imageToFunction :: (GetPixel (Image a b), Num (P (Image a b))) => Image a b -> (Int, Int) -> P (Image a b)

Convert image to a function, which returns pixel values in the domain of the image and zero elsewhere

(<$$>) :: (Num (P b1), Size b1 ~ (Int, Int), Sized b1, GetPixel b1) => (P b1 -> b) -> b1 -> Pixelwise b

Shorthand for `a $ fromImage b`

(<+>) :: (Num (P b1), Size b1 ~ (Int, Int), Sized b1, GetPixel b1) => Pixelwise (P b1 -> b) -> b1 -> Pixelwise b

Shorthand for `a * fromImage b`