How to remove Horizontal and vertical lines only from an Image?

41 ビュー (過去 30 日間)
Jerry
Jerry 2020 年 10 月 3 日
コメント済み: Jerry 2020 年 10 月 6 日
A handwritten checked or big square kids maths notebook contains horizontal(H) and vertical(V) lines. Removal of either one H/V lines are possible, that to with the loss of information.Again there are two difficulties faced at the (1)joints of H/V lines and (2) same/different handwriting / margin / checked lines color. Herewith attached a sample checked image without handwriting

回答 (1 件)

KALYAN ACHARJYA
KALYAN ACHARJYA 2020 年 10 月 3 日
Sir I saw the image on telegram, hope I understand the question, One way is-
Steps:
  1. Convert RGB to Gray
  2. Gray Image to Binary with adjusting threshold value (As minimum as possible), so that only lines are remain.
  3. Consider the binary image as mask, and fill the pixels region in original image as per your requiremnts.
  4. You may apply the average filter to smooth the image on lines and non lines area.
3rd Step:
GrayImage(mask)=pixel_val; choose any pix_val, which is pixel value near equal to non lines region.

製品


リリース

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by