fredmiranda.com
Login

Moderated by: Fred Miranda
  New fredmiranda.com Mobile Site
  New Feature: SMS Notification alert
  New Feature: Buy & Sell Watchlist
  

FM Forums | Post-processing & Printing | Join Upload & Sell

  

Archive 2009 · Image Size Reduction Algorithm

  
 
Lance Couture
Offline
• • • •
Upload & Sell: Off
p.1 #1 · Image Size Reduction Algorithm


Hello Everyone,

I'm curious to know which image re-sizing algorithm you use in PS for down-sizing an image.

For the longest time, I have been using Bicubic Sharper which is the recommended one for downsizing. However, recently I have taken to just using Bicubic, and then doing all of the sharpening myself.

I was finding that using the Bicubic Sharper method coupled with any additional sharpening from me, however discrete, led to an image which did not look right to me. I can't quite explain it. This is more of a gut reaction of the result than an empirical observation.

Can anyone share their thoughts on this?

Cheers.




Jul 29, 2009 at 10:55 PM
andrewfee
Offline

Upload & Sell: Off
p.1 #2 · Image Size Reduction Algorithm


I tend to use bicubic for photographs and sharpen afterwards if necessary, but when appropriate, I'll use bilinear. I don't like how images look using either sharper/smoother when resizing. (up or down)

As I'm running CS2, I need to do any resizing in 32-bit to avoid gamma errors though. I'm not sure if that's been fixed in CS4 - I know it isn't a problem in Lightroom.

To test for that, download this image and scale it to 50% its original size using bilinear. If you end up with a coloured image, it's not being scaled correctly. If it's a flat grey bar then it is. More details here if you want to read up on it. (the source of that image)



Jul 30, 2009 at 12:19 AM
cgardner
Offline
• • • • •
Upload & Sell: Off
p.1 #3 · Image Size Reduction Algorithm


I you can see the difference in the final output it matters: do what looks best to your eye... So you are on the right path here.

Like M mode vs Av or P when shooting the more control you have over the variables of sharpening the better you can control the process to tailor it to the needs of each image, which vary with content, size, output device, viewing distance, etc.

Sharpening works by altering contrast along borders where two tones are significantly different, such as a dark eye lash against bright skin. The brain, which is easily fooled, thinks greater contrast = greater sharpness. Photoshop will find the borders of the eye lash and make the skin next to the eye lash a bit brighter than the surrounding skin and edge of the lash next to the skin a bit darker. The contrast gets increase just along the border of the two tones tricking the brain into thinking the transition is more abrupt: more like a narrow sharp edged knife than a wider blunt-edged axe. Some degree of sharpening is usually needed in digital files because the process of breaking the image into discrete red, green and blue sites on the sensor (Bayer Pattern) then averaging them into RGB values for pixels in the stored image degrades sharpness.


There are just three adjustment variables: amount, radius, and threshold. Threshold controls how much difference there must be between two tones to trigger any sharpening action. If set to 0 then everything will be sharpened. If set to 20 there must be a big difference between two adjoining tones before sharpening will be applied. Radius controls how many pixels on either side of the adjoining tones are affected by the sharpening. Amount controls how much the contrast (tone) is changed.

Assuming threshold is left at zero (everything sharpened) there are two methodologies for sharpening: low radius / high amount and high radius / low amount. If you take the same image and sharpen one copy using A= 500, R= .2, T= 0 and a second copy using A=150, R=1, T=0 you will find they produce a similar degree of change in the image on the screen at normal viewing distance. If you then print both images you may find the two methods affect the image differently than they did on the screen. That's because a screen consists of a grid of pre-arranged pixels of fixed size where a printed image is a collection of scattered overlapping transparent ink dots which will spread into the paper in varying degrees. Thus if you print the same image on matte and glossy paper it will affect appearance and impact on the amount of sharpening needed.

You likely followed someone else's advice to use Bicubic Sharper rather than from the outset taking a typical image rather than trying all the different methods and judging for yourself what their cause and effect. But now that your eye is sophisticated to see the difference you might want to revert to the basic controls for sharpening and do some experimentation to understand the cause and effect.

As with shooting in M mode, once its understood how the individual USM controls affect the outcome you may be more inclined to make the adjustments manually rather than using the more automated features in Photoshop. What I do when in doubt is do it both ways. I'll dupe the image into two layers, sharpen one layer with Bi-cubic Sharper and the other with my manual old-school Amt, Radius, Threashold method. Then by toggling the top layer on and off its easy to make a direct comparison - on screen.


You can't judge the effect of USM for prints on a monitor, you must make a print then evaluate at typical viewing distances. No need to waste reams of paper. Just sharpen an image 6 or 8 different ways then cut/paste the same section of the image into a single print. Then take the print and look at it from reading distance and 3ft, and 6ft. What you'll find is that depending on viewing distance the image segment which looks sharpest perceptually will change. That is especially true of large prints intended for viewing from a distance. If they are sharpened for optimum sharpness at 18" (reading distance) they will tend to look like mush from a distance of 10 feet. In a situation like that to get the illusion of sharpness at 10' it may be necessary to sharpen to the point it would look exaggerated on screen or from reading distance.

In the final analysis there's no substitute for experience and the quickest way to gain experience is with systematic testing like what I suggest above. Also at some point you'll begin to realize that not all parts of an image need to be sharpened equally and that any global sharpening method is less than ideal.

Relative sharpness is a form of contrast which provides a clue to the viewer what is most important. You use it instinctively to blur a distracting background so the viewer will be attracted to the more important foreground subject. That same cause and effect of sharpening also works within a face. Ideally you want the eyes and mouth very sharp so the viewer is attracted there to make and hold "eye contact" and not be distracted off of them immediately. One very effective way to to that is to selectively sharpen the eyes and mouth, then by varying degrees blur everything else in the photo so it will not create distracting contrasting sharpness.

If you progressively darken and soften a dark background photo from the sharper center of interest near the middle towards softer edges of the frame the contrasting sharpness will help pull the viewer in. That works whether the photo is a head shot or a landscape. On a light background you can create the same out-to-in eye movement with tone and sharpness but on light backgrounds the tone needs to become progressively lighter towards the edges (i.e. don't use dark vignettes with light backgrounds - it is counter productive. So are white borders around dark background photos, for the same reason).

Again, in the final analysis what looks best to your eye will be best for you, but the more different techniques you explore the wider your frame of reference for making that decision will be.




Jul 30, 2009 at 08:50 AM
jjlphoto
Offline
• • • • •
[X]
p.1 #4 · Image Size Reduction Algorithm


Chuck, I wonder if you misunderstood what the OP was going after. andrewfee's response was right on the money IMO. I actually do understand this gamma stuff. I use a distortion fix tool called LensFix from Kekus. It is based on Dr. Helmut Dersch's PanoTools formula. To do its work, that program obviously has to do interpolation. I have read many of the original PanoTools tutorials on how the gamma of the image's color space plays into the interpolations. As a result, I have set LenFix to do its work at a gamma of 1 for the same reasons illustrated by andrewfee's links.


Jul 30, 2009 at 09:12 AM
cgardner
Offline
• • • • •
Upload & Sell: Off
p.1 #5 · Image Size Reduction Algorithm


jjlphoto wrote:
Chuck, I wonder if you misunderstood what the OP was going after.


No offense either, but the OP would be the best judge of that, not you.

I read the message as an attempt on his part to better understand what sharpening does and why some methods produce better looking results (to his eye) than others. I'm simply suggesting he try some experimentation using a method where the cause and effect of the variables is more easily seen and understood as a baseline for better understanding the results the more automated methods produce.

Chuck



Jul 30, 2009 at 09:21 AM
jjlphoto
Offline
• • • • •
[X]
p.1 #6 · Image Size Reduction Algorithm


Chuck- I guess I took the OP's statements about the image looking 'not quite right' as to have to do with something less tangible and more obscure than the sharpness factor itself.


Jul 30, 2009 at 10:01 AM
Ernst Dinkla
Offline

Upload & Sell: Off
p.1 #7 · Image Size Reduction Algorithm


Lance Couture wrote:
Hello Everyone,

Can anyone share their thoughts on this?

Cheers.




With downsampling it is also important to check what aliasing can do to detail. Next to that some algorithms will reduce noise (if there) more in downsampling than other algorithms. Lanczos does a good job on both aspects but extra anti-aliasing routines will take care of both. Contrast shifts on small details to larger textured areas are often caused by aliasing.

http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/example1.htm
http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/down_sample.htm


met vriendelijke groeten, Ernst Dinkla

Dinkla Gallery Canvas Wrap Actions for Photoshop
http://www.pigment-print.com/dinklacanvaswraps/index.html





Jul 30, 2009 at 10:15 AM
Mr Mouse
Offline
• • •
Upload & Sell: Off
p.1 #8 · Image Size Reduction Algorithm


Lance Couture wrote:
Hello Everyone,

I'm curious to know which image re-sizing algorithm you use in PS for down-sizing an image.

For the longest time, I have been using Bi-cubic Sharper which is the recommended one for downsizing. However, recently I have taken to just using Bi-cubic, and then doing all of the sharpening myself.

I was finding that using the Bi-cubic Sharper method coupled with any additional sharpening from me, however discrete, led to an image which did not look right to me. I can't quite explain it. This is more of a gut reaction of the result than an empirical observation.

Can anyone share
...Show more

I think it has a lot to do with just how much sharpening has been done before you resample downsize. I tend to only sharpen an image twice many do three pass sharpening. I do a little Capture sharpening in camera RAW usually just use the default setting Adobe has set for my different digital cameras. So my images are smooth and soft after camera RAW. The second sharpening I do for images is output sharpening. If I'm downsizing for the web I just resample the image using Bi-cubic Sharper. The resampled image is reduced in size and as sharp as I want. If the image I'm downsizing is someone's images that has been sharpened I just use plain Bi-cubic for I find the jaggies set in if you use Bi-cubic Sharper on a sharpened image.

Photoshop's Plug-in Fit Image uses Bi-cubic always so for myself I changed it to use Bi-cubic Sharper when it downsizes and Bi-cubic Smoother when it up-sizes.

When I print an image I size it for printing without resampling. If the DPI falls below 200 DPI I will resample the image up to 200 DPI using Bi-cubic Smoother. Once the Image is sized for printing I will sharpen it for printing using a Action I created.



Jul 30, 2009 at 03:09 PM
Lance Couture
Offline
• • • •
Upload & Sell: Off
p.1 #9 · Image Size Reduction Algorithm


John, that is a very striking example.

Chuck, as always, amazing response. A little over-the-top, but still amazing.

Thanks for the info everyone!

*Greatly* appreciated.




Jul 30, 2009 at 05:10 PM
andrewfee
Offline

Upload & Sell: Off
p.1 #10 · Image Size Reduction Algorithm


jjlphoto wrote:
I have posted some of my results using his target, and testing with gamma changes.

Also note that my best result uses a 'stair step reduction' method. Seems with all new reduction methods in Photoshop, IE Bicubic Sharper, and all the third party reduction products, people have forgot about that old tried and true method.


I've done a bit of testing on this myself after seeing your results. I have to say that while it may look good on a zone plate (I found doing 15 steps of bicubic smoother and then 1 step of sharper looked best) it absolutely does not work for real images.

Another thing I would point out, is that you're much better off doing your processing in 32-bit in Photoshop (where it does the scaling in linear light) rather than converting to gamma 1 in 16-bit. I don't think 16-bit is enough precision to avoid rounding from doing that. (probably why Photoshop only seems to do it in 32-bit)

Resizing to 20% in fifteen 90% steps and one 97% step obliterates any high-frequency detail in an image. It also added ugly low-frequency ringing, and distorted the images I tried it with when they weren't perfectly square. On a portrait, it was stretched vertically, and on a landscape shot it was compressed horizontally.

Scaling directly to 20% using bicubic in 32-bit and then adding some low radius unsharp mask gives significantly better results on my photographs.

That said, I think you need to judge the results you get on a per-image basis. I have a preferred amount of sharpening for images I put on the web, which works for most photographs, but not all. Sometimes it's too much, sometimes it's not enough.



Jul 31, 2009 at 12:22 AM
Ernst Dinkla
Offline

Upload & Sell: Off
p.1 #11 · Image Size Reduction Algorithm


I always use Qimage for printing and there are several choices of resampling algorithms in that application. There's also the slider for the ant-aliasing filter that does its work on downsampling only where it is needed most. And the slider of the smart print sharpening is also a wonderful tool.

Stair, step extrapolations or alike isn't what I do, Qimage's algorithms are good enough for me.

Most of the time this works for tone and contrast too. Where the (micro)contrast in small prints increases and depending on the content the print gets lighter or darker I always suspected that aliasing was the cause of it. A balance between loss of detail due to anti-aliasing done, sharpening and gamma correction is needed. Where large prints showed lighter than expected I thought of a reversed aliasing effect or of a perceptual issue that John Caponigro also described without knowing the actual cause either. It happened with analogue prints too and could be a grain effect there.

If Gamma plays a role in resampling processes then that may be another cause too but it doesn't make it the only one.


met vriendelijke groeten, Ernst Dinklal

Try: http://groups.yahoo.com/group/Wide_Inkjet_Printers/



Jul 31, 2009 at 05:50 AM
jjlphoto
Offline
• • • • •
[X]
p.1 #12 · Image Size Reduction Algorithm


Ernst Dinkla wrote:
If Gamma plays a role in resampling processes then that may be another cause too but it doesn't make it the only one.


Plays an important role, see my reply regarding PanoTools. But as you state, Gamma is only one of the many parts of the situation. Unfortunately, Gamma is most often overlooked.


andrewfee wrote:
..... is that you're much better off doing your processing in 32-bit in Photoshop (where it does the scaling in linear light) rather than converting to gamma 1 in 16-bit. I don't think 16-bit is enough precision to avoid rounding from doing that....


I have just CS3 on my OSX machine, so scaling in 32bit only offers me Bilinear. So for now, 16bit/Gamma 1.00 with choices of Bicubic or Bicubic Sharper is the best I can pull off. I agree, the downward stair stepping was a quick test, and may not be appropriate for real life examples.

Great topic though, and I do appreciate reading all the informative links and responses. Also gives me some more things to try for images that need special attention.



Jul 31, 2009 at 08:06 AM





FM Forums | Post-processing & Printing | Join Upload & Sell

    
 

Welcome back
Log in to your account