Topological image feature extraction is very important for many high level tasks in image processing and for topological analysis and modeling of image data. In this work, we use cubical homology theory to extract topological features as well as their geometric representations in image raw data. Furthermore, we present two algorithms that will allow us to do this extraction task very easily. The first one uses the elementary cubical representation to check the adjacency between cubes in order to localize the connected components in the image data. The second algorithm is about cycle extraction. The first step consists of finding cubical generators of the first homology classes. These generators allow to find rough locations of the holes in the image data. The second method localizes the optimal cycles from the ordinary ones. The optimal cycles represent the boundaries of the holes in the image data. A number of experiments are presented to validate these algorithms on synthetic and real binary images.