Permalink
Browse files

add image expand operation

  • Loading branch information...
1 parent 8353c2a commit dabe89c8c834a315f6b586966c6379ae74e1ca9b @amnipar amnipar committed Aug 14, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 CV/Operations.hs
View
@@ -1,6 +1,7 @@
module CV.Operations
( clear
, set
+, expand
, NormType(..)
, normalize
, unitNormalize
@@ -9,6 +10,7 @@ module CV.Operations
) where
import CV.Bindings.Core
+import CV.Bindings.ImgProc
import CV.Bindings.Types
import CV.Image
import CV.ImageMath as IM
@@ -29,6 +31,12 @@ set v i = unsafePerformIO $ do
c'wrapSetAll (castPtr i_ptr) (realToFrac v) nullPtr
return i
+
+expand :: (Int,Int,Int,Int) -> Image d c -> Image d c
+expand (top,bottom,left,right) i = unsafePerformIO $
+ copyMakeBorder i top bottom left right BorderReplicate 0
+
+
data NormType =
NormC |
NormL1 |

0 comments on commit dabe89c

Please sign in to comment.