Live data from Hacker News

A Pixel Is Not A Little Square (1995) [pdf]

alvyray.com

11–20 of 81 posts

Re: A Pixel Is Not A Little Square (1995) [pdf]

#11
post #8

I imagine this came up partly as a result of the recent alpha compositing discussion. We desperately need some research, based in user studies and using modern display technology, to settle some basic questions: * What reconstruction filter gives the best results? Is it the same for vector (text) and natural images? By "best" I do mean contrast (sharpness) and lack of visible artifacts. * For rendering of very thin l…

I can tell you right now that you will have a very difficult time beating a normalized gauss filter with a diameter of around 2.2 pixels in a general case. Color and luminance is a separate and orthogonal issue from filtering. I also know that people get away with compositing without converting to linear space, but I'm skeptical that any benefits they see aren't just a matter of getting the color curve they want for…

Reeeaallly? I haven't made the images, but my intuition is telling me that text will be noticeably blurry compared with a box filter.

I basically agree with your points regarding compositing in a linear space, except that I suspect that thin black-on-white lines will come out looking thin and spindly.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#13
post #4

A great video which touches on this idea, but mostly in the context of audio: https://youtu.be/cIQ9IXSUzuM (relevant part around 8 minutes)

Be careful generalizing the audio results to pixels. The central lesson of xiph's work is that people simply cannot hear frequencies above, let's say 20kHz. Therefore, as long as your sampling rate is above the Nyquist limit (and under the assumption the signal chain is linear), any reconstruction filter that passes frequencies through 20kHz is effectively "perfect." There are two ways this is not true for pixels. Fi…

Thanks for the heads up. There is one specific section where he compares pixels to lollipop graphs and that is mainly what I was referring to, I didn't mean to suggest that all the principles in the video apply to graphics in the same way that they apply to audio.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#14
post #8

Earlier quoted context omitted.

I can tell you right now that you will have a very difficult time beating a normalized gauss filter with a diameter of around 2.2 pixels in a general case. Color and luminance is a separate and orthogonal issue from filtering. I also know that people get away with compositing without converting to linear space, but I'm skeptical that any benefits they see aren't just a matter of getting the color curve they want for…

Reeeaallly? I haven't made the images, but my intuition is telling me that text will be noticeably blurry compared with a box filter. I basically agree with your points regarding compositing in a linear space, except that I suspect that thin black-on-white lines will come out looking thin and spindly.

It sounds like you are talking about text that doesn't move.

If you want a general filter that can give a result without visible aliasing while sacrificing as little sharpness as possible, a 2.2 gauss filter is very hard to beat and I have spent a lot of time trying.

Box filters can be sharper, lancoz filters can be better for scaling down a final image, etc. but they will alias in a general sense. You might not see it in static text which is fine.

Also thin black on white lines are an extreme outlier, since what you percieve is relative and the entire image matters. It is more into the realm of optical illusion that play off our relative sensitivity.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#16
post #14

Earlier quoted context omitted.

Reeeaallly? I haven't made the images, but my intuition is telling me that text will be noticeably blurry compared with a box filter. I basically agree with your points regarding compositing in a linear space, except that I suspect that thin black-on-white lines will come out looking thin and spindly.

It sounds like you are talking about text that doesn't move. If you want a general filter that can give a result without visible aliasing while sacrificing as little sharpness as possible, a 2.2 gauss filter is very hard to beat and I have spent a lot of time trying. Box filters can be sharper, lancoz filters can be better for scaling down a final image, etc. but they will alias in a general sense. You might not see…

So obviously text is one of the things I care about a lot. I'm willing to accept your filter as being very good for a lot of stuff other than presenting a GUI.

Does this mean that there is not one true right answer for images, as there is for audio[0]? That you should use different reconstruction filters depending on the application. Is it accurate to say that a pixel is not a little square unless you're rendering text, in which case it is?

[0] I know this is a slight oversimplification, if you care deeply about latency you might choose between linear and minimal phase, etc. But for consumer applications it's true enough.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#17

I imagine this came up partly as a result of the recent alpha compositing discussion. We desperately need some research, based in user studies and using modern display technology, to settle some basic questions: * What reconstruction filter gives the best results? Is it the same for vector (text) and natural images? By "best" I do mean contrast (sharpness) and lack of visible artifacts. * For rendering of very thin l…

> * What gamma curve yields the perception of equal width of black-on-white and white-on-black thin lines (also relevant for text)? (Hint: likely not linear luminance)

Gamma curves do not affect black and white themselves, only intermediate grays. It’s true that grays are usually used to draw antialiased black and white lines, but we can also think about “ideal” (axis-aligned, pixel-centered, non-antialiased) black and white lines. By framing this as a question about gamma, you’ve implicitly assumed that “ideal” black lines on white would have equal perceived thickness to “ideal” white lines on black.

This is not the case, as typographers have known for decades. The right way to draw perceptually equal-thickness black-on-white and white-on-black lines is to vary the line width (perhaps even by more than a full pixel if the lines are thick enough!). Gamma only comes in afterwards, to help us reproduce the varied widths accurately, and the accurate way to do that is in a linear color space.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#18

I imagine this came up partly as a result of the recent alpha compositing discussion. We desperately need some research, based in user studies and using modern display technology, to settle some basic questions: * What reconstruction filter gives the best results? Is it the same for vector (text) and natural images? By "best" I do mean contrast (sharpness) and lack of visible artifacts. * For rendering of very thin l…

> * What gamma curve yields the perception of equal width of black-on-white and white-on-black thin lines (also relevant for text)? (Hint: likely not linear luminance) Gamma curves do not affect black and white themselves, only intermediate grays. It’s true that grays are usually used to draw antialiased black and white lines, but we can also think about “ideal” (axis-aligned, pixel-centered, non-antialiased) black a…

I should have clarified that I meant lines with subpixel phase and possibly widths that are not integral numbers of pixels, ie the antialiased case.

Also I totally agree that we need to take into account the perceptual differences between black-on-white and white-on-black even assuming the display technology is perfect. That's one reason doing these studies is not trivial!

Re: A Pixel Is Not A Little Square (1995) [pdf]

#19
post #8

I imagine this came up partly as a result of the recent alpha compositing discussion. We desperately need some research, based in user studies and using modern display technology, to settle some basic questions: * What reconstruction filter gives the best results? Is it the same for vector (text) and natural images? By "best" I do mean contrast (sharpness) and lack of visible artifacts. * For rendering of very thin l…

I can tell you right now that you will have a very difficult time beating a normalized gauss filter with a diameter of around 2.2 pixels in a general case. Color and luminance is a separate and orthogonal issue from filtering. I also know that people get away with compositing without converting to linear space, but I'm skeptical that any benefits they see aren't just a matter of getting the color curve they want for…

Lanczos interpolation seems to beat a gauss filter for me. It has some overshooting/ringing effects of course, but the improved sharpness is a great tradeoff compared to the blurriness of gauss filtering. Of course, gauss filtering might still play a residual role in analog systems, such as the one that physically displays stuff via a CRT screen.

Re: A Pixel Is Not A Little Square (1995) [pdf]

#20
post #8

I imagine this came up partly as a result of the recent alpha compositing discussion. We desperately need some research, based in user studies and using modern display technology, to settle some basic questions: * What reconstruction filter gives the best results? Is it the same for vector (text) and natural images? By "best" I do mean contrast (sharpness) and lack of visible artifacts. * For rendering of very thin l…

I can tell you right now that you will have a very difficult time beating a normalized gauss filter with a diameter of around 2.2 pixels in a general case. Color and luminance is a separate and orthogonal issue from filtering. I also know that people get away with compositing without converting to linear space, but I'm skeptical that any benefits they see aren't just a matter of getting the color curve they want for…

True, but how often do you care about the general case? Most images are representations of real objects, or symbols or diagrams designed for human comprehension. Ignoring cases that in practice are very unlikely to occur lets you optimize for the more common cases. Techniques like resizing in a sigmoidal color space (see http://www.imagemagick.org/Usage/resize/#resize_sigmoidal ) don't have any rigorous mathematical basis, but they're tuned subjectively to have good results in common cases.
Post reply on HN