Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into GHC_741RC2

  • Loading branch information...
commit d174fc4c211d75af69a7beae02e7aaa785f8c1f7 2 parents 159101a + 9ae5366
Ville Tirronen authored
View
13 .gitignore
@@ -1,3 +1,16 @@
+cabal-dev/
+examples/Combine.png
+examples/Fitting
+examples/Fuse
+examples/KJ12.tif
+examples/Monster
+examples/cabal-dev/
+examples/fusing_result.png
+examples/img_channel1.tif
+examples/img_channel2.tif
+examples/img_channel3.tif
+tutorial/*.swp
+
dist/
*.hi
*.o
View
42 CV/Bindings/Fittings.hsc
@@ -0,0 +1,42 @@
+{-# LANGUAGE ForeignFunctionInterface #-}
+module CV.Bindings.Fittings where
+import Data.Word
+import Foreign.C.Types
+import Foreign.Ptr
+import Foreign.Storable
+import CV.Bindings.Types
+
+#include <bindings.dsl.h>
+#include "cvWrapLEO.h"
+
+#ccall wrapFitEllipse , Ptr <CvArr> -> Ptr <CvBox2D> -> IO ()
+#ccall cvFitLine , Ptr <CvArr> -> CInt -> Double -> Double -> Double-> Ptr Float -> IO ()
+
+#num CV_DIST_USER
+#num CV_DIST_L1
+#num CV_DIST_L2
+#num CV_DIST_C
+#num CV_DIST_L12
+#num CV_DIST_FAIR
+#num CV_DIST_WELSCH
+#num CV_DIST_HUBER
+
+data Dist =
+ Dist_User
+ | Dist_L1
+ | Dist_L2
+ | Dist_C
+ | Dist_L12
+ | Dist_Fair
+ | Dist_Welsch
+ | Dist_Huber
+
+toNum Dist_User = c'CV_DIST_USER
+toNum Dist_L1 = c'CV_DIST_L1
+toNum Dist_L2 = c'CV_DIST_L2
+toNum Dist_C = c'CV_DIST_C
+toNum Dist_L12 = c'CV_DIST_L12
+toNum Dist_Fair = c'CV_DIST_FAIR
+toNum Dist_Welsch = c'CV_DIST_WELSCH
+toNum Dist_Huber = c'CV_DIST_HUBER
+
View
4 examples/Fitting.hs
@@ -0,0 +1,4 @@
+module Main where
+import CV.Fitting
+
+main = print $ fitEllipse [(0,0),(1,0),(0,1)]
View
BIN  tutorial/ResultFile.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN  tutorial/smallLena.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.