friday 0.2.3.1 → 0.2.3.2
raw patch · 4 files changed
+10/−9 lines, 4 filesdep ~containersdep ~primitivedep ~transformersPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: containers, primitive, transformers
API changes (from Hackage documentation)
- Vision.Histogram: instance (Foreign.Storable.Storable a, GHC.Show.Show a, GHC.Show.Show sh) => GHC.Show.Show (Vision.Histogram.Histogram sh a)
- Vision.Histogram: instance (GHC.Classes.Eq a, GHC.Classes.Eq sh, Foreign.Storable.Storable a) => GHC.Classes.Eq (Vision.Histogram.Histogram sh a)
- Vision.Histogram: instance (GHC.Classes.Ord a, GHC.Classes.Ord sh, Foreign.Storable.Storable a) => GHC.Classes.Ord (Vision.Histogram.Histogram sh a)
- Vision.Histogram: type family PixelValueSpace p;
- Vision.Image.Class: type family FromFunctionPixel i;
- Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix ~ Vision.Image.Class.ImagePixel src, res_pix ~ Vision.Image.Class.FromFunctionPixel res) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.BoxFilter src_pix init acc res_pix)
- Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix ~ Vision.Image.Class.ImagePixel src, res_pix ~ Vision.Image.Class.FromFunctionPixel res) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.BoxFilter1 src_pix init res_pix)
- Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix ~ Vision.Image.Class.ImagePixel src, res_pix ~ Vision.Image.Class.FromFunctionPixel res, Vision.Image.Filter.Internal.SeparatelyFiltrable src res acc) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.SeparableFilter src_pix init acc res_pix)
- Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix ~ Vision.Image.Class.ImagePixel src, res_pix ~ Vision.Image.Class.FromFunctionPixel res, Vision.Image.Filter.Internal.SeparatelyFiltrable src res src_pix) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.SeparableFilter1 src_pix init res_pix)
- Vision.Image.Filter.Internal: type family SeparableFilterAccumulator src res acc;
- Vision.Image.Grey.Type: instance Data.Bits.Bits Vision.Image.Grey.Type.GreyPixel
- Vision.Image.Mutable: type family Freezed i;
- Vision.Image.Type: instance (Foreign.Storable.Storable p, GHC.Show.Show p) => GHC.Show.Show (Vision.Image.Type.Manifest p)
- Vision.Image.Type: instance (GHC.Classes.Eq p, Foreign.Storable.Storable p) => GHC.Classes.Eq (Vision.Image.Type.Manifest p)
- Vision.Image.Type: instance (GHC.Classes.Ord p, Foreign.Storable.Storable p) => GHC.Classes.Ord (Vision.Image.Type.Manifest p)
- Vision.Primitive.Shape: data (:.) tail head
- Vision.Primitive.Shape: instance (GHC.Classes.Eq head, GHC.Classes.Eq tail) => GHC.Classes.Eq (tail Vision.Primitive.Shape.:. head)
- Vision.Primitive.Shape: instance (GHC.Classes.Ord head, GHC.Classes.Ord tail) => GHC.Classes.Ord (tail Vision.Primitive.Shape.:. head)
- Vision.Primitive.Shape: instance (GHC.Read.Read head, GHC.Read.Read tail) => GHC.Read.Read (tail Vision.Primitive.Shape.:. head)
- Vision.Primitive.Shape: instance (GHC.Show.Show head, GHC.Show.Show tail) => GHC.Show.Show (tail Vision.Primitive.Shape.:. head)
+ Vision.Histogram: -- <a>DIM1</a> whereas three-channels pixels will be <a>DIM3</a>. This is
+ Vision.Histogram: -- used to determine the rank of the generated histogram.
+ Vision.Histogram: -- | Gives the value space of a pixel. Single-channel pixels will be
+ Vision.Histogram: instance (Foreign.Storable.Storable a, GHC.Classes.Eq sh, GHC.Classes.Eq a) => GHC.Classes.Eq (Vision.Histogram.Histogram sh a)
+ Vision.Histogram: instance (Foreign.Storable.Storable a, GHC.Classes.Ord sh, GHC.Classes.Ord a) => GHC.Classes.Ord (Vision.Histogram.Histogram sh a)
+ Vision.Histogram: instance (GHC.Show.Show sh, GHC.Show.Show a, Foreign.Storable.Storable a) => GHC.Show.Show (Vision.Histogram.Histogram sh a)
+ Vision.Histogram: type PixelValueSpace p;
+ Vision.Image.Class: type FromFunctionPixel i;
+ Vision.Image.Class: type ImagePixel i;
+ Vision.Image.Class: type PixelChannel p;
+ Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix GHC.Types.~ Vision.Image.Class.ImagePixel src, res_pix GHC.Types.~ Vision.Image.Class.FromFunctionPixel res) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.BoxFilter src_pix init acc res_pix)
+ Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix GHC.Types.~ Vision.Image.Class.ImagePixel src, res_pix GHC.Types.~ Vision.Image.Class.FromFunctionPixel res) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.BoxFilter1 src_pix init res_pix)
+ Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix GHC.Types.~ Vision.Image.Class.ImagePixel src, res_pix GHC.Types.~ Vision.Image.Class.FromFunctionPixel res, Vision.Image.Filter.Internal.SeparatelyFiltrable src res acc) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.SeparableFilter src_pix init acc res_pix)
+ Vision.Image.Filter.Internal: instance (Vision.Image.Class.Image src, Vision.Image.Class.FromFunction res, src_pix GHC.Types.~ Vision.Image.Class.ImagePixel src, res_pix GHC.Types.~ Vision.Image.Class.FromFunctionPixel res, Vision.Image.Filter.Internal.SeparatelyFiltrable src res src_pix) => Vision.Image.Filter.Internal.Filterable src res (Vision.Image.Filter.Internal.SeparableFilter1 src_pix init res_pix)
+ Vision.Image.Filter.Internal: type SeparableFilterAccumulator src res acc;
+ Vision.Image.Grey.Type: instance GHC.Bits.Bits Vision.Image.Grey.Type.GreyPixel
+ Vision.Image.Mutable: -- | The type of the immutable version of the mutable image <tt>i</tt>.
+ Vision.Image.Mutable: type Freezed i;
+ Vision.Image.Type: instance (Foreign.Storable.Storable p, GHC.Classes.Eq p) => GHC.Classes.Eq (Vision.Image.Type.Manifest p)
+ Vision.Image.Type: instance (Foreign.Storable.Storable p, GHC.Classes.Ord p) => GHC.Classes.Ord (Vision.Image.Type.Manifest p)
+ Vision.Image.Type: instance (GHC.Show.Show p, Foreign.Storable.Storable p) => GHC.Show.Show (Vision.Image.Type.Manifest p)
+ Vision.Primitive.Shape: data tail :. head
+ Vision.Primitive.Shape: infixl 3 :.
+ Vision.Primitive.Shape: instance (GHC.Classes.Eq tail, GHC.Classes.Eq head) => GHC.Classes.Eq (tail Vision.Primitive.Shape.:. head)
+ Vision.Primitive.Shape: instance (GHC.Classes.Ord tail, GHC.Classes.Ord head) => GHC.Classes.Ord (tail Vision.Primitive.Shape.:. head)
+ Vision.Primitive.Shape: instance (GHC.Read.Read tail, GHC.Read.Read head) => GHC.Read.Read (tail Vision.Primitive.Shape.:. head)
+ Vision.Primitive.Shape: instance (GHC.Show.Show tail, GHC.Show.Show head) => GHC.Show.Show (tail Vision.Primitive.Shape.:. head)
- Vision.Histogram: Histogram :: !sh -> !(Vector a) -> Histogram sh a
+ Vision.Histogram: Histogram :: !sh -> !Vector a -> Histogram sh a
- Vision.Histogram: [vector] :: Histogram sh a -> !(Vector a)
+ Vision.Histogram: [vector] :: Histogram sh a -> !Vector a
- Vision.Histogram: class (Pixel p, Shape (PixelValueSpace p)) => ToHistogram p where type PixelValueSpace p where {
+ Vision.Histogram: class (Pixel p, Shape (PixelValueSpace p)) => ToHistogram p where {
- Vision.Histogram: histogram2D :: (Image i, ToHistogram (ImagePixel i), Storable a, Num a, HistogramShape (PixelValueSpace (ImagePixel i))) => ((PixelValueSpace (ImagePixel i)) :. Int) :. Int -> i -> Histogram (((PixelValueSpace (ImagePixel i)) :. Int) :. Int) a
+ Vision.Histogram: histogram2D :: (Image i, ToHistogram (ImagePixel i), Storable a, Num a, HistogramShape (PixelValueSpace (ImagePixel i))) => ((PixelValueSpace (ImagePixel i) :. Int) :. Int) -> i -> Histogram ((PixelValueSpace (ImagePixel i) :. Int) :. Int) a
- Vision.Image.Class: class FromFunction i where type FromFunctionPixel i fromFunctionLine size line f = fromFunction size (\ pt@(Z :. y :. _) -> f (line y) pt) fromFunctionCol size col f = fromFunction size (\ pt@(Z :. _ :. x) -> f (col x) pt) fromFunctionCached size line col f = fromFunction size (\ pt@(Z :. y :. x) -> f (line y) (col x) pt) where {
+ Vision.Image.Class: class FromFunction i where {
- Vision.Image.Class: class MaskedImage i => Image i where index img = (img `linearIndex`) . toLinearIndex (shape img) linearIndex img = (img `index`) . fromLinearIndex (shape img) vector img = generate (shapeLength $ shape img) (img `linearIndex`)
+ Vision.Image.Class: class MaskedImage i => Image i
- Vision.Image.Class: class Storable (ImagePixel i) => MaskedImage i where type ImagePixel i maskedIndex img = (img `maskedLinearIndex`) . toLinearIndex (shape img) maskedLinearIndex img = (img `maskedIndex`) . fromLinearIndex (shape img) values !img = unfoldr step 0 where !n = shapeLength (shape img) step !i | i >= n = Nothing | Just p <- img `maskedLinearIndex` i = Just (p, i + 1) | otherwise = step (i + 1) where {
+ Vision.Image.Class: class Storable (ImagePixel i) => MaskedImage i where {
- Vision.Image.Class: class Pixel p where type PixelChannel p where {
+ Vision.Image.Class: class Pixel p where {
- Vision.Image.Contour: Contours :: Map ContourId Contour -> !(Vector Int) -> Contours
+ Vision.Image.Contour: Contours :: Map ContourId Contour -> !Vector Int -> Contours
- Vision.Image.Contour: [contourSizes] :: Contours -> !(Vector Int)
+ Vision.Image.Contour: [contourSizes] :: Contours -> !Vector Int
- Vision.Image.Filter.Internal: Filter :: !Size -> !KernelAnchor -> !kernel -> !(Point -> src -> init) -> !fold -> !(Point -> src -> init -> acc -> res) -> !(BorderInterpolate src) -> Filter src kernel init fold acc res
+ Vision.Image.Filter.Internal: Filter :: !Size -> !KernelAnchor -> !kernel -> !Point -> src -> init -> !fold -> !Point -> src -> init -> acc -> res -> !BorderInterpolate src -> Filter src kernel init fold acc res
- Vision.Image.Filter.Internal: SeparableKernel :: !(init -> DIM1 -> src -> acc -> acc) -> !(init -> DIM1 -> acc -> acc -> acc) -> SeparableKernel src init acc
+ Vision.Image.Filter.Internal: SeparableKernel :: !init -> DIM1 -> src -> acc -> acc -> !init -> DIM1 -> acc -> acc -> acc -> SeparableKernel src init acc
- Vision.Image.Filter.Internal: [fInit] :: Filter src kernel init fold acc res -> !(Point -> src -> init)
+ Vision.Image.Filter.Internal: [fInit] :: Filter src kernel init fold acc res -> !Point -> src -> init
- Vision.Image.Filter.Internal: [fInterpol] :: Filter src kernel init fold acc res -> !(BorderInterpolate src)
+ Vision.Image.Filter.Internal: [fInterpol] :: Filter src kernel init fold acc res -> !BorderInterpolate src
- Vision.Image.Filter.Internal: [fPost] :: Filter src kernel init fold acc res -> !(Point -> src -> init -> acc -> res)
+ Vision.Image.Filter.Internal: [fPost] :: Filter src kernel init fold acc res -> !Point -> src -> init -> acc -> res
- Vision.Image.Filter.Internal: [skHorizontal] :: SeparableKernel src init acc -> !(init -> DIM1 -> acc -> acc -> acc)
+ Vision.Image.Filter.Internal: [skHorizontal] :: SeparableKernel src init acc -> !init -> DIM1 -> acc -> acc -> acc
- Vision.Image.Filter.Internal: [skVertical] :: SeparableKernel src init acc -> !(init -> DIM1 -> src -> acc -> acc)
+ Vision.Image.Filter.Internal: [skVertical] :: SeparableKernel src init acc -> !init -> DIM1 -> src -> acc -> acc
- Vision.Image.Filter.Internal: class (Image (SeparableFilterAccumulator src res acc), ImagePixel (SeparableFilterAccumulator src res acc) ~ acc, FromFunction (SeparableFilterAccumulator src res acc), FromFunctionPixel (SeparableFilterAccumulator src res acc) ~ acc) => SeparatelyFiltrable src res acc where type SeparableFilterAccumulator src res acc where {
+ Vision.Image.Filter.Internal: class (Image (SeparableFilterAccumulator src res acc), ImagePixel (SeparableFilterAccumulator src res acc) ~ acc, FromFunction (SeparableFilterAccumulator src res acc), FromFunctionPixel (SeparableFilterAccumulator src res acc) ~ acc) => SeparatelyFiltrable src res acc where {
- Vision.Image.Mutable: MutableManifest :: !Size -> !(MVector s p) -> MutableManifest p s
+ Vision.Image.Mutable: MutableManifest :: !Size -> !MVector s p -> MutableManifest p s
- Vision.Image.Mutable: [mmVector] :: MutableManifest p s -> !(MVector s p)
+ Vision.Image.Mutable: [mmVector] :: MutableManifest p s -> !MVector s p
- Vision.Image.Mutable: class Image (Freezed i) => MutableImage i where type Freezed i read !img !ix = img `linearRead` toLinearIndex (mShape img) ix linearRead !img !ix = img `read` fromLinearIndex (mShape img) ix write !img !ix !val = linearWrite img (toLinearIndex (mShape img) ix) val linearWrite !img !ix !val = write img (fromLinearIndex (mShape img) ix) val unsafeFreeze = freeze where {
+ Vision.Image.Mutable: class Image (Freezed i) => MutableImage i where {
- Vision.Image.Mutable: create :: (MutableImage i) => (forall s. ST s (i s)) -> Freezed i
+ Vision.Image.Mutable: create :: MutableImage i => (forall s. ST s (i s)) -> Freezed i
- Vision.Image.Type: Delayed :: !Size -> !(Point -> p) -> Delayed p
+ Vision.Image.Type: Delayed :: !Size -> !Point -> p -> Delayed p
- Vision.Image.Type: DelayedMask :: !Size -> !(Point -> Maybe p) -> DelayedMask p
+ Vision.Image.Type: DelayedMask :: !Size -> !Point -> Maybe p -> DelayedMask p
- Vision.Image.Type: Manifest :: !Size -> !(Vector p) -> Manifest p
+ Vision.Image.Type: Manifest :: !Size -> !Vector p -> Manifest p
- Vision.Image.Type: [delayedFun] :: Delayed p -> !(Point -> p)
+ Vision.Image.Type: [delayedFun] :: Delayed p -> !Point -> p
- Vision.Image.Type: [delayedMaskFun] :: DelayedMask p -> !(Point -> Maybe p)
+ Vision.Image.Type: [delayedMaskFun] :: DelayedMask p -> !Point -> Maybe p
- Vision.Image.Type: [manifestVector] :: Manifest p -> !(Vector p)
+ Vision.Image.Type: [manifestVector] :: Manifest p -> !Vector p
Files
- changelog +1/−0
- friday.cabal +5/−5
- src/Vision/Image/Filter/Internal.hs +1/−1
- src/Vision/Image/Type.hs +3/−3
changelog view
@@ -1,6 +1,7 @@ -*-change-log-*- v0.2.4.0 TDB+ * Minimum base is now 4.8 v0.2.3.1 December 2016 * Merge fix for storable instance
friday.cabal view
@@ -2,7 +2,7 @@ -- +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change-version: 0.2.3.1+version: 0.2.3.2 synopsis: A functional image processing library for Haskell. homepage: https://github.com/RaphaelJ/friday license: LGPL-3@@ -78,14 +78,14 @@ hs-source-dirs: src/ default-language: Haskell2010 - build-depends: base >= 4 && < 5- , containers >= 0.4 && < 0.6+ build-depends: base >= 4.8 && < 5+ , containers >= 0.4 && < 0.7.0.0 , convertible >= 1 && < 2 , deepseq >= 1.3 && < 2- , primitive >= 0.5.2.1 && < 0.7+ , primitive >= 0.5.2.1 && < 0.9 , ratio-int >= 0.1.2 && < 0.2 , vector >= 0.10.0.1 && < 1- , transformers >= 0.3 && < 0.6+ , transformers >= 0.3 && < 0.7 Test-Suite test type: exitcode-stdio-1.0
src/Vision/Image/Filter/Internal.hs view
@@ -729,7 +729,7 @@ !vec1' = let pows = [ 2^i | i <- [0..radius'] ] in V.fromList $ pows ++ (tail (reverse pows))- !vec2' = V.fromList $ map negate [1..radius'] ++ [0] ++ [1..radius']+ !vec2' = V.fromList $ map negate [1..radius'] ++ [0] ++ reverse [1..radius'] {-# INLINE sobel #-} -- Others ----------------------------------------------------------------------
src/Vision/Image/Type.hs view
@@ -54,7 +54,7 @@ shape = manifestSize {-# INLINE shape #-} - Manifest _ vec `maskedLinearIndex` ix = Just $! vec V.! ix+ Manifest _ vec `maskedLinearIndex` ix = vec V.!? ix {-# INLINE maskedLinearIndex #-} values = manifestVector@@ -234,10 +234,10 @@ safeConvert = Right . map convert {-# INLINE safeConvert #-} --- | Forces an image to be in its delayed represenation. Does nothing.+-- | Forces an image to be in its delayed representation. Does nothing. delayed :: Delayed p -> Delayed p delayed = id --- | Forces an image to be in its manifest represenation. Does nothing.+-- | Forces an image to be in its manifest representation. Does nothing. manifest :: Manifest p -> Manifest p manifest = id