Grayscale 8 bit images
When eroding a object, the borders if different brightness will be kept on that same brightness.
How can i erode by eat/remove the pixels instead of interpolating them?
Example of a normal erode: (Borders brightness are kept)
What i actually need after erode: (Pixels get removed to inner of the object so the border is cleaned)
Please note i can’t threshold the image, as i require the pixels to keep thier original brightness.
The only solution i see is to erode → Copy original to a new Mat with mask of erode. But is there a more direct way with the erode function?