This paper presents an automatic AMLCD repair system utilizing real-time video, image processing and analysis, pattern recognition, and artificial intelligence. The system fundamentally includes automatic optical focus, automatic alignment, defect detection, defect analysis and identification, repair point and path definition, and automatic metal removal and addition (cutting, ablating, and metal deposition). Automatic alignment includes mark alignment as well AMLCD pixel alignment. The features (area, centroid, slope, perimeter, length, width and relative location between objects of interest) are measured for defect analysis. A least cost criterion is employed for defect detection and classification. The choice of repair process is determined by two defect types, either `Open' or `Short'. The repair point and path definition is made from the material structure type such as Data line, Gate line, and ITO area, defect position, and repair rules. The rules are generated from the global and local knowledge. In the automatic repair process, the system automatically performs optical focus, mark and pixel alignment, defect detection and classification, and laser writing or cutting.