seriealize/deserialize for calibration matrix