Skip to content

Fix bugs in Sobel operator and Canny's nonMaxSuppression #2600

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 2 commits into from
Jul 27, 2019

Conversation

9prady9
Copy link
Member

@9prady9 9prady9 commented Jul 24, 2019

Resolves #2588

@greennbeans , thank you!

Fix gradient factor equation in canny nonmaxsuppression. In the case of negative gradients along both x and y directions, the interpolation factor was incorrectly being calculated.

Apart from this, sobel derivaties respective sobel masks were flipped along edge direction (not a transpose, but flip along axes). Terrible bug introduced by me and fixed now in 5e5c022

Requires arrayfire/arrayfire-data#15

@9prady9 9prady9 added the fix label Jul 24, 2019
@9prady9 9prady9 requested a review from umar456 July 24, 2019 12:56
9prady9 added 2 commits July 25, 2019 12:30
The gradient computation equations where flipped earlier which is
fixed now.

Also, modified the sobel to use same border management as OpenCV.
Any pixel accessed outside the borders is reflected across the border
now. The test data has also been updated accordingly.
Fix gradient factor equation in canny nonmaxsuppression. In the case of negative gradients along both x and y directions, the interpolation factor was incorrectly being calculated.

Apart from this, sobel derivaties respective sobel masks were flipped along edge direction (not a transpose, but flip along axes). Terrible bug introduced by me and fixed now in f5e4e0e
@umar456 umar456 merged commit f4c4c45 into arrayfire:master Jul 27, 2019
@9prady9 9prady9 deleted the imgproc_fixes branch August 21, 2019 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Canny Edge Detector calculation errors
2 participants