#002B Image representation in a computer
Image representation in a computer
The computer stores 3 separate matrices corresponding to the red, green and blue (RGB)
Notation that we will follow is shown in the table below:
| \( x\in\mathbb{R}^{n_{x}}, y\in\begin{Bmatrix}0,1 \end{Bmatrix} \) |
| \( \begin{Bmatrix}(x^{(1)},y^{(1)}),(x^{(2)},y^{(2)}),…,(x^{(m)},y^{(m)})\end{Bmatrix}\) |
| \( X=\begin{Bmatrix}. & . & & . &\\ . & . & & . &\\ x^{(1)} & ^{(2)}& … & x^{(m)}& \\. & .& &. & \\ . & . & & . &\\ \end{Bmatrix} \) |
| \( y=\begin{bmatrix}y^{(1)}, &y^{(2)},&… &,&y^{(m)}\end{bmatrix}\) |
| \( m \times n_{x} \) |
| \( y\in\mathbb{R}^{1 \times m}\) |
| X.shape \( (n, m) \) |
| y.shape \( (1,m) \) |
In the next post, we will learn about Optimizing the Cost Function in Logistic Regression.
More resources on the topic:
For more resources about image representation in computers, check these other sites.