A pattern distortion correction device which performs distortion correction of a layout pattern is provided, considering not only an edge shift value but also a process margin. Said structural elements are designed to be mounted and detached transversally to the direction of the vehicle by means of a roof opening and once attached, are fixed at the front to the windscreen frame and at the rear to a bow that spans the width of the vehicle. In Graph Based Sampling, at each iteration, a two event data sets are randomly selected from a stored plurality of event data sets.