Integrated CMOS sensor microsystems for optical sensing and processing