CMOS image sensors with multi-bucket pixels for computational photography