Skip to content

Commit

Permalink
fix: #78
Browse files Browse the repository at this point in the history
  • Loading branch information
Vincentqyw committed Oct 4, 2024
1 parent eaf5d81 commit bcea394
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions ui/viz.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@

from hloc.utils.viz import add_text, plot_keypoints

np.random.seed(1995)
color_map = np.arange(100)
np.random.shuffle(color_map)


def plot_images(
imgs: List[np.ndarray],
Expand Down Expand Up @@ -232,11 +236,6 @@ def error_colormap(
)


np.random.seed(1995)
color_map = np.arange(100)
np.random.shuffle(color_map)


def fig2im(fig: matplotlib.figure.Figure) -> np.ndarray:
"""
Convert a matplotlib figure to a numpy array with RGB values.
Expand Down Expand Up @@ -284,9 +283,8 @@ def draw_matches_core(
The figure as a numpy array with shape (height, width, 3) and dtype uint8
containing the RGB values of the figure.
"""
thr = 5e-4
thr = 0.5
color = error_colormap(conf, thr, alpha=0.1)
color = error_colormap(1 - conf, thr, alpha=0.1)
text = [
# "image name",
f"#Matches: {len(mkpts0)}",
Expand Down

0 comments on commit bcea394

Please sign in to comment.