필터 지우기
필터 지우기

how to get potential segmentation columns(PSC) in an handwritten image?

조회 수: 1 (최근 30일)
sindhu c
sindhu c 2015년 12월 21일
댓글: Meghashree G 2016년 1월 6일
hello! im trying to segment individual characters of handwritten image . for that i have pre-procesed the image like binarisation , thinning. now my next step is PSC ( each column in the word image, for which the sum of foreground white pixels is 0 or 1 ).
in the attached image i have achieved till step (C) . after doing PSC the output will be as shown in step (d).
how do i achieve this ? please help me with the code. thank you

답변 (1개)

Image Analyst
Image Analyst 2015년 12월 21일
Take the sum vertically, then threshold at 1 or less:
horizontalProfile = sum(double(binaryImage), 1); % double may not be required - not sure.
logicalSpaceIndexes = horizontalProfile <= 1;
Now you have a logical vector that tells you whether a column has 0 or 1 binary pixel in it. If you want actual indexes, you can do
actualSpaceIndexes = find(logicalSpaceIndexes);
That may be more or less convenient to use, depending on what you want to do with the location information and how you want to use it.
  댓글 수: 14
Image Analyst
Image Analyst 2016년 1월 6일
I don't know why you want or need an RGB image. That image is not really needed for segmentation, it's just for your information/curiosity. To just indicate those red zones, just use patch() or fill() - it's easy.
Meghashree G
Meghashree G 2016년 1월 6일
Yes sir i used rectangle function to indicate red lines.Now for one image i'm specifying the co-ordinates.But how to indicate those red lines for when different images is given as input?? I mean on what basis, the red lines should be drawn?sorry for asking too many questions.

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

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by