1
Answer

convert each location from array of bytes to double

zozo ahmed

zozo ahmed

10y
900
1
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)