Faq create multivariate image from separate images

From Eigenvector Research Documentation Wiki
Revision as of 06:26, 18 October 2018 by imported>Lyle (Created page with "===Issue:=== How do I concatenate multiple files into a single DataSet? ===Possible Solutions:=== If you are performing PCA on a multivariate image, you may need to constru...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Issue:

How do I concatenate multiple files into a single DataSet?

Possible Solutions:

If you are performing PCA on a multivariate image, you may need to construct a 3 dimensional (MxNxP) array where each image is MxN pixels and there are P images. An easy way to do this is using the Matlab cat() command.

>>mvimg = cat(3, img1, img2, img3);

Note the first argument = 3, this indicates the concatenation is occurring along the 3rd dimension.