フィルターのクリア

Remove unwanted lines from an image

2 ビュー (過去 30 日間)
chitra s
chitra s 2015 年 7 月 2 日
コメント済み: calvin Li 2023 年 4 月 26 日
sir, i attached my picture with this. in that i want to remove the horizontal and vertical line and a slanting line attached to horizontal line. how can i? plz help me

回答 (2 件)

Thorsten
Thorsten 2015 年 7 月 2 日
I = im2double(imread('Untitled.png'));
I = im2bw(I(:,:,1), 0.5);
L = bwlabel(I);
I(L== L(167, 10)) = 0;
  1 件のコメント
Image Analyst
Image Analyst 2015 年 7 月 2 日

サインインしてコメントする。


Image Analyst
Image Analyst 2015 年 7 月 2 日
Try this:
rgbImage = imread('untitled.png');
subplot(3,1,1);
imshow(rgbImage);
axis on;
title('Color Image', 'FontSize', 22);
binaryImage = rgbImage(:,:,1) > 128;
subplot(3,1,2);
imshow(binaryImage);
title('Binary Image', 'FontSize', 22);
axis on;
Now get rid of lines.
% Erase top line
binaryImage(1,:) = false;
% Erase bottom thick line and edge line.
binaryImage(165:end,:) = false;
% Erase left border line
binaryImage(:,1:2) = false;
% Erase right thick line and edge line
binaryImage(:, 211:end) = false;
subplot(3, 1, 3);
imshow(binaryImage);
title('Cleaned Binary Image', 'FontSize', 22);
axis on;
  7 件のコメント
Image Analyst
Image Analyst 2023 年 4 月 25 日
Sorry, I'm not interested in helping people defeat captchas.
calvin Li
calvin Li 2023 年 4 月 26 日
It's OK. Understood your mindset. Thanks

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeLanguage Support についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by