Breaking Down 2 Bugs In ERODE(), One To Be Fixed ...

by Jule 53 views
Breaking Down 2 Bugs In ERODE(), One To Be Fixed ...

The ERODE function, once trusted for sharp edge detection, now hides two overlooked flaws revealed in recent tests. The first is subtle: the second parameter’s behavior shifts depending on the first parameter’s dimensions - a problem addressed in sr/pro/erode.pro. The second issue? A shift in output when handling vector inputs, detectable in TEST_ERODE_AXES, especially across odd and even image dimensions. This wasn’t just a bug - it was a blind spot. Worse, the test suite was quietly deactivated, burying these issues in plain sight. Even in clean code, context matters: internal versions exist but don’t help solve the surface-level flaw. When vectors dance, ERODE stumbles - here is the deal: input structure affects output, and timing breaks symmetry. Understanding this prevents pixel chaos in edge-heavy images. Don’t assume stability - check dimension alignment. Safety in pixel math starts with awareness. Is your ERODE input dimension aligned? That’s your first defense.