x = 1; y = 5; z = 3;
x = ( imImage[index(i,j) + 0] +imImage[index(i,j) + 1] +imImage[index(i,j) + 2] )/3 ; // 3つの数の平均値の計算を3行に渡って記述