A Bayer filter mosaic is a color filter array (CFA) for arranging RGB color filters on a square grid of…