Online quality monitoring of molten resin in injection molding