MATLAB: Gray to BW

gray bw im2bwMATLAB

Hi all. I should question if anybody know how to convert a gray picture were stored up in us so that only the black pixels and white pixels.
D = im2bw(A);

Best Answer

This is an excellent demo. But I use a selected area of active contour segmentation. I do not know how I took advantage of it.
Output of the segmentation are xy coordinates.