Automatic welding imperfections detection in a smart factory via 2-D laser scanner