[Date Index]
[Thread Index]
[Author Index]
Re: How to downsample a image matrix using left and right
*To*: mathgroup at smc.vnet.net
*Subject*: [mg100913] Re: [mg100864] How to downsample a image matrix using left and right
*From*: Daniel Lichtblau <danl at wolfram.com>
*Date*: Thu, 18 Jun 2009 04:52:11 -0400 (EDT)
*References*: <200906170153.VAA25945@smc.vnet.net>
tenveer wrote:
> HI all
>
> i am just stuck with a unique problem ...
>
> What i want is to downsample a matrix (image matrix) using two left
> and right matrices....
> e.g if i have a 100 by 100 image matrix X what i want is to downsample
> X to 25 by 25 matrix Y using two downsampling matrices U and V which
> are on left and right respectively i.e Y=U*X*V
>
> than what will the contents of the U and V matrices.
>
> Any help will be appreciated
I'm not sure if this answers your question, but you can approximate the
image using the singular value decomposition. This is not really the
same as downsampling, but, viewed as a matrix decomposition, it does
have the form that you indicate.
Here is an example from another recent MathGroup thread.
tt = Table[Cos[x*y], {x, -3., 3., .05}, {y, -3., 3., .05}];
The dimension is 121x121. We use the 25 largest singular values (in this
example, six seems adequate)
ttsvd = SingularValueDecomposition[tt, 25];
Then the approximated image is reconstructed as
tt2 = ttsvd[[1]].ttsvd[[2]].Transpose[ttsvd[[3]]];
One can compare
ListContourPlot[tt]
to
ListContourPlot[tt2]
to get an idea of the quality.
Daniel Lichtblau
Wolfram Research
Prev by Date:
**Re: Time for an integration**
Next by Date:
**Re: Hypergeometric2F1 gives wrong complex infinities**
Previous by thread:
**How to downsample a image matrix using left and right downsampling**
Next by thread:
**Re: How to downsample a image matrix using left and right downsampling**
| |