Just adding a little bit of complexity to try and remove some of the
random clumps and spots that appear.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
The mask used for inpainting wasn't correct (it seems).
Updated it to use the correct mask for inpainting.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Using just OTSU thresholding with some morphology as it's similar
quality but a lot faster.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
As the title says but also adjusted the demoing and specle
thresholding functions so that they work a bit better.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Instead of bluring the edge, now I used inpainting
to use the page colour to fill in the background so it's uniform.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>
Whites out the background pretty well. Changed it
to an adaptive threshold first and then use contours to get a mask.
Also using morphology to clean up said mask.
Signed-off-by: Ethan Wellenreiter <ewellenreiter@gmail.com>