Abstract
A ranging method includes determining a first distance of the object to be measured relative to the self-mobile robot, where content in the first image comprises at least the object and a surface on which the object is located; selecting a point located on the object from the first image as a 5 reference point; determining initial parallax based on the first distance; and determining a region of interest from a second image collected by a second image collection apparatus, and determining a location of the reference point from the region of interest as a first target point; determining a second target point from the region of interest based on the first target point, and determining an actual parallax distance between the first image collection apparatus and the second image collection apparatus; and calculating depth information of the object based on the actual parallax distance.