DSPRelated.com
Forums

Interpolation of versions of an image at different resolutions

Started by Michel Rouzic March 7, 2007
Here's a little something I'd like to get suggestions for so I can try
them. My problem is the following, for an original image of given
dimensions, you're only given (for example) 6 lower resolution images
and by combining them try to obtain something as close as possible to
the original full resolution image. Here are in my example the
characteristics of the 6 low resolution images :

1st image : Full vertical resolution, 1/32 horizontal resolution (wrt
the original resolution)
2nd image : Half vertical resolution, 1/16 horizontal resolution
3rd image : 1/4 vertical resolution, 1/8 horizontal resolution
4th image : 1/8 vertical resolution, 1/4 horizontal resolution
5th image : 1/16 vertical resolution, half horizontal resolution
6th image : 1/32 vertical resolution, full horizontal resolution


So how would you combine the 6 together to obtain something as close
as possible to the original image?

On Mar 7, 4:23 am, "Michel Rouzic" <Michel0...@yahoo.fr> wrote:
> Here's a little something I'd like to get suggestions for so I can try > them. My problem is the following, for an original image of given > dimensions, you're only given (for example) 6 lower resolution images > and by combining them try to obtain something as close as possible to > the original full resolution image. Here are in my example the > characteristics of the 6 low resolution images : > > 1st image : Full vertical resolution, 1/32 horizontal resolution (wrt > the original resolution) > 2nd image : Half vertical resolution, 1/16 horizontal resolution > 3rd image : 1/4 vertical resolution, 1/8 horizontal resolution > 4th image : 1/8 vertical resolution, 1/4 horizontal resolution > 5th image : 1/16 vertical resolution, half horizontal resolution > 6th image : 1/32 vertical resolution, full horizontal resolution > > So how would you combine the 6 together to obtain something as close > as possible to the original image?
Do these images contain uncorrelated noise? This is what will be the biggest problem, I think. Suppose you have an original signal x(t), and two filtered/ sampled versions y[n] and z[m]. Let's say that z[m] is sampled at half the rate of y[n]. Then you can try to use interpolating functions to get r[n] at the higher rate, by setting: r[n] = \alpha y[n] + (1-\alpha) z'[n], where every other sample of z'[n] = \sum_n p[n] z[n/2]. Let z[n/2] = 0 if n odd and z[n/2] is n is even. The weighting \alpha is chosen according to the SNR of y and the SNR of z. Choose p[n] to be some interpolating function, for example the sinc function with the appropriate width. You can treat p[n] as trying to do a sample rate conversion on z by factor of 2. If the noise is correlated, then it's more complicated, of course. Hope that helps somehow. Julius
julius a =E9crit :
> On Mar 7, 4:23 am, "Michel Rouzic" <Michel0...@yahoo.fr> wrote: > Do these images contain uncorrelated noise? This is what > will be the biggest problem, I think. > > Suppose you have an original signal x(t), and two filtered/ > sampled versions y[n] and z[m]. Let's say that z[m] is sampled > at half the rate of y[n]. Then you can try to use interpolating > functions to get r[n] at the higher rate, by setting: > > r[n] =3D \alpha y[n] + (1-\alpha) z'[n], > > where every other sample of z'[n] =3D \sum_n p[n] z[n/2]. > Let z[n/2] =3D 0 if n odd and z[n/2] is n is even. > > The weighting \alpha is chosen according to the SNR of y > and the SNR of z. Choose p[n] to be some interpolating > function, for example the sinc function with the appropriate > width. You can treat p[n] as trying to do a sample rate > conversion on z by factor of 2. > > If the noise is correlated, then it's more complicated, > of course. > > Hope that helps somehow. > Julius
Well, that was a bit confusing. Anyways, there's not really any noise, it's pretty much the same picture filtered with sinc functions. So, basically you interpolate by simply adding the two signals together? I would have thought something like multiplication was more like the way to go, but if I was asking it was to hear different opinions after all :-)
On Mar 8, 1:07 pm, "Michel Rouzic" <Michel0...@yahoo.fr> wrote:
> julius a =E9crit :
> Well, that was a bit confusing. Anyways, there's not really any noise, > it's pretty much the same picture filtered with sinc functions. So, > basically you interpolate by simply adding the two signals together? I > would have thought something like multiplication was more like the way > to go, but if I was asking it was to hear different opinions after > all :-)
What I was suggesting was basically to do it in two steps for each data set: interpolate to the correct sampling rate, and then combine them all with different weights. The weights are chosen according to the quality. So now it is up to you to determine "quality", and hence the weights. I have no idea how multiplying would work, are you thinking about correlating? Hope that helps somehow, Julius
On Mar 7, 2:23 am, "Michel Rouzic" <Michel0...@yahoo.fr> wrote:
> Here's a little something I'd like to get suggestions for so I can try > them. My problem is the following, for an original image of given > dimensions, you're only given (for example) 6 lower resolution images > and by combining them try to obtain something as close as possible to > the original full resolution image. Here are in my example the > characteristics of the 6 low resolution images : > > 1st image : Full vertical resolution, 1/32 horizontal resolution (wrt > the original resolution) > 2nd image : Half vertical resolution, 1/16 horizontal resolution > 3rd image : 1/4 vertical resolution, 1/8 horizontal resolution > 4th image : 1/8 vertical resolution, 1/4 horizontal resolution > 5th image : 1/16 vertical resolution, half horizontal resolution > 6th image : 1/32 vertical resolution, full horizontal resolution > > So how would you combine the 6 together to obtain something as close > as possible to the original image?
This sounds like a version of some old puzzle on how to gather information which was spread out in various ways, but orthogonally. Maybe a variant of a magic square type of puzzle. IMHO. YMMV. -- rhn A.T nicholson d.0.t C-o-M
On 7 Mrz., 11:23, "Michel Rouzic" <Michel0...@yahoo.fr> wrote:
> Here's a little something I'd like to get suggestions for so I can try > them. My problem is the following, for an original image of given > dimensions, you're only given (for example) 6 lower resolution images > and by combining them try to obtain something as close as possible to > the original full resolution image. Here are in my example the > characteristics of the 6 low resolution images : > > 1st image : Full vertical resolution, 1/32 horizontal resolution (wrt > the original resolution) > 2nd image : Half vertical resolution, 1/16 horizontal resolution > 3rd image : 1/4 vertical resolution, 1/8 horizontal resolution > 4th image : 1/8 vertical resolution, 1/4 horizontal resolution > 5th image : 1/16 vertical resolution, half horizontal resolution > 6th image : 1/32 vertical resolution, full horizontal resolution > > So how would you combine the 6 together to obtain something as close > as possible to the original image?
Do a 2D DFT of each. Zero extend the Frequency spectra to the full resolution. Add the (complex) frequency spectra. Multiply them with a weight. Do a 2D IDFT to get the image. How to calculate the weight: Generate a "unit step" for each resolution, do a 2D DFT of it. Zero extend the Frequency spectra to the full resolution. Add the (complex) frequency spectra. 1/x the complex frequency spectrum (0 stays 0). (You can possibly figure out how to simplify this.) When you look at this you will se what frequencies you can "recover". You'll get full orthogonal but 1/8 diagonal resolution. I wonder how such a image would look ?
ray@desinformation.de a =E9crit :
> On 7 Mrz., 11:23, "Michel Rouzic" <Michel0...@yahoo.fr> wrote: > > Here's a little something I'd like to get suggestions for so I can try > > them. My problem is the following, for an original image of given > > dimensions, you're only given (for example) 6 lower resolution images > > and by combining them try to obtain something as close as possible to > > the original full resolution image. Here are in my example the > > characteristics of the 6 low resolution images : > > > > 1st image : Full vertical resolution, 1/32 horizontal resolution (wrt > > the original resolution) > > 2nd image : Half vertical resolution, 1/16 horizontal resolution > > 3rd image : 1/4 vertical resolution, 1/8 horizontal resolution > > 4th image : 1/8 vertical resolution, 1/4 horizontal resolution > > 5th image : 1/16 vertical resolution, half horizontal resolution > > 6th image : 1/32 vertical resolution, full horizontal resolution > > > > So how would you combine the 6 together to obtain something as close > > as possible to the original image? > > Do a 2D DFT of each. Zero extend the Frequency spectra to the full > resolution. > Add the (complex) frequency spectra. > Multiply them with a weight. > Do a 2D IDFT to get the image.
So far I understand perfectly.
> How to calculate the weight: > > Generate a "unit step" for each resolution, do a 2D DFT of it. > Zero extend the Frequency spectra to the full resolution.
Let's see if I understand this right. Do you mean "create a white pixel on a black background on images of a dimensions matching to the original dimensions of each source image, interpolate to the full resolution/perform a 2D DFT"?
> Add the (complex) frequency spectra.
You mean add these newly created images together in the frequency domain? Why?
> 1/x the complex frequency spectrum (0 stays 0).
Now from this point on I'm not following anymore. I mean it's not clear to me what to do.
> (You can possibly figure out how to simplify this.) > When you look at this you will se what frequencies you can "recover". > > You'll get full orthogonal but 1/8 diagonal resolution. > > I wonder how such a image would look ?
I'll let you know ;-)