Skip to content

Commit 00c08f3

Browse files
dmjioclaude
andcommitted
fix: check dim1 for ORB descriptor feature count, not dim0
af_orb returns descriptors shaped [8, n_features] (8 uint32 words per 256-bit descriptor, column-major). dim0 is always 8; dim1 is the feature count. The test was checking d0 which always equals 8, not n. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 2e9766a commit 00c08f3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎test/ArrayFire/VisionSpec.hs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ spec = describe "Vision spec" $ do
119119
-- ORB
120120
-- ------------------------------------------------------------------ --
121121
describe "orb" $ do
122-
it "descriptor row count equals getFeaturesNum" $ skipOnBrokenBackend $ do
122+
it "descriptor column count equals getFeaturesNum" $ skipOnBrokenBackend $ do
123123
let (feats, descs) = A.orb orbImg 0.1 500 1.5 4 False
124124
n = A.getFeaturesNum feats
125-
(d0, _, _, _) = A.getDims (descs :: A.Array Float)
126-
d0 `shouldBe` n
125+
(_, d1, _, _) = A.getDims (descs :: A.Array Float)
126+
d1 `shouldBe` n
127127

128128
it "all coordinate arrays are consistent with getFeaturesNum" $ skipOnBrokenBackend $ do
129129
let (feats, _) = A.orb orbImg 0.1 500 1.5 4 False

0 commit comments

Comments
 (0)