Product quality modeling and control based on vision inspection with an application to baking processes