how to get potential segmentation columns(PSC) in an handwritten image?
1 回表示 (過去 30 日間)
古いコメントを表示
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
0 件のコメント
回答 (1 件)
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
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
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.
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!