[Python] How to remove overlapping noise lines without damaging characters when using Hough...

Discussão em 'Python' iniciado por Stack, Julho 15, 2025.

  1. Stack

    Stack Membro Participativo

    I’m working on extracting text from synthetic images like this:

    [​IMG]

    When a noise line overlaps a character (for example, a line crosses the letter P or the @ symbol), removing the line also removes parts of the character underneath. This causes OCR to fail or misread the text.

    I have tried:

    Using cv2.HoughLinesP to detect the lines.

    Drawing over the detected lines or applying inpainting to remove them.

    Continue reading...

Compartilhe esta Página