To determine whether your assessment is accurate, replace the line
with
which is the 3 x 3 identity matrix. If the reshape() is doing the work and the pca() is not contributing anything then the output you get back will look the same as you get in the pca() case. If the output you get back is significantly different than what you get in the pca() case then the pca() has done something useful.
Note: what that code demo is doing is essentially determining the correlation that the three color planes (Red, Green, Blue) have with each other.
Best Answer