Print inspection apparatus, print inspection method, and program

The printing inspection apparatus addresses the challenge of inspecting deformed characters on curved surfaces by adjusting reference patterns for deformation, achieving both high accuracy and speed in character inspection.

JP7701686B2Active Publication Date: 2025-07-02N TECH +2
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022519944
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2020-05-08
Filing Date
2021-04-28
Publication Date
2025-07-02
Estimated Expiration
2041-04-28

Smart Images

  • Figure 0007701686000001
    Figure 0007701686000001
  • Figure 0007701686000002
    Figure 0007701686000002
  • Figure 0007701686000003
    Figure 0007701686000003
Patent Text Reader

Abstract

A print inspection device is provided with a camera for imaging the characters printed to an inspection object, a shape matching processing unit (33), a deformed pattern generation unit (34), and an inspection processing unit (35). The shape matching processing unit (33) verifies, with regard to a shape, the imaged character pattern included in the captured image acquired by the camera against a preset reference character pattern while changing the deformed degree of the reference character pattern, and searches for a matched character of which the degree of similarity of the shape of the imaged character pattern to the reference character pattern is greater than or equal to a threshold. The deformed pattern generation unit (34) generates a deformed character pattern from the reference character pattern by deformation thereof with the degree of deformation at the time the characters matched in the shape matching process. The inspection processing unit (35) inspects the acceptability of the print state of characters on the basis of the result of comparison of the deformed character pattern with the imaged character pattern.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a printing inspection apparatus, a printing inspection method, and a program for inspecting characters printed on an object.

Background Art

[0002] Conventionally, for example, a printing inspection apparatus that uses pattern matching to inspect the printing state of characters indicating an expiration date or the like printed on a beverage container (object) is known (for example, Patent Documents 1 to 3). In this type of printing inspection apparatus, the characters printed on the inspection target are photographed by a camera, and the similarity between them is calculated by performing pattern matching between the photographed character pattern of the photographed characters and a template including a reference character pattern registered in advance, and the pass / fail of the printing state is determined based on whether or not the similarity reaches a preset threshold value.

[0003] In the printing inspection apparatus described in Patent Document 1, matching processing is performed while collating a divided template for each region obtained by dividing the image region for one character. Further, in the printing inspection apparatus described in Patent Document 2, a dot pattern is registered, and the relative positional relationship between the registered pattern with a high degree of coincidence and each dot is digitized for inspection. Furthermore, in the printing inspection apparatus described in Patent Document 3, it is collated with a standard character mask having a plurality of areas with deductions set, and inspection is performed based on the calculated score.

Prior Art Documents

Patent Documents

[0004]

Patent Document 1

Patent Document 2

Patent Document 3

Summary of the Invention

Problems to be Solved by the Invention

[0005] However, if the printed surface of the inspection target is a curved surface or the like, or if the angle between the camera and the printed surface is inclined, even if the characters are correctly printed on the printed surface, the characters may be imaged with deformation. In the printing inspection apparatuses described in Patent Documents 1 to 3, even if they can cope with this kind of character deformation, or even if they can cope with character deformation, it is necessary to register a large number of templates according to the degree of character deformation and perform matching processing, so the inspection processing takes a long time. For example, when inspecting characters printed on an inspection target such as a container conveyed on a factory line, it is necessary to achieve both high inspection accuracy and high inspection speed for the characters. However, with conventional printing inspection apparatuses, it has been difficult to achieve both high inspection accuracy and high inspection speed for characters. Therefore, there is a demand for a printing inspection apparatus that can achieve both high inspection accuracy and high inspection speed for characters even when the imaged characters are deformed.

[0006] An object of the present invention is to provide a printing inspection apparatus, a printing inspection method, and a program that can achieve both high inspection accuracy and high inspection speed for characters printed on an inspection target.

Means for Solving the Problems

[0007] The printing inspection apparatus for solving the above problems is a printing inspection apparatus for inspecting characters printed on an inspection target, including: an imaging unit that images a region including a portion on which the characters of the inspection target are printed; a shape matching processing unit that collates an imaged character pattern included in the captured image acquired by the imaging unit with a preset reference character pattern while changing the degree of deformation of the shape of the reference character pattern, and searches for a matched character whose similarity in shape between the imaged character pattern and the reference character pattern is equal to or greater than a threshold value; a deformed pattern generation unit that generates a deformed character pattern obtained by deforming the reference character pattern by the degree of deformation when the characters are matched in the shape matching processing; and an inspection processing unit that inspects the quality of the printing state of the characters based on a comparison result between the deformed character pattern and the imaged character pattern.

[0008] According to this configuration, a shape matching process is performed to collate the captured character pattern and the reference character pattern with respect to the shape while changing the degree of deformation of the shape of the reference character pattern. A matching character is searched for in which the similarity between the captured character pattern and the reference character pattern is equal to or greater than a threshold value. A deformed character pattern is generated by deforming the reference character pattern with the degree of deformation when the characters match. The quality of the printing state of the characters is inspected based on the comparison result between the deformed character pattern and the captured character pattern. Therefore, even if the characters printed on the inspection target are deformed within the allowable range, the quality of the characters is inspected from the comparison result between the deformed character pattern obtained by deforming the reference character pattern in accordance with the deformation and the captured character pattern. Therefore, it is possible to achieve both the inspection accuracy and the inspection speed of the characters printed on the inspection target.

[0009] In the above printing inspection apparatus, the shape matching processing unit collates a divided reference character pattern obtained by dividing the reference character pattern into a predetermined number of divisions and a divided character pattern obtained by dividing the captured character pattern by the number of divisions with respect to the shape while changing the degree of deformation of the divided reference character pattern, and searches for a matching divided reference character pattern in which the similarity of the shape between the divided character pattern and the divided reference character pattern is equal to or greater than a threshold value. The shape matching process is performed for each divided region. The deformed pattern generation unit may generate a plurality of divided deformed character patterns for each divided region based on the degree of deformation and the divided reference character pattern for each divided region, and synthesize the plurality of divided deformed character patterns into one character to generate the deformed character pattern.

[0010] According to this configuration, the deformed character pattern is generated by synthesizing the divided reference character patterns that have been matched in the shape matching process performed for each divided region into one character with their respective degrees of deformation. Therefore, the inspection accuracy of the printed characters can be further improved.

[0011] In the above printing inspection apparatus, the number of divisions of the divided reference character pattern may be individually set for each character.

[0012] According to this configuration, since the number of divisions of the division reference character pattern is individually set for each character, it is possible to improve the inspection accuracy of characters while suppressing a decrease in the inspection speed of the printed characters.

[0013] In the above printing inspection apparatus, at least one of the division reference character patterns includes an oblique dividing line in which a dividing line that divides a rectangular area including the division reference character pattern intersects at an acute angle with the side of the rectangular area, and the oblique dividing line may be divided into three or more divisions by a plurality of dividing lines including two or more of the oblique dividing lines.

[0014] According to this configuration, it is possible to further improve the inspection accuracy of the printed characters as compared with the case where the division is made only by dividing lines composed of lines parallel to the sides of the rectangular area.

[0015] In the above printing inspection apparatus, the shape matching processing unit may change the degree of deformation by changing at least one of the size and the rotation angle of the reference character pattern.

[0016] According to this configuration, in the shape matching process, since the shape of the character is collated while changing at least one of the size and the rotation angle of the reference character pattern, it is possible to further improve the inspection accuracy of the printed characters.

[0017] In the above printing inspection apparatus, the inspection processing unit generates an inspection area specific image superimposed on the position where the deformed character pattern is matched with a character area including the captured character pattern in the captured image, and inspects the quality of the printing state of the character by performing a shading inspection on the background image other than the deformed character pattern in the inspection area specific image.

[0018] According to this configuration, it is possible to inspect the presence or absence of printing defects such as printing misalignment, dirt, and bleeding in the printed characters, so that the quality of the printing state of the characters can be accurately inspected.

[0019] In the above-described printing inspection apparatus, the inspection processing unit may generate an inspection region specific image superimposed on a position where the deformed character pattern matches a character region including the captured character pattern in the captured image, and inspect the quality of the printing state of the character by performing a shading inspection on a region of the deformed character pattern in the inspection region specific image.

[0020] According to this configuration, for the printed characters, it is possible to inspect the presence or absence of printing defects such as printing misalignment, bleeding, and dot missing, so that the quality of the printing state of the characters can be accurately inspected.

[0021] In the above-described printing inspection apparatus, the inspection processing unit may inspect the quality of the printing state of the character by performing a shading inspection on a combined character region obtained by combining the region of the deformed character pattern superimposed on a position matching the character region including the captured character pattern in the captured image and the region of the captured character pattern.

[0022] According to this configuration, for the characters printed on a print surface that is easily deformed, it is possible to inspect the presence or absence of printing defects such as printing misalignment, bleeding, and dot missing, so that the quality of the printing state of the characters can be accurately inspected and the inspection results are stable.

[0023] The printing inspection method for solving the above problems is a printing inspection method for inspecting characters printed on an inspection target, including an imaging step of imaging an area including a portion where the characters of the inspection target are printed, an imaging character pattern included in the imaging image obtained in the imaging step, and a preset reference character pattern, and performing a shape matching process of collating the shapes while changing the degree of deformation of the shape of the reference character pattern, and searching for a matched character whose similarity in shape between the imaging character pattern and the reference character pattern is equal to or greater than a threshold value; a deformed pattern generation step of generating a deformed character pattern obtained by deforming the reference character pattern with the degree of deformation when the characters are matched in the shape matching process; and an inspection process step of inspecting the quality of the printing state of the characters based on the comparison result between the deformed character pattern and the imaging character pattern. According to this printing inspection method, the same effect as the above printing inspection apparatus can be obtained.

[0024] The program for solving the above problems is a program executed by a computer that performs a character inspection process for inspecting characters included in a target image, causing the computer to collate the imaging character pattern included in the target image and a preset reference character pattern in terms of shape while changing the degree of deformation of the shape of the reference character pattern, a shape matching process step of calculating the similarity in shape between the imaging character pattern and the reference character pattern; a deformed pattern generation step of generating a deformed character pattern obtained by deforming the reference character pattern with the degree of deformation when the similarity is equal to or greater than a threshold value; and an inspection process step of inspecting the quality of the printing state of the characters based on the comparison result between the deformed character pattern and the imaging character pattern. By causing the computer to execute this program, the same effect as the above printing inspection apparatus can be obtained.

Effects of the Invention

[0025] According to the present invention, it is possible to achieve both high inspection accuracy and high inspection speed for characters printed on an inspection target.

Brief Description of the Drawings

[0026]

Figure 1

Figure 2

Figure 3

Figure 4

Figure 5

Figure 6

Figure 7

Figure 8

Figure 9

Figure 10

Figure 11

Figure 12

Figure 13

Figure 14

Figure 15

Figure 16

MODE FOR CARRYING OUT THE INVENTION

[0027] Hereinafter, an embodiment of the present invention embodied in a printing inspection apparatus for inspecting the printing state of characters indicating the manufacturing date, etc. printed on a beverage container containing beverages such as beer and juice, and a printing inspection method using the same apparatus will be described with reference to the drawings.

[0028] As shown in FIG. 1, the printing inspection apparatus 11 is disposed in the vicinity of a belt conveyor 13 that sequentially conveys a plurality of beverage containers 12, which are an example of an inspection target, from the upstream side to the downstream side in the conveyance direction indicated by the arrow in FIG. 1. Each beverage container 12 is conveyed by the belt conveyor 13. As shown in FIGS. 2 and 3, on a predetermined region on the outer peripheral surface 12a of each beverage container 12, a character string 20 composed of a plurality of characters 21 including the manufacturing date is printed by an inkjet printer (not shown).

[0029] As shown in FIGS. 2 and 3, in the present embodiment, the character string 20 to be printed includes a lot number and the manufacturing date. In the example shown in FIG. 3, on the beverage container 12, as the character string 20, for example, a lot number "ABC123" and a manufacturing date "February 2020" are printed in two upper and lower lines. The lot number is represented by characters 21 composed of alphabets, numbers, and symbols, and the manufacturing date is represented by characters 21 composed of numbers and Chinese characters "year" and "month". Note that the character string 20 may be the manufacturing date instead of the manufacturing date. Further, instead of the manufacturing date indicating the manufacturing time, it may be the expiration date or the consumption date, etc. Furthermore, the character string 20 may be only the lot number.

[0030] As shown in FIG. 1, the printing inspection device 11 includes a control unit 15 that controls the operating state of the printing inspection device 11. The control unit 15 is electrically connected to an optical sensor 16 that detects each beverage container 12 conveyed by a belt conveyor 13, and a camera 17 as an example of an imaging unit that images characters 21 (see FIG. 2) printed in a predetermined area of the beverage container 12 detected by the optical sensor 16. Further, the control unit 15 is electrically connected to an exclusion mechanism 18 that excludes the beverage container 12 determined to have a printing defect from the belt conveyor 13. The control unit 15 inputs a detection signal for detecting the beverage container 12 from the optical sensor 16 and drives and controls the camera 17 and the exclusion mechanism 18. When the control unit 15 inputs a detection signal from the optical sensor 16, it outputs an imaging instruction signal to the camera 17 to cause the camera 17 to image the character string 20 printed on the beverage container 12.

[0031] As shown in FIG. 2, the camera 17 images a predetermined area including the character string 20 printed on the beverage container 12. The image data captured by the camera 17 is transmitted to the control unit 15. Note that the orientation of the beverage container 12 during conveyance is adjusted so that the pre-printed character string 20 faces the front of the camera 17.

[0032] As shown in FIG. 3, when printing is performed on a curved surface such as the outer peripheral surface 12a of the beverage container 12, the distance from the camera 17 to the character 21 varies depending on the position of the character 21. Due to this difference in distance, the size of the character 51 (see FIG. 7) imaged by the camera 17 varies. Also, when printing is performed on a curved surface such as the outer peripheral surface 12a of the beverage container 12, the angle formed between the printed surface on which the character 21 is printed and the optical axis of the camera 17 varies depending on the position of the character 21. Due to this difference in angle, a difference corresponding to the degree of deformation occurs in the character 51 imaged by the camera 17. Further, in the example shown in FIG. 3, a circumferential groove-shaped recess 12b is formed so as to intersect the printed surface of the beverage container 12, and the character 51 is also deformed by this type of recess 12b.

[0033] As shown in FIG. 4, the control unit 15 includes a computer 30, and the computer 30 includes a CPU and a storage unit 31 composed of a ROM and a RAM. Then, the computer 30 includes, as a component composed of software that is activated by executing a printing inspection program stored in the storage unit 31, an OCR (Optical Character Recognition) inspection unit 32, a shape matching processing unit 33, a deformation pattern generation unit 34, an inspection processing unit 35, an exclusion processing unit 36, and a display processing unit 37.

[0034] The OCR inspection unit 32 captures the printed characters with the camera 17, reads them as an image, compares them with the data to recognize the characters and convert them into electronic text, and inspects the characters based on the text data of the characters. In the storage unit 31, data of characters that can be recognized by the OCR inspection unit 32 in advance is stored. The OCR inspection unit 32 recognizes the character 21. If there is even one unrecognizable character in the character string 20, the OCR inspection unit 32 determines that there is a printing defect. When the character 21 is recognized by the OCR inspection unit 32, the position of the recognized character 21 is specified.

[0035] The shape matching processing unit 33 collates the captured character pattern 53 (see FIG. 8) for each character included in the captured image acquired by the camera 17 with the reference character pattern 41 (see FIG. 5), which is a preset reference character pattern for each character, while changing the degree of deformation of the shape of the reference character pattern 41. The shape matching processing unit 33 calculates the similarity of the shape of the captured character pattern 53 to the reference character pattern 41 by this collation. The shape matching processing unit 33 searches for the matched characters whose similarity of the shape of the captured character pattern 53 to the reference character pattern 41 is equal to or greater than the threshold value.

[0036] The shape matching processing unit 33 includes a deformation processing unit 38. The deformation processing unit 38 performs a deformation process of deforming the reference character pattern 41 of the template 40 and the division reference character patterns 41a, 41b, etc. of the division template 42 by a predetermined degree of deformation. In the present embodiment, the deformation processing unit 38 changes the reference character pattern 41 or the division reference character patterns 41a, 41b, etc. by a predetermined degree of deformation by changing at least one of the character size and the character rotation angle.

[0037] The deformation pattern generation unit 34 generates a deformed character pattern 46 (FIGS. 10(g), 11(c)) by deforming the reference character pattern 41 by the degree of deformation when the character matches in the shape matching process. When the deformed character pattern 46 is superimposed on the captured character pattern 51P (see FIG. 8), a considerably large part of the correctly printed part of the captured character pattern 51P overlaps with the deformed character pattern 46.

[0038] The inspection processing unit 35 inspects the quality of the printing state of the character 21 based on the comparison result between the captured character pattern 51P and the deformed character pattern 46. The inspection processing unit 35 generates an inspection area specific image 60 (see FIG. 12) in which the deformed character pattern 46 is superimposed at the position where it matches the character area 52 including the captured character pattern 51P in the captured image, and performs a shading inspection for detecting a printing defect based on the shading (density) of the inspection specific area of the inspection area specific image 60. Details of this shading inspection will be described later.

[0039] As shown in FIG. 4, when the inspection result indicating a printing defect is obtained as a result of the printing inspection by the inspection processing unit 35, the exclusion processing unit 36 drives and controls the exclusion mechanism 18 to exclude the beverage container 12 with a printing defect from the belt conveyor 13.

[0040] The display processing unit 37 performs display processing to cause the monitor 19 to display the inspection results by the inspection processing unit 35. If the printing state of the character string 20 printed on the beverage container 12 is good as a result of the inspection, the display processing unit 37 causes the monitor 19 to display the character "GOOD" indicating that. Also, if the printing state of the character 21 printed on the beverage container 12 is a printing defect, which is a defective state, as a result of the inspection, the display processing unit 37 causes the monitor 19 to display the character "NG" indicating that.

[0041] The storage unit 31 stores the template 40 (master) shown in Fig. 5(a) used in the shape matching process and the division template 42 (division master) shown in Fig. 5(b) obtained by dividing the reference character pattern 41 into a plurality of parts. The template 40 includes the reference character pattern 41 which is a reference character pattern. Also, the division template 42 includes the divided reference character patterns 41a, 41b, etc. obtained by dividing the reference character pattern 41.

[0042] In the present embodiment, for the reference character pattern 41 included in the template 40 shown in Fig. 5(a), there are prepared uppercase and lowercase alphabets from "A" to "Z" (not shown), symbols such as " / ", and numerals from "0" to "9". Also, the division template 42 is a template obtained by dividing at least a part of the reference character pattern 41 included in the template 40 into a plurality of parts as needed. In the example shown in Fig. 5, one template 40 is shown for each character, but a plurality may be prepared for each character. Also, the template 40 includes the reference character pattern 41 representing the outline of the character. For example, a captured character pattern of a non-defective product whose printing state is qualified may be stored (registered) in the storage unit 31, and the control unit 15 may perform contour extraction processing such as edge detection processing on the captured character pattern of the non-defective product to generate the templates 40 and 42 used for shape matching before the start of inspection.

[0043] 6(a) and (b) show examples of division template 42. FIG. 6(a) is an example in which "2" is divided into two parts, top and bottom, and FIG. 6(b) is an example in which "moon" is divided into three parts. Division template 42 is composed of a plurality of division templates 42a, 42b, etc., which are obtained by dividing template 40, which is a rectangular area, into a plurality of areas by one or more division lines. The boundaries of each of the divided division templates partially overlap. The number of divisions is determined according to the shape of reference character pattern 41.

[0044] For example, the divided template 42 for the character "2" shown in Fig. 6(a) is made up of two divided templates 42a and 42b obtained by dividing the rectangular region template 40 including the character "2" into two halves, one above the other. The upper divided template 42a is divided by a horizontal dividing line 43a, and the lower divided template 42b is divided by a horizontal dividing line 43b.

[0045] 6(b), a dividing template 42 for a rectangular area including a Chinese character such as "月" (moon) is made up of three divided templates 42a, 42b, and 42c obtained by dividing the template 40 for "月" by Y-shaped dividing lines 43a, 43b, and 43c. The top divided template 42a is divided by dividing line 43a, which is a vertical line parallel to the side of the rectangular area and a diagonal line that forms an acute angle with the horizontal line. The left divided template 42b is divided by dividing line 43b, which is a vertical line and a diagonal line parallel to the side of the rectangular area, and the right divided template 42c is divided by dividing line 43c, which is a vertical line and a diagonal line.

[0046] Here, if the "moon" template 40 is divided into an upper and lower half and a left and right half, there is a possibility that the two divided templates will each match only one of the two halves of the target character "moon." If the "moon" template 40 is divided into thirds by horizontal dividing lines in the vertical direction, two of the three divided templates will have similar shapes, and there is a possibility that two of them will match one of the three thirds of the target character.

[0047] Therefore, in the present embodiment, as shown in FIG. 6(b), the splitting template 42 divides the template 40 of "month" into three parts by Y-shaped dividing lines 43a, 43b, and 43c. In this way, in the present embodiment, at least one of the dividing lines 43a, 43b, and 43c is an oblique line. Note that the boundary portion of the splitting template 42 overlaps by several pixels (for example, 3 to 5 pixels).

[0048] FIG. 7 shows an image captured by the camera 17. As shown in FIG. 7, in the captured image, the character string 50 is located within a predetermined printing area 50A. Among the character string 50, the characters 51 located near the center captured near the front of the camera 17 are relatively large in size and have a small degree of deformation. Also, in the horizontal direction, as going from the central part to both ends of the character string 50, the size of the character 51 becomes smaller and the degree of deformation of the character 51 becomes larger. Further, the direction in which the character 51 is deformed (rotated) changes according to the angle formed by the optical axis of the camera 17 and the printing surface. Depending on the difference in each printing surface, the character 51 may be deformed (rotated) in the clockwise direction or the counterclockwise direction in FIG. 7.

[0049] Note that in the present embodiment, the printing area 50A is defined from a region of a predetermined position and size of the beverage container 12. Also, the character area 52 is set to a range surrounding the character 51 according to the position and size of the character 51 recognized by the OCR inspection. This character area 52 is larger than the area of the template 40. Therefore, in the shape matching process, a search for characters that match the template 40 with a high degree of similarity is performed within the character area 52 for each character 51.

[0050] Incidentally, template matching includes shape matching processing (contour matching processing) for collating the outlines of characters adopted in this example and density matching processing for collating the density of characters. For example, there are cases where characters are printed with deformation or where characters are imaged with deformation due to the surface shape of the printing surface. When it is desired to match characters with a similarity equal to or higher than a threshold value, in density matching, it is necessary to prepare templates for each character with a different degree of deformation. Further, when the printing surface is a curved surface and the size of the characters varies depending on the distance between the camera 17 and the printing surface, in density matching, it is necessary to prepare templates for each character size. Furthermore, when the brightness is different, it is necessary to prepare templates for each different brightness. Thus, in density matching, it is necessary to prepare a large number of templates according to the degree of deformation of the characters, the character size, the brightness, etc.

[0051] When the characters 51 in the captured image are deformed, the frequency at which the similarity becomes equal to or higher than the threshold value (the frequency of matching) decreases, and even if the deformation of the characters is within the allowable range, the inspection result may be defective. For example, if a plurality of types of reference character patterns 41 are prepared for one character, the frequency at which the similarity becomes equal to or higher than the threshold value increases. However, the number of reference character patterns 41 that match the captured character pattern 53 becomes very large, and the matching process takes a long time. For example, the inspection of the characters cannot follow the conveyance speed of the beverage container 12 conveyed by the belt conveyor 13.

[0052] On the other hand, in the shape matching (contour matching) of the present embodiment, since the collation is performed while changing the degree of deformation of the reference character pattern 41 with respect to the shape of the pattern, even if the brightness of the characters, the density of the characters, and the degree of deformation of the characters (size / rotation angle) are different, it can be handled with one reference character pattern 41. For this reason, the number of matching times required for the inspection per character is small, so it is possible to cope with the inspection of the characters printed on the beverage container 12 being conveyed at a high conveyance speed. Further, since the template 40 and the division template 42 are information only on the outline of the character pattern, the storage capacity for storing in the storage unit 31 can be small. Thus, in the present embodiment, adopting the shape matching processing is the first reason for enabling high-speed inspection.

[0053] As shown in FIG. 8, before performing shape matching, the control unit 15 converts the captured character pattern 51P of the character area 52 into a captured character pattern 53 in which the shape (outline) of the character pattern is extracted by performing edge detection processing on the captured character pattern 51P in advance. In this example, a shape matching process using the template 40 is performed on the character area 54 including the captured character pattern 53.

[0054] Here, with reference to FIG. 9, the shape matching process will be described. As shown in FIG. 9(a), the shape matching processing unit 33 sequentially moves the template 40 of "A" within the character area 54 by a minute distance Δx (for example, 1 to 3 pixels) from the left side to the right side, and sequentially calculates the similarity at each position. At this time, the shape matching processing unit 33 performs shape matching while changing the degree of deformation of the reference character pattern 41 at each position. When the movement of one row in the X direction is completed, it moves to the next row by a minute distance Δy of a predetermined number of pixels from the upper side to the lower side, and similarly sequentially moves by a minute distance Δx from the left side to the right side in the next row, and sequentially calculates the similarity at each position. In this way, the shape matching process is performed on the entire area within the character area 54. When the similarity becomes equal to or greater than the threshold value, the shape matching processing unit 33 assumes that the reference character pattern 41 in the template 40 matches the captured character pattern 53 within the character area 54.

[0055] In this example, the deformation processing unit 38 changes the degree of deformation of the reference character pattern 41. The change in the degree of deformation includes a change in the character size and a change in the rotation angle. As shown in FIG. 9(b), shape matching processing is performed using a template 40A including a reference character pattern 41A in which the character size of the reference character pattern 41 is reduced. Further, as shown in FIG. 9(c), shape matching processing is performed using a template 40B including a reference character pattern 41B in which the character size of the reference character pattern 41 is increased. Further, as shown in FIG. 9(d), shape matching processing is performed using a template 40C including a reference character pattern 41C obtained by rotating the reference character pattern 41 by a counterclockwise rotation angle. Further, as shown in FIG. 9(e), shape matching processing is performed using a template 40D including a reference character pattern 41D obtained by rotating the reference character pattern 41 by a clockwise rotation angle. The character size changes in a plurality of steps within the allowable range of printing (for example, ±10%), and the rotation angle changes in a plurality of steps within the allowable range of printing (for example, ±10 degrees).

[0056] Further, in the storage unit 31 of the present embodiment, a plurality of types of templates 40 and split templates 42 having different resolutions may be stored. Then, the shape matching processing unit 33 may perform pyramid search for performing shape matching processing in order from low resolution to high resolution.

[0057] In the present embodiment, shape matching processing is performed in order from low resolution to high resolution. N levels of resolution of the lowest resolution D1, second resolution D2, …, nth resolution Dn (where n is a natural number of 2 or more) are set. In the present embodiment, an operator can select and set for the control unit 15 by an input operation of the input unit 14 while viewing a setting screen (not shown) of the monitor 19 the number of levels of resolution at which shape matching processing is to be performed.

[0058] As shown in FIGS. 10(a), (b), (d), and (f), assuming that the captured image has the n-th resolution Dn, the image of this n-th resolution is converted into low resolutions of D1, D2, …, Dn-1, and edge detection processing is performed to obtain a character region 54 including a captured character pattern 531 formed by the contour of the character pattern. In FIGS. 10(a) to (f), for each of the resolutions D1, D2, …, Dn, the character region 54 is denoted as character regions 541, 542, …, 54n, and the captured character pattern 53 is denoted as captured character patterns 531, 532, …, 53n. Also, for each of the resolutions D1, D2, …, Dn, the template 40 is denoted as templates 401, 402, …, 40n, and the reference character pattern 41 is denoted as reference character patterns 411, 412, …, 41n.

[0059] The shape matching processing unit 33 first performs shape matching processing on the character region 541 (FIG. 10(a)) including the captured character pattern 531 of the first resolution D1 using the template 401 of the same resolution (FIG. 10(c)). As a result of the shape matching, when a matched character with a similarity equal to or higher than the threshold value is searched for, the shape matching processing at that resolution D1 is terminated at that time, and then shape matching processing is performed on the character region 542 including the captured character pattern 532 of the second resolution D2, which is the next higher resolution, using the template 402 including the reference character pattern 412 of the same resolution. At this time, since the range 55 where the character matches is narrowed down from the position coordinates of the template 401 that matched at the previous resolution, the shape matching processing at the next second resolution D2 is performed within the narrowed-down range 55 (FIGS. 10(d) and (e)). This process is similarly performed for each of the resolutions D2 to Dn. Since the range 55 where the character matches is narrowed down from the position coordinates of the template that matched at the previous resolution, the shape matching processing at the next resolution is performed within the narrowed-down range 55 (FIGS. 10(f) and (g)). By performing such pyramid search, the shape matching processing unit 33 can quickly search for the character pattern in the image of the n-th resolution.

[0060] For example, when performing shape matching processing within the character region 54 at the n-th resolution without performing pyramid search, the matching process is carried out while moving the template 40 by a minute distance Δx (for example, the distance of one pixel) in the X direction. Next, it is shifted by one minute distance Δy in the Y direction, and at the shifted position in the Y direction, the matching process is carried out while shifting it by the minute distance Δx in the X direction one by one. And this is continued until the searched characters are all matched. In this case, at the n-th resolution, since the number of positions to be shifted for performing shape matching processing over the entire area of the character region 54 becomes enormous, the shape matching processing requires a long time. On the other hand, in pyramid search, the position of the captured character pattern 53 is narrowed down at high speed by performing shape matching processing at a low resolution, and by performing shape matching processing at a high resolution within the narrowed-down range 55, the total number of matching process times can be suppressed to a small number, and it is possible to search for the character pattern at the n-th resolution Dn at a higher speed. Thus, in this embodiment, performing pyramid search is the second reason for enabling high-speed inspection.

[0061] When a match is made in the shape matching process at the n-th resolution Dn, which is the highest resolution, the template 40 shown in Fig. 10(g) deformed by the degree of deformation at the time of the match corresponds to a deformed template 45 including a deformed character pattern 46 obtained by deforming the reference character pattern 41 by the degree of deformation at the time of the match.

[0062] In the shape matching process at the n-th resolution Dn, a divided template is used as needed. That is, according to the surface shape of the printed surface of the beverage container 12 to be inspected, the inspector operates an input operation unit (not shown) such as a keyboard connected to the printing inspection device 11 to set divided matching using the divided template to improve inspection accuracy. For example, as shown in FIG. 2, the character string 20 printed on the curved surface is imaged such that the character size in the central region in the width direction is large and the character sizes in the both end regions in the width direction are small (see FIG. 7). Also, there may be cases where the characters are deformed and imaged in the both end regions in the width direction and the upper and lower end regions in the height direction of the character string. And in a region with a large degree of deformation, even for one character, it may be imaged with different degrees of deformation in the upper half and the lower half, or the left half and the right half.

[0063] Therefore, a shape matching process is performed to search for divided character patterns using the divided templates 42a and 42b for each divided region obtained by dividing one character region 54. This is because when the characters on the captured image are deformed due to the surface shape of the printed surface, the distance difference from the camera 17 to the printed surface, the displacement of the printing within the allowable range, etc., it is more appropriate to regard it as a qualified product rather than a defective product. Therefore, in this embodiment, even if the characters on the captured image are deformed, as long as the deformation is within the allowable range, it is possible to perform an inspection to regard it as a qualified product.

[0064] Also, as shown in FIGS. 11(a) and 11(b), for the character (e.g., "2") for which split matching is specified, shape matching processing is performed using split templates 42a and 42b. As shown in FIG. 11(a), shape matching processing is performed by collating the imaging character pattern 53 within the character region 54 while moving the first split template 42a including the upper half split reference character pattern 41a by a minute distance Δx at a time. Assume that when the first split template 42a is at the first degree of deformation, the similarity becomes equal to or greater than the threshold value. Next, as shown in FIG. 11(b), shape matching processing is performed by collating the imaging character pattern 53 within the character region 54 while moving the second split template 42b including the lower half split reference character pattern 41b by a minute distance Δx at a time. Assume that when the second split template 42b is at the second degree of deformation, the similarity becomes equal to or greater than the threshold value. The deformation pattern generation unit 34 generates a deformation template 45 including a deformed character pattern 46 by synthesizing the first split template 42a including the split reference character pattern 41a deformed at the first degree of deformation and the second split template 42b including the split reference character pattern 41b deformed at the second degree of deformation, as shown in FIG. 11(c). Note that in order to restore the deformed character pattern 46 as a character region, region morphology processing is applied as necessary.

[0065] Next, the inspection process will be described with reference to FIGS. 12 and 13. Note that in FIGS. 12 and 13(b), the dot region 46a is drawn exaggeratedly large to make it easier to distinguish between the dot region 46a and the dot 51a. Also, although the shape of the dot region 46a of the deformed character pattern 46 is actually distorted according to the degree of deformation, in FIGS. 12 and 13, the dot region 46a is schematically drawn as a circle.

[0066] As shown in FIG. 12, the inspection processing unit 35 generates an inspection area specific image 60 by superimposing the deformed character pattern 46 included in the deformed template 45 on the character area 52 including the captured character pattern 51P at the position where they match. The deformed character pattern 46 shown in the lower left of FIG. 12 corresponds to the deformed character pattern of the deformed template 45 when they match. By superimposing this deformed character pattern 46 on the image of the captured character area 52, an inspection area specific image 60 for specifying the inspection area in the image of the character area 52 is generated.

[0067] FIG. 13(a) is a background image 61 obtained by extracting the image of the background area 62 excluding the dot area 46a from the inspection area specific image 60 shown in FIG. 12. The inspection processing unit 35 generates the background image 61 shown in FIG. 13(a) by removing the image of the dot area 46a part from the inspection area specific image 60 shown in FIG. 12. In this background image 61, the density value in the dot area 46a is converted to a value representing white (for example, "255") to delete the image of the dot area 46a. Then, the inspection processing unit 35 performs a shading inspection on the background image 61. In the shading inspection, a part where the density value is equal to or less than the threshold value (the black part in FIG. 13(a)) is detected. As a result, the deviation of the dot 51a, the stain 57, and the bleeding 58 are detected. If there are a predetermined area and a predetermined number or more of the deviation of the dot 51a, the stain 57, and the bleeding 58 respectively, the character is determined to be a printing defect. When generating the background image 61, the dot area 46a in the inspection area specific image 60 is enlarged and adjusted to, for example, 1.2 times the size. And the part of the dot 51a that protrudes from the enlarged dot area 46a in the background image 61 is the part that deviates beyond the allowable range.

[0068] Figure 13(b) is a deformed character region image 63 obtained by extracting the image inside the dot region 46a from the inspection region specific image 60 shown in Figure 12. The inspection processing unit 35 generates the deformed character region image 63 shown in Figure 13(b) by removing the images of portions other than the dot region 46a from the inspection region specific image 60 shown in Figure 12. In this deformed character region image 63, the image of the background region 62 is deleted by converting the density value of the background region 62 to a value representing white. In the deformed character region image 63, no enlargement adjustment is performed to enlarge the size of the dot region 46a, for example, by 1.2 times. In the deformed character region image 63, when the occupancy rate of the dot 51a inside the dot region 46a is small and less than the threshold value, it is determined that the dot 51a is displaced or missing. The inspection processing unit 35 discriminates whether the dot 51a is displaced or the dot 51a is missing from the value of the occupancy rate. Further, when the dot 51a is displaced, the inspection processing unit 35 obtains the displacement amount of the dot 51a from the value of the occupancy rate. Note that in the deformed character region image 63, no enlargement adjustment is performed to enlarge the dot region 46a of the deformed character pattern 46 by 1.2 times. Also, a reduction adjustment may be performed to reduce the size of the dot region 46a, for example, by 0.8 times, and if there is even a single white pixel inside the reduced dot region 46a, it may be determined that there is a printing defect such as dot displacement or dot missing.

[0069] The inspection processing unit 35 determines the quality of the printing state of the characters based on the degree and number of dot displacement, dirt 57, and bleeding 58, and the number of dot missing, according to a predetermined inspection rule stored in advance in the storage unit 31.

[0070] Next, the operation of the printing inspection apparatus 11 of the present embodiment will be described with reference to Figure 14 and the like.

[0071] Now, when the belt conveyor 13 is driven, the control unit 15 executes the printing inspection processing routine shown in Figure 14. Specifically, the computer 30 in the control unit 15 executes a program for printing inspection processing shown in the flowchart of Figure 14.

[0072] First, in step S11, the control unit 15 captures an image. When the control unit 15 receives a detection signal detecting the beverage container 12 from the optical sensor 16, it transmits an imaging instruction signal to the camera 17. Then, a character string 20 indicating, for example, the lot number and the manufacturing date and month printed on the outer peripheral surface 12a of the beverage container 12 detected by the optical sensor 16 is imaged by the camera 17, and the imaged image data is transmitted from the camera 17 to the control unit 15. In this embodiment, the process of step S11 corresponds to an example of the imaging step.

[0073] In step S12, the control unit 15 captures the image. The control unit 15 stores the image data received from the camera 17 in a predetermined storage area of the storage unit 31.

[0074] In step S13, the control unit 15 detects the printing area. The control unit 15 extracts the image area of the beverage container 12 from the captured image based on the image data read from the storage unit 31, and extracts, as the printing area 50A (see FIG. 7), an area within a predetermined height range and a predetermined width range among the beverage containers 12 in the image area.

[0075] In step S14, the control unit 15 performs an OCR inspection. Specifically, the OCR inspection unit 32 recognizes the characters 51 constituting the character string 50 within the printing area 50A, and determines that the characters have been printed if the recognized characters are registered in a preset character string for printing. The storage unit 31 stores data of characters that can be recognized by the OCR inspection unit 32 in advance. The OCR inspection unit 32 performs the recognition process of the characters 51 one by one, and determines that there is a printing defect if there is even one unrecognizable character in the character string 50. By the recognition of the character 21 by the OCR inspection unit 32, the position of the recognized character 21 is specified. Then, a character area 52 composed of a rectangular area including the characters 51 within the printing area 50A is specified.

[0076] In step S15, the control unit 15 acquires the captured character pattern 51P. That is, the control unit 15 acquires a character area 52, which is a rectangular area including the captured character pattern 51P that is the pattern of the character 51, from the position of the character 21 recognized by the OCR inspection unit 32.

[0077] In step S16, the control unit 15 performs a contour extraction process. Specifically, the control unit 15 performs an edge detection process on the captured character pattern 51P in the character area 52 shown in FIG. 8, and extracts a contour from the edges. As a result, a character area 54 including the captured character pattern 53 represented by the contour shown in FIG. 8 is generated.

[0078] In step S17, the control unit 15 performs a shape matching process to calculate a similarity by comparing the captured character pattern 53 and the reference character pattern 41 while changing the degree of deformation of the reference character pattern 41. Specifically, as shown in FIGS. 9(a) to (e), the captured character pattern 53 in the character area 54 is searched by comparing while changing the degree of deformation of the reference character pattern 41. The shape matching processing unit 33 performs a shape matching process while changing the size and rotation angle of the reference character pattern 41 in a predetermined order. The shape matching processing unit 33 calculates the similarity of the captured character pattern 53 with respect to the reference character pattern 41 at each position while moving the reference character pattern 41 deformed by a predetermined degree of deformation by a minute distance Δx.

[0079] In step S18, the control unit 15 determines whether or not there is a match. That is, the control unit 15 determines whether or not the similarity is equal to or greater than a threshold value. If the similarity is equal to or greater than the threshold value, it is determined that the captured character pattern 53 matches the reference character pattern 41. On the other hand, if the similarity is less than the threshold value, it is determined that the captured character pattern 53 does not match the reference character pattern 41. If there is a match, the process proceeds to step S19, and if there is no match, the process returns to step S17 to repeat the shape matching process.

[0080] Here, when the split matching is set, the shape matching process in step S17 is performed for each split region using the split template 42 instead of the template 40. That is, as shown in Fig. 11(a), the shape matching processing unit 33 performs the shape matching process while changing the degree of deformation of the split reference character pattern 41a using the first split template 42a, and then, as shown in Fig. 11(b), performs the shape matching process while changing the degree of deformation of the split reference character pattern 41b using the second split template 42b. Then, the shape matching process (step S17) is repeated until it is determined that the similarity is equal to or greater than the threshold for each split region (step S18).

[0081] Also, in step S17, it is also possible to perform the pyramid search shown in Fig. 10. When performing the pyramid search, the shape matching processing unit 33 performs the shape matching process in order from low resolution to high resolution. As a result, since the shape matching process can be performed at the resolution of the next layer within the range 55 narrowed down by the shape matching process performed at the resolution of the previous layer, the speed of the shape matching process can be increased. This pyramid search can also be applied to split matching. In this embodiment, the processes of steps S17 and S18 correspond to an example of the shape matching process step.

[0082] In step S19 shown in FIG. 14, the control unit 15 generates a deformed character pattern 46 obtained by deforming the reference character pattern 41 with the matched degree of deformation. When deforming the reference character pattern 41, the control unit 15 generates a deformed character pattern using region morphology. Here, the reference character pattern 41 can be created as an artificial character pattern using image creation software on a personal computer, but it is more suitable for actual conditions and may be preferable in terms of ensuring inspection accuracy to create it from a captured image of the printing area of a good beverage container 12. In this example, since the reference character pattern 41 created by the latter method is adopted, the reference character pattern 41 has small stains and cutting points on the contour line of the character pattern. In order to make the deformed character pattern 46 into a region, it is necessary to connect the cutting points of the line, but if there are small stains, there is a possibility of drawing a line connecting the stains. Therefore, after performing noise removal processing to remove noise such as stains, the deformed character pattern 46 is generated by connecting the lines using region morphology. In region morphology, union, intersection, difference, complement, translation, hole filling, shrinking, and dilation are used. In this way, using the template 40 including the reference character pattern 41, a character region in which the degree of deformation corresponding to the difference in distance from the camera 17 to the printing surface and the surface state of the printing surface is considered is restored as the deformed character pattern 46.

[0083] Note that when split matching is set, the control unit 15 deforms the split reference character patterns 41a and 41b with the matched degree of deformation, and synthesizes the deformed split reference character patterns 41a and 41b into one character to generate the deformed character pattern 46 (see FIG. 11(c)). Also in this case, when the split reference character patterns 41a and 41b are created from a captured image of the printing area of a good beverage container 12, the deformed character pattern 46 is generated using noise removal processing and region morphology.

[0084] In step S20 shown in FIG. 14, the control unit 15 generates an inspection area specific image 60. Specifically, as shown in FIG. 12, the inspection processing unit 35 generates the inspection area specific image 60 by superimposing the deformed character pattern 46 on the position that matches the character area 52 including the captured character pattern 51P. The inspection area specific image 60 is an image of the captured character area 52, but is an image in which the inspection area to be inspected is specified.

[0085] In step S21, the control unit 15 performs a shading inspection on the background image 61. Specifically, the inspection processing unit 35 generates the background image 61 shown in FIG. 13(a) by extracting the image of the background area 62 other than the deformed character pattern 46 from the inspection area specific image 60 shown in FIG. 12, and performs a shading inspection on this background image 61. In this first inspection, the inspection processing unit 35 detects the deviation of the dots 51a, the stain 57, and the bleeding 58 shown in FIG. 13(a) from the distribution and number of pixels whose density value (pixel value) is equal to or less than the first threshold value in the background image 61. Further, the inspection processing unit 35 can specify the dots with printing deviation and the positions of the stain 57 and the bleeding 58 from the positions where the pixels are distributed. Note that, for example, a value obtained by multiplying the average density of the inspection area specific image 60 by a predetermined value (for example, 0.8) is adopted as the first threshold value.

[0086] In step S22, the control unit 15 performs a shading inspection on the deformed character region image 63. Specifically, the inspection processing unit 35 generates the deformed character region image 63 shown in FIG. 13(b) by extracting only the image of the region of the deformed character pattern 46 from the inspection region specific image 60 shown in FIG. 12, and performs a shading inspection on this deformed character region image 63. In this second inspection, the inspection processing unit 35 obtains the occupancy rate (e.g., white occupancy rate) of the pixels in the dot region 46a from the distribution and number of pixels whose density value is equal to or greater than the second threshold value within the dot region 46a. If the occupancy rate is equal to or greater than the occupancy threshold value, the inspection processing unit 35 determines that there is a deviation or defect in the dot 51a. Further, the inspection processing unit 35 discriminates whether it is a dot deviation or a dot defect from the value of the occupancy rate. Note that, for example, the second threshold value is a value obtained by multiplying the average density of the inspection region specific image 60 by a predetermined value (e.g., 1.2). In the present embodiment, the processes of steps S20 to S22 correspond to an example of inspection processing steps.

[0087] In step S23, the control unit 15 determines whether or not the inspection of all characters has been completed. If the inspection of all characters in the character string 50 has not been completed, the process proceeds to step S24 to move to the next character, and the processes of steps S15 to S22 are repeated. In this way, the inspection is performed one character at a time, and when the inspection is completed for all characters (positive determination in step S23), the process proceeds to step S25.

[0088] In step S25, the control unit 15 outputs the inspection result. Specifically, the inspection processing unit 35 determines the quality of the printing state of the character string 50 based on the inspection results of all characters. The control unit 15 sends a display command to the display processing unit 37 to display on the monitor 19 the inspection result indicating the quality of the printing state of the character string 50. The display processing unit 37 displays on the monitor 19 the inspection result indicating the quality of the printing state. Further, when the inspection result indicates a printing defect, the control unit 15 sends an exclusion command to the exclusion processing unit 36. The exclusion processing unit 36 drives the exclusion mechanism 18 to exclude the beverage container 12 with a printing defect from the belt conveyor 13.

[0089] According to the embodiment described in detail above, the following effects can be obtained.

[0090] (1) The printing inspection device 11 includes a camera 17 as an example of an imaging unit that images an area including a portion where the characters to be inspected are printed, a shape matching processing unit 33, a deformation pattern generation unit 34, and an inspection processing unit 35. The shape matching processing unit 33 collates the imaged character pattern 51P(53) included in the captured image acquired by the camera 17 with a preset reference character pattern 41 in terms of shape while changing the degree of deformation of the shape of the reference character pattern 41, and searches for a matching character for which the similarity of the shape of the imaged character pattern 51P(53) to the reference character pattern 41 is equal to or greater than a threshold value. The deformation pattern generation unit 34 generates a deformed character pattern 46 obtained by deforming the reference character pattern 41 with the degree of deformation when the characters match in the shape matching process. The inspection processing unit 35 inspects the quality of the printing state of the characters based on the comparison result between the deformed character pattern 46 and the imaged character pattern 51P.

[0091] According to this configuration, the imaging character pattern 51P(53) and the reference character pattern 41 are collated for shape by shape matching processing in which the degree of deformation of the shape of the reference character pattern 41 is changed, and a matching character is searched for in which the similarity of the shape of the imaging character pattern 51P(53) to the reference character pattern 41 is equal to or greater than a threshold value. Then, a deformed character pattern 46 in which the reference character pattern 41 is deformed by the degree of deformation when the characters match is generated. Even if the printed characters are deformed within an allowable range, the quality of the printing state of the characters can be appropriately inspected from the comparison result between the deformed character pattern 46 deformed by the same degree of deformation and the imaging character pattern 51P. For example, even if the characters 51 in the captured image are deformed within the allowable range due to the printed surface being a curved surface or the angle formed by the optical axis of the camera 17 and the printed surface deviating from 90 degrees, it can be determined that the printing state is good. Also, in the shape matching process, even if there are local printing defects such as printing misalignment, dot loss, dirt 57, and bleeding 58, there are cases where the similarity is equal to or greater than the threshold value and the printing defects are overlooked. However, in the present embodiment, by comparing the imaging character pattern 51P and the deformed character pattern 46, it is possible to inspect for the presence or absence of local printing defects such as printing misalignment, dot loss, dirt 57, and bleeding 58. Therefore, it is possible to accurately inspect the quality of the printing state of the printed characters. Also, the shape matching process requires fewer templates 40, 42 to collate only the shape compared to the shading matching process that requires a large number of templates for each factor such as the size, rotation angle, and brightness of the characters, so the processing time can be shortened. Thus, it is possible to achieve both the inspection accuracy and the inspection speed of the characters printed on the inspection target.

[0092] (2) The shape matching processing unit 33 collates the divided reference character patterns 41a, 41b, etc. obtained by dividing the reference character pattern 41 into a predetermined number of divisions with the divided character patterns obtained by dividing the imaged character pattern 53 into the same number of divisions, and searches for the matching divided character patterns where the similarity of the shape of the divided part of the imaged character pattern 53 with respect to the divided reference character patterns 41a, 41b, etc. becomes equal to or greater than a threshold value while changing the degree of deformation of the divided reference character patterns 41a, 41b, etc. The shape matching process is performed for each divided area. The deformation pattern generation unit 34 generates a plurality of divided deformation character patterns for each divided area based on the degree of deformation for each divided area and the divided reference character patterns 41a, 41b, etc., and synthesizes the plurality of divided deformation character patterns into one character to generate the deformed character pattern 46. Therefore, the deformed character pattern 46 is generated by synthesizing the divided reference character patterns 41a, 41b, etc. that match in the shape matching process performed for each divided area into one character with their respective degrees of deformation. Thus, the inspection accuracy of the printed characters can be further improved.

[0093] (3) The number of divisions of the divided reference character patterns 41a, 41b, etc. is set individually for each character. Therefore, since the number of divisions of the divided reference character patterns 41a, 41b, etc. is set individually for each character, it is possible to improve the inspection accuracy of the characters while suppressing the reduction in the inspection speed of the printed characters.

[0094] (4) At least one of the divided reference character patterns 41a to 41c (FIG. 6(b)) includes the diagonal section lines 43a that intersect at an acute angle with the sides of the rectangular area and divide the rectangular area including the divided reference character patterns 41a to 41c. The divided reference character patterns 41a to 41c are divided into three or more divisions by a plurality of section lines 43a to 43c including two or more diagonal section lines 43a. Therefore, compared with the case of dividing only by section lines composed of lines parallel to the sides of the rectangular area, the inspection accuracy of the printed characters can be further improved.

[0095] (5) The shape matching processing unit 33 changes the degree of deformation by changing at least one of the size and the rotation angle of the reference character pattern 41. Therefore, in the shape matching process, the shape of the character is collated while changing at least one of the size and the rotation angle of the reference character pattern 41, so that the inspection accuracy of the printed character can be improved. In particular, in the present embodiment, since both the size and the rotation angle of the reference character pattern 41 are changed, the inspection accuracy of the printed character can be further improved.

[0096] (6) The inspection processing unit 35 generates an inspection area specific image 60 that overlaps the position where the deformed character pattern 46 is matched with the character area 52 including the captured character pattern 51P, and performs a shading inspection on the background image 61 excluding the area of the deformed character pattern 46 in the inspection area specific image 60 to inspect the quality of the printing state of the character. Therefore, since it is possible to inspect the presence or absence of printing defects such as printing misalignment, dirt 57, and bleeding 58 of the printed character, the quality of the printing state of the character can be accurately inspected.

[0097] (7) The inspection processing unit 35 generates an inspection area specific image 60 that overlaps the position where the deformed character pattern 46 is matched with the character area 52 including the captured character pattern 51P, and performs a shading inspection on the deformed character area image 63, which is the area of the deformed character pattern 46 in the inspection area specific image 60, to inspect the quality of the printing state of the character. Therefore, since it is possible to inspect the presence or absence of printing defects such as printing misalignment and dot missing of the printed character, the quality of the printing state of the character can be accurately inspected.

[0098] (8) The printing inspection method includes an imaging step (step S11) of imaging an area including a portion where the character to be inspected is printed, a shape matching processing step (steps S17, S18), a deformed pattern generation step (step S19), and an inspection processing step (steps S20 to S22). In the shape matching processing step, the imaged character pattern 51P included in the imaged image obtained in the imaging step is collated with a preset reference character pattern 41 in terms of shape while changing the degree of deformation of the shape of the reference character pattern 41, and a matching character whose similarity in shape between the imaged character pattern 51P and the reference character pattern 41 is equal to or greater than a threshold value is searched for. In the deformed pattern generation step, a deformed character pattern 46 obtained by deforming the reference character pattern 41 with the degree of deformation when the character is matched in the shape matching process is generated. In the inspection processing step, the quality of the printing state of the character is inspected based on the comparison result between the deformed character pattern 46 and the imaged character pattern 51P. Therefore, according to this printing inspection method, the same effect as the printing inspection apparatus 11 described in the above (1) can be obtained.

[0099] (9) A program executed by a computer 30 that performs a character inspection process for inspecting characters included in a target image causes the computer 30 to execute a shape matching processing step (steps S17, S18), a deformed pattern generation step (step S19), and an inspection processing step (steps S20 to S22). In the shape matching processing step, the imaged character pattern 51P (53) included in the target image is collated with a preset reference character pattern 41 in terms of shape while changing the degree of deformation of the shape of the reference character pattern 41, and the similarity in shape between the imaged character pattern 51P (53) and the reference character pattern 41 is calculated. In the deformed pattern generation step, a deformed character pattern 46 obtained by deforming the reference character pattern 41 with the degree of deformation when the similarity is equal to or greater than a threshold value is generated. In the inspection processing step, the quality of the printing state of the character is inspected based on the comparison result between the deformed character pattern 46 and the imaged character pattern 51P. Therefore, by causing the computer 30 to execute this program, the same effect as the printing inspection apparatus 11 described in the above (1) can be obtained.

[0100] Incidentally, the above-described embodiment may be modified and embodied as follows.

[0101] · The inspection performed by the inspection processing unit 35 is not limited to the first inspection or the second inspection, and may be the third inspection shown below. As shown on the left side of FIG. 15, the inspection processing unit 35 generates a combined character region 47 shown on the right side of FIG. 15 by combining the region of the captured character pattern 53 and the region of the deformed character pattern 46 at the matched position. The combined character region 47 is composed of a plurality of combined dot regions 47a located at positions corresponding to the dot region 46a of the deformed character pattern 46. As can be seen from FIG. 15, at the position where the dot region 46a and the dot 53a are displaced, the combined dot region 47a is wider than the dot region 46a by the amount of displacement of the dot 53a. Also, at the dot 53a with the blur 58, the combined dot region 47a is wider than the dot region 46a by the amount of the blur 58.

[0102] As shown in FIG. 16, the inspection processing unit 35 generates a combined character region image 64 in which the combined character region 47 obtained by combining the region of the deformed character pattern 46 (see FIG. 15) superimposed on the matched position and the region of the captured character pattern 53 (see FIG. 15) is superimposed on the character region 52 including the captured character pattern 51P in the captured image. Then, the inspection processing unit 35 performs a shading inspection on the combined character region image 64 within the range of the combined character region 47.

[0103] When the occupancy rate of the dot 51a within the combined dot region 47a is small and less than the threshold value, the inspection processing unit 35 determines that there is a displacement, a defect, or a blur 58 of the dot 51a. The inspection processing unit 35 discriminates whether it is a displacement of the dot 51a or a defect of the dot 51a from the value of the occupancy rate. According to this third inspection, compared with the second inspection (FIG. 13(b)), even if the area of the portion where the dot 51a or the blur 58 protrudes from the dot region 46a is the same, the calculated occupancy rate is less likely to be a very small value. Therefore, small printing displacements and small blurs 58 are not determined as defective printing.

[0104] For example, when printing on a flexible container such as a pouch whose printed surface is randomly deformed, it is inevitable to have a small amount of printing misregistration. Therefore, from the perspective of yield, there is a requirement not to regard a small amount of printing misregistration as a printing defect. According to this third inspection, even if there is a small amount of printing misregistration or a small amount of bleeding 58 that is determined to be defective in the second inspection, it is determined to be in a good printing state, so it is possible to avoid determining a small amount of printing misregistration as a defect. Also, even if the amount of printing misregistration changes somewhat, the inspection results do not vary and are stable. Therefore, according to the third inspection, for the characters printed on a printed surface that is easily deformed, in addition to the rough inspection result by the shape matching process, it is possible to inspect the presence or absence of printing defects such as printing misregistration, bleeding 58, and dot missing. Thus, it is possible to accurately inspect the quality of the printing state of the characters, and the inspection results are stable. For example, it is useful for the printing inspection of containers such as pouches whose printed surfaces are randomly deformed.

[0105] · The inspection processing unit 35 only needs to perform at least one of the first inspection, the second inspection, and the third inspection. For example, only the first inspection, only the second inspection, or only the third inspection may be performed, or one of these inspections may be combined with other inspections. Also, a combination of the first inspection and the third inspection, a combination of the second inspection and the third inspection, or all of the first inspection to the third inspection may be performed. Further, a configuration may be adopted in which the above-described plurality of inspections are prepared in the printing inspection apparatus 11, and an inspector selects and sets which inspection to apply by operating an input device.

[0106] · The deformation of the reference character pattern 41 in the shape matching process only needs to be at least one of size and rotation. For example, only the size or only the rotation may be used. Also, the deformation may be an inclination that tilts the character to make it italic, or a deformation in which the size of the character gradually decreases or increases toward one end, such as the shape of the character printed on a curved surface when viewed from the front. Further, the magnification of the character may be changed only in one direction. For example, the character may be expanded or compressed only in the width direction, or expanded or compressed only in the height direction. Further, the character may be deformed into a fan shape or an inverse fan shape. Also, a plurality of the above-described deformations may be combined.

[0107] ·In the above embodiment, the method of restoring the deformed character pattern 46 when it matches to the deformed character pattern 46 expressed in a region may be other methods than region morphology. For example, a reference character pattern expressed in a region created using image creation software or the like may be stored in the storage unit 31, and the deformed character pattern 46 may be obtained by deforming this reference character pattern using information on the degree of deformation (for example, size and rotation angle) that has been matched. Also, information on the degree of deformation that has been matched may be used for restoration using region morphology.

[0108] ·When generating the background image 61, an image of the deformation template 45 in which the background region is made transparent and the inside of the dot region 46a is made white may be superimposed on the captured image of the character region 52. Also, when generating the deformed character region image 63, an image of the deformation template 45 in which the background region is made white and the dot region 46a is made transparent may be superimposed on the captured image of the character region 52.

[0109] ·In the above embodiment, the printed dots were dot characters separated one by one, but they may be characters in which the dots are combined with adjacent dots. Instead of dot characters formed by dots such as 5×8 or 5×9, characters printed in a predetermined font such as Gothic or Ming may also be used.

[0110] ·In the above embodiment, the division template 42 may not be used. That is, a configuration in which shape matching processing is performed using only the template 40 may also be used.

[0111] ·Pyramid search may not be performed.

[0112] ·The OCR inspection may be abolished. When the OCR inspection is abolished, the text information of the character string 20 may be stored in the storage unit 31. By referring to the text information, the characters used for the template in the shape matching process can be narrowed down. It is not necessary to perform multiple matching processes using a plurality of templates for the shape matching process for one character.

[0113] · The inspection processing unit 35 may binarize the background image 61 shown in FIG. 13(a) and the deformed character region image 63 shown in FIG. 13(b), and obtain the occupancy ratio from the areas of the white regions and the black regions in the background region 62 and the dot region 46a.

[0114] · Each of the divided templates 42a, 42b, and 42c does not necessarily have to overlap with each other at these boundary portions.

[0115] · Although it is divided into three parts by a plurality of partition lines including two diagonal partition lines 43a, it may be divided into three parts by a plurality of partition lines including only one diagonal partition line 43a. Also, it may be divided into three parts using three diagonal partition lines 43a. Further, it may be divided into a plurality of parts of four or more by a plurality of partition lines including two diagonal partition lines 43a. Furthermore, it may be divided into two parts by a plurality of partition lines including one or two diagonal partition lines 43a.

[0116] · The characters to be inspected may be characters such as Chinese characters, hiragana, katakana, Roman letters, alphabets, numbers, or symbols.

[0117] · The character string may be used for inspecting characters other than the manufacturing date, expiration date, consumption date, and lot number.

[0118] · The inspection target may include printed codes in addition to the printed characters. In this case, the code may be, for example, a one-dimensional code such as a barcode or a two-dimensional code such as a QR code (registered trademark).

[0119] · In the above embodiment, the OCR inspection unit 32, the shape matching processing unit 33, the deformation pattern generation unit 34, the inspection processing unit 35, the exclusion processing unit 36, and the display processing unit 37 are realized by software constructed by the CPU executing a program, but these may be configured by hardware such as an IC. Furthermore, these may be configured to be realized by the cooperation of software and hardware.

[0120] · The printing surface of the characters may be flat. Also, the printing surface may be a concave curved surface or an inclined surface.

[0121] · The inspection target (object) is not limited to beverage containers such as plastic containers, paper containers, bottles, and cans for beverages, but may also be containers for food, for example, cans, bottles, paper containers, plastic containers, and pouch containers. Furthermore, the inspection target is not limited to food, but may also be a container containing other products or semi-finished products, for example, a cardboard box. Furthermore, the inspection target is not limited to containers, but may also be the product itself before being contained in a container. In this case, the product may be an electrical appliance, stationery, tableware, building materials, parts, etc. It may also be a product with a seal printed with characters.

[0122] · The printing is not limited to printing by an inkjet printer, but may also be printing by a laser printer or a dot impact printer. It may also be printing (engraving) by the laser light of a laser marker.

Explanation of Signs

[0123] 11… Printing inspection device, 12… Beverage container as an example of the inspection target, 15… Control unit, 17… Camera as an example of the imaging unit, 20… Character string, 21… Character, 30… Computer, 31… Storage unit, 32… OCR inspection unit, 33… Shape matching processing unit, 34… Deformation pattern generation unit, 35… Inspection processing unit, 36… Exclusion processing unit, 37… Display processing unit, 38… Deformation processing unit, 40, 40A, 40B, 40C, 40D… Template, 41… Standard character pattern, 41a, 41b, 41c… Divided standard character patterns, 42… Dividing template, 42a, 42b, 42c… Divided templates, 43a, 43b, 43c… Partition lines, 45… Deformed template, 46… Deformed character pattern, 46a… Dot area, 47… Combined character area, 47a… Combined dot area, 50A… Printing area, 50… Character string, 51… Character, 51P… Captured character pattern, 51a… Dot, 52… Character area, 53… Captured character pattern, 54… Character area, 55… Range, 57… Dirt, 58… Bleeding, 60… Inspection area specific image, 61… Background image, 62… Background area, 63… Deformed character area image, 64… Combined character area image.

Claims

1. A printing inspection apparatus for inspecting characters printed on an object to be inspected, comprising: an imaging unit that images a region including a portion on which the characters of the object to be inspected are printed; a shape matching processing unit that collates an imaging character pattern included in the imaging image acquired by the imaging unit with a preset reference character pattern while changing a degree of deformation of the shape of the reference character pattern, and performs a shape matching process for searching for a matched character whose similarity in shape between the imaging character pattern and the reference character pattern is equal to or greater than a threshold value; a deformed pattern generation unit that generates a deformed character pattern obtained by deforming the reference character pattern with a degree of deformation when a character is matched in the shape matching process; an inspection processing unit that inspects whether the printing state of a character is good or bad based on a comparison result between the deformed character pattern and the imaging character pattern. A printing inspection apparatus, characterized by comprising the above components.

2. The shape matching processing unit collates, for each divided region, a divided reference character pattern obtained by dividing the reference character pattern into a predetermined number of divisions with a divided character pattern obtained by dividing the imaging character pattern into the same number of divisions, while changing a degree of deformation of the divided reference character pattern, and performs a shape matching process for searching for a matched divided reference character pattern whose similarity in shape between the divided character pattern and the divided reference character pattern is equal to or greater than a threshold value. The deformed pattern generation unit generates a plurality of divided deformed character patterns for each divided region based on the degree of deformation and the divided reference character pattern for each divided region, and synthesizes the plurality of divided deformed character patterns into one character to generate the deformed character pattern. The printing inspection apparatus according to claim 1, characterized by the above.

3. The printing inspection apparatus according to claim 2, characterized in that the number of divisions of the divided reference character pattern is set individually for each character.

4. At least one of the divided reference character patterns includes diagonal dividing lines where dividing lines that divide a rectangular region including the divided reference character pattern intersect at an acute angle with the sides of the rectangular region, and is divided into three or more divisions by a plurality of dividing lines including two or more of the diagonal dividing lines. The printing inspection apparatus according to claim 2 or claim 3, characterized by the above.

5. The printing inspection apparatus according to any one of claims 1 to 4, wherein the shape matching processing unit changes the degree of deformation by changing at least one of the size and the rotation angle of the reference character pattern.

6. The inspection processing unit generates an inspection area specific image superimposed on the position where the deformed character pattern is matched with a character area including the captured character pattern in the captured image, and inspects the quality of the printing state of the character by performing a shading inspection on the background image other than the deformed character pattern in the inspection area specific image. The printing inspection apparatus according to any one of claims 1 to 5.

7. The inspection processing unit generates an inspection area specific image superimposed on the position where the deformed character pattern is matched with a character area including the captured character pattern in the captured image, and inspects the quality of the printing state of the character by performing a shading inspection on the area of the deformed character pattern in the inspection area specific image. The printing inspection apparatus according to any one of claims 1 to 5.

8. The inspection processing unit inspects the quality of the printing state of the character by performing a shading inspection on a combined character area obtained by combining the area of the deformed character pattern and the area of the captured character pattern superimposed on the position where the deformed character pattern is matched with a character area including the captured character pattern in the captured image. The printing inspection apparatus according to any one of claims 1 to 5.

9. A printing inspection method for inspecting characters printed on an inspection target, an imaging step of imaging an area including a portion where the characters to be inspected are printed; a shape matching processing step of collating a captured character pattern included in the captured image obtained in the imaging step with a preset reference character pattern in terms of shape while changing the degree of deformation of the shape of the reference character pattern, and searching for a matched character whose similarity in shape between the captured character pattern and the reference character pattern is equal to or greater than a threshold value; a deformed pattern generation step of generating a deformed character pattern obtained by deforming the reference character pattern with the degree of deformation when the character is matched in the shape matching processing; an inspection processing step of inspecting the quality of the printing state of the character based on the comparison result between the deformed character pattern and the captured character pattern characterized by comprising.

10. A program executed by a computer that performs a character inspection process for inspecting characters included in a target image, causing the computer to perform a shape matching process step of comparing the captured character pattern included in the target image with a preset reference character pattern in terms of shape while changing the degree of deformation of the shape of the reference character pattern, and calculating the similarity of the shape of the captured character pattern to the reference character pattern; a deformed pattern generation step of generating a deformed character pattern obtained by deforming the reference character pattern at a degree of deformation when the similarity is equal to or greater than a threshold value; and an inspection process step of inspecting the quality of the printing state of the character based on the comparison result between the deformed character pattern and the captured character pattern is a program to be executed.

Citation Information

Patent Citations

  • Model registration method and pattern recognition device using this method

    JP2003187187A

  • Inspection method, inspection device and inspection program for image forming state

    JP2011112398A

  • Printing inspection device and printing inspection method

    JP2015036937A

  • Printing inspection method

    JP2015087889A