Epipolar rectification is a crucial step in stereo image processing, especially when dealing with satellite images captured from different viewpoints. The repository you referenced, s2p, is an open-source stereo pipeline designed for processing satellite imagery to generate Digital Elevation Models (DEMs). In this context, understanding the principle of epipolar rectification is essential for accurate and efficient stereo matching.
What is Epipolar Geometry?
Before delving into rectification, it's important to understand epipolar geometry:
- Epipoles: The points where the line connecting the camera centers intersects the image planes.
- Epipolar Lines: For any point in one image, the corresponding point in the other image must lie along a specific line called the epipolar line.
In stereo imaging, each 3D point projects to a point in each image. Due to the relative positions and orientations of the cameras (or sensors), the corresponding points across images are constrained along these epipolar lines.
The Challenge with Satellite Imagery
Satellite images, particularly those captured by pushbroom sensors commonly used in satellites, have unique characteristics:
- Pushbroom Sensors: These sensors capture images line by line as the satellite moves along its orbit, resulting in images that are built over time.
- Variable Geometry: The position and orientation of the satellite change continuously during image capture, leading to complex geometric relationships between images.
- Non-Linear Epipolar Lines: Unlike images from standard frame cameras where epipolar lines are straight, pushbroom images can have curved epipolar lines due to the sensor's motion and Earth's curvature.
Principle of Epipolar Rectification in s2p
Epipolar rectification aims to transform the stereo images such that the epipolar lines become horizontally aligned and parallel, ideally matching the image scanlines (rows). This alignment simplifies the stereo matching process because corresponding points will lie on the same row in both images.
The s2p pipeline implements epipolar rectification through the following steps:
-
Sensor Modeling:
- Rational Polynomial Coefficients (RPCs): Satellite images often come with RPCs that describe a mapping from image coordinates to geographic coordinates.
- Physical Sensor Models: Alternatively, exact models using the physics of the sensor and satellite motion can be used.
-
Geometry Reconstruction:
- The sensor models are used to predict the precise geographical location of each pixel.
- Because pushbroom sensors capture images over time, the model accounts for the satellite's trajectory and orientation at each line.
-
Epipolar Plane Determination:
- For a given pair of images, compute the epipolar planes that contain the line between the two sensor positions and points on the ground.
- Determine how these planes intersect the image planes, resulting in epipolar lines.
-
Rectifying Transformation:
- Compute transformations that warp both images such that the epipolar lines map to horizontal lines.
- This involves resampling the original images using interpolation methods to generate rectified images.
-
Alignment of Scanlines:
- Adjust the images so that corresponding epipolar lines (now horizontal) are aligned between the two images.
- This alignment ensures that any point in one image will lie on the same row (scanline) as its corresponding point in the other image.
-
Preserving Image Quality:
- Care is taken to minimize distortion during rectification.
- Advanced interpolation techniques are used to preserve the radiometric properties of the images.
Benefits of Epipolar Rectification
- Simplifies Matching: By aligning the epipolar lines horizontally, the search for corresponding points reduces from searching along a line to searching along a row, greatly simplifying and speeding up the matching process.
- Improves Accuracy: Reduces errors in matching by constraining correspondences to the same image row.
- Facilitates Dense Stereo Matching: Essential for generating high-resolution DEMs where dense matching of image points is required.
Mathematical Foundation
The rectification process relies on projective transformations and epipolar geometry principles:
- Homographies: Planar projective transformations that map points from one image to another.
- Fundamental Matrix: Encapsulates the epipolar geometry between two images. However, for satellite imagery with pushbroom sensors, the fundamental matrix varies across the image.
- Piecewise Rectification: Due to the non-linearity of epipolar lines in pushbroom images, rectification may be performed in segments to accommodate local variations.
Implementation in s2p
In the s2p pipeline:
- The software reads the metadata and RPCs associated with the satellite images.
- It calculates the epipolar geometry using these sensor models.
- The images are resampled to create rectified images where the epipolar lines are horizontal and aligned.
- The rectified images are then used for stereo matching to extract elevation information.
Conclusion
Epipolar rectification in the s2p stereo pipeline is a process that geometrically transforms satellite images to simplify the stereo matching problem. By using accurate sensor models and considering the unique characteristics of pushbroom sensors, the pipeline aligns epipolar lines horizontally, enabling efficient and precise generation of DEMs from satellite imagery.
This rectification is fundamental in remote sensing applications, where accurate terrain models are essential for various analyses, including urban planning, environmental monitoring, and disaster management.
References
- Hartley, R., & Zisserman, A. (2004). Multiple View Geometry in Computer Vision. Cambridge University Press.
- Satellite Sensor Models and RPCs in Remote Sensing.
- The s2p GitHub Repository: https://github.com/centreborelli/s2p
By understanding and implementing epipolar rectification as described, users can leverage the s2p software to produce accurate and high-quality DEMs from satellite stereo images.