Patch based yarn defect detection using Gabor filters