Optoelectronic perovskite film characterization via machine vision