If you are a thermographer, drone pilot or use thermal imaging cameras, you may have encountered different image types to save your photos and thermal images, or have you ever wondered what is the difference between .TIFF, .JPG and .R.JPG formats.
What is the difference between .TIFF and .JPEG format? Which image format is better? Which one is recommended in each case?
Below we discuss the characteristics and differences between these two formats, which are the most popular to capture and store thermographic images.
After a aerial drone inspection is carried out, it is necessary to store and save the images in order to use them in photogrammetry projects, aerial thermography, even aerial video with film cameras, among other applications.
There are many ways to store data and the major difference lies in the way the information is encoded, which can be text, image and video. Each of these has its own compression and storage methods, so the files have different characteristics and formats (.avi, .mpg, jpg, etc).
Due to the growth of digital media and the Internet in the last 40 years, the storage, manipulation and transfer of data has become a very important part of the industry, however the technological limitations, both in storage and data transfer, have led to new ways of storing and transferring them; optimizing resources and using various compression algorithms. To date, files with large amounts of information can be a problem for handling, transfer and storage despite the increase in processing capacity.
Where and how does the .TIFF and .JPEG format emerge?
At the beginning of the digital era 80-90s, due to the limitations for data transmission and the low speed of Internet browsing, the .JPEG format was created for storing images using a compression method called “lossy“, which allows the reduction in the size of the images and facilitates their manipulation on digital platforms. This format would become the standard for images used on the Internet from the early nineties to the present day.
It was also at the beginning of the digital era when the .TIFF format was created in 1987, however, given the large amount of information it could store, it also required a large processing capacity, which is why this format would regain popularity several years later with the development of new technologies that would allow its storage and processing.
The .TIFF format is currently becoming a standard for manipulation and storage of images for work; be it photography, photogrammetry, thermography, multispectral analysis, among others. These types of files are known as editable files, they do not lose quality when recorded and edited, since they use a compression technique called lossless.
Meanwhile, R.JPEG files, which contain radiometric information, are a proprietary format, i.e., they were created by FLIR, as well as their compression and visualization methods using specialized software, such as Flir Tools or ResearchIR. R.JPEG files, which in 2018 gained attention due to the launch of FLIR’s Dual cameras, are exclusively used for thermal cameras, as one of their major advantages is that radiometric parameters, such as emissivity and background temperature, can be adjusted in post-processing allowing for more detailed analysis and reporting.
But then is it .JPEG or .JPG?
The term JPG exists because of changes in earlier versions of Windows operating systems. Specifically, MS-DOS 8.3 and FAT-16 file systems had a maximum limit of 3 letters when it came to file names, unlike UNIX-like operating systems such as Mac or Linux, which did not have this limit.
Therefore, on Mac or Linux systems, images saved as JPEGs use the .jpeg file extension. But when it came to saving those same types of images using Windows, the file extension had to be shortened to .jpg so that it would not exceed the 3-letter limit.
Nowadays Windows operating systems accept 3 or 4 letter file extensions such as .jpeg or .jpg. But since many people have been using Windows for so long and are used to saving their images as JPG, they have not stopped doing so. As a result, photo editing software such as Adobe Photoshop and GIMP save all JPEG images by default in the .jpg file extension on both Windows and Macs to avoid confusion.
What is the difference?
The comparison of this type of files is unavoidable because both are being used in industries that depend on image processing, however many times the difference between both is not known, it is substantial, since it is the way in which each of their algorithms compress the information becoming practically opposite in this area.
Lossy (JPEG ) – loses data when compressing and saving which is not recoverable.
Lossless (TIFF) – does not lose data when compressed and all data can be edited and stored.
Lossy + Lossless (RJPEG) – stores a JPG file and a TIFF file, which is then separated.
The .JPEG images use a compression method that takes representative samples of the data, while in .TIFF images all data points are saved, therefore this format allows better editing and saving of the raw data with its modifications, allowing us to return to the original image, which would be impossible with .JPEG images.
What do the acronyms of the file extension stand for?
JPEG – Joint Photographic Experts Group, is the name of the group of specialists who developed this image compression and encoding standard.
TIFF– Tagged Image File Format, is a file format created to store bitmap images, developed in 1987 by Aldus and currently owned by Adobe software company.
R.JPEG – Radiometric JPEG
The technical differences of both files and a comparison of both types with images used in the industry are presented below. In the comparison we used “.RJPEG” images which use the same principle as the .JPEG but contain radiometric information (temperature) so they have the distinctive R before the JPEG.
As shown in the image comparison
In Fig. 1 and 2, where the images on the left are a .TIFF image and the images on the right are .R.JPEG, the .TIFF images appear with a sort of layering that makes the image much more uniform in contrast and in “blurred” or “milky” appearance, compared to the .R.JPEG image.
This is a natural property of .TIFF files; it is a format that compresses all the sensor information in 8 or 16 bits, where all the information is “scaled” in alphanumeric form, along the whole radiometric metadata package that contains the image, being the metadata the information that describes the file itself. For this reason, .TIFF images cannot be read radiometrically by thermographic analysis programs, such as Flir Tools, since it is first necessary to decompress all the radiometric information in order to be able to analyze it in scale. There are some ways to perform this decompression with data analysis programs such as Python, however it is not recommended to use this format to make orthomaps (an image generated by joining photos) in some photogrammetric reconstruction programs
Unlike the .TIFF format, the R.JPEG format keeps all the radiometric metadata of the image in each pixel, being this the smallest homogeneous unit that is part of a digital image. This allows it to be read directly in any radiometric reading program.
It is worth mentioning that in the case of orthomap generation, which is a photographic representation of a surface to scale, the images are saved in R.JPEG format, although the result of the final orthomap will be in .TIFF format.
Which format is better?
It is not possible to define which format is better because both have pros and cons, however what we can do is to properly decide which one is suitable for a certain purpose. This can be done by establishing the objectives of the activity and in case of doing it for commercial or professional purposes, consulting the appropriate requirements, for example:
-To create an orthomosaic, R.JPEG and jpeg images are recommended since most of the current software perform reconstructions using these formats.
-For an artistic photo session, the .TIFF format, although it is not the most used, would be the most recommended since multiple editions of the original photograph can be made and with any file we can return to the original, unlike the .JPG.
Features chart of .JPG, .TIFF and R.JPEG formats.
|Radiometric JPEG||r.jpeg||8 & 14 bits||Contains visible and thermal information in a single file.|
640×512 8-bit thumbnail based on working mode.
640×512 LWIR 14-bit Flinear data
12MP Visible image
FLIR proprietary format
|TIFF||.tiff||14 bits||Tlinear data, radiometric parameters set at the time of capture.|
The visible image is contained in a separate jpeg.
|8-bit JPEG||8b.jpg||8 bits||This type of format is generated when a capture is taken over a radiometric video.|
LWIR only, AGC and color palette applied.
Although images in .TIFF format are not the current standard, this format has great potential because its encoding method allows storing a wide variety of data, with Machine learning and Data analysis this information can be exploited. In addition, the same image in both formats takes less space with tiff compression, so it is very likely to see it in the coming years included in processing software for photogrammetry.
At AV3 AEROVISUAL we use jpeg and rjpeg images for the generation of orthomosaics, point clouds, digital elevation models, digital surface models, and other techniques that employ principles of image reconstruction with photogrammetry; mainly because it is the format used by software such as Pix4D, Reality Capture and Agisoft Meta Shape.
If you have more questions about which images to use in your project or need a quote for a project that requires our image reconstruction services, do not hesitate to contact us through our social networks or at our email email@example.com