You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Canny outputs border artifacts when image is constant with default parameters #6346
For clarification, constant was already the default mode before this commit. This commit simply exposes mode and cval in canny API. constant mode was kept for backward compatibility. @stefanv, is this a behaviour change or a bug?
changed the title [-]Canny `mode` now set to `constant` by default[/-][+]Canny outputs border artifacts when image is constant with default parameters[/+]on Apr 20, 2022
Activity
[-]Canny mode now implicitly set to `constant`[/-][+]Canny `mode` now set to `constant` by default[/+]stefanv commentedon Apr 18, 2022
Desired behavior is achieved by setting
mode='reflect'.grlee77 commentedon Apr 18, 2022
I think this should just be
mode='nearest'. Definitely agree that constant does not seem desirable for this function.rfezzani commentedon Apr 19, 2022
For clarification,
constantwas already the default mode before this commit. This commit simply exposesmodeandcvalincannyAPI.constantmode was kept for backward compatibility.@stefanv, is this a behaviour change or a bug?
stefanv commentedon Apr 19, 2022
I know the behavior changed, because a tutorial I had written the year before suddenly started malfunctioning, detecting edges on the border.
rfezzani commentedon Apr 20, 2022
@stefanv, you spotted the right commit. I will investigate 😉
rfezzani commentedon Apr 20, 2022
More precisely, here is the exact commit 4c60efe introducing the change!
I will fix this and add a UT 😉
[-]Canny `mode` now set to `constant` by default[/-][+]Canny outputs border artifacts when image is constant with default parameters[/+]