Color balancing a mosaicked dataset produces odd artifacts

1721
8
07-19-2017 04:57 AM
Marthinusvan_der_Walt
New Contributor II

I am attempting to run a full color balance workflow from mosaic creation to raster output using Sentinel 2 imagery in ArcGIS Pro 2. My process is as follows:

- Create mosaic dataset,

- add rasters,

- rebuild footprints (some "tiles" are split between two rasters - when initially added to the mosaic dataset only a single footprint is created for both images, and color balancing usually is only applied to one),

- build seamlines (for blending along tile edges),

- bundle edit raster functions on select rasters as necessary,

- build pyramids and calculate statistics,

- run color balance (dodging, third order).

The problem is that once the color balance is run, a jagged edge of white appears along the footprint of some of the tiles (inner edges between tiles - see attached image for example). This only happens after footprints were rebuilt (without rebuilding the footprints the color balance may exclude small tiles contained within the original footprints) and only when the dodging method is applied - histogram and standard deviation methods do not produce this region of white/nodata. Reloading the mosaic does not fix the issue, and overviews created after color balancing reflect the same situation. While this problem has persisted after trying numerous permutations of the workflow (including tweaking the parameters) it has successfully produced a complete mosaic without the white regions on one occasion. Attempting to reproduce the mosaic by following the same essential steps and parameter settings, however, again produced the white edges.

0 Kudos
8 Replies
JayantaPoddar
MVP Esteemed Contributor

Did you reboot ArcGIS Pro and add the dataset after Building Overviews - ArcGIS Desktop .

Sometimes it requires multiple attempts of Building Overviews with Define missing overview tiles, Generate overviews options checked.

If you need more control over the definition of the overviews, use the Define Overviews tool first.


Think Location
0 Kudos
Marthinusvan_der_Walt
New Contributor II

I have tried restarting the application numerous times, and the issue is not with the overviews, but with the color balancing. The white spaces persisted after saving the mosaic as a .Tiff file. Reloading the mosaic in a new map, removing and adding back all the rasters, and even starting from scratch did not produce any different results, except on the occasion where the footprints were not rebuilt after adding the rasters. But since rebuilding the footprints is necessary in order to produce seamlines that step cannot be skipped.

0 Kudos
GünterDörffel
Occasional Contributor III

Honestly - there is a lot of variables in the workflow and maybe it is just a plain bug. But one thing that comes to my mind when I see the whitespace you get, is a jpeg-border-compression issue that might happen here?

So to eliminate that "risk": Have you tried to avoid any lossy compression on the definitions of the pyramids/overviews/base-data?

I am aware you built footprints prior to the color balancing, so it SHOULDNT matter - but who knows?

Regards
Guenter

0 Kudos
Marthinusvan_der_Walt
New Contributor II

I have had the same thought, and I have tried changing those parameters in the pyramids and statistics dialog, but to no effect.The images that I am using are not compressed either, so I have no idea where the border issues might be coming from. If it is a bug, hopefully it can be sorted out at some point, since the color balancing on ArcGIS is pretty impressive otherwise.

0 Kudos
GünterDörffel
Occasional Contributor III

Final comment - afterwards I am with you to check for a bug: Have you deleted all pyramids that might be "on" the base images?
I would and only rebuild them after the whole process ... Good luck!

Marthinusvan_der_Walt
New Contributor II

I have just finished clearing and rebuilding the pyramids based on this information, but it did not seem to change the outcome as hoped. Below is a sample of the results from the most recent color balancing, no footprints were rebuilt this time:

The white lines run along the footprint edges of the raster tiles. Usually these smaller areas can be blended into the overlap, but where tiles are of a more irregular shape the white space becomes more pronounced and usually larger, making it impossible to successfully hide it in the overlap.

0 Kudos
GünterDörffel
Occasional Contributor III

But you still do Overviews BEFORE the color balancing?

0 Kudos
Marthinusvan_der_Walt
New Contributor II

No overviews were built - the mosaic dataset was created, the rasters added, the pyramids were removed, and then the pyramids and statistics were rebuilt, after which the color balancing was run.

0 Kudos