Agisoft Metashape allows to adjust the brightness and contrast of images and orthomosaic for better data visualization. This article describes how to set these parameters for displaying data and how to ensure that they are taken into account when exporting orthomosaic:


Set the brightness and contrast


For a more convenient display of the objects in the Model and Ortho view, it is possible to adjust image brightness and contrast in Set Brightness dialog window available from menu Tools. 



Changing the Min - Max interval can be used to improve the visualization of underexposed or overexposed images. If you need more precise control over the brightness and contrast settings, you can use these formulas:


min_value = (contrast - 1) / (2 * brightness * contrast) *  100 

max_value =  (contrast + 1) / (2 * brightness * contrast) * 100 


Where: contrast and brightness are specified as floating-point values, with 100% corresponding to 1.0. 


Image Brightness dialog window before Metashape 2.2.3 version:


This tool only sets brightness and contrast for displaying in Model and Ortho view, these parameters will not be taken into account when exporting. 

Use Raster Calculator tool to apply the brightness/contrast change to orthomosaic, which can be exported with the changes applied. 


How to export orthomosaic with brightness and contrast taken into account


For the brightness/contrast adjustment purposes you should use Raster Calculator and create three output formulas in the Transform section in the following way (providing that the input data is 8-bit RGB):


B1 = (B1 * brightness) /256 * contrast + 0.5 * (1 - contrast)


Where: brightness = value_in_percent / 100, and contrast is defined in the same way. 


If you know the values you want to use for brightness and contrast, simply substitute them into the formula above. 

If you want to use the Min and Max values that were automatically determined in the Image Brightness dialog, you can use the following formulas to calculate the desired values:

brightness  = 100 / (max_value + min_value)
contrast  = (max_value + min_value) / (max_value - min_value)



The formula is used for the desired channel, for RGB images you need to specify the formula for each channel (below are two examples: one for RGB and one for LWIR images).


Example 1 (RGB)


For 110% brightness use 1.1 value and for 180% contrast use 1.8 value:

Before transform:


After transform:


Example 2 (LWIR)


For 1200% brightness use 12.0 value and for 96% contrast - 0.96 value.


Before transform:


After transform:


To export orthomosaic with applied brightness/contrast corrections select Index Color option in the Raster Transform section of the Export Orthomosaic dialog: