Fabric defect detection by wavelet transform and neural network