Skip to content

Commit

Permalink
Fixed sorting and score in harris.py.
Browse files Browse the repository at this point in the history
  • Loading branch information
jesolem committed Jul 12, 2013
1 parent 5666e9e commit 790b64d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions PCV/localdescriptors/harris.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def compute_harris_response(im,sigma=3):
Wdet = Wxx*Wyy - Wxy**2
Wtr = Wxx + Wyy

return Wdet / (Wtr*Wtr)
return Wdet / Wtr


def get_harris_points(harrisim,min_dist=10,threshold=0.1):
Expand All @@ -40,8 +40,8 @@ def get_harris_points(harrisim,min_dist=10,threshold=0.1):
# ...and their values
candidate_values = [harrisim[c[0],c[1]] for c in coords]

# sort candidates
index = argsort(candidate_values)
# sort candidates (reverse to get descending order)
index = argsort(candidate_values)[::-1]

# store allowed point locations in array
allowed_locations = zeros(harrisim.shape)
Expand Down

0 comments on commit 790b64d

Please sign in to comment.