1. A method implemented in an apparatus for generating superpixels for a sequence of frames, the method comprising: receiving a sequence of frames via an input; separating a feature space of the sequence of frames into a color subspace and a spatial subspace with a separator; performing a clustering with a clustering hardware unit, the clustering comprising iteratively assigning and updating, wherein the assigning uses joint distances derived from a distance to spatial cluster centers determined in the spatial subspace on a frame basis and a distance to color cluster centers determined in the color subspace on stacked frames, wherein a search window associated with a cluster is extended into the temporal dimension by creating a window on every frame centered around a spatial cluster center in that frame, the search window being a sliding window spanned around a center frame, and wherein in the updating, updated spatial cluster centers and color cluster centers are computed based on results of the assigning; and outputting results of the clustering via an output.