A laser pattern inspection and/or writing system which writes or inspects a pattern on a target on a stage, by raster scanning the target pixels. Inspection can also be done by substage illumination with non-laser light. A database, organized into frames and strips, represents an ideal pattern as one or more polygons. Each polygon's data description is contained within a single data frame. The database is transformed into a turnpoint polygon representation, then a left and right vector representation, then an addressed pixel representation, then a bit-mapped representation of the entire target. Most of the transformations are carried out in parallel pipelines. Guardbands around polygon sides are used for error filtering during inspection. Guardbands are polygons, and frames containing only guardband information are sent down dedicated pipelines. Error filtering also is done at the time of pixel comparisons of ideal with real patterns, and subsequently during defect area consolidation. Defect areas are viewed as color overlays of ideal and actual target areas, from data generated during real time. Defect areas can be de-zoomed to allow larger target areas to be viewed. An autofocus keeps the scanning laser beam in focus on the target. The inspection system is used to find fiducial marks to orient the target prior to raster scanning. IC bars are provided with alignment marks for locating each IC bar. Interferometers or glass scale encoders allow the stage position to be known.