Automatic Defect Detection using Enhanced Motif and Non-Motif Algorithms in 2D Patterned Texture Images