A systematic approach to real-time image segmentation in FPGA devices