Flat optics for image differentiation