-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Labels
bugSomething isn't workingSomething isn't working
Description
| void MaskAnalyzer::findOutline4(const uint8_t* mask, const unsigned int width, const unsigned int height, const unsigned int maskPaddingElements, PixelPositions& outlinePixels4, const PixelBoundingBox& boundingBox, const uint8_t nonMaskValue) |
The output for this function is described as this:
Resulting outline-4 pixels, the pixel itself is not a mask pixel but has at least one neighbor mask pixel in the four-neighborhood
But nowhere does it ensure that the pixel being analyzed is not a mask pixel. As a result the output contains all of the mask pixels in addition to the outline pixels. See Line 381 for example:
if (maskRow[x - 1u] != nonMaskValue || maskRow[x + 1u] != nonMaskValue || maskRowBottom[x] != nonMaskValue)
It is done correctly in other functions, such as here in Line 1784:
if (row1[x] != nonMaskValue && (row1[x - 1u] == nonMaskValue || row1[x + 1u] == nonMaskValue || row0[x] == nonMaskValue || row2[x] == nonMaskValue))
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working