From: su su on
Hi all
I'm using canoncorr() function to get the relationship between two images, A and B. In getting canonical variates, the matrix A and B are not full rank. So I can't get the required dimensions of canonical variates. Please give advice. Thanks.
From: Peter Perkins on
su su wrote:

> I'm using canoncorr() function to get the relationship between two images, A and B. In getting canonical variates, the matrix A and B are not full rank. So I can't get the required dimensions of canonical variates. Please give advice. Thanks.

Su, can you please provide a real example, and demonstrate what you think is wrong?
From: su su on
Peter Perkins <Peter.Perkins(a)MathRemoveThisWorks.com> wrote in message <hat41k$hic$1(a)fred.mathworks.com>...
> su su wrote:
>
> > I'm using canoncorr() function to get the relationship between two images, A and B. In getting canonical variates, the matrix A and B are not full rank. So I can't get the required dimensions of canonical variates. Please give advice. Thanks.
>
> Su, can you please provide a real example, and demonstrate what you think is wrong?

For example
I crop the pair of images into 100 by 100 pixels. And then canoncorr() is used for that pair.
[A,B,r,U,V]=canoncorr(X,Y);
If the images X and Y are full rank, I will get U and V as 100 by 100 pixels and I can continue multiplication with other matrix.
But my images are not full rank. So I got only U and V with 100 by d, (d=min(rank(X),min(rank(Y))) and I can't multipy at equation (2).
The equations I'm using after canoncorr() are
(1) M=pinv(V'*Y)*X;
(2) x=M*V'*Y;
Thanks for replying me.
From: Peter Perkins on
su su wrote:
> Peter Perkins <Peter.Perkins(a)MathRemoveThisWorks.com> wrote in message <hat41k$hic$1(a)fred.mathworks.com>...
>> su su wrote:
>>
>>> I'm using canoncorr() function to get the relationship between two images, A and B. In getting canonical variates, the matrix A and B are not full rank. So I can't get the required dimensions of canonical variates. Please give advice. Thanks.
>> Su, can you please provide a real example, and demonstrate what you think is wrong?
>
> For example
> I crop the pair of images into 100 by 100 pixels. And then canoncorr() is used for that pair.
> [A,B,r,U,V]=canoncorr(X,Y);
> If the images X and Y are full rank, I will get U and V as 100 by 100 pixels and I can continue multiplication with other matrix.
> But my images are not full rank. So I got only U and V with 100 by d, (d=min(rank(X),min(rank(Y))) and I can't multipy at equation (2).

Your original post seemed to claim that the first two outputs from CANONCORR were rank deficient. I take it that that is not the case. What you describe above is what CANONCORR is designed to do.
From: su su on
Hello Sir,
I also read Canonical Correlation Analysis technique to understand canoncorr(). I want to know in canoncorr(), U and V are canonical variates ? , and A and B are basis vectors ? Please kindly explain me.
With Regards