Re: what is the Nyuist rate of an image?
- From: aruzinsky <aruzinsky@xxxxxxxxxxxxxxxxxxxx>
- Date: Tue, 1 Jan 2008 09:22:45 -0800 (PST)
On Jan 1, 12:53 am, da...@xxxxxxxxx (Dave Martindale) wrote:
aruzinsky <aruzin...@xxxxxxxxxxxxxxxxxxxx> writes:
This is fine if it helps you with the following practical problem:
Objective:
Shift an image 0.5 pixels in the diagonal direction using an
appropriate discrete 1D interpolation kernel, e.g., bicubic, Lanczos
or whatever.
Do you mean to shift by 0.5 of the diagonal distance between pixels in a
diagonal line, or by 0.5 of the horizontal/vertical distance between
pixels?
I mean (x + 0.5, y + 0.5).
Alternatives:
1. Use the 1D kernel only in the diagonal direction to directly shift.
2. Use the 1D kernel to shift once in the horizontal and once in the
vertical directions.
It seems to me that there's a real problem in using a 1D kernel along
the diagonal direction: aliasing. As noted earlier in this thread, a
properly bandlimited and sampled image can contain diagonal patterns
whose spatial frequency (measured in the diagonal direction) is 0.7
cycles/pixel, relative to the horizontal/vertical pixel spacing. The
diagonal pixel spacing is 1.4 times larger, so this frequency limit is 1
cycle/pixel based on the spacing of pixels along a diagonal line. The
sampling density along a single diagonal line is a factor of 2 too low
to resolve real high-frequency information in the original image.
When shifting horizontally or vertically, the maximum frequency remains
0.5 cycles/pixel, so I'd expect the results to be correct at least.
Are you assuming that intermediate results remain in floating point?
Of course.
But why use either of these, compared to the usual 2D kernel providing
a shift any any desired direction in a single pass?
2 is mathematically equivalent to the "the usual 2D kernel." The
usual 2D kernel is the outer product of two 1D kernels. It is less
computationally expensive, for 1D kernels with support larger than 2,
to do the horizontal and vertical interpolations separately.
1 is half as computationally expensive as 2.
Which method usually provides the highest PSNR?
I know the answer because I tried both ways. I would like to hear a
theoretical prediction.
How do you define PSNR in this case? (Not a trick question; I simply
don't know. Image processing is not my field).
Dave
I shift (x + 0.5, y + 0.5) followed by (x - 0.5, y - 0.5) and examine
the difference with the original . The errors in pixel luminances
comprise the "noise." Otherwise, the definition of PSNR can be
googled, but all you have to know is that it is a monotone decreasing
function of mean squared error (MSE). In other words, which method
typically produces the lowest MSE?
.
- References:
- Re: what is the Nyuist rate of an image?
- From: Dave Martindale
- Re: what is the Nyuist rate of an image?
- Prev by Date: Re: what is the Nyuist rate of an image?
- Next by Date: Re: find all rectangles enclosing certain amount of points
- Previous by thread: Re: what is the Nyuist rate of an image?
- Next by thread: Re: find all rectangles enclosing certain amount of points
- Index(es):
Relevant Pages
|