Automatic Defect Detection of Patterned Fabric via Combining the Optimal Gabor Filter and Golden Image Subtraction