Image pre-processing
[~] Salt and Pepper noise removal
black dots in the image --> Pepper
holes in the image --> Salt
source: project OCR by group algfk-21 at Chalmers
The method is based on two basic binary image morphological operations:
1] Dilations --> (expansion, the act of expanding an aperture)
2] Erosions --> (wearing away, the mechanical process of wearing or grinding something down)
(based on the Minkowski addition and subtraction)
open and close operation:
- Opening an image will eliminate small islands, sharp peaks and thin lines.
- Closing an image will fuse narrow breaks, close small holes and smooth contours.
[~] Character Boundary Generation
source: project OCR by group algfk-21 at Chalmers
- finding the boundary of a character-image
- method starts with a gray-scale image and ends up with the characters boundary that is one pixel wide
... two steps:
step-1: edge detection
- performed by scanning the whole grey-scale image and picking out the boundary-pixels.
- A boundary-pixel is defined as a pixel whose grey-level is above the average gray-level and has a neighbor whose level is below the average grey-level.
- boundary generated by this algorithm has a width of maximum two pixels.
step-2: edge thinning
done in two passes:
:: In the first pass
- the boundary-image is scanned
- all pixels with three or five neighbors which are not branching are deleted.
- repeated until no deletions occur.
:: In the second pass
- all diagonal lines are thinned.
To get an even better result, the grey-scale image should undergo some form of enhancement to filter out noise and to sharpen the image before the boundary is generated.
black dots in the image --> Pepper
holes in the image --> Salt
source: project OCR by group algfk-21 at Chalmers
The method is based on two basic binary image morphological operations:
1] Dilations --> (expansion, the act of expanding an aperture)
2] Erosions --> (wearing away, the mechanical process of wearing or grinding something down)
(based on the Minkowski addition and subtraction)
open and close operation:
- Opening an image will eliminate small islands, sharp peaks and thin lines.
- Closing an image will fuse narrow breaks, close small holes and smooth contours.
[~] Character Boundary Generation
source: project OCR by group algfk-21 at Chalmers
- finding the boundary of a character-image
- method starts with a gray-scale image and ends up with the characters boundary that is one pixel wide
... two steps:
step-1: edge detection
- performed by scanning the whole grey-scale image and picking out the boundary-pixels.
- A boundary-pixel is defined as a pixel whose grey-level is above the average gray-level and has a neighbor whose level is below the average grey-level.
- boundary generated by this algorithm has a width of maximum two pixels.
step-2: edge thinning
done in two passes:
:: In the first pass
- the boundary-image is scanned
- all pixels with three or five neighbors which are not branching are deleted.
- repeated until no deletions occur.
:: In the second pass
- all diagonal lines are thinned.
To get an even better result, the grey-scale image should undergo some form of enhancement to filter out noise and to sharpen the image before the boundary is generated.

0 Comments:
Post a Comment
<< Home