Filter löschen
Filter löschen

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

1 Ansicht (letzte 30 Tage)
sindhu c
sindhu c am 21 Dez. 2015
Kommentiert: Meghashree G am 6 Jan. 2016
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

Antworten (1)

Image Analyst
Image Analyst am 21 Dez. 2015
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 Kommentare
Image Analyst
Image Analyst am 6 Jan. 2016
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 am 6 Jan. 2016
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.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by