Level the blobs and Delete Blob containing Text in it.

조회 수: 2 (최근 30일)
Priyanka Roy
Priyanka Roy 2015년 5월 20일
댓글: Image Analyst 2015년 5월 21일
I want to delete texts or words present in my result image.
let the image is :
i have done the blob analysys and plot the object location using this code:
%% Calculate number of object present in output image
BW=bwlabel(BW);
s = regionprops(BW,'BoundingBox');
b = bwboundaries(BW);
n = size(b, 1);
%% Function For Ploting object location
figure,imshow(BW)
hold on;
for n=1:size(s,1)
rectangle('Position',s(n).BoundingBox,'EdgeColor','y','LineWidth',1)
end
hold off;
so then the output image is :
now i want to lable these blobs:
and then remove the blob containing text in it.:
so thus the output image will be:
and the final image i want is :
How will i do this?
  댓글 수: 1
Walter Roberson
Walter Roberson 2015년 5월 20일
Why isn't bwlabel separating out the letters of the text into individual objects? The 'S' does not appear to be touching the 'K' at all; 'K' just might be touching the left tip of the 'Y' though.
Are you possibly doing a morphological filling operation before doing blob boundary detection?

댓글을 달려면 로그인하십시오.

채택된 답변

Image Analyst
Image Analyst 2015년 5월 20일
Priyanka, what's the status of this? Do you still need help? Can you answer Walter's question? Can you just filter based on the area of the blob? Do all the bird shapes have about the same area, which is different than the letters? Can you use this example? http://www.mathworks.com/help/vision/examples/automatically-detect-and-recognize-text-in-natural-images.html?prodcode=VP&language=en to find the text and then delete it?
  댓글 수: 2
Priyanka Roy
Priyanka Roy 2015년 5월 21일
All birds shapes are not same. And the text may change time to time when image changes. the below code i use for creating the blob boundary based on the area:
hold on;
b = bwboundaries(K);
numberOfBoundaries = size(b, 1);
for k = 1 : numberOfBoundaries
thisBoundary = b{k};
plot(thisBoundary(:,2), thisBoundary(:,1), 'g', 'LineWidth', 2);
end
hold off;
i want to remove the blob which containing the text.
Image Analyst
Image Analyst 2015년 5월 21일
You marked it as accepted so I presume the "finding text in natural scenery" link is what you're using.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Computer Vision with Simulink에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by