MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: How to downsample a image matrix using left and right

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100888] Re: How to downsample a image matrix using left and right
  • From: Ray Koopman <koopman at sfu.ca>
  • Date: Wed, 17 Jun 2009 04:45:02 -0400 (EDT)
  • References: <h19i7r$p7g$1@smc.vnet.net>

On Jun 16, 6:51 pm, tenveer <ten.v... at gmail.com> 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

If you just want to take means then you can use U = Flatten /@
(IdentityMatrix[25] /. {1 -> {.25,.25,.25,.25}, 0 -> {0,0,0,0}})
and V = Transpose@U. However, you can also get U.X.Transpose@U as
Nest[ Transpose[Mean/@Partition[#,4]]&, X, 2].


  • Prev by Date: Re: Re: Re: Combined Set, SetDelayed
  • Next by Date: Re: Re: Re: Combined Set, SetDelayed
  • Previous by thread: Re: Help with HoldAll needed
  • Next by thread: Re: How to downsample a image matrix using left and right