Bob Hawkins Posted October 7, 2009 Share Posted October 7, 2009 I note that one of two methods of interpolation is chosen having selected 'Best Quality' in the 'Resize' dialog box: Bicubic and Super Sampling. I haven't been able to figure out the criteria that the application uses for selecting one over the other, yet. Can anyone throw further light on this subject? Quote Link to comment Share on other sites More sharing options...
Neil Cassidy Posted October 7, 2009 Share Posted October 7, 2009 Playing with the control is a little confusing because the method name in the method-indicator-thing seems to lag one step behind the inputs to the stepper-arrow-things. After accounting for this, I always observe that it chooses bicubic when only one dimension is being stretched/shrunk, and I always observe that it chooses supersampling when both dimensions are being stretched/shrunk. When only one dimension is being stretched/shrunk, bicubic interpolation reduces to cubic interpolation in that dimension. Relative to bicubic interpolation, cubic interpolation is easier to code and faster. So it probably uses cubic interpolation for accuracy when only one dimension is being stretched/shrunk, and defaults to supersampling when both dimensions are being stretched/shrunk because supersampling isn't really any more complex in that case. I haven't seen the source, but that's my guess. Quote Segment Image : Average Color (HSL) : Eigen Blur : []Cool, new forum! Link to comment Share on other sites More sharing options...
Bob Hawkins Posted October 7, 2009 Author Share Posted October 7, 2009 Neil, Thanks for your explanation. Typically, I have an image which, when opened, is 136.60 x 91.44 centimetres at a resolution of 28.25 pixels per centimetre. '* Bicubic will be used' is at the foot of the dialog box (the default, I guess). I change the resolution to 118.11 (equivalent to 300 pixels per inch) and as soon as I start to enter a new value for either the width or the height, '* Super Sampling will be used' appears. Both dimensions are changed, however, because the 'Maintain aspect ratio' box is checked. (It seems '* Super Sampling will be used' is selected because the program reacts as soon as the first number anywhere is entered, which will almost always be smaller than that it is replacing.) I wonder whether the answer is as simple as enlargement and reduction. I note that for both 'By percentage' and 'By absolute size', if the figure I enter is smaller than initially displayed, '* Super Sampling will be used' is selected, whereas, if the figure I enter is greater than initially displayed, '* Bicubic will be used' is selected. Quote Link to comment Share on other sites More sharing options...
Neil Cassidy Posted October 7, 2009 Share Posted October 7, 2009 OK, I tested this more carefully. 1. When one dimension is scaled down, it seems to choose bicubic. 2. When one dimension is scaled up, it seems to choose bicubic. 3. When both dimensions are scaled down, it seems to choose supersampling. 4. When both dimensions are scaled up, it seems to choose bicubic. 5. When one dimension is scaled up and the other is scaled down, it seems to choose bicubic. So my guess doesn't make sense in cases 4 and 5. I suppose that supersampling doesn't make sense when the image is being scaled up, because the output image could be quite large and most of the supersamples would be redundant. In those cases it must do a full bicubic interpolation, or at least two cubic interpolations in succession. I'm gonna dig around in the assemblies and see if I can figure this out. Time passes... Yeah, took a look earlier. The "Best Quality" method will only use supersampling when the height of the resized image is less than that of the original image, and the width of the resized image is less than that of the original image. Otherwise it switches to bicubic. It will use nearest-neighbour if either one of the images is either one pixel wide or one pixel tall, but it won't say so in the dialog. Quote Segment Image : Average Color (HSL) : Eigen Blur : []Cool, new forum! Link to comment Share on other sites More sharing options...
Bob Hawkins Posted October 8, 2009 Author Share Posted October 8, 2009 Neil, Many thanks for taking the time to investigate this issue in detail. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.