Skip to content

Stereo Vision

Stereo vision is the range sensor for every Mars rover flown. There is no lidar and no radar on any of them: the terrain model that hazard detection, path selection and arm placement all consume is a point cloud produced by correlating two camera images [1]. Its cost on flight processors set the drive rate of every mission before Mars 2020.

The flight pipeline is an area-based correlator using the sum of absolute differences over a rectangular window, typically 7x7, searched along the epipolar line [3][5]. The steps are rectification using a geometric lens calibration, bandpass filtering, the SAD correlation over the disparity search range, consistency checks, subpixel disparity by quadratic interpolation of the SAD scores, and projection to XYZ range images [1][3]. A left-right uniqueness check and a threshold on the disparity gradient remove matches that are not supported by both views [5].

The variant used from 2011 onward adds SAD5: the score at each disparity is the SAD1 score of the center pixel plus the lowest two SAD1 scores of the four corner pixels at that disparity level, which improves range at object edges and range discontinuities [5].

Full frame readout from the MER cameras is about 5 s per 1024x1024 12 bit image, so images for navigation are binned vertically in the CCD and read out at 256x1024, then averaged down to 256x256, and stereo matching runs at 256x256 [1]. The output is a 256x256 disparity image in which each pixel either encodes the 3D location of the terrain seen at that pixel in the rectified left image, or is unknown [2].

Vehicle and cameraField of viewTypical 3D points per pair
Spirit, front and rear hazard cameras125 degreesabout 15,000
Opportunity, navigation cameras45 degreesabout 48,000

Source: [2]. Instrument placement uses a different configuration: one or two front hazard camera pairs at 1024x1024, downsampled to 512x512 and cropped to 420x412 for a coarse view, followed by a full resolution 241x241 subframe of the patch of terrain the arm will touch.

Camera geometry decides what the stereo can see. The wide field of view hazard cameras were sized to see more than the full width of the rover a short distance ahead, which is what obstacle avoidance and turn-in-place safety checks need, but their wide field of view and narrow baseline limit useful lookahead to 3 to 4 m. The navigation cameras see further with a narrower field of view and wider baseline, but their field of view is only wide enough to verify one candidate path several meters ahead [1]. The panoramic cameras are not used for autonomous navigation [1].

Range error is set by the accuracy of the subpixel disparity estimate, which is why the correlator’s subpixel stage rather than its integer search decides how good the range is [3]. Evaluated for the flight camera geometries at 0.25 pixel correlation accuracy [7]:

MER and MSL navigation camerasMER panoramic camerasMSL panoramic cameras
Baseline0.20 m0.30 m0.20 m
Resolution1024x10241024x10241200x1200
Field of view45 x 45 degrees16 x 16 degrees6 x 6 to 50 x 50 degrees
Range error at 50 m2.5 m0.60 m0.20 m at maximum zoom

Source: [7], Table 1. Range error grows steeply with standoff, which is why the hazard camera lookahead limit is a geometry limit rather than a software one, and why traversability assessment weights nearby map cells more heavily than distant ones [1].

PlatformConfigurationTime per stereo pair
MER flight processor, 20 MHz RAD6000256x256 SAD24 to 30 s
Xeon 5160 at 3 GHzrectification, bilateral subtraction filter, disparity7024 ms total, of which 74 ms disparity
Core 2 Quad at 2.4 GHzsame pipeline8827 ms total, of which 87 ms disparity
Virtex-4 LX160 at 66 MHzrectification, bilateral filter, SAD1 at 1024x76815 Hz fed directly from Camera Link, 12 Hz when raw imagery is loaded over the PCI bus
Perseverance Vision Compute Element, Virtex5QVstereo correlation and visual odometry22 million disparities per second

Sources: [1] for MER, [5] for the FPGA and desktop comparison, [4] for Perseverance. The FPGA figure in [5] is for a 1024x768 SAD1 system consuming 134 block RAMs and 49,924 slices on a Virtex-4 LX160 class part; a 512x384 SAD5 system takes 162 block RAMs and 38,581 slices. On the general purpose processors in that comparison, the bilateral subtraction filter rather than the correlation dominates, at 6947 ms of the 7024 ms total.

The per-step cost across missions tracks the pixel count rather than the clock alone [4]:

SojournerSpirit and OpportunityCuriosityPerseverance
Stereo pixels processed per step2010,000 to 50,00040,000 to 200,000240,000 to 1,200,000
Image pairs per step11 to 241
Autonomous navigation pause per stepnot reportedabout 120 sabout 120 stypically 0 if not steering

Source: [4], Table 1. Perseverance processes about six times as many pixels per step as Curiosity in less time because the correlation runs in the Virtex-5 FPGA on the Vision Compute Element rather than on the RAD750.

The imaging software that feeds the correlator is itself a scheduling problem. MER Imaging Services holds requests in priority queues, two per priority level, and hands each image to a separate post-processing task as soon as the pixels are read so the camera control task can start the next exposure. Image buffers are a limited shared pool, and ground imaging commands queue when none is free [6].

Texture starvation. Opportunity could not get acceptable range data from its hazard cameras at Meridiani: the fine texture of the rock-free soil gave inadequate texture for correlation at hazard camera resolution and baseline. The workaround was to use navigation camera stereo instead, and because Meridiani is largely obstacle free, it was sufficient to check the traversability of the nominal path forward and stop the vehicle if a hazard was detected [1]. This is the same terrain property that starves visual odometry, and it is the dominant flight failure mode for both.

Range discontinuities. Correlation windows that straddle a depth edge produce a blended disparity. SAD5 exists specifically to improve range at object edges and range discontinuities, and the disparity gradient threshold exists to discard the results that remain wrong [5].

Calibration. Range depends on the camera model. The MER images are labeled with geometric camera models shortly after acquisition, mapping pixel space to the body-fixed frame shared by all subsystems, so a calibration change propagates into every consumer of the range data [6].

References

  1. Maimone, M., Johnson, A., Cheng, Y., Willson, R. and Matthies, L. (2004). Autonomous Navigation Results from the Mars Exploration Rover (MER) Mission. Source
    BibTeX
    @inproceedings{maimone2004autonomous,
      author = {Maimone, Mark and Johnson, Andrew and Cheng, Yang and Willson, Reg and Matthies, Larry},
      title = {Autonomous Navigation Results from the Mars Exploration Rover (MER) Mission},
      booktitle = {9th International Symposium on Experimental Robotics},
      year = {2004},
      address = {Singapore},
      url = {https://hdl.handle.net/2014/41077}
    }
  2. Maimone, M. W., Leger, P. C. and Biesiadecki, J. J. (2007). Overview of the Mars Exploration Rovers' Autonomous Mobility and Vision Capabilities. Source
    BibTeX
    @inproceedings{maimone2007overview,
      title = {Overview of the Mars Exploration Rovers' Autonomous Mobility and Vision Capabilities},
      author = {Maimone, Mark W. and Leger, P. Chris and Biesiadecki, Jeffrey J.},
      booktitle = {IEEE International Conference on Robotics and Automation, Space Robotics Workshop},
      address = {Rome, Italy},
      year = {2007},
      url = {https://www-robotics.jpl.nasa.gov/media/documents/mer_autonomy_icra_2007.pdf}
    }
  3. Ansar, A., Castano, A. and Matthies, L. (2004). Enhanced Real-time Stereo Using Bilateral Filtering. Source
    BibTeX
    @inproceedings{ansar2004enhanced,
      author = {Ansar, Adnan and Castano, Andres and Matthies, Larry},
      title = {Enhanced Real-time Stereo Using Bilateral Filtering},
      booktitle = {Proceedings, 2nd International Symposium on 3D Data Processing, Visualization and Transmission (3DPVT 2004)},
      year = {2004},
      pages = {455--462},
      doi = {10.1109/TDPVT.2004.1335273},
      url = {https://dataverse.jpl.nasa.gov/dataset.xhtml?persistentId=hdl:2014/8040}
    }
  4. Rankin, A., Del Sesto, T., Hwang, P., Justice, H., Maimone, M., Verma, V. and Graser, E. (2023). Perseverance Rapid Traverse Campaign. Source
    BibTeX
    @inproceedings{rankin2023perseverance,
      title = {Perseverance Rapid Traverse Campaign},
      author = {Rankin, Arturo and Del Sesto, Tyler and Hwang, Pauline and Justice, Heather and Maimone, Mark and Verma, Vandi and Graser, Evan},
      booktitle = {2023 IEEE Aerospace Conference},
      address = {Big Sky, Montana},
      year = {2023},
      url = {https://robotics.jpl.nasa.gov/media/documents/2023-rapid-traverse.pdf},
      doi = {10.1109/aero55745.2023.10115835},
      pages = {1-16}
    }
  5. Villalpando, C. Y., Morfopoulos, A., Matthies, L. and Goldberg, S. (2011). FPGA Implementation of Stereo Disparity with High Throughput for Mobility Applications. Source
    BibTeX
    @inproceedings{villalpando2011fpga,
      author = {Villalpando, Carlos Y. and Morfopoulos, Arin and Matthies, Larry and Goldberg, Steven},
      title = {FPGA Implementation of Stereo Disparity with High Throughput for Mobility Applications},
      booktitle = {2011 IEEE Aerospace Conference},
      address = {Big Sky, Montana},
      year = {2011},
      pages = {1--11},
      doi = {10.1109/AERO.2011.5747269},
      url = {https://dataverse.jpl.nasa.gov/dataset.xhtml?persistentId=hdl:2014/41800}
    }
  6. Litwin, T. E. and Maki, J. N. (2005). Imaging Services Flight Software on the Mars Exploration Rovers. Source
    BibTeX
    @inproceedings{litwin2005imaging,
      author = {Litwin, Todd E. and Maki, Justin N.},
      title = {Imaging Services Flight Software on the Mars Exploration Rovers},
      booktitle = {2005 IEEE International Conference on Systems, Man and Cybernetics},
      year = {2005},
      pages = {895--900},
      address = {Waikoloa, Hawaii},
      url = {https://robotics.jpl.nasa.gov/media/documents/155_268.pdf}
    }
  7. Helmick, D. M., Angelova, A., Livianu, M. and Matthies, L. H. (2007). Terrain Adaptive Navigation for Mars Rovers. Source
    BibTeX
    @inproceedings{helmick2007terrain,
      title = {Terrain Adaptive Navigation for Mars Rovers},
      author = {Helmick, Daniel M. and Angelova, Anelia and Livianu, Matthew and Matthies, Larry H.},
      booktitle = {2007 IEEE Aerospace Conference},
      address = {Big Sky, Montana},
      year = {2007},
      url = {https://www-robotics.jpl.nasa.gov/media/documents/HelmickAero07tanav.pdf},
      doi = {10.1109/aero.2007.352684},
      pages = {1-11}
    }