Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
25th March 2017, 22:50 | #1 | Link |
The image enthusyast
Join Date: Mar 2015
Location: Brazil
Posts: 270
|
How, mathematically, downscaling works?
I talk about, here, turn an image into a polynomial function f(x,y) = z.
In upscaling task, all it has to do is replace into function the coordinates of the interpolated pixels. What about downscaling task: is there something that can be done in the polynomial that is the image function?
__________________
Searching for great solutions |
10th April 2017, 08:29 | #2 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
http://entropymine.com/imageworsener/resample
^this explains things in simple English with lots of pretty pictures. It's a good place to start.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
10th April 2017, 18:32 | #3 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
In between those sampling points the image value is not known, so a 2D interpolation (e.g. BiLinear or BiCubic) is used to approximate the image data in between the original sample points: https://upload.wikimedia.org/wikiped...lation.svg.png Finally, new sampling points are taken from the interpolated curve (function), which then form the output image. Again the output image will only contain discrete sampling points. The difference between "upscaling" and "downscaling" is that the former creates an output image with more (denser) sampling points, while the latter creates an output image with less (sparser) sampling points - compared to the input image. (BTW: Why does "downscaling" require interpolation at all? Why not simply discard a certain fraction of the sampling points from the original image? The reason is that, depending on the scaling factor, the remaining sampling points of the "downscaled" image may be located at a position where there is no sampling point in the original image! So the image value at the location of the "new" sampling point needs to be interpolated/approximated from the original sampling points)
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 10th April 2017 at 19:18. |
|
10th April 2017, 20:26 | #4 | Link | |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
|
Quote:
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
|
13th April 2017, 00:58 | #5 | Link | |
The image enthusyast
Join Date: Mar 2015
Location: Brazil
Posts: 270
|
Quote:
__________________
Searching for great solutions |
|
13th April 2017, 01:27 | #6 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
More information was provided by MP4 Guy here
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. Last edited by Katie Boundary; 13th April 2017 at 01:47. |
|
13th April 2017, 09:02 | #7 | Link | |
Software Developer
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 13,248
|
Quote:
Just like an audio signal is a continuous curve in 1D time-space (aka "Waveform"), an image is a continuous function in 2D space. And both are sampled for digital storage, i.e. the signal value is only captured/store at discrete (infinitely small) points. Only difference is that for an audio signals we store the signal value at discrete points in 1D time space, while for an image we store the image value at discrete points in 2D spatial space. Neither are there any "stairsteps" in a digital/sampled audio signal, nor do the "pixels" in a digital/sampled image have any "area". Representing pixels (i.e. samples of a digital image) as solid-color squares that actually take up an area is nothing but a "workaround" which is used by image editors - because you wouldn't be able to see an infinitely small sample points. It is still not an accurate representation (not at all) of what the sampled image data actually is Watch this video, especially the "there are no stairsteps" chapter: https://xiph.org/video/vid2.shtml
__________________
Go to https://standforukraine.com/ to find legitimate Ukrainian Charities 🇺🇦✊ Last edited by LoRd_MuldeR; 13th April 2017 at 09:10. |
|
13th April 2017, 09:35 | #8 | Link |
Registered User
Join Date: May 2006
Posts: 3,997
|
Just a thought on the "stairsteps" (the temporal aspect maybe a bit off topic though):
In a movie each picture (or frame in digital video) is displayed for 1/24s = 41.7ms. During this time the picture does not change, means our eyes are fed with a sequence of pictures of 41.7ms duration each, which is per definition a "stairstep" function. The interpolation filter is the human apparatus (eyes, brain ....). What is this human filter like? Some kind of lowpass, I assume ..... (btw. certain animals have "interpolation filters" which are totally different from humans, that's why they don't go to the cinema, I presume). Last edited by Sharc; 13th April 2017 at 09:57. |
13th April 2017, 19:14 | #9 | Link |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
|
While I agree this is true for audio, for video its not as simple. Digital sensors in a camera aren't infinitely small dots that capture one infinitely small sample at given distances, the pixels in a sensor are an area of a certain size, so the pixel-area representation is closer to their actual sampled signal then an infinitely small dot in the center of the pixel.
__________________
LAV Filters - open source ffmpeg based media splitter and decoders |
14th April 2017, 00:34 | #11 | Link | ||
Formerly davidh*****
Join Date: Jan 2004
Posts: 2,496
|
Quote:
Quote:
Isn't audio usually passed through a high-pass filter before sampling for exactly this reason? To avoid "sharp" samples? Last edited by wonkey_monkey; 14th April 2017 at 00:39. |
||
14th April 2017, 07:27 | #12 | Link | |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
Quote:
In other words, sampling is just one of many models of reality, and presenting it as the only model is wrong.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
|
14th April 2017, 07:49 | #13 | Link | ||
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
Quote:
|
||
14th April 2017, 08:30 | #14 | Link | |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Quote:
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th April 2017 at 08:32. |
|
14th April 2017, 08:32 | #15 | Link | |
Registered User
Join Date: Mar 2011
Posts: 4,829
|
Quote:
http://www.cambridgeincolour.com/tut...ra-sensors.htm Maybe another way of looking at it..... I don't know what Katie imagines a pixel could be other than a sample. That makes no sense. If you resize down, each new pixel might represent some sort of average of pixels from the original image, but that doesn't mean a new "sample" wasn't created. |
|
14th April 2017, 08:50 | #16 | Link | |
Registered User
Join Date: May 2006
Posts: 3,997
|
Quote:
This is different for video when we bob (instaed of single rate deinterlace) a video. The time resolution of the single rate deinterlaced video is 30fps while the bobbed sequence produces 60 different pictures per second (for action or panning scenes). |
|
14th April 2017, 09:08 | #17 | Link |
HeartlessS Usurer
Join Date: Dec 2009
Location: Over the rainbow
Posts: 10,980
|
Yes, anti-flicker. (same for PAL 50 fields/sec or NTSC 60 fields/sec, 25/30 Frames/sec would flicker).
__________________
I sometimes post sober. StainlessS@MediaFire ::: AND/OR ::: StainlessS@SendSpace "Some infinities are bigger than other infinities", but how many of them are infinitely bigger ??? Last edited by StainlessS; 14th April 2017 at 09:42. |
14th April 2017, 09:30 | #18 | Link | |
Retried Guesser
Join Date: Jun 2012
Posts: 1,373
|
Quote:
wikipedia/Anti-aliasing_filter/Optical_applications |
|
14th April 2017, 17:31 | #19 | Link | |
Unavailable
Join Date: Mar 2009
Location: offline
Posts: 1,480
|
Quote:
What an annoying, disgusting, terrible experience, is all I can say |
|
14th April 2017, 18:41 | #20 | Link |
Registered User
Join Date: Jan 2015
Posts: 1,056
|
That's funny. None of my old CRT televisions ever flickered. Maybe it was just your TV and had nothing to do with the frame rate.
__________________
I ask unusual questions but always give proper thanks to those who give correct and useful answers. |
|
|