packages feed

HOpenCV 0.1.1 → 0.1.2

raw patch · 2 files changed

+16/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ AI.CV.OpenCV.HighGui: c_cvCreateFileCapture :: CString -> IO (Ptr CvCapture)
+ AI.CV.OpenCV.HighGui: cvCreateFileCapture :: String -> IO (Ptr CvCapture)

Files

HOpenCV.cabal view
@@ -1,5 +1,5 @@ name: HOpenCV-version: 0.1.1+version: 0.1.2 license: BSD3 maintainer: Noam Lewis <jones.noamle@gmail.com> bug-reports: mailto:jones.noamle@gmail.com@@ -9,15 +9,17 @@ description:    Initial version with very limited bindings to OpenCV 2.0. (See: <http://opencv.willowgarage.com/wiki/Welcome>)    .-   For a functional interface to this library, see the package @cv-combinators@.+   For a functional interface to this library, see the package "cv-combinators".    .-   Installation+   Online module documentation, if not build below, can be found at <http://www.ee.bgu.ac.il/~noamle/>.    .+   /Installation/+   .    You must install OpenCV (development packages) prior to installing this package. Currently only tested on Ubuntu Linux, but should work on most linux distributions. For OpenCV installation on other *nix platforms, see <http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.0/>    .-   On ubuntu systems, the appropriate version of OpenCV can be installed by:+   On /Ubuntu/ systems, the appropriate version of OpenCV can be installed by (the instructions are for Karmic):    .-   > sudo add-apt-repository ppa:gijzelaar/opencv2-karmick+   > sudo add-apt-repository ppa:gijzelaar/opencv2-karmic    > sudo apt-get update    > sudo apt-get install libcv-dev libhighgui-dev    .
src/AI/CV/OpenCV/HighGui.hs view
@@ -6,6 +6,7 @@ import Foreign.C.Types import Foreign.Ptr import Foreign.ForeignPtr+import Foreign.C.String   import AI.CV.OpenCV.CxCore @@ -28,6 +29,14 @@                            cvCreateCameraCapture :: CInt -> IO (Ptr CvCapture) cvCreateCameraCapture x = errorName "Failed to create camera" . checkPtr $ c_cvCreateCameraCapture . fromIntegral $ x+  +foreign import ccall unsafe "highgui.h cvCreateFileCapture"+  c_cvCreateFileCapture :: CString -> IO (Ptr CvCapture)+                          +cvCreateFileCapture :: String -> IO (Ptr CvCapture)+cvCreateFileCapture filename = err' . checkPtr $ withCString filename f+    where err' = errorName $ "Failed to capture from file: '" ++ filename ++ "'"+          f filenameC = c_cvCreateFileCapture filenameC     foreign import ccall unsafe "HOpenCV_warp.h release_capture"