The basic idea of super-resolution imaging is the ability to scale up images and maintain visual quality either for people to view or for computer image analysis.
Super-resolution is important due to the diffraction limit, the limit on the resolution an optical hardware can reach due to the diffraction of light. The ability to improve the resolution via an algorithm means that you can subvert that limit to increase the resolution.
So why talk about super-resolution scaling? Besides it being a pretty cool topic, our Java imaging SDK JDeli added support for Super Resolution and you might find that it is what you need to get those high quality images.
So let’s run a little experiment. Let’s take this image of some zebras and run it through JDeli’s super-resolution scaling and Java’s bicubic scaling.
Here is the initial image:
For JDeli super-resolution I am using the following code:
BufferedImage image = JDeli.read(new File("Zebras.png"));
image = SuperResolution.scale2x(image);
JDeli.write(image, JDeli.OutputFormat.PNG, new File("Zebras-JDeli-Scaled.png"));
For Java bicubic I am using the following code:
BufferedImage src = JDeli.read(new File("Zebras.png"));
final int w = src.getWidth();
final int h = src.getHeight();
BufferedImage dst = new BufferedImage((w * 2),(h * 2), BufferedImage.TYPE_INT_ARGB);
final AffineTransform at = AffineTransform.getScaleInstance(2.0, 2.0);
final AffineTransformOp ato = new AffineTransformOp(at, AffineTransformOp.TYPE_BICUBIC);
dst = ato.filter(src, dst);
JDeli.write(dst, JDeli.OutputFormat.PNG, new File("Zebras-Java-Scaled.png"));
End result side by side comparison: (please click on the images to see the difference)
|JDeli super-resolution||Java bicubic|
As you can see, super-resolution maintains the quality of the initial image, whereas bicubic ends up in a more blurred image. At IDRsolutions, we’re very happy with the results that you get with JDeli. What do you think?
IDRsolutions develop a Java PDF library, a PDF forms to HTML5 converter, a PDF to HTML5 or SVG converter and a Java Image Library that doubles as an ImageIO replacement. On the blog our team post about anything interesting they learn about.