Created
January 22, 2016 08:21
-
-
Save sudipto80/5babd395b84c9fd00f71 to your computer and use it in GitHub Desktop.
Rose And Potato
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System.IO | |
let image = System.Drawing.Image.FromFile(@"C:\personal\rose.jpg") | |
let image2 = System.Drawing.Image.FromFile(@"C:\personal\potato.jpg") | |
let ms = new MemoryStream() | |
image.Save(ms,System.Drawing.Imaging.ImageFormat.Jpeg) | |
let bytes = ms.ToArray() |> Array.map int |> List.ofArray | |
let ms2 = new MemoryStream() | |
image2.Save(ms2,System.Drawing.Imaging.ImageFormat.Jpeg) | |
let bytes2 = ms2.ToArray() |> Array.map int |> List.ofArray | |
let bytesPDF = listToHist bytes |> List.map snd | |
let bytesPDF2 = listToHist bytes2 |> List.map snd | |
let simCanberra = canberra bytesPDF bytesPDF2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment