Does this give the correct result always? No, and there are plenty of improvements that can be made. Secondly, the closest character to the dot is chosen as the best option. First, the letter must be lower in the image (higher on the y-axis). For each dot, every potential letter is scanned. Once the dots were identified, the hunt for their parent began. While the implemented solution was not far from this idea, this straightforward approach can fail for slanted text. One idea was to locate the dot and then find the first piece of text below it along the y-axis. There were some approaches that were avoided. This is necessary in order to distinguish the outlier dot from other strokes and dashes. Furthermore, I assumed a dot would have a small area for both handwritten and typed text. For one, I assumed that dots are not common. There were some assumptions that I still made. Alternatively, a solution that used geometric properties of the dots and it’s relation to surrounding letters seemed to be a more concrete solution. One thought was to use data from the image, which I ultimately needed for line detection. Since I had a vague understanding on how I would implement line detection, cleaning the gap between dots and their parent symbol was quite a design decision. Truth be told, I had already begun exploring line detection before resolving the dot problem. As will be shown later, these dots interfere with detecting lines in the image. Readers that are following this series will recall that in the previous procedure, dots above letters were considered to be separate objects. To make the algorithm robust, I will combine the dot’s that are above the letters ‘i’ and ‘j’. Specifically, I’m interested in detecting the structure of text by assigning letters to the line they belong to. In this piece I will discuss the additions made to the previous code. Yet, the simple procedure still laid down the foundation for a basic optical character recognition (OCR) Python script. Realistically, that algorithm did little more than find high contrasting pixel regions in an image. In my previous article, I discussed how to implement fairly simple image processing techniques in order to detect blobs of text in an image.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |