Grayscale conversion¶
Images may be exported and displayed in color (RGB) or grayscale from within the GUI. Converting the RGB images into grayscale is done by combining the three color channels of each pixel using the following equation:
\[\begin{split}\begin{bmatrix}
p_{gray}
\end{bmatrix}_{x, y}
=
\begin{bmatrix}
0.2125 & 0.7154 & 0.0721
\end{bmatrix}
\begin{bmatrix}
p_r \\
p_g \\
p_b
\end{bmatrix}_{x, y}\end{split}\]
where \(p_r\) is the red channel value, \(p_g\) is the green channel value, and \(p_b\) is the blue channel value of pixel \((x, y)\). The vector \(\begin{bmatrix} 0.2125 & 0.7154 & 0.0721 \end{bmatrix}\) represents the fraction of the red, green, and blue pixel channels of pixel \((x, y)\) to be summed to create \(p_{gray}\), the pixel’s grayscale value.