A memristor-based pixel implementing light-to-resistance conversion