Seeing Earth from Space — from Raw Satellite Data to Beautiful High-resolution Images

Tools/Software Used

Satellite Data

Finding Your Data

From Data to Image

MyComputer:~ $ cd Sentinel2data/20170119Maputo
MyComputer:20170119Maputo $ ls
B02.jp2 B03.jp2 B04.jp2
MyComputer:20170119Maputo $ convert B04.jp2 B03.jp2 B02.jp2 -combine -colorspace sRGB -level 0,7500 -unsharp 5x2+1+0 -sampling-factor 4:2:2 -quality 98 output.jpg
  • convert is the Imagemagick tool to process images
  • B04.jp2 B03.jp2 B02.jp2 are the input files I give to the program. Giving the images this way will process the whole tile. I usually crop the image later in Gimp but if you would like to crop the image already here using Imagemagick you can replace the input files with: “B04.jpg[WxH+XOFFS+YOFFS] B03.jpg[WxH+XOFFS+YOFFS] B02.jpg[WxH+XOFFS+YOFFS]” where W and H are the width and height of the cropped area, respectively, and XOFFS and YOFFS the coordinates of the upper left corner of the crop position. Example: “B04.jpg[1200x600+4000+0] B03.jpg[1200x600+4000+0] B02.jpg[1200x600+4000+0]” would result in image of size 1200 x 600 pixels and its upper left corner will be pixel (4000,0) of the original tile image.
  • -combine means I want to combine the previously listed grayscale images into one image, by default convert will take the first image as red channel, second as green, and third as blue
  • -colorspace sRGB colorspace of the new image will be sRGB
  • -level 0,7500 this will increase the brightness of the image. Sentinel 2 instruments were designed to image various types of scenes (dark forests and bright deserts for example) and therefore the images can have very wide range of values. This typically results in land scenes that are quite dark and we need to increase the brightness of the image to see anything (without this command the resulting image is probably mostly black). For normal land scenes I usually use this range of 0,7500. For scenes containing very bright features, I try something like 0,9000 for example. If the scene is especially dark, I could try 0,5000. This is a parameter you just need to tune. The brighter the scene, the higher number and the darker the scene the lower number: method of trial and error!
  • -unsharp 5x2+1+0 I like to slightly sharpen the image. In my opinion this will usually make small details look better in the image. For sharpening I use the unsharp mask with parameters 5x2+1+0. These parameters were also found by trying different things. Of course this can be omitted or different parameters could be tried…
  • -sampling-factor 4:2:2 -quality 98 these are just quality parameters for the output JPEG file. Anything could be used but I have found these to be OK for me in most cases.
  • output.jpg name of the output image file

Post-processing of image

Cropping the image

Adjusting colors, contrasts and details

1) Pro contrast

2) Detail extractor

3) Foliage




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Antti Lipponen

Antti Lipponen

Researcher at Finnish Meteorological Institute. #Satellite images, #dataviz and #science related things. Remote sensing, climate etc.