zozo ahmed

zozo ahmed

  • NA
  • 18
  • 16.1k

convert each location from array of bytes to double

Jan 7 2014 1:11 PM
I need to convert each location of bytes arrays to double ,it can not run with Bitconverter:
 
byte[,] R = new byte[width, height]; 
byte[,] G = new byte[width, height]; 
byte[,] B = new byte[width, height];  
double[,] Y1 = new double[width, height]; 
for (int x = 0; x < width; x++) 
 for (int y = 0; y < height; y++) 
    { 
           double ee = BitConverter.ToDouble(R[x, y], x, y);
           double ee1 = BitConverter.ToDouble(G[x, y], x, y); 
           double ee2 = BitConverter.ToDouble(B[x, y], x, y);     
           Y1[x, y] = (0.39 * ee) + (0.59 * ee1) + (0.12 * ee2);
}
Is there method for convert each location of byte array to double??

 

Answers (1)