Real-time defect detection using online learning for laser metal deposition