1
votes

I am using Sentinel-2 data for Satellite Image Analysis. The code can be viewed here.

The problem is while plotting the RGB composite image. "To plot RGB composite images, you will plot the red, green and blue bands, which are bands 4, 3 and 2, respectively. The indices for red band = 3, green band = 2 and blue band = 1." The supporting code for this is-

rgb = ep.plot_rgb( arr = stacked_s2_sentinel_img, rgb = (1, 2, 3), figsize =(20, 10) #, title = titles )
plt.show()

However, this results into a black and white instead of a colored image (as can be viewed in the Jupyter notebook).

What's going wrong?

1

1 Answers

1
votes

Your image is colored in that it has three RGB channels. However to get a more familiar look you need to apply gamma correction.

Here is how your image looks with gamma=3.00 Image with gamma=3.0

I have no experience with low level S-2 image processing so I cannot tell which gamma value to use. I believe that the recommended "true color" gamma value is written somewhere in Copernicus documentation.

Update: There is a 2017 paper by Sinergise, the developer of the official EO-Browser application, that recommends gamma=2.2 for true color images.

My answer is not complete without the code to apply gamma correction using Earthpy API. Feel free to post the code as an alternative solution.