Printed character detection method
By designing the printed character detection equipment, using positioning fixtures, slide rails, imaging devices and detection and analysis modules, the problems of high manual detection intensity and poor reliability are solved, and efficient and accurate printed character detection is achieved.
Patent Information
- Application Number
- CN202210841383.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-18
- Publication Date
- 2025-03-21
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the detection of printed characters relies on manual visual and sample comparison, resulting in high working intensity and poor detection reliability.
Design a printing character detection device, including a positioning fixture, a slide rail, an imaging device and a detection and analysis module. The product is moved to the imaging position by positioning fixtures, the imaging device takes the product image, and the detection and analysis module compares it with the pre-stored template image to judge the qualification of the printed characters.
It realizes that machines replace manual labor, efficiently identify printed character features, improve detection efficiency, reduce customer complaints, reduce employee labor intensity, and improve detection accuracy.
Smart Images

Figure CN115343290B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of detection technology, and in particular to a printed character detection device and method. Background Art
[0002] Electronic products (such as mobile phones, tablet computers) or other products sometimes need to be printed with characters in specific locations for identification. For example, symbols indicating the headphone jack, charging jack, and USB jack may need to be printed near the headphone jack, charging jack, and USB jack of a mobile phone.
[0003] In the prior art, printed characters are inspected by manual visual inspection and sample comparison to select defective products, which has the problems of high labor intensity and poor detection reliability. Summary of the invention
[0004] The present invention aims to provide a printed character detection device and method to solve the problems of high workload and poor detection reliability in manual visual detection.
[0005] The present application provides a printed character detection device, comprising:
[0006] Positioning fixture, used to hold the product to be tested;
[0007] A slide rail, used to carry the positioning jig, and capable of driving the positioning jig and the product carried on the positioning jig to move to an imaging position;
[0008] An imaging device for acquiring a product image of a product located at an imaging position, the product image including a character area corresponding to printed characters of the product;
[0009] A detection and analysis module is electrically connected to the imaging device and is used to receive a product image from the imaging device; the detection and analysis module pre-stores a template image of the printed characters of the product, and is capable of comparing the character area with the corresponding template image to obtain the degree of difference between the character area and the corresponding template image, and comparing the degree of difference with a preset allowable difference range. If the degree of difference is within the allowable difference range, the printed characters in the character area are deemed qualified, otherwise they are deemed unqualified.
[0010] Optionally, the printed character detection device further includes a base; the slide rail is mounted on the base, and the positioning fixture is slidably mounted on the slide rail along a first direction, and the first direction is a horizontal direction.
[0011] Optionally, the printed character detection device also includes a bracket and a coaxial light source; the bracket is installed on the base; the bracket includes a vertical plate, and the vertical plate is located above the slide rail; the imaging device is installed on the side of the vertical plate away from the slide rail, and the coaxial light source is located between the imaging device and the slide rail.
[0012] Optionally, the printed character detection device also includes a manual slide; the manual slide is installed on the vertical plate, the imaging device is installed on the manual slide, and the imaging device can adjust its position in the second direction and the third direction through the manual slide, wherein the second direction is along the vertical direction, and the third direction is perpendicular to the first direction and perpendicular to the second direction.
[0013] Optionally, the product extends along a first direction and has a plurality of printed characters spaced apart along the first direction; the slide rail is an electronic slide rail and is capable of driving the product to move along the first direction until each of the printed characters or a combination of a plurality of adjacent printed characters is at a position corresponding to the imaging position.
[0014] Optionally, the positioning fixture includes a main body and two positioning protrusions respectively protruding from the upper surface of the main body, the upper surface of the main body is adapted to the inner side surface of the product, and the two positioning protrusions are respectively suitable for matching with two positioning holes of the product.
[0015] The present application also provides a printed character detection method, which is based on the aforementioned printed character detection device, and the printed character detection method includes:
[0016] Loading: Position the product to be inspected on the positioning fixture and drive it to the imaging position through the slide rail;
[0017] Imaging: starting an imaging device to capture and obtain product images;
[0018] Comparative analysis: Use the detection and analysis module to compare the character area on the product image with the corresponding template image to obtain the degree of difference between the character area and the corresponding template image, and compare the degree of difference with the preset allowable difference range. If the degree of difference is within the allowable difference range, the printed characters are considered qualified, otherwise they are considered unqualified.
[0019] Optionally, the product is provided with a plurality of printed characters spaced apart along a first direction;
[0020] The slide rail can drive the product to move along the first direction, so that each of the printed characters or a combination of a plurality of adjacent printed characters corresponds to an imaging device, and the imaging device forms images to obtain a plurality of sub-images;
[0021] The detection and analysis module pre-stores a plurality of template images, each corresponding to the plurality of printed characters;
[0022] Each character area of each sub-image is compared with the corresponding template image to obtain the result of whether the corresponding printed character is qualified.
[0023] Optionally, the comparative analysis step further includes:
[0024] Masking the area outside the character area of the product image;
[0025] The detection and analysis module compares and analyzes the character area on the product image after mask processing with the template image corresponding to the character.
[0026] Optionally, the content of the comparative analysis includes comparative analysis of character defects and comparative analysis of character positions;
[0027] Among them, the comparative analysis method for character defects includes: performing grayscale comparison on corresponding pixels of each character area on the product image and the corresponding template image, if the difference in grayscale of the corresponding pixel is within a preset difference threshold, the pixel on the product image is determined to be a defective pixel, and multiple defective pixels connected together constitute a first defect area; if there are two adjacent first defect areas among the multiple first defect areas obtained after the grayscale comparison, the adjacent first defect areas are expanded so that the two adjacent first defect areas are connected together to form a second defect area, wherein the adjacent first defect areas refer to first defect areas with a spacing within a set range, and the expansion operation refers to expanding the area of one of the two adjacent first defect areas until it is connected to the other first defect area to form a second defect area; the second defect area after the expansion operation and the first defect area that exists alone are greater than the set minimum area. The area is determined as a third defect area; if the total area of the third defect area is less than the allowable range, it is determined that the character shape is qualified, otherwise it is determined to be unqualified;
[0028] The comparative analysis method for character positions includes: obtaining the distance between the baseline feature of the character on the product image and the reference baseline on the product image; if the distance meets the requirements, the character position is deemed qualified, otherwise it is deemed unqualified; wherein the reference baseline is the feature of the structural hole on the corresponding product on the product image.
[0029] The printed character detection device and method in the embodiments of the present application have at least one of the following beneficial effects:
[0030] 1. Machines replace manual labor, efficiently take photos to identify printed character features, and complete the determination of character positions and character defects, thereby improving detection efficiency, reducing customer complaints, and reducing employee labor intensity;
[0031] 2. Use a dual-axis manual slide to adjust the object distance arbitrarily and improve detection accuracy;
[0032] 3. The positioning fixture is designed to conform to the test surface to ensure a flat surface, and the positioning protrusions with rounded corners are convenient for manual placement. BRIEF DESCRIPTION OF THE DRAWINGS
[0033] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without creative work.
[0034] Figure 1 It is a structural schematic diagram of a printed character detection device in an embodiment of the present application;
[0035] Figure 2 for Figure 1 A partial structural diagram of a printed character detection device;
[0036] Figure 3 It is a schematic diagram of the structure of the positioning fixture in the embodiment of the present application;
[0037] Figure 4 This is a schematic diagram of the structure of the product in the embodiment of the present application;
[0038] Figure 5 A schematic diagram for imaging a product;
[0039] Figure 6 is a flow chart of a printed character detection method in an embodiment of the present application;
[0040] Figure 7 Schematic diagram of character position measurement in the printed character detection method in an embodiment of the present application.
[0041] Description of main component symbols: product 200, left side L, middle part M, right side R, printed characters 210, structural hole K1, printed character detection equipment 100, positioning fixture 10, slide rail 20, imaging device 30, detection and analysis module 40, main body 11, upper surface P1, positioning protrusion 12, rounded corner 13, frame 50, outer frame 51, base 52, first direction X, opening 53, bracket 70, coaxial light source 31, vertical plate 71, crossbeam 72, vertical plate 73, manual slide 74, second direction Y, third direction Z, button box 54, safety light grid 55, display screen 56, three-color light 57, fan 58, universal wheel 59, door switch 60, door switch detection sensor 61, first sub-image G1, second sub-image G2, third sub-image G3. DETAILED DESCRIPTION
[0042] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments.
[0043] It should be noted that when an element is referred to as being "fixed to" another element, it may be directly on the other element or there may also be a centered element. When an element is considered to be "connected to" another element, it may be directly connected to the other element or there may also be a centered element. When an element is considered to be "set on" another element, it may be directly set on the other element or there may also be a centered element. The terms "vertical", "horizontal", "left", "right" and similar expressions used herein are for illustrative purposes only.
[0044] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those generally understood by those skilled in the art. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The term "or / and" used herein includes any and all combinations of one or more related listed items.
[0045] Some embodiments of the present application are described in detail. In the absence of conflict, the following embodiments and features of the embodiments can be combined with each other.
[0046] Example
[0047] See also Figures 1 to 3 This embodiment provides a printed character detection device 100, including a positioning fixture 10, a slide rail 20, an imaging device 30 and a detection and analysis module 40. The printed character detection device 100 is used to detect a product 200 (see Figure 4 ) whether the printed characters 210 on it meet the requirements.
[0048] The positioning fixture 10 is used to carry the product 200 to be inspected, the slide rail 20 is used to carry the positioning fixture 10, and can drive the positioning fixture 10 and the product 200 carried on the positioning fixture 10 to move to the imaging position, and the imaging device 30 is used to obtain the product image of the product 200 located at the imaging position, and the product image includes the character area corresponding to the printed characters 210 of the product 200. The detection and analysis module 40 is electrically connected to the imaging device 30, and is used to receive the product image from the imaging device 30, and compare and analyze the product image with the pre-stored template image to make a judgment on whether each printed character 210 is qualified.
[0049] The product 200 in this embodiment may be any product 200 printed with printed characters 210, such as a mobile phone or a component of a mobile phone.
[0050] For example Figure 4 As shown, the product 200 is a shell part of a mobile phone, and the shell part is provided with a plurality of structural holes K1. The outer surface of the shell part has printed characters 210 near some of the structural holes K1, which are used to indicate the functions of the structural holes K1. For example, Figure 4 The second, third, fourth, sixth and seventh structural holes K1 of the outer shell are respectively printed with printed characters 210 from left to right. Among them, one printed character 210 is printed at the second, third, fourth and sixth structural holes K1 respectively, and two printed characters 210 are printed near the seventh structural hole K1. Figure 4 Taking the posture of as an example, the second and third structural holes K1 and the corresponding printed characters 210 are located on the left side L of the product 200, the fourth and sixth structural holes K1 are located in the middle part M of the product 200, and the seventh structural hole K1 is located on the right side R of the product 200.
[0051] The distribution of the structural holes K1 and the printed characters 210 is merely exemplary and not limiting.
[0052] The positioning fixture 10 in this embodiment is used to carry the product 200 to be inspected. Figure 4 The product 200, the positioning fixture 10 includes a main body 11 and two positioning protrusions 12 protruding from the upper surface P1 of the main body 11, the upper surface P1 of the main body 11 adopts a contoured design to adapt to the inner side of the product 200, and the two positioning protrusions 12 are respectively suitable for matching with two positioning holes of the product 200, such as the third structural hole K1 and the seventh structural hole K1 of the product 200. Optionally, the tops of the two positioning protrusions 12 are provided with rounded corners 13 to facilitate the product 200 to fit in. The positioning fixture 10 is convenient for taking and placing the product 200, and can avoid contact with the outer surface of the product 200 printed with printed characters 210, so as to avoid affecting the imaging of the printed characters 210.
[0053] When the product 200 is positioned and installed, its inner side is in contact with the upper surface P1 of the positioning fixture 10. Exemplarily, the two positioning protrusions 12 are respectively matched with the third structural hole K1 and the seventh structural hole K1.
[0054] See again Figure 1 and Figure 2 The slide rail 20 is used to carry the positioning fixture 10, and can drive the positioning fixture 10 and the product 200 carried on the positioning fixture 10 to move to the imaging position. Optionally, the slide rail 20 adopts an electric slide rail 20, which can be electrically controlled to drive the positioning fixture 10 and the product 200 thereon to move. Specifically, the slide rail 20 in this embodiment can adopt an electric screw or other linear drive device, which is not limited here.
[0055] In this embodiment, the printed character detection device 100 further includes a frame 50. The frame 50 includes an outer frame 51 and a base 52 mounted on the outer frame 51, and the base 52 is horizontally arranged. The slide rail 20 is mounted on the base 52, and the positioning fixture 10 is slidably mounted on the slide rail 20 along a first direction X, and the first direction X is a horizontal direction. Among them, an opening 53 is set at the front end of the outer frame 51, and an operator can take and place the product 200 through the opening 53.
[0056] like Figure 4 As shown, the product 200 in this embodiment is generally a long strip structure, and the aforementioned structural holes K1 are sequentially distributed along the length direction thereof. After being installed on the positioning fixture 10, the length direction of the product 200 is along the first direction X. In this way, the slide rail 20 can drive the product 200 to move along the first direction X until each printed character 210 or a combination of multiple adjacent printed characters 210 is at an imaging position corresponding to the bottom of the imaging device 30, so as to perform zoned photography and imaging of the product 200.
[0057] For example, for Figure 4 The product 200 shown can be photographed at the left side L, the middle part M, and the right side R, that is, the following three positions are taken in sequence: Figure 5 The first sub-image G1, the second sub-image G2 and the third sub-image G3 are shown in the figure. The first sub-image G1 includes the second and third structural holes K1 on the left side L of the product 200 and the corresponding images of the printed characters 210; the second sub-image G2 includes the fourth and sixth structural holes K1 in the middle part M of the product 200 and the corresponding images of the printed characters 210; the third sub-image G3 includes the seventh structural hole K1 on the right side R of the product 200 and the corresponding images of the printed characters 210.
[0058] In this embodiment, the imaging device 30 may use a CCD camera. Optionally, the printed character detection device 100 further includes a bracket 70 and a coaxial light source 31; the bracket 70 is mounted on the base 52. The bracket 70 includes two vertical plates 71, a crossbeam 72 and a vertical plate 73. Among them, the two vertical plates 71 are respectively erected on both sides of the slide rail 20, the crossbeam 72 is connected to the upper ends of the two vertical plates 71, and the vertical plate 73 is connected to the middle position of the crossbeam 72 and is located above the slide rail 20. The imaging device 30 is installed on the side of the vertical plate 73 away from the slide rail 20, and the coaxial light source 31 is located between the imaging device 30 and the slide rail 20. Optionally, the printed character detection device 100 further includes a manual slide 74; the manual slide 74 is mounted on the vertical plate 73, the imaging device 30 is mounted on the manual slide 74, and the imaging device 30 can adjust its position in the second direction Y and the third direction Z through the manual slide 74, wherein the second direction Y is along the vertical direction, and the third direction Z is perpendicular to the first direction X and perpendicular to the second direction Y.
[0059] Based on this structure, the imaging process of the first sub-image G1, the second sub-image G2 and the third sub-image G3 of the product image is as follows:
[0060] The operator positions and installs the product 200 on the positioning fixture 10. The slide rail 20 drives the positioning fixture 10 and the product 200 thereon to correspond to the left side L, the middle part M, and the right side R below the imaging device 30, respectively, corresponding to the imaging position. The coaxial light source 31 is turned on to illuminate the product 200, and the imaging device 30 sequentially captures and obtains the first sub-image G1, the second sub-image G2, and the third sub-image G3.
[0061] When the product 200 of different shape and size needs to be replaced or the imaging clarity is poor due to other reasons, the position of the imaging device 30 in the second direction Y and / or the third direction Z can be fine-tuned by the manual slide 74 to adjust the object distance, improve the imaging quality, and improve the detection accuracy. The specific structure of the manual slide 74 can be set as needed.
[0062] The detection and analysis module 40 in this embodiment can be integrated on the frame 50 or can be an independent computer. The detection and analysis module 40 is electrically connected to the imaging device 30 to receive product images from the imaging device 30, such as the first sub-image, the second sub-image and the third sub-image.
[0063] The detection and analysis module 40 includes a memory, which pre-stores a template image of the printed characters 210 of the product 200, and includes a calculation unit, which can compare the character area with the corresponding template image to obtain the degree of difference between the character area and the corresponding template image, and compare the degree of difference with a preset allowable difference range. If the degree of difference is within the allowable difference range, the printed characters 210 in the character area are determined to be qualified, otherwise they are determined to be unqualified.
[0064] See again Figure 1 The printed character detection device 100 in this embodiment may also include a button box 54, a safety grating 55, a display screen 56, a three-color light 57, a fan 58, a universal wheel 59, a switch door 60, a door switch detection sensor 61 and other structures.
[0065] Among them, the display screen 56 is electrically connected to the detection and analysis module 40 and the imaging device 30, and can display the image captured by the imaging device 30, the analysis result of the detection and analysis module 40, etc. The safety grating 55 is installed on both sides of the opening 53 at the front end of the outer frame 51, and is electrically connected to the slide rail 20. When the safety grating 55 senses the hand of the operator, the movement of the slide rail 20 is restricted. Only when the operator's hand is sensed to leave the opening 53, the slide rail 20 can be driven to move to ensure safe operation. The three-color light 57 can be set at a conspicuous position at the top of the outer frame 51, and indicates different operating states of the printed character detection device 100, such as normal operation, stop, etc., through optical signals. The switch door 60 is set on one side of the outer frame 51 and is only opened in special circumstances such as maintenance. The door switch detection sensor 61 is set near the switch door 60, and can sense the state of the switch door 60, and prevent the operation of the slide rail 20 when the switch door 60 is in the open state, ensuring safe use. The universal wheel 59 is located at the bottom of the outer frame 51 to facilitate the movement of the entire printed character detection device 100. The fan 58 is installed on the outer frame 51 to dissipate heat for the printed character detection device 100 .
[0066] The overall shape of the printed character detection device 100 in this embodiment can be set to be 850 mm in length, 800 mm in width and 1700 mm in height, respectively, so as to facilitate the use by the operator and occupy a reasonable area.
[0067] See also Figure 6 The embodiment of the present application further provides a printed character detection method. Based on the aforementioned printed character detection device 100, the printed character detection method includes:
[0068] Loading: Position and install the product 200 to be inspected on the positioning fixture 10, and drive it to the imaging position through the slide rail 20;
[0069] Imaging, starting the imaging device 30 to capture and obtain a product image;
[0070] Comparative analysis uses the detection and analysis module 40 to compare each character area on the product image (such as the first sub-image G1) with the template image corresponding to the character, to obtain the degree of difference between the character area and the corresponding template image, and to compare the degree of difference with a preset allowable difference range. If the degree of difference is within the allowable difference range, the printed character 210 is considered qualified, otherwise it is considered unqualified.
[0071] As described above, the product 200 is provided with a plurality of printed characters 210 spaced apart along the first direction X, and the slide rail 20 can drive the product 200 to move along the first direction X, so that each printed character 210 or a combination of a plurality of adjacent printed characters 210 corresponds to the imaging device 30, and the imaging device 30 forms images to obtain a plurality of sub-images, such as the aforementioned first sub-image G1, the second sub-image G2, and the third sub-image G3;
[0072] The detection and analysis module 40 pre-stores a plurality of template images, each corresponding to a plurality of printed characters 210;
[0073] Each character region of each sub-image is compared with the corresponding template image to obtain a result of whether the corresponding printed character 210 is qualified.
[0074] In this embodiment, the aforementioned comparative analysis step further includes:
[0075] Mask the area outside the character area of the product image to reduce the impact of stains or other conditions;
[0076] The detection and analysis module 40 compares and analyzes the character area on the product image after masking with the template image corresponding to the character.
[0077] The content of comparative analysis includes comparative analysis of character defects and comparative analysis of character positions.
[0078] Among them, the comparative analysis method for character defects includes: comparing the grayscale of each character area on the product image and the corresponding pixel of the corresponding template image, if the difference in the grayscale of the corresponding pixel is within a preset difference threshold, the pixel on the product image is determined to be a defective pixel, and multiple defective pixels connected together constitute a first defective area; wherein the difference threshold can be selected between 0-255 as needed, such as being set to 64; for example, if the grayscale of a pixel on the template image is 20, and the grayscale of the corresponding pixel on the product image is 85, the difference between the two is 65, which is greater than the difference threshold 64, then the pixel is determined to be a defective pixel; for all defective pixels, the connected ones are connected together to obtain a number of first defective areas;
[0079] If there are two adjacent first defect areas among the multiple first defect areas obtained after the grayscale comparison, the adjacent first defect areas are expanded so that the two adjacent first defect areas are connected together to form a second defect area, wherein the adjacent first defect areas refer to first defect areas with a spacing within a set range (a value of 0-16, such as 2 pixels), and the expansion operation refers to expanding the area of one of the two adjacent first defect areas until it connects with the other first defect area to form a second defect area. The expansion operation can be implemented by filling the two adjacent first defect areas; the second defect area after the expansion operation and the first defect area that exists alone are greater than the set minimum area (such as the area is within 3 pixels) are identified as third defect areas; if the total area of the third defect area is less than the allowable range (such as 1% of the printed character 210), it is determined that the character shape is qualified, otherwise it is determined to be unqualified; the unqualified situations in the comparative analysis of character defects mainly include character reprinting, flaws, spots, high degree of blur, etc.
[0080] In another embodiment, it is also possible to determine whether the characters are defective by comparing the character area on the product image with the character area on the template image.
[0081] The comparative analysis method for character positions includes: obtaining the distance between a reference feature (such as a reference point) of the character on the product image and a reference reference on the product image; if the distance meets the requirements, the character position is deemed qualified, otherwise it is deemed unqualified; wherein the reference reference is a feature of a structural hole K1 on the corresponding product 200 on the product image.
[0082] See also Figure 7 ,for Figure 5 For the printed characters with arrows on the left side of the middle part M, the edge detection tool can be used to find the edge lines L1 and L2 on both sides of the arrows, and the midline L3 of the two edge lines can be calculated. The intersection Q1 of the midline and the patch at the end of the arrow is used as the reference feature of the character; the corresponding structural hole K1 is close to the edge line L4 of the character as the reference reference, and the spacing d1 from the intersection to the edge line is calculated. If the spacing d1 meets the requirements, such as the spacing difference with the corresponding feature on the template image is within the allowable range (such as within 1%), the character position is considered qualified; otherwise, the character position is considered unqualified, that is, the position does not meet the requirements.
[0083] When both the character defect analysis and the character position analysis in the comparative analysis are qualified, a detection pass signal is output, otherwise a detection fail signal is output.
[0084] For products or printed characters that fail the inspection, manual retesting or repair can be performed.
[0085] In addition, after performing detection using the printed character detection device 100 or the printed character detection method of the present application, the relevant data can be sorted and saved, such as saving and exporting an EXCEL document, to facilitate subsequent analysis.
[0086] The printed character detection device 100 and method in the embodiment of the present application have at least one of the following beneficial effects:
[0087] 1. The machine replaces manual labor, takes photos efficiently to identify the features of printed characters, completes the determination of character positions and character defects, improves detection efficiency and determination accuracy, reduces customer complaints, and reduces employee labor intensity; in practice, it is measured that the accuracy of employee visual detection is 97%, and the detection accuracy of this solution is more than 99.9%; manual detection takes 11 seconds per piece, and products with disputes that cannot be determined need to be confirmed again, while this solution takes 9 seconds per piece, and the detection data is intuitive and easy to view;
[0088] 2. Use a dual-axis manual slide to adjust the object distance arbitrarily and improve detection accuracy;
[0089] 3. The positioning fixture is designed to ensure the flatness of the detection surface, and the positioning protrusion with rounded corners is convenient for manual placement;
[0090] 4. The product character position and defect data can be summarized, and unstable factors can be visually viewed to continuously improve the product ink printing quality.
[0091] The above implementation modes are only used to illustrate the technical solutions of the present application and are not intended to limit the present application. Although the present application has been described in detail with reference to the above preferred implementation modes, a person skilled in the art should understand that the technical solutions of the present application may be modified or replaced by equivalents without departing from the spirit and scope of the technical solutions of the present application.
Claims
1. A printed character detection method, characterized in that: Based on the printed character detection device, the printed character detection device comprises: Positioning fixture, used to hold the product to be tested; A slide rail, used to carry the positioning jig, and capable of driving the positioning jig and the product carried on the positioning jig to move to an imaging position; an imaging device for acquiring a product image of a product located at an imaging position, the product image including a character area corresponding to printed characters of the product; and a detection and analysis module, electrically connected to the imaging device, and used to receive the product image from the imaging device; the detection and analysis module pre-stores a template image of the printed characters of the product, and is capable of comparing the character area with the corresponding template image to obtain the degree of difference between the character area and the corresponding template image, and comparing the degree of difference with a preset allowable difference range; if the degree of difference is within the allowable difference range, the printed characters in the character area are deemed qualified, otherwise they are deemed unqualified; The printed character detection method comprises: Loading: Position the product to be inspected on the positioning fixture and drive it to the imaging position through the slide rail; Imaging, starting an imaging device to capture and obtain an image of the product; and, Comparative analysis: using the detection and analysis module to compare the character area on the product image with the corresponding template image, obtain the difference between the character area and the corresponding template image, and compare the difference with the preset allowable difference range. If the difference is within the allowable difference range, the printed characters are considered qualified, otherwise they are considered unqualified. The comparison and analysis step further includes: performing mask processing on the area outside the character area of the product image, and the detection and analysis module performing comparison and analysis on the character area on the product image after the mask processing and the template image corresponding to the character; The content of comparative analysis includes comparative analysis of character defects and comparative analysis of character positions; Among them, the comparative analysis method for character defects includes: performing grayscale comparison on corresponding pixels of each character area on the product image and the corresponding template image, if the difference in grayscale of the corresponding pixel is within a preset difference threshold, the pixel on the product image is determined to be a defective pixel, and multiple defective pixels connected together constitute a first defect area; if there are two adjacent first defect areas among the multiple first defect areas obtained after the grayscale comparison, the adjacent first defect areas are expanded so that the two adjacent first defect areas are connected together to form a second defect area, wherein the adjacent first defect areas refer to first defect areas with a spacing within a set range, and the expansion operation refers to expanding the area of one of the two adjacent first defect areas until it is connected to the other first defect area to form a second defect area; the second defect area after the expansion operation and the first defect area that exists alone are greater than the set minimum area. The area is determined as a third defect area; if the total area of the third defect area is less than the allowable range, it is determined that the character shape is qualified, otherwise it is determined to be unqualified; The comparative analysis method for character positions includes: obtaining the distance between the baseline feature of the character on the product image and the reference baseline on the product image; if the distance meets the requirements, the character position is deemed qualified, otherwise it is deemed unqualified; wherein the reference baseline is the feature of the structural hole on the corresponding product on the product image.
2. The printed character detection method according to claim 1, characterized in that: The product is provided with a plurality of printed characters spaced apart along a first direction; The slide rail can drive the product to move along the first direction, so that each of the printed characters or a combination of a plurality of adjacent printed characters corresponds to an imaging device, and the imaging device forms images to obtain a plurality of sub-images; The detection and analysis module pre-stores a plurality of template images, each corresponding to the plurality of printed characters; Each character area of each sub-image is compared with the corresponding template image to obtain the result of whether the corresponding printed character is qualified.
3. The printed character detection method according to claim 1, characterized in that: The printed character detection device also includes a base; The slide rail is installed on the base, and the positioning fixture is slidably installed on the slide rail along a first direction, and the first direction is a horizontal direction.
4. The printed character detection method according to claim 3, characterized in that: The printed character detection device also includes a bracket and a coaxial light source; The bracket is mounted on the base; the bracket includes a vertical plate, and the vertical plate is located above the slide rail; The imaging device is installed on a side of the vertical plate away from the slide rail, and the coaxial light source is located between the imaging device and the slide rail.
5. The printed character detection method according to claim 4, characterized in that: The printed character detection device also includes a manual slide table; The manual slide is mounted on the vertical plate, the imaging device is mounted on the manual slide, and the imaging device can adjust its position in the second direction and the third direction through the manual slide, wherein the second direction is along the vertical direction, and the third direction is perpendicular to the first direction and perpendicular to the second direction.
6. The printed character detection method according to claim 3, characterized in that: The product extends along a first direction and has a plurality of printed characters spaced apart along the first direction; The slide rail is an electronic slide rail, and can drive the product to move along the first direction until each of the printed characters or a combination of multiple adjacent printed characters is at a position corresponding to the imaging position.
7. The printed character detection method according to claim 1, characterized in that: The positioning fixture comprises a main body and two positioning protrusions respectively protruding from the upper surface of the main body. The upper surface of the main body is adapted to the inner side surface of the product, and the two positioning protrusions are respectively adapted to cooperate with two positioning holes of the product.
Citation Information
Patent Citations
Character defect detection method and device based on morphology
CN109142383A