Image segmentation is an important and challenging problem in image analysis. Segmentation of moving objects in image sequences is even more difficult and computationally expensive. In this work we propose a technique for spatio- temporal segmentation of medical sequences based on K-mean clustering in the feature vector space. The motivation for spatio-temporalsegmentation approach comes from the fact that motion is a useful clue for object segmentation. Two- dimensional feature vector has been used for clustering in the feature space. In this paper we apply the proposed technique to segmentation of cardiac images. The first feature used in this particular application is image brightness, which reveals the structure of interest in the image. The second feature is the Euclidean norm of the optical flow vector. The third feature is the three- dimensional optical flow vector, which consists of computed motion in all three dimensions. The optical flow itself is computed using Horn-Schunck algorithm. The fourth feature is the mean brightness of the input image in a local neighborhood. By applying the clustering algorithm it is possible to detect moving object in the image sequence. The experiment has been conducted using a sequence of ECG-gated magnetic resonance (MR) images of a beating heart taken as in time so in the space.