update mask and flip camera alignment