Skip to content

Commit

Permalink
Generalize test
Browse files Browse the repository at this point in the history
  • Loading branch information
timholy committed Jul 21, 2023
1 parent 5baca49 commit af059f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ jobs:
matrix:
version:
- '1.0'
- '1.6'
- '1'
# - 'nightly'
os:
Expand Down
4 changes: 3 additions & 1 deletion test/brief.jl
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,9 @@ end
desc_1, ret_keypoints_1 = create_descriptor(img_array_1, keypoints_1, brief_params)
desc_2, ret_keypoints_2 = create_descriptor(img_array_2, keypoints_2, brief_params)
matches = match_keypoints(ret_keypoints_1, ret_keypoints_2, desc_1, desc_2, 0.1)
@test all(m[1] + CartesianIndex(100, 200) == m[2] for m in matches)
# Julia <=1.6 give a slightly different answer from 1.9
@show length(matches) sum(m[1] + CartesianIndex(100, 200) == m[2] for m in matches)
@test (sum(m[1] + CartesianIndex(100, 200) == m[2] for m in matches) - length(matches)) <= 1
end

@testset "Testing with Standard Images - Lena (Translation (10, 20))" begin
Expand Down

0 comments on commit af059f3

Please sign in to comment.