MATLAB Answers


How Labeling objects in grayscale image in matlab

Asked by pabudi abeyrathne on 23 Apr 2013

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.


1 Answer

Answer by Image Analyst
on 23 Apr 2013

Please upload the image. You can use imquantize() followed by bwconncomp() and regionprops().


Join the 15-year community celebration.

Play games and win prizes!

Learn more
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!