In this paper, we present a fast algorithm for object detection and segmentation in MPEG compressed domain using color clustering, region merging based on spatiotemporal similarities, background/foreground classification, and pixel edge extraction. The features extracted from the blocks of segmented object in compressed domain can be used for fast object tracking and indexing at low level. Moreover, those blocks can be decompressed to obtain details of a specific object in pixel domain and can be used for high level indexing. By using our algorithm, we can reduce the amount of the information needed to be processed, and therefore, save the computational time, and increase the processing speed. Also we need to perform inverse DCT on only some parts of the image.