Layout features become highly susceptible to lithography process fluctuations due to the widening subwavelength lithography gap. Problematic layout patterns incur poor printability even if they pass design rule checking. These hotspots should be detected and removed at early design phases to improve manufacturability. While existing studies mainly focus on hotspot detection and pattern classification, hotspot pattern library generation is rarely addressed in literature but crucial to the effectiveness and efficiency of hotspot detection. For an advanced process, in addition to yield-limiting patterns inherent from old processes and computation intensive lithography simulation, defect silicon images (SEM images) inspected from test wafers provide more realistic process-dependent hotspots. For facilitating hotspot pattern library generation, we raise a pattern matching problem of searching design layout patterns that may induce problematic SEM images. The key challenge is the various shape distortions between an SEM image and corresponding design layouts. Directly matching either feature points or shapes of both is thus not applicable. We observe that even with shape distortions, matched design layouts and the SEM image have similar density distribution. Therefore, in this paper, we propose an efficient multilevel pixilation framework to seek layout clips with similar density distribution from coarse- to finegranularities to an SEM image. The proposed framework possesses high parallelism. Our results show that the proposed method can effectively and efficiently identify matched layout pattern candidates.