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

4 次查看(过去 30 天)
How to reshape the mean vector to a 2D mean face image in matlab?

回答(1 个)

Kaashyap Pappu
Kaashyap Pappu 2019-12-26
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!

类别

Help CenterFile Exchange 中查找有关 Images 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by