MATLAB: How to return a labeled image to its original form

Image Processing Toolboxlabeled image

I have an image and perform some enhancing filters on it, then labeled it and eliminate some objects of labeled image now i need to do erosion on the rest objects that dosent eliminate. how i can transform the label matrix to its initial form?

Best Answer

You can simply threshold it:
binaryImage = labeledImage > 0;