Upgrade to Pro — share decks privately, control downloads, hide ads and more …

A Novel Approach to Segmenting Ottaksharas from Handwritten Kannada Words

A Novel Approach to Segmenting Ottaksharas from Handwritten Kannada Words

Subhrajyoti Sen

December 14, 2018
Tweet

More Decks by Subhrajyoti Sen

Other Decks in Research

Transcript

  1. A Novel Approach To
    Segmenting Ottaksharas from
    Handwritten Kannada Words
    Subhrajyoti Sen
    Smallcase

    View Slide

  2. Contents
    ▪ What is Optical Character Recognition (OCR)
    ▪ Steps in OCR
    ▪ Challenges faced
    ▪ Proposed Approaches
    ▪ Performance
    ▪ Future Scope

    View Slide

  3. Optical Character Recognition
    ▪ Optical character recognition (also
    known as OCR) is the conversion of
    images of handwritten or printed text into
    a machine-encoded text.
    ▪ The usage can vary from reading a
    business card to automated address tagging
    on the postal packages to reading number
    plates. The possibilities are huge.

    View Slide

  4. Steps in OCR
    1. Segmentation
    a) Line Segmentation
    b) Word Segmentation
    c) Character Segmentation
    2. Augmentation
    3. Classification

    View Slide

  5. Character Segmentation
    Input word image
    Segmented characters
    Process of segmenting a word into its constituting characters (including
    ottaksharas)

    View Slide

  6. Challenges
    ▪ Concept of subscript (ottakshara) as compared to languages
    written in the Latin script
    ▪ Ottaksharas are disconnected from the parent character and
    thus can be easily ignored by segmentation algorithms,
    thereby causing loss of data
    ▪ Ottaksharas are located diagonally below the parent character

    View Slide

  7. Proposed Approaches
    1. Iterative Approach
    2. Bounding Boxes Approach
    Implemented using OpenCV for Python

    View Slide

  8. Common Implementation
    • Convert image to grayscale. This is used to reduce
    image data.
    • Calculate binary threshold using Otsu optimization.
    Prevent manual calculation using trial and error.
    • Perform binary thresholding using the threshold.
    This reduces the image to a binary matrix.

    View Slide

  9. Iterative Approach
    1. Extract contours using RETR_EXTERNAL and CHAIN_APPROX_NONE
    flag.
    2. RETR_EXTERNAL returns only the outermost contours and thus ignores
    the minor inner contours that arise due to uneven ink or poor scanning.
    3. CHAIN_APPROX_NONE returns a list of co-ordinates along the contours.
    4. Sort the list of contours in descending order of area.
    5. Select the contour with the largest area.
    6. Iterate over the co-ordinates to find the one with the lower y value.
    7. Crop the part of the image below this point.
    8. The cropped image contains the ottaksharas.

    View Slide

  10. Iterative Approach

    View Slide

  11. Bounding Boxes Approach
    1. Sort contours from left-to-right.
    2. Draw bounding boxes are each contour.
    3. Ignore boxes with area less than 5% of the image area.
    4. Extract corner co-ordinates of remaining boxes.
    5. The bounding boxes whose top co-ordinate below half the height
    of the image contain an ottaksharas.
    6. Since the image is parsed left-to-right, the ottaksharas can be
    mapped to the previous parsed character.

    View Slide

  12. Bounding Boxes Approach
    O-01-00

    View Slide

  13. Segmentation Of Multiple Ottaksharas
    Both the approaches are able to segment multiple ottaksharas from
    words.
    The bounding boxes approach inherently segment multiple ottaksharas.
    The ottaksharas are numbered accordingly

    View Slide

  14. Segmentation Of Multiple Ottaksharas
    The iterative can be used to get the contours of the individual ottaksharas
    from the cropped image. Using the co-ordinates from the contours, they
    can drawn on a blank canvas, thus giving us images of single ottaksharas.

    View Slide

  15. Performance
    For a word of resolution 300x300 with a single ottakshara, the time
    taken by the scripts (in seconds) are
    Iterative Approach Bounding Boxes Approach
    0.0515 0.0081
    This is expected as the time complexity of the Iterative Approach is O(n2)
    while that of the Bounding Boxes Approach is O(n).

    View Slide

  16. Future Scope
    • Segmentation of ottaksharas connected to words
    • Segmentation of connected ottaksharas

    View Slide

  17. Thank You

    View Slide