How to identify and erase dotted lines or convert them to solid lines?

Many a times image sent to OCR containing dotted lines are misinterpreted by the engine as texts. How can we identify the dotted lines specifically in the text and replace them either with blank spaces or solid lines.

please show, what you tried, so far (code), example image, thank you.

Hey Thank You : let me share the link of the exact problem

This link contains the exact issue.

I have tried the following codes:

  1. How to convert dashed lines to solid? - OpenCV Q&A Forum
  1. python - Detect dotted (broken) lines only in an image using OpenCV - Stack Overflow

Some codes that I don’t understand

  1. Remove horizontal dashed lines - ImageMagick
  1. Remove the dotted line in OCR - Programmer Sought