Handwritten letters
A very interesting use of computer vision in real-life solutions is performing Optical Character Recognition (OCR) to distinguish printed or handwritten text characters inside digital images of physical documents.
Let's try to improve the definition of this handwritten letter so that it's easier to classify.

As we can see it's the letter R, already binary, with some noise in it. It's already loaded as upper_r_image
.
Apply the morphological operation that will discard the pixels near the letter boundaries.
Cet exercice fait partie du cours
Image Processing in Python
Instructions
- Import the module from scikit-image.
- Apply the morphological operation for eroding away the boundaries of regions of foreground pixels.
Exercice interactif pratique
Essayez cet exercice en complétant cet exemple de code.
# Import the morphology module
from ____
# Obtain the eroded shape
eroded_image_shape = ____.____(____)
# See results
show_image(upper_r_image, 'Original')
show_image(eroded_image_shape, 'Eroded image')