Skip to content

Canny empty array fix #3169

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 17, 2021
Merged

Conversation

umar456
Copy link
Member

@umar456 umar456 commented Aug 16, 2021

The otsuThreshold function was creating an empty Array for the sigmas variable
and this sometimes failed because the last value was not always written to. This
PR adjusts the size of the array so that the extra element is not used.

Description

The otsuThreshold function was creating an empty Array for the sigmas variable
and this sometimes failed because the last value was not always written to. This
PR adjusts the size of the array so that the extra element is not used.

This PR also removes a couple of reductions in the otsuThreshold function. These
reductions are replaced by a scan.

Changes to Users

Checklist

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

@umar456 umar456 force-pushed the canny_empty_arry_fix branch 3 times, most recently from 804535b to 1cbaf19 Compare August 16, 2021 16:58
@umar456 umar456 changed the title Canny empty arry fix Canny empty array fix Aug 16, 2021
umar456 and others added 2 commits August 17, 2021 14:21
The otsuThreshold function was creating an empty Array for the sigmas variable
and this sometimes failed because the last value was not always written to. This
commit adjusts the size of the sigmas array to better match the values that are
assigned to it
Prior to this change, edge tracking CPU backend kernel wasn't processing
the batch input sets. Thus, the output of corresponding input sets was
missing in the array returned by canny API. This is fixed now.

Added a batch test for this scenario.
@9prady9 9prady9 force-pushed the canny_empty_arry_fix branch from 1cbaf19 to 9acb6e1 Compare August 17, 2021 13:56
Co-authored-by: Umar Arshad <umar@arrayfire.com>
@9prady9 9prady9 force-pushed the canny_empty_arry_fix branch from 9acb6e1 to 75bc1d5 Compare August 17, 2021 14:58
@umar456 umar456 merged commit 4ea695f into arrayfire:master Aug 17, 2021
@9prady9 9prady9 deleted the canny_empty_arry_fix branch August 18, 2021 03:16
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