hip-1.0.1: Haskell Image Processing (HIP) Library.

Copyright(c) Alexey Kuleshevich 2016
LicenseBSD3
MaintainerAlexey Kuleshevich <lehins@yandex.ru>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Graphics.Image.Interface.Repa

Contents

Description

 

Synopsis

Construction

makeImage Source

Arguments

:: Array RD cs Double 
=> (Int, Int)

(m rows, n columns) - dimensions of a new image.

-> ((Int, Int) -> Pixel cs Double)

A function that takes (i-th row, and j-th column) as an argument and returns a pixel for that location.

-> Image RD cs Double 

Create a delayed representation of an image.

fromLists :: Array RD cs e => [[Pixel cs e]] -> Image RD cs e Source

Construct an image from a nested rectangular shaped list of pixels.

IO

readImageY :: FilePath -> IO (Image RD Y Double) Source

Read image as luma (brightness).

readImageYA :: FilePath -> IO (Image RD YA Double) Source

Read image as luma with Alpha channel.

readImageRGB :: FilePath -> IO (Image RD RGB Double) Source

Read image in RGB colorspace.

readImageRGBA :: FilePath -> IO (Image RD RGBA Double) Source

Read image in RGB colorspace with Alpha channel.

Computation

computeS :: (Array arr cs e, Array RS cs e, Exchangable arr RS) => Image arr cs e -> Image RS cs e Source

Computes an image sequentially and ensures that all elements are evaluated.

computeP :: (Array arr cs e, Array RP cs e, Exchangable arr RP) => Image arr cs e -> Image RP cs e Source

Computes an image in parallel and ensures that all elements are evaluated.

delay :: (ManifestArray arr cs e, Array RD cs e, Exchangable arr RD) => Image arr cs e -> Image RD cs e Source

Delays an image, so further operations can be fused together.

Representation

data RD Source

Repa Delayed Array representation, which allows for fusion of computation.

Constructors

RD 

Instances

Show RD Source 
Exchangable RS RD Source

O(1) - Delays manifest array.

Exchangable RP RD Source

O(1) - Delays manifest array.

Exchangable RD RS Source

Computes delayed array sequentially.

Exchangable RD RP Source

Computes delayed array in parallel.

Elt RD cs e => Array RD cs e Source 
data Image RD Source 
type Elt RD cs e = (ColorSpace cs, Num e, Typeable * e, Elt e, Unbox e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source 

data RS Source

Repa Unboxed Array representation, which is computed sequentially.

Constructors

RS 

Instances

Show RS Source 
Exchangable VU RS Source

O(1) - Changes to Repa representation.

Exchangable RS VU Source

O(1) - Changes to Vector representation.

Exchangable RS RP Source

O(1) - Changes computation strategy.

Exchangable RS RD Source

O(1) - Delays manifest array.

Exchangable RP RS Source

O(1) - Changes computation strategy.

Exchangable RD RS Source

Computes delayed array sequentially.

ManifestArray RS cs e => MutableArray RS cs e Source 
ManifestArray RS cs e => SequentialArray RS cs e Source 
Array RS cs e => ManifestArray RS cs e Source 
Elt RS cs e => Array RS cs e Source 
data Image RS = RSImage !(Image RD cs e) Source 
type Elt RS cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source 
data MImage st RS cs e = MRSImage !(MImage st VU cs e) Source 

data RP Source

Repa Unboxed Array representation, which is computed in parallel.

Constructors

RP 

Instances

Show RP Source 
Exchangable VU RP Source

O(1) - Changes to Repa representation.

Exchangable RS RP Source

O(1) - Changes computation strategy.

Exchangable RP VU Source

O(1) - Changes to Vector representation.

Exchangable RP RS Source

O(1) - Changes computation strategy.

Exchangable RP RD Source

O(1) - Delays manifest array.

Exchangable RD RP Source

Computes delayed array in parallel.

Array RP cs e => ManifestArray RP cs e Source 
Elt RP cs e => Array RP cs e Source 
data Image RP = RPImage !(Image RD cs e) Source 
type Elt RP cs e = (ColorSpace cs, Elt e, Unbox e, Num e, Typeable * e, Elt (PixelElt cs e), Unbox (PixelElt cs e), Elt (Pixel cs e), Unbox (Pixel cs e)) Source