No histogram equalization/color balancing in SNAP3's mosaicing modules


I have noticed, like several other forum members, that L2A tiles produced with sen2cor have different color palettes because, after @bdpg, they are processed tile by tile.

Also if you have to mosaic images or tiles from different swaths the same problem will occur.

It is therefore necessary that SNAP’s mosaicing module includes options for histogram equalization (color balancing) between different tiles (e.g. overlapping layer, average etc.) as you have in IDRISI.

Kind regards.

Since I cannot produce seamless mosaics in SNAP3 from the sentinel-2 L2A products obtained with sen2cor, I have had to find another way.

  1. I saved the L2A images from SNAP3 in DIMAP format then I imported them in IDRISI TerrSet;
  2. I opened from the main menu IDRISI Image Processing/Restoration/Mosaic

  1. In the mosaicing window I chose the options shown in the image below, most importantly for Matching image gray level.

  1. I ran this mosaicking module 4 times, each time mosaicking one band from the 4 tiles to be mosaicked. I did it for the VNIR bands (4, 3, 2 and 8) but i could choose any number of bands.

  2. I exported the 4 mosaiced bands in Tif format and imported them in QGIS and fused them into 1 single stack file then I produced an 8, 4, 3 RGB composite with minmax stretching (I could have done that in IDRISI TerrSet too).

The 2 image extracts below show you the bands 8, 4, 3 RGB composites from SNAP3 (I have drawn a dashed line to show the seam clearly) then from QGIS after the processing described above:


  1. The image mosaicked with IDRISI TerrSet is seamless.
  2. Since SNAP3 mosaics seamlessly the L1C products, it would be great to do the same with L2A sentinel-2 products to avoid all these manipulations.

Best regards.

1 Like

In the radar menu there is a SAR Mosaic which does normalisation and weighted average but I cant get it to do what I want with the S2 tiles.

The S2TBX L2A reader provides raw access to your L2A products, we just mosaic the different tiles together, but don’t touch the reflectance values, and it is intended to stay like this.
The root cause of the problem here is that sen2cor computes tiles independently so discontinuities can appear in the resulting corrected reflectance, because of discontinuities in AOT/WV retrieval. This should first be solved in sen2cor IMHO.

Having said that : a better mosaicking module for S2 data is on our roadmap. Performance is our first goal, but introducing functionnalities for equalization and color balancing there, as an option, is a good idea.


Is there any way to balance this color difference now? Thank you.

The result would be better if you first do an atmospheric correction. I think you have used L1C data, right?


I advise you to use the mosaic module of Orfeo Toolbox (OTB 6) which is simply the best mosaicing tool I know of. I have tested it on landsat 8, sentinel 2; it always works perfectly.


Many thanks! I’ll try it .