Our objective is to provide an enhanced algorithm for the FASTCAM instrument, developed by the Instituto de Astrofi??sica de Canarias in collaboration with the Universidad Polite??cnica de Cartagena. In this paper we propose a versatile algorithm, based on the CNN paradigm, which can be adapted to the detection of several astronomical objects. We also propose an implementation architecture that makes use of a High Performance Reconfigurable Computer (HPRC), also called hybrid supercomputer, combining general purpose standard microprocessors with custom hardware accelerators based on FPGAs, to speed up execution time. The hardware/software partitioning and co-design process has been carried out using high level design tools, instead of traditional Hardware Description Languages (HDL).