Skip to content

Commit

Permalink
Merge pull request #28 from JuliaRobotics/revert-27-24Q2/fix/match
Browse files Browse the repository at this point in the history
Revert "check all matches agains threshold"
  • Loading branch information
Affie authored Apr 24, 2024
2 parents f4c5911 + 0986b29 commit 3cc214a
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 3cc214a

Please sign in to comment.