Image processing apparatus and image processing method
By designing an image processing device, extracting the features of the printing area and the substrate area, and producing and configuring defective image data, the problem of difficulty in accurately reproducing defects in the prior art is solved, and the accuracy of AI in the inspection of non-conforming products is improved.
Patent Information
- Application Number
- CN202411417093.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-10-13
- Filing Date
- 2024-10-11
- Publication Date
- 2025-04-15
AI Technical Summary
In the inspection of unqualified products, it is difficult for the prior art to accurately reproduce various defects, which affects the accuracy of AI when determining whether the item is qualified.
An image processing device is designed to obtain qualified product image data, extract printing areas and substrate areas, produce defective image data based on pixel values, shapes and sizes of these areas, and arrange them in corresponding areas of qualified product image data to generate accurate defective product images.
It realizes the accurate reproduction of various defects in the virtual non-qualified product images used in the non-qualified product inspection, and improves the accuracy of AI when determining whether the item is qualified.
Smart Images

Figure CN119831921A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to an image processing device and an image processing method for producing an image used for inspecting an article having a surface printed thereon. Background Art
[0002] Tablets are known as an example of articles with printing on the surface. In order to mass produce such articles, the articles produced are inspected by machines. The articles produced are screened into qualified and unqualified articles by inspection, and only the articles judged as qualified articles are shipped. There are various inspection methods as a method for judging whether or not an article is qualified, and as one of them, an inspection method using an image is known.
[0003] In the inspection method using images, for example, image data of qualified products determined to be qualified products during inspection and image data of unqualified products determined to be unqualified products due to poor printing, etc. are collected. AI (artificial intelligence) installed on a computer is made to learn the collected image data of qualified products and unqualified products. The AI acquires image data of the object to be inspected, compares it with the learned image data of qualified products and unqualified products, and determines whether the object to be inspected is qualified or not.
[0004] In such an inspection method using AI, the more the number of image data used as the basis, the higher the inspection accuracy. In other words, the more the number of qualified product image data and unqualified product image data learned by AI, the higher the inspection accuracy. However, in recent years, the performance of production equipment has been higher, and the frequency of producing unqualified products has been lower. Therefore, it is easy to collect qualified product image data, but it takes time to collect unqualified product image data. Therefore, as disclosed in Patent Document 1, a method is being developed that does not obtain unqualified product image data based on actually produced unqualified products, but virtually produces unqualified product image data through a computer.
[0005] In the image generation method of patent document 1, a plurality of qualified product images are first acquired. Then, the plurality of qualified product images are synthesized and an average image is generated, and the average image has a pixel value obtained by averaging the pixel values of the plurality of qualified product images. Then, a defect is set for determining as a defective product. The defect is dirt, and the color, size, shape and location of the dirt are set. Then, the defect is assigned to the generated average image to generate a virtual defective product image. Then, the average image is used as a qualified product image, and the virtual defective product image is used as a defective product image for AI learning.
[0006] Prior art literature Patent Literature Patent Document 1: Japanese Patent Application Publication No. 2022-024541 Summary of the invention Technical problem to be solved by the invention In the image generation method of Patent Document 1, it is not necessary to find defective products from the produced items. Therefore, it is easy to prepare defective product images for AI to learn. In addition, the qualified product images learned by AI use images obtained by averaging images obtained from multiple qualified products actually produced. Therefore, the possibility of AI mistakenly learning slight differences caused by production deviations as defects even though they are qualified product images is reduced.
[0007] However, Patent Document 1 does not disclose a detailed defect creation method and defect assignment method. In addition, most defects of printed articles are caused by poor printing. Examples of poor printing include stains of ink or the like outside the specified printing area, partial or complete missing of printed characters, marks, etc., blurring and blurring of printed characters, marks, etc. If such various defects can be accurately reproduced, various defective product images can be produced and more accurate defective product images can be produced. As a result, AI can accurately identify various printing defects that may actually occur.
[0008] The technical problem of the present invention is to accurately reproduce various defects in a defective product image used in defective product inspection.
[0009] Solutions for solving technical problems (1) The image processing device of the present invention is an image processing device for producing images used in the inspection of articles with printing applied on the surface. The image processing device comprises: an acquisition unit, which acquires image data of qualified products determined to be qualified products during the inspection; an extraction unit, which extracts the printing area where printing is applied and the base area where printing is not applied from the acquired qualified product image data; a defect image production unit, which produces defect image data based on the extracted printing area and / or base area; and a defect image production unit, which arranges the produced defect image data in at least one of the printing area and the base area of the qualified product image data, and produces defect image data of the defect product determined to be defective during the inspection based on the qualified product image data.
[0010] Characters, graphics, and marks on the surface of an object can be printed by placing ink on the base of the object. In order to reproduce various printing defects, it is necessary to identify the printed area where ink is placed and the base area where ink is not placed. For example, a stain, which is an example of poor printing, is caused by placing ink on the base area where ink is not originally placed. A defect is caused by not placing ink on a part of the characters in the printed area. In addition, in order to accurately reproduce the poor printing, it is important to compare the printed area and the base area in appearance. For example, if the stain is the same color as the base, it is difficult to identify it as a stain. If the defect is the same color as the printed area, it is difficult to identify it as a defect. In addition, in fact, defects with different colors from the printed area and the base area are not easy to occur in poor printing.
[0011] In the above-mentioned image processing device, the printing area and the base area are identified, and defective image data is produced based on at least one of the printing area and the base area according to the type of poor printing to be reproduced. The produced defective image data is arranged on at least one of the printing area and the base area according to the type of poor printing to be reproduced. That is, in the above-mentioned image processing device, various poor printings can be reproduced by identifying the printing area and the base area. By producing defective image data based on at least one of the printing area and the base area, it is possible to accurately reproduce the poor printing in a form in which the contrast between the appearance of the printing area and the base area conforms to the actual poor printing. Therefore, according to the above-mentioned image processing device, various defects can be accurately reproduced in the defective product image used in the defective product inspection.
[0012] (2) In the image processing device of (1) above, the defect image production unit may also include: a defect color determination unit that obtains the pixel value of the extracted base area and determines the pixel value of the defect image data in a manner that becomes a pixel value different from the pixel value of the obtained base area; a defect shape determination unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect production unit that produces defect image data, wherein the defect image data has a pixel value, a shape, and a size determined based on the extracted base area. The defective product image production unit may also arrange the defective image data at least in the base area of the qualified product image data to produce the defective product image data.
[0013] In the image processing device of (2) above, defect image data having pixel values different from those in the base area are produced based on the pixel values in the base area. The defect image data having pixel values different from those in the base area is at least arranged in the base area. Thus, a region different from the surrounding region, i.e., a stain, is reproduced in the base area. Therefore, according to the above image processing device, various defects, especially stains, can be accurately reproduced in a defective product image used for defective product inspection.
[0014] (3) In the image processing device of (1) above, the defect image generating unit may also include: a defect color determination unit that obtains the pixel value of the extracted printing area and determines the pixel value of the defect image data in a manner that becomes a pixel value different from the pixel value of the obtained printing area; a defect shape determination unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect generating unit that generates defect image data, wherein the pixel value, shape and size of the defect image data are determined based on the extracted printing area. The defective product image generating unit may also configure the defective image data at least in the printing area of the qualified product image data to generate the defective product image data.
[0015] In the image processing device of (3) above, defect image data having pixel values different from those of the printing area is produced based on the pixel values of the printing area. The defect image data having pixel values different from those of the printing area is at least arranged in the printing area. Thus, an area different from the surrounding printing area, i.e., a missing area, is reproduced in a part of the printing area. Therefore, according to the above image processing device, various defects, especially missing areas, can be accurately reproduced in the defective product image used for defective product inspection.
[0016] (4) In the image processing device of (1) above, the defect image production unit may also include: a defect color determination unit that obtains the pixel value of the extracted base area and determines the pixel value of the defect image data in a manner that becomes a pixel value different from the pixel value of the obtained base area; a defect shape determination unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect production unit that produces defect image data, wherein the defect image data determines the pixel value, shape and size based on the extracted printing area. The defective product image production unit may also arrange the defective image data in at least a part of the vicinity of the edge of the printing area of the qualified product image data to the position separated by a specified number of pixels, and produce the defective product image data.
[0017] In the image processing device of (4) above, defect image data having pixel values different from those of the base area is produced based on the pixel values of the base area. The defect image data having pixel values different from those of the base area is arranged in at least a portion near the printing area. As a result, the printing area seems to expand, thereby reproducing the bleeding. Therefore, according to the above image processing device, various defects, especially bleeding and blurring, can be accurately reproduced in the defective product image used for defective product inspection.
[0018] (5) The image processing method of the present invention is an image processing method for producing an image used in the inspection of an article having a surface printed thereon. The image processing method comprises: an acquisition step of acquiring image data of a qualified product determined to be a qualified product during the inspection; an extraction step of extracting a printed area where printing is performed and a base area where printing is not performed from the acquired qualified product image data; a defect image production step of producing defect image data based on the extracted printed area and / or base area; and a defect image production step of arranging the produced defect image data in at least one of the printed area and the base area of the qualified product image data, and producing defect image data of a defective product determined to be a defective product during the inspection based on the qualified product image data.
[0019] Effects of the Invention According to the image processing apparatus and the image processing method of the present invention, various defects can be accurately reproduced in a virtual defective product image used in defective product inspection. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1 This is a conceptual diagram of a defective product inspection system using the image processing device according to the first embodiment.
[0021] Figure 2 This is a functional block diagram of the image processing device according to the first embodiment.
[0022] Figure 3 This is a conceptual diagram of extracting a printed area and a background area in the image processing device of the first embodiment. (A) shows conforming product image data, (B) shows the extracted printed area, and (C) shows the extracted background area.
[0023] Figure 4 This is a conceptual diagram showing the color arrangement of defects in the image processing device according to the first embodiment.
[0024] Figure 5 The diagrams are for explaining the shape and size of a defect created in the image processing device according to the first embodiment.
[0025] Figure 6 This is a diagram showing defective product image data created by the image processing apparatus according to the first embodiment.
[0026] Figure 7 This is a flowchart of an image processing method for creating a defective product image in the image processing device according to the first embodiment.
[0027] Figure 8 This is a conceptual diagram showing the color arrangement of defects in the image processing device according to the second embodiment.
[0028] Fig. 9The diagrams are for explaining the shape and size of a defect created in the image processing apparatus according to the second embodiment.
[0029] Fig.10 It is a diagram showing defective product image data created by the image processing apparatus according to the second embodiment.
[0030] Fig.11 The diagrams are for explaining the shape and size of a defect created in the image processing device according to the third embodiment. DETAILED DESCRIPTION
[0031] Hereinafter, embodiments of the present invention will be described with reference to the drawings.
[0032] First embodiment Figure 1 1 is a conceptual diagram of a defective product inspection system using an image processing device of the first embodiment. First, the general situation of the defective product inspection system of the present embodiment is described. The defective product inspection system 1 includes an inspection machine 11 and an image processing device 12. The inspection machine 11 photographs a plurality of items judged as qualified products during inspection, and produces a plurality of qualified product image data as images of each item. The inspection machine 11 sends the produced plurality of qualified product image data to the image processing device 12.
[0033] The image processing device 12 uses part or all of the multiple qualified product image data sent from the inspection machine 11 to produce multiple unqualified product image data. The image processing device 12 is equipped with AI. AI learns the multiple qualified product image data collected from the inspection machine 11 and the multiple unqualified product image data produced. The image processing device 12 sends the learning result of AI to the inspection machine 11. The inspection machine 11 determines whether the item of the inspection object is a qualified product or a unqualified product based on the learning result sent from the image processing device 12. The inspection machine 11 is equipped with AI. The AI in the inspection machine 11 uses the learning result sent from the image processing device 12 to determine whether the item is a qualified product or a unqualified product.
[0034] Figure 2 This is a functional block diagram of the image processing device according to the first embodiment. The image processing device 12 includes a communication unit 121 , a storage unit 122 , an acquisition unit 123 , an extraction unit 124 , a defect image creation unit 125 , a defective product image creation unit 126 , and a learning unit 127 .
[0035] The communication unit 121 can communicate with the inspection machine 11. The communication unit 121 can receive and send data from the inspection machine 11. The communication unit 121 stores the data (conforming product image data) received from the inspection machine 11 in the storage unit 122. The communication unit 121 notifies the acquisition unit 123 that the data has been stored in the storage unit 122.
[0036] The acquisition unit 123 acquires the image data of the qualified product determined as a qualified product during the inspection. Specifically, the acquisition unit 123 receives the notification from the communication unit 121 and acquires the image data of the qualified product from the storage unit 122. The acquisition unit 123 adds a label indicating that the acquired image data of the qualified product is a qualified product and stores it in the storage unit 122. The acquisition unit 123 notifies the extraction unit 124 that the image data of the qualified product has been stored in the storage unit 122.
[0037] The extracting unit 124 receives the notification from the acquiring unit 123 and acquires the conforming product image data from the storage unit 122. The extracting unit 124 extracts the printed area and the unprinted background area of the conforming product image data.
[0038] Figure 3 This is a conceptual diagram of extracting the printing area and the base area in the image processing device of the first embodiment. (A) shows the image data of a qualified product. (B) shows the extracted printing area A1. The printing area A1 is the area where the ink is placed. (C) shows the base area A2. The base area A2 is the area of the printed surface of the article other than the printing area A1.
[0039] The extraction unit 124 obtains the pixel value of each pixel coordinate of the qualified product image data. The extraction unit 124 identifies the printing area A1 and the base area A2 according to a predetermined threshold. For example, when the pixel value of a certain pixel coordinate is greater than the threshold, the extraction unit 124 determines the pixel coordinate as the printing area A1. When the pixel value of a certain pixel coordinate is less than the threshold, the extraction unit 124 determines the pixel coordinate as the base area A2. The threshold is set in advance and saved in the storage unit 122.
[0040] Reference Figure 2 The extracting unit 124 stores the extracted data on the printing area A1 and the base area A2 in the storage unit 122. The extracting unit 124 notifies the defective image generating unit 125 that the data on the printing area A1 and the base area A2 are stored in the storage unit 122.
[0041] The defect image generating unit 125 receives the notification from the extracting unit 124 and acquires data related to the printing area A1 and the base area A2 from the storage unit 122. In this example, the defect image generating unit 125 generates defect image data based on both the extracted printing area A1 and the base area A2. The defect image generating unit 125 includes a defect color determining unit 1251, a defect shape determining unit 1252, a defect size determining unit 1253, and a defect generating unit 1254.
[0042] Figure 4This is a conceptual diagram showing the color matching of defects in the image processing device of the first embodiment. The defective color matching determination unit 1251 obtains the pixel value of a certain pixel coordinate of the base area A2. The defective color matching determination unit 1251 changes the obtained pixel value in such a way that it becomes a value different from the pixel value of the base area A2. More specifically, the defective color matching determination unit 1251 calculates the average pixel value of the printing area A1. The defective color matching determination unit 1251 changes the obtained pixel value of the base area A2 to the average pixel value of the printing area A1. The defective color matching determination unit 1251 determines the changed pixel value of the base area A2 as the pixel value of the defective image data. That is, the defective color matching determination unit 1251 determines the pixel value of the defective image data based on both the pixel value of the printing area A1 and the pixel value of the base area A2.
[0043] Figure 5 (A) to (D) are diagrams for explaining the shapes and sizes of defects created in the image processing device of the first embodiment. Figure 5 (A), the defect shape determination unit 1252 creates a plurality of working areas T1, T2, and T3 having a predetermined number of pixels. The defect shape determination unit 1252 selects a portion of pixels in the plurality of working areas T1, T2, and T3, respectively. The defect shape determination unit 1252, for example, randomly selects a plurality of pixel coordinates in the plurality of working areas T1, T2, and T3, respectively. The defect shape determination unit 1252 selects each pixel, for example, by setting a flag on the selected pixel coordinates.
[0044] Reference Figure 5 (B) The defect shape specifying unit 1252 combines the plurality of working areas T1 , T2 , and T3 to create a combined area T4 , wherein pixels selected in common in the plurality of working areas T1 , T2 , and T3 are selected in the combined area T4 .
[0045] Reference Figure 5 (C) The defect shape determination unit 1252 cuts out the screening area T5 as a part of the composite area T4. The screening area T5 has a smaller number of pixels than the composite area T4. The shape of the screening area T5 is not particularly limited. For example, the defect shape determination unit 1252 uses a circle with a radius of a predetermined number of pixels as the screening area.
[0046] Reference Figure 5 (D), the defect shape determination unit 1252 connects the pixels selected in the screening area T5. For example, the defect shape determination unit 1252 connects the pixels by dilating the selected pixels by a predetermined amount. That is, the defect shape determination unit 1252 processes the screening area T5 in a manner of aggregating the selected pixels. The defect shape determination unit 1252 determines the shape formed by connecting the selected pixels as the shape of the defect image data T6.
[0047] The defect size specifying unit 1253 specifies the size of the shape of the specified defect image data. For example, the defect size specifying unit 1253 specifies the size of the defect image data so as to maintain the shape of the specified defect image data.
[0048] Reference Figure 2 , the defect color determination unit 1251 saves the pixel value of the determined defect image data to the storage unit 122. The defect color determination unit 1251 notifies the defect creation unit 1254 that the pixel value of the defect image data has been saved in the storage unit 122. Similarly, the above-mentioned defect size determination unit 1253 saves the size of the determined defect image data to the storage unit 122. The defect size determination unit 1253 notifies the defect creation unit 1254 that the size of the defect image data has been saved in the storage unit 122. The defect shape determination unit 1252 saves the shape of the determined defect image data to the storage unit 122. The defect shape determination unit 1252 notifies the defect creation unit 1254 that the shape of the defect image data has been saved in the storage unit 122.
[0049] The defect creation unit 1254 creates defect image data based on the pixel value, shape, and size determined by the defect color determination unit 1251, the defect shape determination unit 1252, and the defect size determination unit 1253. The defect creation unit 1254 acquires the pixel value, shape, and size of the defect image data from the storage unit 122. The defect creation unit 1254 creates defect image data in a manner that matches the acquired pixel value, shape, and size (see Figure 5 (D)). The defect creation unit 1254 saves the created defect image data to the storage unit 122. The defect creation unit 1254 notifies the defective product image creation unit 126 that the defect image data has been saved to the storage unit 122. The defective product image creation unit 126 receives the notification from the defect creation unit 1254 and acquires the defect image data and the qualified product image data from the storage unit 122. The defective product image creation unit 126 creates the defective product image data based on the acquired defect image data and the qualified product image data.
[0050] Figure 61 is a diagram showing defective product image data produced by the image processing device of the first embodiment. The defective product image producing unit 126 arranges the produced defective image data in the base area A2 of the qualified product image data. Thus, it is possible to reproduce the stain 20 on which ink is placed in the base area A2 where printing is not originally performed. In this way, the defective product image producing unit 126 produces defective product image data that is determined to be defective during inspection based on the qualified product image data. In addition, the defective product image producing unit 126 can also arrange the defective product image data in the printing area A1 in addition to the base area A2. The defective product image producing unit 126 can also arrange the defective image data in a manner that a part of the defective image data overlaps with the printing area A1.
[0051] Reference Figure 2 The defective product image generating unit 126 adds a label indicating a defective product to the generated defective product image data and stores it in the storage unit 122. The defective product image generating unit 126 notifies the learning unit 127 that the defective product image data has been stored in the storage unit 122.
[0052] The learning unit 127 receives notification from the defective product image production unit 126, and obtains defective product image data and qualified product image data from the storage unit 122. The learning unit 127 functions as an AI. The learning unit 127 uses the obtained defective product image data and qualified product image data as learning data. The learning unit 127 uses, for example, a neural network model formed by deep learning to generate a model for determining whether the item is a qualified product or a defective product based on the image data of the item. The learning unit 127 sends the generated model as a learning result to the inspection machine 11 via the communication unit 121. The inspection machine 11 performs a defective product inspection on the item based on the received learning result.
[0053] Figure 7 This is a flowchart of an image processing method for creating a defective product image in the image processing device of the first embodiment. The image processing method includes an acquisition step S11, an extraction step S12, a defect image creating step S13, and a defective product image creating step S14.
[0054] First, in the acquisition process S11, the image processing device acquires the qualified product image data. Then, in the extraction process S12, the image processing device extracts the printing area and the base area for the acquired qualified product image data. Then, in the defect image production process S13, the image processing device produces the defect image data according to the extracted printing area and base area. In more detail, the defect image production process S13 includes a defect color determination process S131, a defect shape determination process S132, a defect size determination process S133, and a defect production process S134.
[0055] In the defect color determination step S131, the image processing device obtains the pixel values of the printing area and the base area of the qualified product image data. The image processing device changes the obtained pixel value of the base area to the average pixel value of the printing area, and determines it as the pixel value of the defect image data. In the defect shape determination step S132, the image processing device determines the shape of the defect image data. In the defect size determination step S133, the image processing device determines the size of the defect image data. In the defect production step S134, the image processing device produces the defect image data according to the determined pixel value, shape and size. In addition, the order in which the image processing device executes the defect color determination step S131, the defect shape determination step S132 and the defect size determination step S133 is not particularly limited.
[0056] Next, in the defective product image creating step S14 , the image processing device arranges the created defect image data in the background area of the good product image data to create the defective product image data.
[0057] As described above, in the image processing device 12 of the present embodiment, the printing area A1 and the base area A2 are identified, and defective image data is produced based on the pixel values of both the printing area A1 and the base area A2. That is, the defective image data has a pixel value that is the same as that of the printing area A1 and different from that of the base area A2. In addition, the defective image data has a random shape, and its size is also adjusted to an appropriate size. Such defective image data is arranged in the base area A2. As a result, stains that appear as if ink has been accidentally dropped are reproduced in the base area A2. Therefore, according to the above-mentioned image processing device, various defects, especially stains, can be accurately reproduced in the defective product image used in the defective product inspection.
[0058] In the above description, the defect image generating unit 125 generates defect image data based on the extracted pixel values of both the printing area A1 and the base area A2. However, the defect image generating unit 125 may generate defect image data based only on the extracted pixel values of the base area A2. This is because the stain can be reproduced as long as the defect image data has a pixel value different from that of the base area A2.
[0059] Second embodiment Next, the image processing device of the second embodiment is described. The image processing device of the second embodiment is different from the image processing device of the first embodiment in terms of reproducing the loss of the printed area. Hereinafter, the structure of the image processing device of the second embodiment that is different from the image processing device of the first embodiment is described, and the description of the same structure is omitted.
[0060] The defect image generating unit 125 generates defect image data based on the pixel values of both the print area A1 and the base area A2 . The defect image generating unit 125 includes a defect color specifying unit 1251 , a defect shape specifying unit 1252 , a defect size specifying unit 1253 , and a defect generating unit 1254 .
[0061] Figure 8 This is a conceptual diagram showing defective colors in the image processing device of the second embodiment. The defective color determination unit 1251 acquires a pixel value of a certain pixel coordinate of the base area A2. The defective color determination unit 1251 determines the acquired pixel value of the base area A2 as the pixel value of the defective image data.
[0062] Fig. 9 (A) to (D) are diagrams for explaining the shapes and sizes of defects created in the image processing device of the second embodiment. Fig. 9 (A) The defect shape specifying unit 1252 creates a plurality of working areas T21 and T22 having a predetermined number of pixels. For example, the defect shape specifying unit 1252 randomly selects a plurality of pixel coordinates in each of the plurality of working areas T21 and T22.
[0063] The defect shape specifying unit 1252 synthesizes the plurality of working areas T21, T22 and the extracted printing area A1, selects pixel coordinates selected in common in the plurality of working areas T21, T22 and the printing area A1, and creates a synthesized area (not shown). Then, the defect shape specifying unit 1252 cuts a portion of the synthesized area and selects an area having a predetermined number of pixels or more (not shown).
[0064] Reference Fig. 9 (B) The defect shape specifying unit 1252 connects the pixels selected in the cropped area. For example, the defect shape specifying unit 1252 connects the pixels by dilating the selected pixels by a predetermined amount. The defect shape specifying unit 1252 defines the area formed by connecting the selected pixels as the missing area T23.
[0065] Reference Fig. 9(C), the defect shape determination unit 1252 creates a blur model T24 that reproduces the blur of the printing area. In more detail, the defect shape determination unit 1252 creates a working area with a specified number of pixels. The defect shape determination unit 1252 selects a portion of pixels in the working area in a manner having a specified shape. For example, the defect shape determination unit 1252 selects a plurality of pixels in a manner that forms a plurality of ellipses in the working area. The defect shape determination unit 1252 arranges the plurality of elliptical shapes at random positions. The defect shape determination unit 1252 selects a plurality of pixels in a manner that a portion or all of the formed plurality of ellipses overlap with other ellipses. Through such processing, the defect shape determination unit 1252 creates a blur model T24 of pixels that select a portion of the working area.
[0066] Reference Fig. 9 (D) The defect shape determination unit 1252 creates a composite area T25 that selects pixels selected from the created blur model T24, the missing area T23, and the acquired print area A1. The defect shape determination unit 1252 determines the shape formed by the pixels selected in the composite area T25 as the shape of the defect image data.
[0067] The defect size determination unit 1253 determines the size of the shape of the determined defect image data. The defect size determination unit 1253 determines the size of the shape of the defect image data according to the printing area. The defect size determination unit 1253 may also determine the size of the shape of the defect image data according to the size of a specific character, graphic or symbol in the printing area.
[0068] The defect creation unit 1254 creates defect image data based on the pixel value, shape, and size determined by the defect color determination unit 1251 , the defect shape determination unit 1252 , and the defect size determination unit 1253 .
[0069] Fig.10 It is a diagram showing the defective product image data produced by the image processing device of the second embodiment. The defective product image producing unit 126 determines the position for configuring the defective image data in the printing area A1 of the qualified product image data. The defective product image producing unit 126 may also select specific characters, graphics or symbols in the printing area A1 as the position for configuring the defective image data. The defective product image producing unit 126 configures the defective image data to a specified position in the printing area A1 of the qualified product image data. Thus, it is possible to reproduce the missing 21 caused by the lack of ink in a part of the printing area A1 where printing is originally performed. In addition, the defective product image producing unit 126 may also configure the defective product image data in the base area A2 in addition to the printing area A1. The defective product image producing unit 126 may also configure the defective image data in a manner that a part of the defective image data overlaps with the base area A2.
[0070] As described above, in the image processing device 12 of the second embodiment, the defective image data has a pixel value different from that of the printing area A1 and the same as that of the base area A2. In addition, the defective image data is composed of a combination of a missing area having a random shape within the range of the printing area A1 and a blur model that reproduces the blur of the printing area. Thus, the same missing as the actual printing defect is reproduced in the printing area A1. Therefore, according to the above-mentioned image processing device, various defects, especially missing, can be accurately reproduced in the defective product image used for defective product inspection.
[0071] In the above description, the defect image generating unit 125 generates defect image data based on the extracted pixel values of both the printing area A1 and the base area A2. However, the defect image generating unit 125 may generate defect image data based only on the extracted pixel values of the printing area A1. This is because the defect can be reproduced as long as the defect image data has a pixel value different from that of the printing area A1.
[0072] Third embodiment Next, the image processing device of the third embodiment is described. The image processing device of the third embodiment is different from the image processing device of the first embodiment in reproducing the bleeding of the printed area. The following describes the structure of the image processing device of the third embodiment that is different from the image processing device of the first embodiment, and omits the description of the same structure.
[0073] The defect image creating unit 125 creates defect image data based on the pixel values of both the print area A1 and the base area A2.
[0074] Reference Figure 4 , the defective color determination unit 1251 obtains the pixel value of a certain pixel coordinate in the base area A2. The defective color determination unit 1251 changes the obtained pixel value of the base area A2 to the average pixel value of the printing area A1. The defective color determination unit 1251 determines the changed pixel value of the base area A2 as the pixel value of the defective image data.
[0075] The defect shape specifying unit 1252 creates a missing region in the same manner as in the second embodiment. The defect shape specifying unit 1252 expands the created missing region by a predetermined amount and further expands the created target region by a predetermined amount. In short, the target region is a region of a predetermined range around the printed region on the surface of the article.
[0076] Fig.11 (A) to (C) are diagrams for explaining the shapes and sizes of defects created in the image processing device according to the third embodiment. Fig.11(A), the defect shape determination unit 1252 sets a nearby area A3 near the printing area A1. The nearby area A3 is an area from the edge of the printing area A1 to a position separated by a predetermined number of pixels. The nearby area A3 is set within the entire range of the printing area A1. That is, the nearby area A3 is set for each of the multiple characters constituting the printing area A1. Here, as an example, the nearby area A3 around the number "1" printed in the printing area is described.
[0077] Reference Fig.11 (B), the defect shape determination unit 1252 creates a bleeding model that reproduces the bleeding of the printing area A1. In more detail, the defect shape determination unit 1252 creates a working area with a specified number of pixels. The working area has a specified shape. For example, the working area has an elliptical shape with a specified width, height, and angle. The defect shape determination unit 1252 selects a plurality of pixels in a linear manner in the working area. The defect shape determination unit 1252 creates a plurality of lines of randomly selected lengths and thicknesses in the working area as a bleeding model.
[0078] Reference Fig.11 (C) The defect shape specifying unit 1252 selects a bleeding model located in the target area and in the vicinity area A3. The defect size specifying unit 1253 adjusts the range of the bleeding model so that the selected bleeding model falls within a predetermined range.
[0079] The defective color specifying unit 1251 changes the pixel value of the adjusted blurring model so as to become the average pixel value of the printing area A1.
[0080] The defective product image generating unit 126 generates defect image data based on the pixel value, shape, and size determined by the defect color specifying unit 1251 , the defect shape specifying unit 1252 , and the defect size specifying unit 1253 .
[0081] The defective product image generating unit 126 determines the position where the defective image data is configured in the printing area A1 of the qualified product image data. The defective product image generating unit 126 may also select a specific character, graphic or mark in the printing area A1 as the position where the defective image data is configured. Fig.11 (C)) is arranged in the vicinity A3 of the qualified product image data. Thus, it is possible to reproduce the bleeding of the ink beyond the printing area A1. In addition, the defective product image production unit 126 may also arrange the defective product image data in the printing area A1 in addition to the vicinity A3. The defective product image production unit 126 may also arrange the defective image data in a manner that a part of the defective image data overlaps with the printing area A1.
[0082] As described above, in the image processing device 12 of the third embodiment, the defective image data has a pixel value that is different from the base area A2 and the same as the printing area A1. In addition, the defective image data is produced using a bleeding model that reproduces the bleeding of the printing area within the range of the nearby area A3 adjacent to the printing area A1. Thus, the same bleeding as the actual poor printing is reproduced in the printing area A1. Therefore, according to the above-mentioned image processing device, various defects, especially bleeding, can be accurately reproduced in the defective product image used in the defective product inspection.
[0083] In the above description, the defect image generating unit 125 generates defect image data based on the extracted pixel values of both the printing area A1 and the base area A2. However, the defect image generating unit 125 may generate defect image data based only on the extracted pixel values of the base area A2. This is because as long as the defect image data has a pixel value different from that of the base area A2, the blurring can be reproduced.
[0084] <Modification> Instead of the above-mentioned bleeding model, the fuzzy model T24 described in the second embodiment may be arranged in the vicinity A3 (see Fig. 9 (C)) By setting the pixel selected in the blur model to a pixel value different from the pixel value of the base area A2 or a pixel value different from both the base area A2 and the print area A1, the blur of the print area A1 can be reproduced.
[0085] The embodiments of the present invention have been described above. However, the present invention is not limited to the above-described embodiments, and can be modified as needed.
[0086] For example, in the above-mentioned embodiment, a tablet is exemplified as an article having a surface printed thereon, but the article having a surface printed thereon is not limited thereto, and may be a card, an exterior part of a device, or the like.
[0087] In the above-mentioned embodiment, the case where the defective product image data has one stain, one missing character, blurring or blurring is described, but the defective product image data may have multiple stains, multiple missing characters, blurring or blurring.
[0088] In addition, in the above-mentioned embodiment, the case where the image processing device and the inspection machine are separately constructed is described. However, the image processing device may also be integrated with the inspection machine. In addition, in the above-mentioned embodiment, the case where a learning unit, i.e., AI, is mounted in the image processing device is described. However, the learning unit may also be provided outside the image processing device, i.e., it is separately constructed from the image processing device. In addition, the image processing device including the learning unit includes a processor such as a CPU (Central Processing Unit). The image processing device performs various processes by reading and executing one or more programs recorded in a non-volatile memory through a processor. For example, the non-volatile memory may be provided inside or outside the image processing device.
[0089] Description of Reference Numerals 1: Defective product inspection system; 11: Inspection machine; 12: Image processing device; 121: Communication unit; 122: Storage unit; 123: Acquisition unit; 124: Extraction unit; 125: Defect image production unit; 1251: Defect color determination unit; 1252: Defect shape determination unit; 1253: Defect size determination unit; 1254: Defect production unit; 126: Defective product image production unit; 127: Learning unit; 20: Stain; A1: Printing area; A2: Base area; A3: Nearby area.
Claims
1. An image processing device for producing an image used in the inspection of an article having a surface printed thereon, comprising: an acquisition unit that acquires image data of a conforming product determined to be a conforming product during inspection; an extraction unit for extracting a printed area where printing is performed and a base area where printing is not performed based on the acquired image data of the qualified product; A defect image generating unit, which generates defect image data according to the extracted printing area and / or the base area; as well as A defective product image production unit configures the produced defective image data in at least one of the printing area and the base area of the qualified product image data, and produces defective product image data judged as defective during inspection based on the qualified product image data.
2. The image processing device according to claim 1, wherein: The defect image production unit comprises: a defective color determination unit that acquires the extracted pixel value of the base region and determines the pixel value of the defective image data so as to be a pixel value different from the acquired pixel value of the base region; a defect shape determining unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect creation unit, which creates the defect image data, wherein the defect image data determines the pixel value, shape and size according to the extracted base area, The defective product image creating unit arranges the defect image data at least in the base region of the good product image data to create the defective product image data.
3. The image processing device according to claim 1, wherein: The defect image production unit comprises: a defective color determination unit that acquires the extracted pixel value of the printing area and determines the pixel value of the defective image data so as to be a pixel value different from the acquired pixel value of the printing area; a defect shape determining unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect creation unit, which creates the defect image data, wherein the defect image data determines the pixel value, shape and size according to the extracted printing area, The defective product image creating unit arranges at least the defect image data in the printing area of the good product image data to create the defective product image data.
4. The image processing device according to claim 1, wherein: The defect image production unit comprises: a defective color determination unit that acquires the extracted pixel value of the base region and determines the pixel value of the defective image data so as to be a pixel value different from the acquired pixel value of the base region; a defect shape determining unit that determines the shape of the defect image data; a defect size determination unit that determines the size of the defect image data; and a defect creation unit, which creates the defect image data, wherein the defect image data determines the pixel value, shape and size according to the extracted printing area, The defective product image creating unit creates the defective product image data by placing the defective image data in at least a portion of a vicinity of a region of the good product image data from an edge of the printing region to a position separated by a predetermined number of pixels.
5. An image processing method for producing an image used in the inspection of an article having a surface printed thereon, comprising: A step of acquiring image data of a qualified product determined to be a qualified product during inspection; A process of extracting a printed area and a base area where printing is not performed based on the acquired image data of the qualified product; A defect image producing step of producing defect image data according to the extracted printing area and / or the substrate area; as well as The defective image data is arranged in at least one of the printing area and the base area of the qualified product image data, and a defective product image data judged as a defective product during inspection is produced based on the qualified product image data.
Citation Information
Patent Citations
Image generation device, image inspection system, image generation method, and program
JP2022024541A