Camera Sensor Linearity Characterization and Correction