pca2

From DavinciWiki
(Redirected from Pca2)
Jump to: navigation, search

Description

This function computes principal component images from an input image and a set of eigenvectors. This function is different from pca in that it allows for application to various multiband images in multiple data formats. It also take the output from eigen2, which calculates the eigenvectors the slow way, which greatly increases the accuracy of higher order eigenvectors and eigenvalues.

Arguments and Return Values

Arguments: Input image cube, output structure from eigen2.

Return Value: Image cube with the same x and y dimensions as the input and the same z dimension as the number of input eigenvectors and aigenvalues.

Usage

Syntax: pca2(image,ev)

image: surface pressure (m x n x k array)

ev: output structure from eigen2 containing .evecs (k x j x 1 array), .evals (j x 1 x 1 array), .avg (k x 1 x 1 array), and .C (i x j x 1 array)

Arrays are arbitrary in size, but 'k' must be the same in image and ev.evecs.

Examples

dv> a
272x242x8 array of float, bsq format [2,106,368 bytes]
dv> ev = eigen2(a[1:272:5,1:242:5]*5000,8)

EV#  Iterat.  Eigenvalue
---+--------+-----------
1      200      771.579984
2      21      2.266776
3      49      0.748638
4      31      0.491434
5      38      0.257143
6      142      0.168165
7      53      0.150262
8      4      0.114633 

struct, 4 elements
    evecs: 8x8x1 array of double, bsq format [512 bytes]
    evals: 8x1x1 array of float, bsq format [32 bytes]
    avg: 8x1x1 array of double, bsq format [64 bytes]
    C: 2695x8x1 array of float, bsq format [86,240 bytes]
dv> apc = pca2(a,ev)
272x242x8 array of double, bip format [4,212,736 bytes]
dv> 

Images

Individual principal component images from the example above. PC1 is the upper left image and PC8 is the lower right image. jpca1.png

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Major Sub-Functions

Related Functions

Recent Library Changes

Created On: 01-01-2008
Modified On: 01-17-2008

Personal tools