Week III: Vertical Segmentation
After so many trials and errors, I was able to get the above segmented row from the ROI (Region of Image) as I desired from the last week. As the aim of this week, “Vertical Segmentation of the extracted Row” suggests to do the similar segmentation again, so I thought this week will go easy. However, I had to be more careful with my code this week as I was segmenting each row into columns, thus separating each character from another.
If at all the extraction of characters is not accurate then it would lead to misinterpretation of the Braille characters, thereby costing all my work I have done for the project.
Firstly all the red pixels had to be cleared which were carried forward to the extracted row. These red pixels got dilated when dilation was done which disturbed the image. Hence after dilating it image looks like this:
CAUTION! The size of the structuring element should be carefully chosen as this step decides the size of each cell, but I am sure it will take 2–3 columns of width.
Next I prepared the image for getting Hough Lines that segmented each character from one another. It involved getting the edges,
and finally drawing the Hough Lines.
At this stage everything seemed pretty easy unless I realized a flaw. All the cells were not of same size. Moreover, the size of the cells containing just a single column of dots was very small. This could hamper the interpretation of the Braille characters scheduled for upcoming weeks.
There were again many ways to tackle this issue. However more the code is simplified, lesser will be chances to get errors. Finally I deduced the code to overcome this issue. You can go to the github link posted below to see the code.
Okay…. after seeing this, I seriously went like….
I swear, nothing in this world seemed better than these results at this stage. With this the third week of MUSoC came to an end i.e. I have completed half of this six week project! All this experience and especially my past two weeks taught me the importance of belief in self and perseverance. Without these two I would have never reached this stage.
Braille-OCR - An application that reads out Braille in English for the visually impaired/github.com
Stay tuned for WEEK IV :)