Why Procrustes method gives error if 2 matrices representing multiband images of the same dimensions are used as X and Y?

Is there anybody who can help me by giving some suggestions regarding orthogonal transformation in matlab? I applied Principal Component Analysis on my 6-bands multispectral image. Now, I want to rotate its axes orthogonally according to the axes of another image of the same dimensions and size in all aspects. I tried to use Procrustes method on my multispectral images. I first converted both images from 6-bands to 3 bands size. I am trying to transform Y according to X, but error occurred with message that either of the matrices should be scalar. I am using matlab2012b.If I use simple matrices as X and Y which has no band issue then Procrustes method work very well. But I don't know how to use it for multispectral bands. Could anyone give me some suggestion how to address this issue?
Here, I am copying the commands and error messages:
>> X= multibandread('G:\Data Processing\Landsatimage\PCA-with-3-components',[2236, 5450, 3], 'float', 0, 'bsq','ieee-le',{'Row','Direct',[1:500]}, {'Column','Direct',[1:500]}); >> Y= multibandread('G:\Data Processing\Landsatimage\PCAonstratified-randomsample-24371pixels',[2236, 5450, 6], 'float', 0, 'bsq','ieee-le',{'Row','Direct',[1:500]},{'Column','Direct',[1:500]},{'Band','Direct',[1,2,3]}); >> whos('X') Name Size Bytes Class Attributes
X 500x500x3 6000000 double
>> whos('Y') Name Size Bytes Class Attributes
Y 500x500x3 6000000 double
>> [d, Z, tr] = procrustes(X, Y); Operands to the and && operators must be convertible to logical scalar values.
Error in procrustes (line 103) if ~constX && ~constY

Answers (0)

Asked:

on 19 Sep 2013

Community Treasure Hunt

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

Start Hunting!