DSPRelated.com
Forums

image subsampling problem???

Started by walala March 22, 2004
glen herrmannsfeldt wrote:

> Jerry Avins wrote: > >> Piergiorgio Sartor wrote: > > >>> If I understand correctly, this means it is not possible >>> to sample DC. > > >> How is that? Surely a digital camera can distinguish between featureless >> black and featureless white. What part of the theory suggests otherwise? > > > The autoexposure system. Well, I suppose between black and white, > but not between dark gray and light gray. > > Audio systems tend not to be DC coupled, anyway, but many > also have automatic level control. > > -- glen
Isn't autoexposure outside the scope of the question? Or are you pulling my leg? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Jerry Avins wrote:

> glen herrmannsfeldt wrote: > >> Jerry Avins wrote: >> >>> Piergiorgio Sartor wrote:
>>>> If I understand correctly, this means it is not possible >>>> to sample DC.
>>> How is that? Surely a digital camera can distinguish between featureless >>> black and featureless white. What part of the theory suggests otherwise?
>> The autoexposure system. Well, I suppose between black and white, >> but not between dark gray and light gray.
>> Audio systems tend not to be DC coupled, anyway, but many >> also have automatic level control.
> Isn't autoexposure outside the scope of the question? Or are you pulling > my leg?
Probably, but your example of a digital camera, most of which have autoexposure, is what I was answering. As to the original question, yes. -- glen

Piergiorgio Sartor wrote:
> > Jerry Avins wrote: > > > Consider the sinc. It has zeros at evenly spaced multiples _except_ at > > zero; there, it is unity. > > Ah, OK, now it's clear. > > > As for stripes at Fs/2 imaged onto rectangular pixels, it can come out > > as alternating black and white, uniform gray, or anything between, > > depending on how the image is aligned on the image. In other words, the > > modulation transfer function (MTF) can take any value from zero to one. > > Well, but this means there is aliasing at DC, or, at least, > there is potential aliasing at DC.
First of all the notion of sampling with a rectangle is a simplification. But using that as the model then any frequency with a period of one sample space is completely attentuated as would be any frequency with integer multiples of thet period. So assuming perfect rectangular sampling and defining frequency content as axis aligned with that same rectangular matrix then no aliasing will occur at DC. -jim -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
jim wrote:

> > Piergiorgio Sartor wrote: > >>Jerry Avins wrote: >> >> >>>Consider the sinc. It has zeros at evenly spaced multiples _except_ at >>>zero; there, it is unity. >> >>Ah, OK, now it's clear. >> >> >>>As for stripes at Fs/2 imaged onto rectangular pixels, it can come out >>>as alternating black and white, uniform gray, or anything between, >>>depending on how the image is aligned on the image. In other words, the >>>modulation transfer function (MTF) can take any value from zero to one. >> >>Well, but this means there is aliasing at DC, or, at least, >>there is potential aliasing at DC. > > > First of all the notion of sampling with a rectangle is a > simplification. But using that as the model then any frequency > with a period of one sample space is completely attentuated as > would be any frequency with integer multiples of thet period. So > assuming perfect rectangular sampling and defining frequency > content as axis aligned with that same rectangular matrix then > no aliasing will occur at DC. > > -jim
Jim, As I see it, the period of the grating is not one, but two pixel sizes. If the center of a stripe lies on the center of a pixel, full contrast appears. If the center of a stripe lies between adjacent pixels, all contrast is gone and a value half way between light and dark appears on all pixels. Whether you call it aliasing to DC or not, that is a constant output produced by a high-frequency input. The semantic difficulty here lies in thinking in lines when line pairs are called for. When you think about it, it can make clear why we need two samples per cycle. Fs is the line spacing. Fs/2 is the cycle (or line pair) spacing. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Jerry Avins wrote:

> > As I see it, the period of the grating is not one, but two pixel sizes. > If the center of a stripe lies on the center of a pixel, full contrast > appears. If the center of a stripe lies between adjacent pixels, all > contrast is gone and a value half way between light and dark appears on > all pixels. Whether you call it aliasing to DC or not, that is a > constant output produced by a high-frequency input.
Well yes, but that constant output is what we usually call zero. If black is minimum and white is the max of a sinusoid then where is zero?
> > The semantic difficulty here lies in thinking in lines when line pairs > are called for. When you think about it, it can make clear why we need > two samples per cycle. Fs is the line spacing. Fs/2 is the cycle (or > line pair) spacing.
But in nature we can have frequencies at Fs. And Fs and its multiples are the frequencies that will alias to DC (unless there be a filter that removes them). -jim -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
jim wrote:

> > Jerry Avins wrote: > > >>As I see it, the period of the grating is not one, but two pixel sizes. >>If the center of a stripe lies on the center of a pixel, full contrast >>appears. If the center of a stripe lies between adjacent pixels, all >>contrast is gone and a value half way between light and dark appears on >>all pixels. Whether you call it aliasing to DC or not, that is a >>constant output produced by a high-frequency input. > > > Well yes, but that constant output is what we usually call zero. > If black is minimum and white is the max of a sinusoid then > where is zero?
Images usually have only positive brightness values. Black is usually assigned zero and white, MAXINT. Setting zero at neutral gray isn't the usual way, but it is more consistent with audio practice. I get your drift now.
>>The semantic difficulty here lies in thinking in lines when line pairs >>are called for. When you think about it, it can make clear why we need >>two samples per cycle. Fs is the line spacing. Fs/2 is the cycle (or >>line pair) spacing. > > > But in nature we can have frequencies at Fs. And Fs and its > multiples are the frequencies that will alias to DC (unless > there be a filter that removes them). > > -jim
I don't understand this point. Without filtering, there can be energy at Fs and higher. Why stop there? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������

Jerry Avins wrote:

> > Images usually have only positive brightness values. Black is usually > assigned zero and white, MAXINT. Setting zero at neutral gray isn't the > usual way, but it is more consistent with audio practice. I get your > drift now. >
Yes, usually images are assigned values so that they have a built in DC bias.
> >>The semantic difficulty here lies in thinking in lines when line pairs > >>are called for. When you think about it, it can make clear why we need > >>two samples per cycle. Fs is the line spacing. Fs/2 is the cycle (or > >>line pair) spacing. > > > > > > But in nature we can have frequencies at Fs. And Fs and its > > multiples are the frequencies that will alias to DC (unless > > there be a filter that removes them). > > > > -jim > > I don't understand this point. Without filtering, there can be energy at > Fs and higher. Why stop there?
The point was that gathering energy for each pixel over the entire sample interval acts like a filter that removes the frequencies that would otherwise alias to DC. Any additional filtering will not change that. -jim -----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- http://www.newsfeeds.com - The #1 Newsgroup Service in the World! -----== Over 100,000 Newsgroups - 19 Different Servers! =-----
jim wrote:

   ...

> The point was that gathering energy for each pixel over the > entire sample interval acts like a filter that removes the > frequencies that would otherwise alias to DC. Any additional > filtering will not change that.
Now that you point that out explicitly, it's retrospectively obvious. On the other hand, if the sensitive elements are just a little narrower then the spacing, then some DC is possible with inputs of n*Fs. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
"Jerry Avins" <jya@ieee.org> wrote in message
news:405f43e6$0$3039$61fed72c@news.rcn.com...
> Fred Marshall wrote: > > ... > > > You have to filter the image frequencies to be not greater than 1/4X
where X
> > is the spatial sampling interval. Same as 1/4fs in frequency/time
spaces.
> > This means you will be throwing out information - so perfect
reconstruction
> > of the original is out of the question. But, you can reasonably
reconstruct
> > the *bandlimited version from the subsamples*. > > > > Just apply a lowpass filter of appropriate character..... > > > > Fred > > Fred, > > I assume that by 1/4X you mean X/4. Why 4, rather than 2? > > Jerry > --
Jerry, I might have said: "where X is the *original* spatial sampling interval." If T is the temporal sample interval, then 1/T is the sample frequency and 1/2T is the Nyquist frequency and the bandwidth is < 1/2T. If I want to decimate by 2, then I need to reduce the bandwidth to < 1/4T. If X is the spatial sample interval, then 1/X is the sample frequency and 1/2X is the Nyquist frequency and the bandwidth is < 1/2X. If I want to decimate by 2, then I need to reduce the spatial bandwith to < 1/4X. The "new" sample interval will be 2X or 2T. So, the Nyquist frequency is 1/(2*2X) or 1/(2*2T) Fred
Fred Marshall wrote:

   ...

> Jerry, > > I might have said: "where X is the *original* spatial sampling interval." > > If T is the temporal sample interval, then 1/T is the sample frequency and > 1/2T is the Nyquist frequency and the bandwidth is < 1/2T. If I want to > decimate by 2, then I need to reduce the bandwidth to < 1/4T. > > If X is the spatial sample interval, then 1/X is the sample frequency and > 1/2X is the Nyquist frequency and the bandwidth is < 1/2X. If I want to > decimate by 2, then I need to reduce the spatial bandwith to < 1/4X. > > The "new" sample interval will be 2X or 2T. So, the Nyquist frequency is > 1/(2*2X) or 1/(2*2T) > > Fred
Fred, I get it. Sorry I asked! Jerry -- Engineering is the art of making what you want from things you can get. &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;