X-Git-Url: http://git.euphorik.ch/?p=master-thesis.git;a=blobdiff_plain;f=Parasitemia%2FParasitemiaCore%2FImgTools%2FIO.fs;fp=Parasitemia%2FParasitemiaCore%2FImgTools%2FIO.fs;h=219eab66d58437057c7f6d38b7c7a30d2b9664a9;hp=0000000000000000000000000000000000000000;hb=3f8b0d281b3058faf23dbd0363de440bd04c6574;hpb=e3842630f4d36c5ea8c8a0c3d4762684e1c510f4 diff --git a/Parasitemia/ParasitemiaCore/ImgTools/IO.fs b/Parasitemia/ParasitemiaCore/ImgTools/IO.fs new file mode 100644 index 0000000..219eab6 --- /dev/null +++ b/Parasitemia/ParasitemiaCore/ImgTools/IO.fs @@ -0,0 +1,15 @@ +module ParasitemiaCore.IO + +open System +open System.Drawing + +open Emgu.CV +open Emgu.CV.Structure + +let saveImg (img: Image<'TColor, 'TDepth>) (filepath: string) = + img.Save(filepath) + +let saveMat (mat: Matrix<'TDepth>) (filepath: string) = + use img = new Image(mat.Size) + mat.CopyTo(img) + saveImg img filepath