Adaptive detection of weft-knitted fabric defects based on machine vision system