Optoelectronic Refractive Index Measurements: Application for Smart Polymer Processing