Nanophotonic filters for digital imaging