Skip to content

Commit 790b64d

Browse files
committed
Fixed sorting and score in harris.py.
1 parent 5666e9e commit 790b64d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

PCV/localdescriptors/harris.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ def compute_harris_response(im,sigma=3):
2222
Wdet = Wxx*Wyy - Wxy**2
2323
Wtr = Wxx + Wyy
2424

25-
return Wdet / (Wtr*Wtr)
25+
return Wdet / Wtr
2626

2727

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

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

4646
# store allowed point locations in array
4747
allowed_locations = zeros(harrisim.shape)

0 commit comments

Comments
 (0)