

Moving objects detection algorithms need real-time processing for diverse applications such as rescue robots and driving assistance. Moreover, in these applications, they should deal with strong levels of egomotion, which limit the reliability of most of the existing techniques. These requirements make them very compute intensive and memory bound, what enforces the use of hardware acceleration, such as FPGA or GPU. In this work, a GPU implementation of an optical flow based moving objects detection algorithm is presented. This algorithm is applicable in scenarios with weak and strong egomotion, thanks to egomotion compensation and two alternative detection methods. Our implementation includes novel approaches on GPU to widely-used techniques as RANSAC and region growing. It also solves image processing parallelization problems, as divergent execution paths, by using compaction and sorting primitives, with a significant impact on performance. Finally, our implementation has been compared to a previous FPGA implementation. From the performance point of view, results on the newest GPUs clearly outperform the FPGA.