Skip to content

Commit

Permalink
fix dspsift color pick
Browse files Browse the repository at this point in the history
  • Loading branch information
originlake committed Jul 22, 2024
1 parent 24993f4 commit 7406fb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions opensfm/features.py
Original file line number Diff line number Diff line change
Expand Up @@ -656,6 +656,8 @@ def extract_features(

xs = points[:, 0].round().astype(int)
ys = points[:, 1].round().astype(int)
xs = np.clip(xs, 0, image.shape[1] - 1)
ys = np.clip(ys, 0, image.shape[0] - 1)
colors = image[ys, xs]
if image.shape[2] == 1:
colors = np.repeat(colors, 3).reshape((-1, 3))
Expand Down

0 comments on commit 7406fb9

Please sign in to comment.