I wrote a code in openCV python which can detect defects in glove (tear, dirt) and measure its area. Then I applied the fuzzy logic code to get its quality (0-100%). The inputs