Problem: This image of the Kepler Track, New Zealand (taken by my brother) has vertical stripes where the automatic panorama mode on his camera has adjusted to changing lighting conditions. How do we remove the stripes?

IMG_0128

Kepler Track, New Zealand. (c) MDS

Step 1: Read into numpy using matplotlib.image

Step 2: Split into component bands (in this case red, green and blue)

red_band_raw

Step 3: For each column of the image, sample the surround bit of sky

red_band_raw_area

Step 4: Compare the sampled area with the sky of the column. If there’s a difference correct the whole column.

red_band_raw_blueline

red_band_raw_greenline

Step 5: Repeat for the full image

red_band_smoothed_200

Step 6: Recombine the bands

smoothed200

Step 7: Compare and enjoy

IMG_0128

Advertisements