F4graph : an API for camera scheduling and heterogeneous image processing on mobile devices