opencv-0.0.0.0: Haskell binding to OpenCV-3.x

Safe HaskellNone
LanguageHaskell2010

OpenCV.Core.Types.Mat.Repa

Synopsis

Documentation

data M shape channels Source #

Representation tag for Repa Arrays for OpenCV Mats.

Instances

Storable depth => Source (M shape channels) depth Source # 

Associated Types

data Array (M shape channels) sh depth :: * #

Methods

extent :: Shape sh => Array (M shape channels) sh depth -> sh #

index :: Shape sh => Array (M shape channels) sh depth -> sh -> depth #

unsafeIndex :: Shape sh => Array (M shape channels) sh depth -> sh -> depth #

linearIndex :: Shape sh => Array (M shape channels) sh depth -> Int -> depth #

unsafeLinearIndex :: Shape sh => Array (M shape channels) sh depth -> Int -> depth #

deepSeqArray :: Shape sh => Array (M shape channels) sh depth -> b -> b #

(Shape sh, Storable depth) => NFData (Array (M shape channels) sh depth) Source # 

Methods

rnf :: Array (M shape channels) sh depth -> () #

data Array (M shape channels) Source # 
data Array (M shape channels) = Array !(Mat (S [DS Nat] shape) (S Nat channels) (S * depth)) !(Ptr Word8) ![Int] ![Int]

type family DIM (n :: Nat) :: * where ... Source #

Equations

DIM 0 = Z 
DIM n = DIM (n - 1) :. Int 

toRepa Source #

Arguments

:: forall (shape :: [DS Nat]) (channels :: Nat) (depth :: *) (dims :: Nat) (sh :: *). (Storable depth, KnownNat channels, KnownNat dims, dims ~ Length shape, sh ~ DIM (dims + 1)) 
=> Mat (S shape) (S channels) (S depth) 
-> Array (M shape channels) sh depth 

Converts an OpenCV Matrix into a Repa array.

This is a zero-copy operation.