Image resizing with LCD sub-pixel awareness (aka ClearType)

Discuss digital image processing techniques and algorithms. We encourage its application to ImageMagick but you can discuss any software solutions here.
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: Image resizing with LCD sub-pixel awareness (aka ClearTy

Post by henrywho »

I wanna try testing with this concept. Using the sample image at http://forums.dpreview.com/forums/read. ... e=40282142 the anti-aliasing effect seems not easily noticeable.

Code: Select all

convert.exe 7640_CO40_FM1-175pct_sRGB.jpg -colorspace RGB -filter RobidouxSharp -distort resize 1800x900! -channel Red -morphology Convolve "3x1: 0, 0, 1" -channel Green -morphology Convolve "3x1: 0, 1, 0" -channel Blue -morphology Convolve "3x1: 1, 0, 0" +channel -filter Catrom -resize 600x900! -colorspace sRGB -quality 95% -sampling-factor 1x1 7640_CO40_FM1-175pct_sRGB_s0.jpg 

convert.exe 7640_CO40_FM1-175pct_sRGB.jpg -colorspace RGB -filter RobidouxSharp -distort resize 1800x900! -filter Catrom -resize 600x900! -colorspace sRGB -quality 95% -sampling-factor 1x1 7640_CO40_FM1-175pct_sRGB_s1.jpg 
Are my choices of the "before" and "after" not good enough?
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: Image resizing with LCD sub-pixel awareness (aka ClearTy

Post by henrywho »

It seems to work better with B/W textual materials.

1000x500 picture with contents quoted from: http://zh.wikipedia.org/wiki/%E8%9F%B9% ... F%E4%BA%91
Image

"Plain" resize to 200x100:
Image

Code: Select all

convert.exe msg2.png -colorspace RGB -filter RobidouxSharp -distort resize 200x100! -colorspace sRGB -quality 95% -alpha off +repage -strip msg2_s0.png
"Normal" resize to 200x100 (in two steps in order to tally with that of sub-pixel-aware resize):
Image

Code: Select all

convert.exe msg2.png -colorspace RGB -filter RobidouxSharp -distort resize 600x100! -filter Lanczos -resize 200x100! -colorspace sRGB -quality 95% -alpha off +repage -strip msg2_s3.png
Sub-pixel aware resize to 200x100:
Image

Code: Select all

convert.exe msg2.png -colorspace RGB -filter RobidouxSharp -distort resize 600x100! -channel Red -morphology Convolve "3x1: 0, 0, 1" -channel Green -morphology Convolve "3x1: 0, 1, 0" -channel Blue -morphology Convolve "3x1: 1, 0, 0" +channel -filter Lanczos -resize 200x100! -colorspace sRGB -quality 95% -alpha off +repage -strip msg2_s1.png
Does the sub-pixel version look better?
henrywho
Posts: 188
Joined: 2011-08-17T06:46:40-07:00
Authentication code: 8675308

Re: Image resizing with LCD sub-pixel awareness (aka ClearTy

Post by henrywho »

One surprising result is that the HDRI enabled binary at http://blog.astrophotographytargets.com/ is producing sharper and more contrasty images (both -gamma and -colorspace tested) than normal Q16 binary with the above textual image. Tiny difference but noticeable. I believe such test cases are challenging the limits of 16bit integers.

Edit: On second thought, this sub-pixel technique is not really useful nowadays.
(1) Everybody is using tablets and phones for browsing, holding them whatever-the-orientation-they-feel-like. Hence, we cannot assume the RGB pixel placement.
(2) We seldom use these devices at 1:1 display.
(3) Many panels of these devices do not follow the RGB-pattern anyway.
(4) Many of them have similar technology built-in already.
rnbc
Posts: 109
Joined: 2010-04-11T18:27:46-07:00
Authentication code: 8675308

Re: Image resizing with LCD sub-pixel awareness (aka ClearTy

Post by rnbc »

henrywho, as I said before this is only useful as an output technology. It's not meant to be used to prepare images beforehand. We are doing that as a proof of concept only, but that's not how it makes sense to use. For example, perhaps the browser should be doing it when presenting large images, or google-earth when downscaling satellite images, etc.
Post Reply