Obstacle detection for low-flying unmanned aerial vehicles (UAVs) poses unique engineering challenges in terms of real-time implementation as well as system accuracy. Of all the available techniques for carrying out this task, optical sensors stand out as an inexpensive, lightweight and reliable solution. Image processing methods are used to analyze the images captured by the UAV camera(s) and to generate information pertaining to the location and motion of the obstacles in the field of view. These methods, however, can be computationally intensive and must be optimized if they are to be implemented in a moving vehicle. Additionally, the measurement of distance usually requires a high level of calibration before the results are useful. This thesis proposes a calibration method rooted in image data analysis and shows how this can be used to accurately predict the distance to obstacles. An algorithm tailored specifically to low-flying UAVs (Sparse Edge Reconstruction) is presented. Both the calibration method and the algorithm were used to analyze video gathered on a low-altitude test flight.