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.Types

Description

 

Synopsis

Documentation

class (Show arr, ColorSpace cs, Num (Pixel cs e), Functor (Pixel cs), Applicative (Pixel cs), Foldable (Pixel cs), Num e, Typeable e, Elt arr cs e) => Array arr cs e Source

Base array like representation for an image.

Associated Types

data Image arr cs e Source

Underlying image representation.

Instances

Elt VU cs e => Array VU cs e Source 
Elt RS cs e => Array RS cs e Source 
Elt RP cs e => Array RP cs e Source 
Elt RD cs e => Array RD cs e Source 

class Array arr cs e => ManifestArray arr cs e Source

Array representation that is actually has real data stored in memory, hence allowing for image indexing, forcing pixels into computed state etc.

Minimal complete definition

index, deepSeqImage, (|*|), fold, eq

Instances

Array VU cs e => ManifestArray VU cs e Source 
Array RS cs e => ManifestArray RS cs e Source 
Array RP cs e => ManifestArray RP cs e Source 

class ManifestArray arr cs e => SequentialArray arr cs e Source

Array representation that allows computation, which depends on some specific order, consequently making it possible to be computed only sequentially.

Minimal complete definition

foldl, foldr, mapM, mapM_, foldM, foldM_

class ManifestArray arr cs e => MutableArray arr cs e Source

Array representation that supports mutation.

Minimal complete definition

mdims, thaw, freeze, new, read, write, swap

Associated Types

data MImage st arr cs e Source

Instances

class Exchangable arr' arr Source

Allows for changing an underlying image representation.

Minimal complete definition

exchange

Instances

Exchangable arr arr Source

Changing to the same array representation as before is disabled and changeTo will behave simply as an identitity function.

Exchangable VU RS Source

O(1) - Changes to Repa representation.

Exchangable VU RP 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 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 RS Source

Computes delayed array sequentially.

Exchangable RD RP Source

Computes delayed array in parallel.

data Border px Source

Approach to be used near the border during transformations, which, besides a pixel of interest, also use it's neighbors, consequently going out of bounds at the edges of an image.

Constructors

Fill !px

Fill in a constant pixel.

           outside |  Image  | outside
(Fill 0) : 0 0 0 0 | 1 2 3 4 | 0 0 0 0
Wrap

Wrap around from the opposite border of the image.

           outside |  Image  | outside
Wrap :     1 2 3 4 | 1 2 3 4 | 1 2 3 4
Edge

Replicate the pixel at the edge.

           outside |  Image  | outside
Edge :     1 1 1 1 | 1 2 3 4 | 4 4 4 4
Reflect

Mirror like reflection.

           outside |  Image  | outside
Reflect :  4 3 2 1 | 1 2 3 4 | 4 3 2 1
Continue

Also mirror like reflection, but without repeating the edge pixel.

           outside |  Image  | outside
Continue : 1 4 3 2 | 1 2 3 4 | 3 2 1 4

data VU Source

Unboxed Vector representation.

Constructors

VU 

Instances

Show VU Source 
Exchangable VU RS Source

O(1) - Changes to Repa representation.

Exchangable VU RP Source

O(1) - Changes to Repa representation.

Exchangable RS VU Source

O(1) - Changes to Vector representation.

Exchangable RP VU Source

O(1) - Changes to Vector representation.

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

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