US 12,444,042 B2
Method of detecting misprints, computing device, and storage medium
Cheng-Feng Wang, Kaohsiung (TW); and Li-Che Lin, Kaohsiung (TW)
Assigned to HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed by HON HAI PRECISION INDUSTRY CO., LTD., New Taipei (TW)
Filed on May 19, 2022, as Appl. No. 17/748,280.
Claims priority of application No. 202111092189.8 (CN), filed on Sep. 17, 2021.
Prior Publication US 2023/0092072 A1, Mar. 23, 2023
Int. Cl. G06T 7/00 (2017.01); G06T 7/12 (2017.01); G06T 7/136 (2017.01); G06T 7/70 (2017.01)
CPC G06T 7/001 (2013.01) [G06T 7/12 (2017.01); G06T 7/136 (2017.01); G06T 7/70 (2017.01); G06T 2207/20021 (2013.01); G06T 2207/30144 (2013.01)] 17 Claims
OG exemplary drawing
 
1. A method of detecting misprints, comprising:
obtaining a reference image and a test image, the reference image comprising first characters, the test image comprising second characters, and the first characters being perfectly formed;
performing a first image processing on the reference image to obtain a first image, and performing the first image processing on the test image to obtain a second image;
performing a second image processing on the first image to obtain a first outline image of each of the first characters, comprising: determining a first position of each of the first characters in the first image; and segmenting the first outline image from the first image according to the first position; and performing the second image processing on the second image to obtain a second outline image of each of the second characters, comprising: determining a second position of each of the second characters in the second image; and segmenting the second outline image from the second image according to the second position;
determining a corresponding first outline image of the second outline image;
calculating a similarity between the corresponding first outline image and the second outline image; and
determining a detection result of the second outline image according to the similarity, comprising: comparing the similarity and a second threshold; determining that a character in the second outline image is not perfectly formed when the similarity is greater than or equal to the second threshold; and determining that the character in the second outline image is perfectly formed when the similarity is less than the second threshold;
wherein determining the first position of each of the first characters in the first image comprises:
recognizing the first characters in the first image by using an optical character recognition technology;
selecting each of the first characters in the first image using a first rectangle, each of the first characters corresponding to one first rectangle;
determining coordinates of a lower left corner and coordinates of an upper right corner of each first rectangle in a first rectangular coordinate system; and
determining the first position of each of the first characters in the first image using the coordinates of the lower left corner and coordinates of the upper right corner of the corresponding first rectangle in the first rectangular coordinate system;
wherein determining the second position of each of the second characters in the second image comprises:
recognizing the second characters in the second image by using the optical character recognition technology;
selecting each of the second characters in the second image using a second rectangle, each of the second characters corresponding to one second rectangle;
determining coordinates of a lower left corner and coordinates of an upper right corner of each second rectangle in a second rectangular coordinate system; and
determining the second position of each of the second characters in the second image using the coordinates of the lower left corner and coordinates of the upper right corner of the corresponding second rectangle in the second rectangular coordinate system.