How Labeling objects in grayscale image in matlab

2 ビュー (過去 30 日間)
pabudi abeyrathne
pabudi abeyrathne 2013 年 4 月 23 日
回答済み: julian tuyin 2016 年 10 月 28 日
Hi all,
I work with pathological image. and at the middle stage of the my method i give 0.3 gray value to background and 1 for the objects, and also there is pixels that does not belong to any of those. that pixels are in 0 gray value. Using this image i want to give label 1 to background and then i want to label objects start with 2. for seeded watershed. Can any one tell me how can i do this.. if you want i can upload this image.
Thank you all.
Best Regards, Pabudi.

回答 (2 件)

Image Analyst
Image Analyst 2013 年 4 月 23 日
Please upload the image. You can use imquantize() followed by bwconncomp() and regionprops().

julian tuyin
julian tuyin 2016 年 10 月 28 日
hi, im having a similar problem, what i did, was use the code from "Detecting a Cell Using Image Segmentation", on the image progressing help, and once you get the image with the filled holes, and obviously the border image, you can do.
im=BWdfill-BWsdil
%image= image with filled holes - image with dilated borders.
you will get what you are looking for, you'll just have to adjust your borders. after that you can easily do, BWLABEL and REGIONPROPS. but this wont ensure you have the background with label 1, as you can have an object in the (1,1), it would be better to do them on separate process.

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by