This code detects any defect (e.g. textile or liquid defects) using image processing in different kinds of images.
You can download the code from here.
This code was made by Zouhir Wakaf and Hamid A. Jalab, and is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International license.