In this paper, we present a bio-inspired parallel implementation of a solution of the problem of looking for the representative geometrical objects of the homology groups in a binary 2D image (extended-HGB2I problem), which is an extended version of a well-known problem in homology theory. In particular, given a binary 2D image, all black connected components and the representative curves of the holes of these components are obtained and labelled. To this aim, a new technique for labelling the connected components of a binary image is presented. In order to compute the solution, the formal framework uses techniques from membrane computing and the implementation has been done in a hardware architecture called compute unified device architecture (CUDA). The computational complexity of the proposed solution is O(m) with respect to the input (image) size m similar to n(2). Finally, some examples and applications are also presented.