Skip to content

Commit

Permalink
docs: add comments to explain the ROI is for the grid and not the images
Browse files Browse the repository at this point in the history
  • Loading branch information
rouxm-cs committed Jan 22, 2025
1 parent 75dc91f commit 7380dd1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cars/core/geometry/shareloc_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def get_roi(self, pairs_for_roi, epsg, margin=0.006):
coords_list.extend(self.image_envelope(image1, geomodel1))
# Footprint of right image
coords_list.extend(self.image_envelope(image2, geomodel2))
# Epipolar extent
# Footprint of rectification grid (with margins)
image1 = SharelocGeometry.load_image(image1)
geomodel1 = self.load_geom_model(geomodel1)
geomodel2 = self.load_geom_model(geomodel2)
Expand Down
3 changes: 3 additions & 0 deletions tests/core/geometry/test_shareloc_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def test_get_roi():
]
np.testing.assert_allclose(roi, ref_roi)

# Add a 5 pixel margin on rectification grid
geo_plugin_with_margin_on_grid = (
AbstractGeometry( # pylint: disable=abstract-class-instantiated
"SharelocGeometry",
Expand All @@ -153,6 +154,8 @@ def test_get_roi():
44.21382,
5.203201,
]
# Returned ROI is the footprint of the rectification
# It takes into account the 5 pixels margin
np.testing.assert_allclose(roi, ref_roi)


Expand Down

0 comments on commit 7380dd1

Please sign in to comment.