A Graph-based Optimization Framework for Hand-Eye Calibration for Multi-Camera Setups