MATLAB Answers

Reshape mean vector to 2D mean face image in matlab?

1 view (last 30 days)
Kumar Thapa
Kumar Thapa on 20 Dec 2019
Answered: Kaashyap Pappu on 26 Dec 2019
How to reshape the mean vector to a 2D mean face image in matlab?

  0 Comments

Sign in to comment.

Answers (1)

Kaashyap Pappu
Kaashyap Pappu on 26 Dec 2019
You can use the reshape function to change the vector into a 2-Dimensional array. Following this, you can use the imagesc function to plot the image, where each array value is represented using the appropriate colourmap.
While reshaping, it is important to note that MATLAB’s vector indexing follows a column-major approach.
Hope this helps!

  0 Comments

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by