It&#x27;s a friend&#x27;s research project I&#x27;m tinkering with, so if I don&#x27;t sound like I know what I&#x27;m doing I don&#x27;t... :)<p>The first step is masking out clouds (morphological erosion + more), and then applying a haze optimized transform to the image data. I&#x27;m confused about making code parallelisable when the transform of a pixel relies on neighbouring pixels - how do you remove boundary errors (take extra pixels, then crop off each strip before recombining I guess)?<p>There must be something in-place to deal with boundary errors round the edge of the image, but so far I haven&#x27;t grasped it!<p>Numpy, Scipy, and particularly scikit-image are where the time is spent - my dabbling was originally to try and speed things up, but I&#x27;ve also become interested in understanding what is going on.