This is definitely possible using F # with one of the .NET wrappers on top of OpenCV. For example, below is the “Hello World” snippet that comes with EmguCV , translated from C # to F #, which works just fine:
open Emgu.CV
open Emgu.CV.CvEnum
open Emgu.CV.Structure
[<EntryPoint>]
let main(_) =
let win1 = "Test Window"
CvInvoke.cvNamedWindow(win1) |> ignore
use img = new Image<Bgr, byte>(400, 200, Bgr(255.,0.,0.))
let f = ref (MCvFont(FONT.CV_FONT_HERSHEY_COMPLEX, 1., 1.))
img.Draw("Hello, World", f, System.Drawing.Point(10,80), Bgr(0.,255.,0.))
CvInvoke.cvShowImage(win1, img.Ptr)
CvInvoke.cvWaitKey(0) |> ignore
CvInvoke.cvDestroyWindow(win1)
0
- EmguCV #, . F # .