In this chapter, we will discuss Remote Sensing. This field grows more exciting every day as more satellites are launched and the distribution of data becomes easier. The high availability of satellite and aerial images, as well as interesting new types of sensors launching each year is changing the role remote sensing plays in understanding our world.
And in this field, Python is quite capable. However, in this chapter we will rely more on Python bindings to C libraries than we have in the previous chapters, where the focus was more on using pure Python. The only reason for this change is the size and complexity of remotely sensed data. In remote sensing, we step through each pixel in an image and perform some form of query or mathematical process. An image can be thought of as a large numerical array. And in remote sensing these arrays can be quite large on the order of tens of megabytes to several gigabytes. While Python is fast, only C-based libraries can provide the speed needed to loop through arrays at a tolerable speed.
The compromise that we make in this chapter is that whenever possible we'll use the Python Imaging Library (PIL) for image processing and NumPy which provides multi-dimensional array mathematics. While written in C for speed, these libraries are designed for Python and provide a pythonic API.
In this chapter we'll start with basic image manipulation and build on each exercise all the way to automatic change detection. Here are the topics we'll cover:
Swapping image bands
Creating image histograms
Extracting features from images