此篇著重在C#傳遞灰階的bitmap影像資料給matlab dll的程式碼,至於如何編譯與使用matlab dll請參考本站文章build .net assembly dll for c# use by MATLAB r2011a和matlab dll usage on Visual Studio 2011。 C# ``` Bitmap bitmap = gray.ToBitmap(); int width = bitmap.Width; int height = bitmap.Height; double[,] = new double[height, width]; for (int i = 0; i <