[FFmpeg-user] Glossary: Nyquist

Mark Filipak (ffmpeg) markfilipak at bog.us
Sat Oct 3 01:50:45 EEST 2020


On 10/02/2020 06:34 AM, Anatoly wrote:
> On Thu, 1 Oct 2020 20:25:30 -0400
> "Mark Filipak (ffmpeg)" <markfilipak at bog.us> wrote:
>> On 10/01/2020 07:43 PM, Anatoly wrote:
>>> On Wed, 30 Sep 2020 19:21:59 -0400
>>> "Mark Filipak (ffmpeg)" <markfilipak at bog.us> wrote:
>>>    
>>>> Nyquist [adjective]: 1, Reference to the Nyquist-Shannon sampling
>>>>      theorem. 2, The principle [1] that, to most faithfully
>>>> reproduce an image at a given digital display's resolution, the
>>>> samples must be made at or above twice the display's resolution,
>>>> both horizontally & vertically [2].
>>> Sorry, but this is wrong.
>>> from
>>> https://en.wikipedia.org/wiki/Nyquist%E2%80%93Shannon_sampling_theorem
>>> "If a function x(t) contains no frequencies higher than B hertz, it
>>> is completely determined by giving its ordinates at a series of
>>> points spaced 1/(2B) seconds apart.
>>> A sufficient sample-rate is therefore anything larger 2B samples per
>>> second."
>>> Let's say we have 640 horisontal dots (pixels) per line in NTSC
>>> system.
>> -snip-
>> Yes, yes, of course. You are correct, but this is different.
>>
>> The source is not an NTSC analog signal. The source is analog streams
>> of photons striking a CCD imager array, frame by frame, and applies
>> to the image regardless whether the image is moving or stationary,
>> and regardless of exposure time (which affects brightness, not
>> resolution). The source is a 2-dimensional, lighted field of view in
>> a camera or film scanner transferring light energy to produce charge
>> in photo transistors over a spacial area. It's not temporal as is the
>> case when sampling a changing analog voltage.
> Yet I think replacing Voltage with Light Intencity and Time with X
> coordinate on analoguie video signal graph changes nothing, if you are
> about moving to spatial domain.
>>
>> When sampling an analog voltage, resolution is the ability to resolve
>> voltage value within a certain period of time (i.e. within a given
>> channel bandwidth). When sampling a visual field of view however,
>> resolution is the ability to resolve stationary edges that vary
>> spacially, going from light to dark or dark to light. It's the same
>> gaussian energy transfer issue (i.e. that transferring energy
>> requires time) with the same signal-to-noise issues and the same
>> handy half-power shorthand, but it applies to ... wait for it ...
>> human eyes! Human eyes resolve edges only so good, even totally black
>> abutting totally white. There is nothing you can do about that, and
>> staring at the edge doesn't bring it into higher resolution. However,
>> if the image source itself has fuzzy edges because it was sampled at
>> lower than Nyquist, then the result in our brains is a double
>> gaussian, the first from the CCD and the second from our eyes. It's
>> that double gaussian that is avoided by spacially sampling at higher
>> than 2x the display resolution.
>>
> So you want to say that if I watching picture on 640x480 dots
> display, my brain "effectively" can percept only 320x240 dots.

Hi Anatoly,

The issue is not biology, The issue is pure physics.

In your scenario, your eyes do see 640x480. Your brain does see 640x480. But in order to cleanly 
'see' a black-white edge inside those 640x480 dots, the 640x480 dots need to be made from 1280x960 
samples within the camera. If the camera made 640x480, then, yes, you would see that edge at 320x240 
effective resolution (i.e. fuzzier).

I'm trying to prepare some illustrations that will show how Nyquist works in images. That's proving 
to be really hard. Two-dimensional Nyquist is hard to visualize.

In the mean time, and in answer to your's & Eduardo's posts, I'm going to write an explanation 
instead of showing an explanation.

The Nyquist criterion is based on physics not biology. In physics, perceiving/measuring physical 
properties is based on moving energy from object to observer plus the time that takes. If energy 
doesn't move, then there is no measurement or observable result.

The interpretation of Nyquist at Wikipedia addresses 1-dimensional voltage (a signal). What is 
presented is limited to one dimension plus time.

However, over a 2-dimensional area (such as a display), the more general interpretation of 
resolution is based on the rate of change of energy density per unit of time. Higher energy (e.g. 
more light) makes images more resolvable. Higher density (e.g. more dots per square mm) makes images 
more resolvable. More time (e.g. longer observation) makes images more resolvable.

Anyone who thinks that Nyquist sampling is limited to signals is wrong. Nyquist sampling applies to 
2-dimensional areas, too. (Nyquist applies to 3-dimensions, also, but that's another story.)

Nyquist applies to anything/everything that's converted from analog to digital.

> And for
> my brain to percept "effectively" 640x480, I need 1280x960 from CCD to
> LCD?
> Then I may say that at image processing domain such a terms as "640x480"
> or "4K" is all about real count of pixels (spatial samples), not about
> how human brain will percept them. So if you're writing about human
> perception, you probably must state it explicitly. I can't duscuss about
> human perception because I know little here.


> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> 
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> 


-- 
What if you woke up and found yourself in a police state?
African-Americans wake up in a police state every day.


More information about the ffmpeg-user mailing list