Posts

Showing posts from July, 2011

Image Processing Using Excel VBA

This subroutine can load a RGB 24 bit 16 pixel x 16 pixel raw file as a binary file and convert the color image of the raw file to a gray image. Sub OpenBinaryFile_ExtractRGB_2DArray()         Dim sFilePath As String     Dim sSaveFilePath As String     Dim sFolderPath As String     Dim sReadFileName As String     Dim sWritefileNmae As String                 Dim i As Integer     Dim j As Integer         Dim R_x As Integer     Dim R_y As Integer     Dim G_x As Integer     Dim G_y As Integer     Dim B_x As Integer     Dim B_y As Integer     Dim Gray_x As Integer     Dim Gray_y As Integer         Dim xsize As Integer     Dim ysize As Integer         Dim R_image_x0 As Integer     Dim R_image_y0 As Integer     Dim G_image_x0 As Integer     Dim G_image_y0 As Integer     Dim B_image_x0 As Integer     Dim B_image_y0 As Integer     Dim Gray_image_x0 As Integer     Dim Gray_image_y0 As Integer         Dim R(16, 16) As Byte     Dim G(16, 16) As Byte     Dim B(