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

• To: mathgroup at smc.vnet.net
• Subject: [mg100924] Re: How to downsample a image matrix using left and right downsampling
• From: dh <dh at metrohm.com>
• Date: Thu, 18 Jun 2009 04:54:12 -0400 (EDT)
• References: <h19i7r\$p7g\$1@smc.vnet.net>

```
Hi,

what do you exactly mean by down sampling?

I assume that you want to take the mean of 4 times 4 blocks.

I first give a simpler example where we avarage 2 by 2 blocks:

=======================

a = Array[A, {4, 4}];

left = {{1, 1, 0, 0}, {0, 0, 1, 1}};

right = Transpose[left];

left.a.right/4

=======================

in your case left will be:

Table[If[0 < j - 4 (i - 1) < 5, 1, 0], {i, 25}, {j, 100}]

Daniel

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

>

>

>

```

• Prev by Date: Re: Hilbert transform bug in 7.0.3?
• Next by Date: Re: Calculation of the surface after intersection of two spheres
• Previous by thread: Re: How to downsample a image matrix using left and right
• Next by thread: Calculation of the surface after intersection of two spheres