Re: Downsample and then reconstruct an image.
- From: davem@xxxxxxxxx (Dave Martindale)
- Date: Fri, 3 Feb 2006 23:52:51 +0000 (UTC)
"VijaKhara" <VijaKhara@xxxxxxxxx> writes:
I have a 2048x2048 image and what I want is to reduce its size to
1024x1024 (downsampling factor is
2). Actually, I don't care about whether or not the sampled image looks
like the orgininal image. What I care is how from the downsampled
image to reconstruct the orginal image.
But only approximately, since you've thrown away up to 3/4 of the
information that was present in the original (you have 1 million pixels
now instead of 4 million).
Theoretically in 1 D, I should low pass filter the image firstly to
avoid aliasing, and then pickup just every middle points Y(n)=X(2*n).
But I also learn that there are many filters for this task,
Yes, because there are many ways to trade off high-frequency
attenuation, low-frequency preservation, sharpness of the filter, and
computational cost. The simplest (and worst) method is to just select
every second data point with no filtering at all. Averaging pairs of
pixels together (box filter) is somewhat better. Bicubic and higher
polynomials are better yet, as are apprioximations to a sinc function.
I the case of 2D (an image), do you think what filter will work the
best. Also what interpolation function should I use to interpolate to
get the orginal image. In my case, can I get the exactly the original
image?
There is no "best" downsampling filter - it depends on the tradeoffs
between the factors above. There's no "best" upsampling filter either.
But with most normal images, you cannot reconstruct the original image
because you have discarded 3/4 of the data. If you properly low-pass
filter as part of the downsampling process, you have saved the lower
half of the horizontal and vertical frequencies while discarding the
upper half of each. The upsampling process will (more or less
accurately, depending on algorithm) correctly resample these lower
frequencies to the larger image size. But the small details,
representing high spatial frequencies in the original, are lost during
downsampling and cannot magically reappear during upsampling.
The *only* time the process of downsampling and upsampling by 2X will
get you the original image back is when the original image didn't have
any high frequency detail to begin with - for example, when the camera
lens was quite out of focus.
Dave
.
- References:
- Downsample and then reconstruct an image.
- From: VijaKhara
- Downsample and then reconstruct an image.
- Prev by Date: Re: Book search
- Next by Date: Re: Downsample and then reconstruct an image.
- Previous by thread: Downsample and then reconstruct an image.
- Next by thread: Re: Downsample and then reconstruct an image.
- Index(es):
Relevant Pages
|