CV-0.3.7: OpenCV based machine vision library

Safe HaskellNone

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 Source

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)Source

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

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 bSource

Convert a pixelwise construct to image.

toImagePar :: (SetPixel (Image a b), CreateImage (Image a b)) => Int -> Pixelwise (SP (Image a b)) -> Image a bSource

Convert a pixelwise construct to image.

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

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 bSource

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

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

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

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

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 bSource

Shorthand for `a $ fromImage b`

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

Shorthand for `a * fromImage b`