Comparisons between parts of the Messier 78 region in visible and infrared light