Cardiovascular Magnetic Resonance (CMR) images involves a great amount of uncertainties. Such uncertainties may originate from either intrinsic measurement limitations or heterogeneities among patients. Without properly considering these uncertainties, image analysis may provide inaccurate estimations of cardiac functions, and ultimately lead to false diagnosis and inappropriate treatment strategy. In this work, a stochastic image segmentation algorithm is developed to separate cardiac chambers from the background of CMR images. To account for noise and uncertainties in pixel values, a generalized polynomial chaos (gPC) expansion is integrated with a level set function to dynamically evolve boundaries of cardiac chambers. Two consecutive steps are developed: a deterministic segmentation to identify an immediate neighborhood of boundary, of which pixel values are used to calibrate the gPC model; and a stochastic segmentation applied to the neighborhood region to evolve boundaries of cardiac chambers in a stochastic manner. The proposed method can provide a probabilistic description of the segmented heart boundary, which will greatly improve the reliability of image analysis, and potentially enhanced cardiac function evaluation.