The invention discloses a method and a device for acquiring an interference shear amount and a
shear angle, relates to the technical field of optical measurement, and aims to improve the universality of an existing interference shear amount and
shear angle acquisition
algorithm and improve the precision and the reliability of displacement acquisition. Comprising the following steps: fusing interferograms obtained by using a lateral
shearing interferometer through a
spatial modulation degree quality diagram to obtain a
spatial modulation quality diagram, and obtaining a gamma transformation diagram according to gamma change of the
spatial modulation quality diagram; obtaining edge information of the gamma transformation diagram through a canny operator and a fine Contours
algorithm, determining a maximum contour curve of the edge information of the gamma transformation diagram, and cancelling according to the maximum contour to obtain a gamma transformation diagram
mask; according to the gamma transformation diagram, the gamma transformation diagram
mask and a
GrabCut algorithm, obtaining an interference region segmentation diagram and a final segmentation
label corresponding to the gamma transformation diagram; carrying out canny
edge detection on the interference region segmentation image to obtain interference region edge information, segmenting the interference region edge information based on a minimum matrix
fitting algorithm to obtain upper and lower edges or left and right edges, and carrying out circular fitting on the upper and lower edges or the left and right edges according to a constrained least square method to obtain a circular fitting image; and determining the center point position, the shearing amount and the shearing angle.