Skip to content

Fix bounds check for FAST Nonmax - #3357

Open
jlaxson wants to merge 2 commits into
arrayfire:masterfrom
jlaxson:fix-cpu-fast-dims
Open

jlaxson wants to merge 2 commits into
arrayfire:masterfrom
jlaxson:fix-cpu-fast-dims

Conversation

@jlaxson

@jlaxson jlaxson commented Jan 24, 2023 •

Copy link
Copy Markdown

This bounds check was broken in two ways:

  1. It happened after memory access already occurred, meaning it didn't really protect anything
  2. It swapped x/y checks in the dimension order.

The result was fast (and orb) features would not be returned for the entire image if the input image wasn't square.

Checklist

  • Rebased on latest master
  • Code compiles
  • Tests pass
  • Functions added to unified API
  • Functions documented

@syurkevi syurkevi added this to the 3.9.0 milestone Mar 7, 2023
melonakos pushed a commit that referenced this pull request Sep 10, 2026
The check ran after the neighbourhood reads and compared y against dims[1] and x against dims[0], so on non-square images it read out of bounds and rejected every keypoint. Move it before the reads and use the right dimension for each axis. Extracted from #3357.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants