A formal approach for the optimization of heterogeneous multiprocessors for complex image processing schemes