Nowadays, polyethylene is the most widely used material in piping technology, the vital problem of which is the discrimination of possible flaws. Destructive and non-destructive strategies are possible error-detection methods, the second of which surpasses the former in both restoration and time complexity. Infrared technology can be introduced as one of the most powerful tools in non-destructive area showing acceptable results for detection of welding flaws in the polyethylene pipes. In this research, the infrared video sequences from the cooling step of the pipeline welding procedure were collected in Chahar_Mahal_O_Bakhtiari/Iran gas Company. The snapshot of an optimum moment of each sequence went under a preprocessing procedure and different clustering methods were applied to distinguish various errors and to classify them into most prevalent flaw groups. Choosing the best clustering algorithm by introducing proper coefficients, the proposed method could discriminate the occurred flaws, even better than destructive approaches.