CMOS/CCD sensor selection, lenses, ISP, lighting and the optics that decide image quality before any code runs.