# How do I correctly enlarge thermographic images for web use?

I'm helping a friend of mine who owns a company that does infrared analysis of structures.

He wants to put a gallery of thermal images on his website, but his extremely expensive camera only takes thermal pictures at 320 x 240.

He can convert the thermal format to normal web formats (PNG, JPEG, GIF). How much of a percentage can we enlarge the images before the quality becomes so horrible that quality becomes unusable?

• Why not just stitch 16 such images together to create 1280 by 960 images? You then have the same resolution but the displayed structure is larger. They then look like ordinary images taken from a larger distance, you then don't notice the poor resolution. Apr 17, 2015 at 19:20
• @mattdm if the question doesn't fit, that's fine. I posted here because I found other questions on this site related to thermagraphic photography, so I assumed it was the right spot. Apr 17, 2015 at 20:44
• Some examples of the thermal images would be helpful. Apr 17, 2015 at 21:37
• I don't understand the off-topic comment. I just reviewed the site guides photo.stackexchange.com/help/on-topic and IR photography and image post processing seems a suitable topic. Is scientific photography not photography? That is not listed in the off topic section. Apr 18, 2015 at 21:59
• Combining the low resolution thermo with high resolution visible light photos will enable you to create decent looking images with a high resolution; that's why the cameras take both. I just can't tell you how you do it, but you should be able to find out online. Apr 19, 2015 at 18:19

Perfect Resize (formerly Genuine Fractals) is usually considered as one of the best available upsampling tools for photography. It is worth trying.

Another, actually the opposite approach might be to use strictly multiples of the original size (like 2x = 640x480) and use the simplest thing - nearest neighbor algorithm that will just make the pixels look like squares. The images will be pixelated, but crisp.

If it was me, I would try both methods on multiple images and asked people what they think looks best.

Edit: One method, that is not very useful in regular photography but might work well in this case is vectorization.You only have as much detail as the original picture, but you can enlarge as much as you want.

The following images are (1) up sampled from 200px to 800px by nearest neighboring (2) Vectorized from 200px x 300 px original. I chose very small size for the original and they certainly look wrong when used on regular photograph, but they show the effect well.

• I think your nearest neighbor idea might be the best. If you see sharp jagged lines when you look at the guts of a building you can probably figure out what this object is supposed to be. Apr 18, 2015 at 22:33

I think you have 4 options.

1) There are some programs that do a decent job upscaling images. I would not use them beyond 300%. If you do so you have a 960x720px. It can work.

I'm posting this that I have used sometime. They dosen't perform miracles but help.

I have not used this but it has some popularity

Irfanview has a good algorithm called Lanczos

2) Blow up the pixels, and use them as a texture! Resample them 20 times!

3) Use a pattern over the image

4) Use a "panorama" aproach as Count Iblis mentioned, where you stilch diferent images together. You can use for example http://hugin.sourceforge.net/ or any other Photo editing program.

Consider using waifu2x, which was originally created to scale manga images using deep convolutional neural networks. It has also been trained to remove JPG compression artifacts and to resize photographs. Binaries for Windows are available. Users of other operating systems will need to figure out how to compile it.

For comparison, I resized the nearest-neighbor sample image provided by MirekE down to 200x300, then upscaled it to 800x1200 with waifu2x:

Other options to consider:

• Stitch multiple images, as Count Iblis suggests.

• Overlay low resolution thermal images on high-resolution visible light photos, as ziggystar recommends.

• Use conventional resizing algorithms (nearest neighbor, bilinear, bicubic, lanczos).

• Use "preserve details", if you are a Photoshop user.