Skip to content

Commit

Permalink
Revert "check all matches agains threshold"
Browse files Browse the repository at this point in the history
  • Loading branch information
Affie authored Apr 24, 2024
1 parent f4c5911 commit 0986b29
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions ext/services/OpenCVFeatures.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function goodFeaturesToTrackORB(
return kp_, des
end

function getPoseSIFT(imgA, imgB, K; mask=nothing, distthreshold=100)
function getPoseSIFT(imgA, imgB, K; mask=nothing)
# Initiate SIFT detector
sift = cv.SIFT_create()
# sift = cv.ORB_create()
Expand All @@ -148,10 +148,10 @@ function getPoseSIFT(imgA, imgB, K; mask=nothing, distthreshold=100)
# Apply ratio test
good = []
for mat in matches
for m in mat
if m.distance < distthreshold
push!(good, (distance=m.distance, queryIdx=m.queryIdx+1, trainIdx=m.trainIdx+1))
end
m = mat[1]
n = mat[2]
if m.distance < 0.75 * n.distance
push!(good, (distance=m.distance, queryIdx=m.queryIdx+1, trainIdx=m.trainIdx+1))
end
end

Expand Down

0 comments on commit 0986b29

Please sign in to comment.