A method and an apparatus for automatic segmentation of an image representing a mass of a tissue region based on dynamic programming that guarantees an accurate and closed contour of the mass is disclosed. The method according to one embodiment accesses digital image data representing an image including the mass of the tissue region, creates a mirror image of the digital image data, extracts a Region of Interest (ROI) which includes a portion of the mirror image containing the mass, transforms the ROI to polar space for obtaining a polar image of the ROI, assigns local cost to sub portions of the polar image, and finds a contour of the mass based on the assigned local cost.