Comparison of image formats for photogrammetry- part 1

This post is intended for practitioners who know the basics of photogrammetry and are now focused on optimizing images quality and processing speed.

The foundation of photogrammetry is finding common points in multiple images. Every error that occurs with images—including the choice of file format—propagates through the entire reconstruction pipeline, affecting the accuracy of the point cloud. To minimize the image errors and noise, it is important to understand the trade-offs between the three primary image formats used in photogrammetry: JPEG, DNG, and RAW. According to the best practice, user should generally go for the RAW format. However, this does not make sense if you do not plan to edit photos afterwards.

RAW files are the ‘digital negatives.’ This means you cannot use them as images for processing, but they hold all the data to make an image. These files also do not degrade over time, as they are the original data for an image.

JPEG images tend to degrade over time – once they have been opened, edited and saved, the quality keeps deteriorating. Every edit or copy of a JPEG image simply adds to the degradation of image quality.

While photogrammetry software purely uses the JPEG or PNG format of images, the RAW images are only to ensure you have pure files to convert into JPEG, without worrying about the depleting quality.

Let’s see what the main differences between them are.


Feature JPEG DNG RAW
Data content 8-bit per channel processed image. RGB values only. Linear sensor data (typically 12-14 bit), either losslessly compressed or uncompressed. Contains the raw sensor values. Linear sensor data (typically 12-16 bit), often with proprietary compression. Contains the raw sensor values + manufacturer-specific metadata.
Dynamic range Low. Highlights and shadows are clipped during the in-camera processing that creates the JPEG. Limited recovery potential. High. Provided the conversion from RAW is lossless, the dynamic range is identical to the original RAW file. Full highlight and shadow recovery is possible. Maximum. Represents the full dynamic range captured by the sensor.
White balance & color Baked-in. White balance and color rendering are applied permanently and irreversibly. Completely adjustable. WB is stored as metadata and can be changed with zero quality loss. Completely adjustable. WB is stored as metadata and can be changed with zero quality loss.
Noise & detail In-camera noise reduction and sharpening are applied. This destroys fine texture detail and can confuse matching algorithms. Unprocessed. Noise and fine detail are preserved perfectly, allowing for superior algorithmic or manual noise reduction later. Unprocessed. The truest representation of sensor noise and detail.
File size Smallest. Lossy compression reduces size by 5x-20x. Medium. Typically 20-40% smaller than uncompressed RAW due to lossless compression and efficient packaging. Largest. Contains the most data, though lossless compression schemes reduce size.
Software support Universal. Read by every photogrammetry package ever made. Excellent. Directly supported by most software. Excellent, but requires codecs. Supported, but software must be updated to support new camera models’ specific formats.
Risk for photogrammetry Compression artifacts: JPEG’s blocky artifacts act as false features. Conversion fidelity: If DNG is converted from RAW after capture, it must be done losslessly. Some in-camera DNG implementations may apply adjustments. Processing overhead: Requires “developing” during processing, which is computationally more intensive than starting with a pre-rendered image like JPEG.

Analysis

JPEG

JPEG’s lossy compression can be problematic for photogrammetry. The compression algorithm works in 8x8 pixel blocks, which can create false edges and artifacts that do not exist in the real scene. Photogrammetry software’s feature detection algorithms (e.g., SIFT, SURF, AGAST) will detect and match these false features, introducing error. This manifests as “noise” in the dense point cloud. The limited 8-bit depth also means a loss of granularity in texture and color information.

DNG

DNG is an open wrapper for RAW data, offering several advantages over JPEG and RAW:

  • Open standard: Mitigates the risk of proprietary RAW formats becoming unreadable.
  • Potential size savings: Lossless compression reduces storage and transfer times without sacrificing data.
  • Processing efficiency: Some software suites can import DNG slightly faster than proprietary RAW formats.
  • Metadata integrity: A well-designed DNG contains all the original sensor data and metadata.

The critical consideration is the conversion source. When DNG is obtained from RAW it should use a lossless conversion to preserve all original raw data.

RAW

RAW photos provide the maximum amount of information for the photogrammetry software.

Superior feature matching: The higher bit-depth (e.g., 14-bit) means subtler gradients and textures are preserved. This gives the matching algorithm high-quality data to lock onto, resulting in a denser and more accurate point cloud.

Non-destructive correction: The ability to recover overexposed highlights or correct a wrong white balance after capture without any generational loss. It allows for non-destructive adjustment of exposure, white balance, and lens correction parameters before the photogrammetric processing begins.

  • True radiometric fidelity: For applications requiring accurate color measurement or reflectance analysis.

The trade-off is larger files and a longer processing time. However, for most demanding projects, the improvement in results typically outweighs computational cost.

Conclusion

  1. Use RAW if you aim for the best accuracy and colors.
  • For large projects, consider converting your RAWs to lossless DNG. This can save storage space.
  1. Process directly from RAW/DNG in your photogrammetric software.
  2. Use JPEG for quicker or non-critical projects where demands for accuracy and realistic colors are not high, and when storage space or processing hardware is a constraint.

Further read

Subscribe and receive updates, lessons, courses and more. No spam!

Get the latest updates and tips.

0%
If this helped you, it might help others too. Share: