how can i segment characters from the image with lot of white pixels and similar background like text ?

1 回表示 (過去 30 日間)
i need to segment the character part of image and then each individual characters as a seperate image. i am having problem to do in matlab. Here is the image attached. P.S. : I have tried earlier answers for character segmentation, but this image seems a bit difficult. could anybody please help :)
i want to segment the portion containing characters into a seperate image. so my aim is not to just recognize text but to segment it as an image from above image. Finally i want to compare the segmented image of hello world from this printed board with the reference image which is made in paint and have just hello world witten in it. So main aim is Kinda quality comparison of printed image with 100 percent accurate image, so basically how good each character it is printing.
  2 件のコメント
KSSV
KSSV 2017 年 11 月 10 日
Have you checked with ocr?
Avinash Kumar
Avinash Kumar 2017 年 11 月 10 日
編集済み: Avinash Kumar 2017 年 11 月 10 日
yes, ocr doesnt seem to work. As background is quite similar to the text here. this is what ocr return instead of hello world : ocrText with properties:
Text: 'efloflwofldi↵↵'
CharacterBoundingBoxes: [11×4 double]
CharacterConfidences: [11×1 single]
Words: {'efloflwofldi'}
WordBoundingBoxes: [47 2 302 55]
WordConfidences: 0.1218
Moreover i want the segmented result as image as i want to kinda compare quality of printing on this board with original reference image of hello world.

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

採用された回答

Image Analyst
Image Analyst 2017 年 11 月 10 日
You just need to subtract the images:
diffImage = abs(double(grayImage) - double(refImage));
Then see if you have a significant number of pixels above zero. If you do, then the test image does not say Hello World.
  16 件のコメント
Image Analyst
Image Analyst 2017 年 11 月 15 日
bwareafilt() will not introduce any additional blobs, like those in the corner. You can delete blobs touching the border with imclearborder().
Avinash Kumar
Avinash Kumar 2017 年 11 月 15 日
yes, this works :D Thanks a lot for all your help. If i have any question again, i will open this thread.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeConvert Image Type についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by