-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Functional Combinators for Computer Vision -- @package cv-combinators @version 0.1.3 -- | ImageProcessors is a functional (Processor-based) interface to -- computer vision using OpenCV. -- -- The Processor interface allows the primitives in this library to take -- care of all the allocation / deallocation of resources and other -- setup/teardown requirements, and to appropriately nest them when -- combining primitives. -- -- Simple example: -- --
--   win = window 0        -- The number is essentially a label for the window
--   cam = camera 0        -- Autodetect camera
--   edge = canny 30 190 3 -- Edge detecting processor using canny operator
--   
--   test = cam >>> edge >>> win   
--   
-- -- The last expression is a processor that captures frames from camera -- and displays edge-detected version in the window. module AI.CV.ImageProcessors type ImageSink = IOSink Image type ImageSource = IOSource () Image type ImageProcessor = IOProcessor Image Image type Image = IplImage -- | A capture device, using OpenCV's HighGui lib's cvCreateCameraCapture -- should work with most webcames. See OpenCV's docs for information. -- This processor outputs the latest image from the camera at each -- invocation. camera :: Int -> ImageSource videoFile :: String -> ImageSource -- | A window that displays images. Note: windows with the same index will -- be the same window....is this ok? Response: Yes. It will display -- whatever images you give it. window :: Int -> ImageSink namedWindow :: String -> Bool -> ImageSink -- | OpenCV's cvResize resize :: Int -> Int -> InterpolationMethod -> ImageProcessor -- | OpenCV's cvDilate dilate :: Int -> ImageProcessor -- | OpenCV's cvCanny canny :: Int -> Int -> Int -> ImageProcessor -- | Wrapper for OpenCV's cvHaarDetectObjects and the surrounding required -- things (mem storage, cascade loading, etc). haarDetect :: String -> Double -> Int -> HaarDetectFlag -> CvSize -> IOProcessor Image [CvRect] -- | OpenCV's cvRectangle, currently without width, color or line type -- control drawRects :: IOProcessor (Image, [CvRect]) Image -- | Runs the processor until a predicate is true, for predicates, and -- processors that take () as input (such as chains that start with a -- camera). runTill :: IOProcessor () b -> (b -> IO Bool) -> IO b -- | Name (and type) says it all. runTillKeyPressed :: Show a => IOProcessor () a -> IO () -- | Some general utility functions for use with Processors and OpenCV -- -- Predicate for pressed keys keyPressed :: Show a => a -> IO Bool