Well, a double is represented by 8 bytes internally using a standard format.
So, when you say that you want to convert the bytes to doubles, do you mean that:
1. you want to (somehow) take the bytes, eight at a time, and convert them to a double using the internal representation; or
2. you want to convert each byte to a double with the same value - so a byte of 1 would become the double 1.0.
If it's the latter, then the solution is simply:
for (int x = 0; x < width; x++)
for (int y = 0; y < height; y++)
Y1[x, y] = 0.39 * R[x,y] + 0.59 * G[x,y] + 0.12 * B[x,y];