Image inspection device, image inspection method, and image inspection program

The image inspection device uses a neural network to recognize character types and calculates a quality score, addressing the issue of incorrect recognition in neural networks by ensuring accurate and reliable inspection results.

JP2026036647APending Publication Date: 2026-03-05KEYENCE CORP
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-01-24
Publication Date
2026-03-05

AI Technical Summary

Technical Problem

Existing character recognition using neural networks may incorrectly recognize abnormal character images as normal, leading to inappropriate inspection results.

Method used

An image inspection device and method that uses a neural network to recognize character types and calculates a quality score based on the similarity between a master image and the recognized character image, providing both character type and quality score outputs.

Benefits of technology

Ensures accurate and appropriate inspection results by using a quality score to validate the recognition accuracy of character types, improving the reliability of neural network-based character recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2026036647000001_ABST
    Figure 2026036647000001_ABST
Patent Text Reader

Abstract

To obtain appropriate inspection results when an OCR tool is implemented as an inspection tool using a neural network. [Solution] A control unit of an image inspection device executes an OCR tool as an inspection tool. When the OCR tool is executed, the control unit inputs a work image WI including a character image area CI to a neural network, and obtains a character type recognition result indicating the character type of each unit character image area UI and the position of the unit character image area UI based on information related to character types recognizable by the OCR tool. Furthermore, the control unit calculates a quality score indicating the similarity between the image of the unit character image area UI and a master image corresponding to the character type indicated in the character type recognition result based on the position of the unit character image area UI, and outputs the quality score Q in association with the character type indicated in the character type recognition result R.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to an image inspection device, an image inspection method, and an image inspection program that execute an OCR tool as an inspection tool. [Background technology]

[0002] Patent Document 1 discloses an image processing system that captures an image of characters printed on a medium and analyzes the image using an image processing device. The medium may be, for example, a medium attached to a product or the product packaging itself. The image processing device recognizes the characters printed on the product or the product, thereby checking the manufacturing process, transportation process, etc. of the product or the product. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Patent No. 4909216 Summary of the Invention [Problem to be solved by the invention]

[0004] It is conceivable to use a neural network to perform character recognition processing as described in Patent Document 1. When character recognition processing is performed using a neural network, there is an advantage in that character types relating to images of various shapes can be recognized, but there is also a problem in that character images that would be judged as abnormal by a human visual inspection may be correctly recognized as character types, and appropriate inspection results may not be obtained.

[0005] An object of the present invention is to provide an image inspection device, an image inspection method, and an image inspection program that can obtain appropriate inspection results when an OCR tool is executed as an inspection tool using a neural network. [Means for solving the problem]

[0006] The image inspection device according to the present invention comprises an image acquisition unit that acquires a workpiece image showing a workpiece, an inspection execution unit that executes an inspection tool and outputs inspection results for the workpiece image, and an inspection setting unit that accepts settings for the inspection tool, wherein the inspection setting unit accepts registration of a master image associated with a character type recognizable by the OCR tool as a setting for an OCR tool serving as the inspection tool, and the inspection execution unit executes the OCR tool serving as the inspection tool and inputs one of the workpiece image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and acquires a character type recognition result as the inspection result that indicates the character type of the unit character image area and the position of the unit character image area based on the information related to the recognizable character type, and calculates a quality score that indicates the similarity between the master image corresponding to the character type indicated in the character type recognition result and the image of the unit character image area based on the position of the unit character image area, and outputs the quality score in association with the character type indicated in the character type recognition result.

[0007] The image inspection device according to the present invention outputs not only the character type indicated in the character type recognition result but also a quality score associated with the character type. By using the quality score, appropriate inspection results can be obtained when an OCR tool using a neural network is executed as an inspection tool.

[0008] The image inspection method according to the present invention includes an image acquisition step of acquiring a workpiece image showing a workpiece; The method includes an inspection execution step of executing an inspection tool to output an inspection result for the work image, and an inspection setting step of accepting settings for the inspection tool, wherein the inspection setting step accepts registration of a master image in association with a character type recognizable by the OCR tool as a setting for an OCR tool serving as the inspection tool, and the inspection execution step executes the OCR tool serving as the inspection tool, inputs one of the work image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and obtains a character type recognition result as the inspection result indicating the character type of the unit character image area and the position of the unit character image area based on information related to the recognizable character type, calculates a quality score indicating the similarity between the master image corresponding to the character type indicated in the character type recognition result and the image of the unit character image area based on the position of the unit character image area, and outputs the quality score in association with the character type indicated in the character type recognition result.

[0009] According to the image inspection method of the present invention, not only the character type indicated in the character type recognition result but also the quality score associated with the character type is output. By using the quality score, appropriate inspection results can be obtained when an OCR tool using a neural network is executed as an inspection tool.

[0010] The image inspection program of the present invention causes an image inspection device to function as an image acquisition means for acquiring a workpiece image showing a workpiece, an inspection execution means for executing an inspection tool and outputting inspection results for the workpiece image, and an inspection setting means for accepting settings for the inspection tool. The inspection setting means accepts registration of a master image in association with a character type recognizable by the OCR tool as a setting for an OCR tool serving as the inspection tool, and the inspection execution means executes the OCR tool serving as the inspection tool to input one of the workpiece image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and obtains a character type recognition result as the inspection result indicating the character type of the unit character image area and the position of the unit character image area based on the information related to the recognizable character type, and calculates a quality score indicating the similarity between the master image corresponding to the character type indicated in the character type recognition result and the image of the unit character image area based on the position of the unit character image area, and outputs the quality score in association with the character type indicated in the character type recognition result.

[0011] According to the image inspection program of the present invention, not only the character type indicated in the character type recognition result but also a quality score associated with the character type is output. By using the quality score, appropriate inspection results can be obtained when an OCR tool using a neural network is executed as an inspection tool. [Brief explanation of the drawings]

[0012] [Figure 1] 1 is a schematic diagram of an image inspection device according to a first embodiment of the present invention. [Figure 2] FIG. 2 is a block diagram showing the electrical configuration of the image inspection device of FIG. 1. [Figure 3] FIG. 2 is a flow diagram showing a setting flow for an OCR tool executed by the control unit of FIG. 1. [Figure 4]4 is a schematic diagram showing an example of a screen displayed on the display when the control unit receives an additional instruction in step S4 of FIG. 3. FIG. [Figure 5] 5 is a schematic diagram showing an example of a screen that is displayed on the display following the screen of FIG. 4 when the control unit accepts an additional instruction in step S4 of FIG. 3. FIG. [Figure 6] 6 is a schematic diagram showing an example of a screen that is displayed on the display following the screen of FIG. 5 when the control unit accepts an additional instruction in step S4 of FIG. 3. FIG. [Figure 7] FIG. 4 is an example of a screen displayed on the display when the control unit accepts registration of a master image in step S7 of FIG. 3, and is a schematic diagram showing a state in which the user is selecting one of multiple master image candidates. [Figure 8] FIG. 8 is an example of a screen that is displayed on the display following the screen of FIG. 7 when the control unit accepts registration of a master image in step S7 of FIG. 3, and is a schematic diagram showing the state in which the user has selected one of multiple master image candidates as the master image. [Figure 9] FIG. 2 is a flow diagram showing an execution flow of an OCR tool executed by the control unit of FIG. 1. [Figure 10] 10 is a schematic diagram showing an example of a screen that the control unit causes the display to display in step S24 of FIG. 9. FIG. [Figure 11] 10 is a schematic diagram showing a modified example of a screen that the control unit causes the display to display in step S24 of FIG. 9. FIG. [Figure 12] FIG. 2 is a functional block diagram showing functions of the control unit of FIG. 1. DETAILED DESCRIPTION OF THE INVENTION

[0013] First Embodiment First, the overall configuration of an image inspection device 1 according to a first embodiment of the present invention will be described with reference to Fig. 1. The image inspection device 1 is used, for example, in a product manufacturing line.

[0014] The image inspection device 1 includes an imaging unit 11 that captures an image of a workpiece W, which is a product transported by a transport unit, and a control unit 12. The imaging unit 11 and the control unit 12 are electrically connected to each other.

[0015] The imaging unit 11 has a lens, a camera module including an imaging element, a lighting module for illuminating the workpiece W, and a control board for controlling each module. The imaging unit 11 generates workpiece image data in which the workpiece W is captured, and transmits the data to the control unit 12. The imaging unit 11 in this embodiment has a configuration in which the lens and lighting module are integrated, but may have a configuration in which the lens is replaceable or the lighting module is expandable externally depending on the type of workpiece W and the imaging environment.

[0016] The control unit 12 acquires the workpiece image by receiving the above data from the imaging unit 11. That is, the control unit 12 corresponds to the "image acquisition section" and "image acquisition means" according to the present invention.

[0017] The control unit 12 further executes an inspection tool, which will be described later, as an image inspection of the acquired workpiece image, and outputs the inspection results for the workpiece image. In other words, the control unit 12 corresponds to the "inspection execution unit" and "inspection execution means" of the present invention.

[0018] The image inspection device 1 is used with an input / output unit, which is an external device, electrically connected to the control unit 12. In this embodiment, the PC 2, control panel 3, and PLC 4 correspond to the input / output unit, which is an external device. The external device is a device external to the image inspection device 1 and is not included in the image inspection device 1. The input / output unit performs at least one of generating input to the control unit 12 and receiving output from the control unit 12. The PC 2 includes a display 15a (see FIGS. 4 to 8), a mouse, and a keyboard. A user of the image inspection device 1 can input desired setting information to the control unit 12 via the PC 2 by operating the mouse or keyboard. The PC 2 can receive output from the control unit 12 and display, on the display 15a, workpiece images acquired by the control unit 12 from the imaging unit 11 and inspection results for the workpiece images. The control panel 3 includes a touch panel display. The control panel 3 can display workpiece images and inspection results for the workpiece images output from the control unit 12, and can also input information to the control unit 12 based on operations on the display. The PLC 4 is electrically connected to the transport unit that transports the workpiece W and controls the transport by the transport unit. The PLC 4 can send a trigger input to the control unit 12 to control the timing of capturing an image of the workpiece W based on the control of the transport by the transport unit. The control unit 12 sends an ON / OFF output based on the inspection results of the workpiece image to the PLC 4. The PLC 4 performs predetermined control based on the ON / OFF output obtained from the control unit 12. For example, if the transport unit has a sorter that sorts products, the PLC 4 controls the sorter so that the products are sorted based on the ON / OFF output obtained from the control unit 12.

[0019] The control unit 12 receives settings for the inspection tool based on signals received from the input / output unit. That is, the control unit 12 corresponds to the "inspection setting section" and "inspection setting means" of the present invention.

[0020] In this embodiment, the imaging unit 11 captures an image of the workpiece W being transported by the transport unit, but may be configured to capture an image of the workpiece W being transported, or may be configured to capture an image of the workpiece W in a stationary state. Also, in this embodiment, the timing of imaging by the imaging unit 11 is controlled by the PLC 4, which controls both the control unit 12 and the transport unit, but is not limited to this. For example, the PLC 4 or the control unit 12 may receive a sensor output that detects that the workpiece W is located within the imaging field of view of the imaging unit 11, and the timing of imaging by the imaging unit 11 may be controlled based on the sensor output. Alternatively, the imaging unit 11 may be configured to constantly acquire frame images (images that constitute a video), and when the frame images satisfy predetermined conditions, the imaging unit 11 generates data of the workpiece image as the inspection target.

[0021] Furthermore, although the image inspection device 1 of this embodiment includes the imaging unit 11, it may not necessarily include the imaging unit 11. For example, the control unit 12 may be configured to be connected to an imaging device as an external device and acquire workpiece images from the imaging device.

[0022] Next, the electrical configuration of the image inspection device 1 will be described with reference to FIG.

[0023] The control unit 12 includes a CPU 121 , a DSP 122 , an FPGA 123 , an accelerator 124 , a memory 125 including RAM and ROM, and a communication board 126 .

[0024] The CPU 121 controls the entire image inspection device 1. The DSP 122 and FPGA 123 execute various signal processing operations. The accelerator 124 speeds up the signal processing operations performed by the DSP 122 and FPGA 123.

[0025] The memory 125 stores the workpiece image acquired from the imaging unit 11, information input from the input / output unit connected to the control unit 12, and the like.

[0026] The memory 125 also stores an image inspection program according to the present invention. More specifically, the memory 125 stores programs that describe the functions of the inspection tool, data used in each program, and the like.

[0027] The communication board 126 is electrically connected to each of the external devices, namely, the PC 2, the control panel 3, and the PLC 4, which are connected to the control unit 12. The control unit 12 transmits and receives signals to and from the external devices via the communication board 126.

[0028] Next, the functional configuration of the control unit 12 will be described with reference to Fig. 12. The control unit 12 includes an image acquisition unit 31, an inspection setting unit 32, and an inspection execution unit 33.

[0029] The image acquisition unit 31 acquires the workpiece image generated by the imaging unit 11. The image acquisition unit 31 sends the workpiece image to the inspection execution unit 33. The workpiece image acquired by the image acquisition unit 31 from the imaging unit 11 is also stored in the memory 125.

[0030] The inspection setting unit 32 receives setting information from an external device connected to the control unit 12. The inspection setting unit 32 acquires a workpiece image from the memory 125, generates GUI information for receiving setting information using the workpiece image, and outputs the GUI information to the external device. The setting information received by the inspection setting unit 32 includes the execution order of the inspection tools and reference information for the inspection tools. The inspection setting unit 32 stores the received setting information in the memory 125.

[0031] An inspection tool in the image inspection device 1 is a program that defines the image processing to be executed for image inspection by the image inspection device 1, and produces a certain output for an input image. A user of the image inspection device 1 can make the image inspection device 1 execute a desired image inspection by combining inspection tools. To this end, the user operates an external device to input the execution order of the inspection tools used in the image inspection and the reference information to be referenced when executing the inspection tools into the control unit 12 as setting information.

[0032] The image inspection device 1 in this embodiment is equipped with an OCR tool, an area measurement tool, and a count tool as inspection tools. The OCR tool is a tool that optically recognizes characters in the inspection area of ​​the workpiece image. The user sets, as reference information, information indicating the inspection area in the workpiece image, a dictionary (described later), and information related to the quality score. The area measurement tool is a tool that determines the area of ​​a portion of the inspection area that has a specified color and brightness. The user sets, as reference information, information indicating the inspection area in the workpiece image and color and brightness information. The count tool is a tool that counts objects of a specified shape in the inspection area of ​​the workpiece image. The user sets, as reference information, information indicating the inspection area, the shape of the object to be counted, and a threshold value to compare with the count number.

[0033] The inspection execution unit 33 executes the inspection tool on the workpiece image acquired from the imaging unit 11 by the image acquisition unit 31. At this time, the inspection execution unit 33 reads the setting information stored in the memory 125 by the inspection setting unit 32, and executes the inspection tool according to the setting information. The inspection execution unit 33 outputs the inspection results obtained as a result of executing the inspection tool to an external device connected to the control unit 12. The inspection results output to the external device differ depending on the output destination of the inspection results. The inspection results output to the PC 2 or the control panel 3 include display information that displays the workpiece image and the execution results of the inspection tool on the workpiece image. The display information may include information for superimposing the inspection area of ​​the inspection tool and the inspection results on the workpiece image. The inspection results output to the PLC 4 include information in a form that can be processed by the control program executed by the PLC 4. The inspection results output to the PLC 4 may include the same display information as the inspection results output to the PC 2 or the control panel 3.

[0034] Next, a setting flow for the OCR tool executed by the control unit 12 will be described with reference to Fig. 3. Each process in this setting flow corresponds to an "inspection setting step" according to the present invention. Each of the following processes is executed by the CPU 121 of the control unit 12 as an inspection setting section.

[0035] The control unit 12 first receives information indicating an inspection area in a workpiece image and inspection conditions for determining output as an OCR tool based on the character recognition results (step S1). In step S1, the control unit 12 displays the workpiece image on the display 15a of the PC2 and receives information indicating the inspection area through a user operation on the displayed workpiece image. The control unit 12 stores the information indicating the inspection area in the memory 125 in association with the inspection tool to be set. The control unit 12 also receives the inspection conditions via the PC2. The inspection conditions are, for example, a character string. If the recognized characters match the character string, the execution result of the OCR tool is output as a "good product."

[0036] After step S1, the control unit 12 determines whether or not a signal indicating an additional instruction to update the character types recognizable by the OCR tool has been received from the PC 2 (step S2). The signal is transmitted from the PC 2 to the control unit 12 in response to, for example, a user selecting a GUI element displayed on the display 15a of the PC 2.

[0037] The image inspection device 1 is shipped in a state where the OCR tool can recognize certain characters. That is, at the time of shipping of the image inspection device 1, the memory 125 stores an internal dictionary. The memory 125 stores, as the internal dictionary, character types and data for recognizing character images as predetermined character types in association with each other. When the inspection execution unit 34 executes the OCR tool as an inspection tool, the inspection execution unit 34 recognizes characters in a work image by referring to the internal dictionary stored in the memory 125.

[0038] The additional instruction received by the control unit 12 means that an additional dictionary to be referenced together with the built-in dictionary is to be stored in the memory 125. The user of the image inspection device 1 stores the additional dictionary in the memory 125 in order to correctly recognize character images for which correct recognition results cannot be obtained by executing an OCR tool that references only the built-in dictionary, and to obtain as recognition results character types that the built-in dictionary does not have as recognition results.

[0039] If the control unit 12 determines that it has not received a signal indicating an addition instruction (step S2: NO), it determines whether or not an additional dictionary is stored in the memory 125 (step S3). If it determines that an additional dictionary is not stored in the memory 125 (step S3: NO), the control unit 12 ends the setting flow. On the other hand, if it determines that an additional dictionary is stored in the memory 125, the control unit 12 proceeds to step S5.

[0040] In this embodiment, the data for recognizing character images as predetermined character types included in the built-in dictionary stored in memory 125 is not suitable for calculating a quality score. Therefore, if no additional dictionary is stored in memory 125, the test setting step for the quality score is not performed. However, if the built-in dictionary has character images for the quality score in addition to the data for recognizing character types, the test setting step for the quality score may be performed even if no additional dictionary is stored in memory 125.

[0041] If it is determined that a signal indicating an addition instruction has been received (step S2: YES), the control unit 12 accepts setting information for the additional dictionary based on information input via the PC 2 (step S4). In step S4, the control unit 12 displays a work image for setting the additional dictionary on the display 15a of the PC 2. The user operates the PC 2 to specify a character image to be registered in the additional dictionary from the work image and specify a character type corresponding to the specified work image. The control unit 12 associates the character type specified by the user with the character image and stores the result in the memory 125 as an additional dictionary. As a result, when the inspection execution unit 34 executes an OCR tool that references the additional dictionary, the character image specified by the user is recognized as the character type specified by the user.

[0042] After step S4, the control unit 12 determines whether or not a signal indicating that a master image for quality score registration is to be performed has been received from the PC 2 (step S5). The signal is transmitted from the PC 2 to the control unit 12 in response to, for example, a user selecting a GUI element displayed on the display 15a of the PC 2.

[0043] If it is determined that a signal indicating that a master image is to be registered has not been received (step S5: NO), the control unit 12 determines whether a master image for the quality score is stored in the memory 125 (step S6). If it is determined that a master image is not stored in the memory 125 (step S6: NO), the control unit 12 ends the setting flow. On the other hand, if it is determined that a master image is stored in the memory 125 (step S6: YES), the control unit 12 proceeds to step S8.

[0044] When it is determined that a signal indicating that a master image is to be registered has been received (step S5: YES), the control unit 12 accepts setting information related to the master image (step S7). In step S7, the control unit 12 displays character images stored in the memory 125 as an additional dictionary on the display 15a of the PC2. The user operates the PC2 to specify a master image for the quality score from the character images displayed on the display 15a. The control unit 12 stores the master image specified by the user via the PC2 in the memory 125 in association with the character type. As a result, when the inspection execution unit 34 executes an OCR tool that references the additional dictionary, a quality score is calculated for a character image that is recognized as the character type for which the master image is registered.

[0045] After step S7, the control unit 12 determines whether or not a signal indicating that a threshold value for the quality score is to be set has been received from the PC 2 (step S8). The signal is transmitted from the PC 2 to the control unit 12 in response to, for example, a user selecting a GUI element displayed on the display 15a of the PC 2.

[0046] If it is determined that a signal indicating that a threshold value for the quality score is to be set has not been received (step S8: NO), the control unit 12 proceeds to step S10.

[0047] When it is determined that a signal indicating that a quality score threshold should be set has been received (step S8: YES), the control unit 12 accepts the setting of the quality score threshold via the PC 2 (step S9). In step S9, the control unit 12 stores the quality score threshold in the memory 125. The quality score threshold does not depend on the character type, that is, it may be set commonly for a plurality of character types, or it may be set individually for each character type.

[0048] After step S9, the control unit 12 accepts settings for the quality score calculation process (step S10). In step S10, the control unit 12 accepts settings for whether or not to calculate multiple quality scores for each master image. When the control unit 12 receives setting information from the PC 2 indicating that multiple quality scores are to be calculated, the control unit 12 turns on a multiple calculation flag stored in the memory 125. The multiple calculation flag is referenced when calculating the quality scores. The setting information is transmitted from the PC 2 to the control unit 12, for example, in response to a user selecting a GUI element displayed on the display 15a of the PC 2.

[0049] After step S10, the control unit 12 ends the setting flow.

[0050] The control unit 12 repeatedly executes the setting flow while the dialog for setting the OCR tool of the image inspection device 1 is running.

[0051] The process of accepting a setting as to whether or not to calculate multiple quality scores for each master image corresponds to the process of "accepting a setting as to whether or not to calculate a first quality score and a second quality score as a quality score calculation process."

[0052] Next, an example of the process of step S4 in FIG. 3 will be described with reference to FIGS.

[0053] In step S4, first, as shown in Fig. 4, for example, an image including the character type to be instructed to be added is displayed on the display 15a of the PC 2. The image is a work image WI including a character image area CI of the six characters "ABCDEF," and may be one that has been acquired in advance from the imaging unit 11 and stored in the memory 125. The character image area CI includes a unit character image area UI for each of the six characters "ABCDEF." Above each unit character image area UI, a character type recognition result R is displayed as an inspection result for the work image WI.

[0054] While viewing the image displayed on the display 15a, the user of the image inspection device 1 identifies a unit character image area to be added as a target of an additional instruction, and inputs an additional instruction to the control unit 12 via the PC 2 to add the unit character image area as a character type recognizable by the OCR tool. FIG. 4 shows an example in which the user of the image inspection device 1 operates the mouse or keyboard constituting the PC 2 to select a unit character image area recognized as "A" among the six characters "ABCDEF" as a target of an additional instruction. When the user selects "A" in FIG. 4 and clicks the "Register" button (GUI element 51), the screen displayed on the display 15a changes to that shown in FIG. 5. In this embodiment, for convenience of explanation, a unit character image area in which a character type is correctly recognized is selected. However, the unit character image area selected as a target of additional learning by the user of the image inspection device 1 may be an area that has been recognized as a unit character image area but whose character type has been incorrectly recognized, or an area that has not been recognized as a unit character image area. This allows the user to give additional instructions and obtain improved execution results of the OCR tool when the desired recognition results are not obtained by executing the OCR tool with reference to the built-in dictionary or the additional dictionary stored in memory 125 at that time.

[0055] FIG. 5 shows an example in which a user of the image inspection device 1 operates the mouse or keyboard of the PC 2 to specify that the unit character image "A" selected in FIG. 4 be registered as dictionary No. 002 of character type A, the character type selected to be updated, in the additional dictionary being set up. As shown in FIG. 5, the inspection setting unit 32 displays a table consisting of rows indicating the registration status for each character type as display information for accepting settings related to the additional dictionary. The column for Dictionary No. 000 in the table indicates whether the character type is registered in the built-in dictionary, i.e., whether the data required to recognize the character type is stored in the memory 125 as a built-in dictionary. Since the character types "8," "9," "A," "B," "C," and "D" shown in FIG. 5 are all character types registered in the built-in dictionary, a dictionary icon is displayed in the column for Dictionary No. 000. In the example shown in FIG. 5, of the character types "8," "9," "A," "B," "C," and "D," only the character type "A" is registered in the additional dictionary. When the user clicks the "OK" button (GUI element 61) after specifying the registration destination in Figure 5, the unit character image of "A" selected in Figure 4 is registered as an additional dictionary in addition to the character image already registered as dictionary No. 001, and the screen displayed on display 15a changes to Figure 6.

[0056] 5, the action of the user clicking the "OK" button (GUI element 61) after specifying the registration destination corresponds to inputting an additional instruction to the control unit 12 to update the selected character type "A" to a character type that can be recognized by the OCR tool. In response to this user action, the control unit 12 accepts the additional instruction.

[0057] FIG. 6 shows that the registration of the unit character image of dictionary No. 002 for the selected character type "A" has been completed, i.e., the control unit 12 stores in the memory 125 an additional dictionary in which the additional unit character image included in the addition instruction corresponds to the character type specified in the addition instruction. An "additional unit character image" refers to an image of one character added as a character type recognizable by an OCR tool. Multiple characters, such as "cm," may also be treated as a "single character." In the example of FIG. 6, the character image of "A" depicted below the "selected character," i.e., the additional unit character image, is stored in the memory 125 as an additional dictionary of dictionary No. 002 associated with the character type "A." The control unit 12 storing the additional unit character image in the memory 125 as an additional dictionary corresponds to the control unit retaining the additional unit character image as an additional dictionary.

[0058] 5 and 6, a thumbnail image is displayed on the display 15a as the image of the character type "A." The control unit 12 may register the thumbnail image in the supplemental dictionary, or may register the original image of the thumbnail image in the supplemental dictionary. When a thumbnail image is registered in the supplemental dictionary, the processing speed increases.

[0059] Next, an example of the process of step S7 in FIG. 3 will be described with reference to FIGS.

[0060] In step S7, first, as shown in FIG. 7, for example, master image candidates MIa and MIb are displayed for each character type on the display 15a provided in the PC 2. FIG. 7 shows a state in which a user of the image inspection device 1 operates the mouse or keyboard constituting the PC 2 to select candidate MIa from candidates MIa and MIb, which are images of character type "A" in dictionary Nos. 001 and 002. In the example of FIG. 7, candidate MIa being selected by the user is surrounded by a dashed-dotted rectangular frame. When the user moves the cursor, the dashed-dotted rectangular frame moves. When the user clicks the "Select" button (GUI element 81) with candidate MIa designated in FIG. 7, the screen displayed on the display 15a transitions to that shown in FIG. 8.

[0061] 8 shows that the rectangular frame surrounding the candidate MIa selected by the user has been changed from a dashed line to a solid line, and that the candidate MIa has been registered as the master image of the character type "A." The control unit 12 accepts the registration of the master image in response to the user clicking the "Select" button (GUI element 81) in FIG.

[0062] In this way, the control unit 12 differentiates the display manner of the candidate MIa for the master image "being selected" by the user shown in Fig. 7 from the candidate MIa for the master image "selected" by the user as the master image shown in Fig. 8. In Fig. 7, the candidate MIa is displayed in a manner surrounded by a rectangular frame drawn with dashed lines, and in Fig. 8, the candidate MIa is displayed in a manner surrounded by a rectangular frame drawn with solid lines.

[0063] Next, the OCR tool execution flow executed by the control unit 12 will be described with reference to Fig. 9. The CPU 121 of the control unit 12 executes each of the following processes.

[0064] When the control unit 12 receives a trigger input from, for example, the PLC 4 instructing the execution of an image inspection flow including an OCR tool, the control unit 12 starts the flow.

[0065] The control unit 12 first acquires a workpiece image WI from the imaging unit 11 (step S11). As described above with reference to Fig. 4, the workpiece image WI may include not only one unit character image area UI but also a character image area CI configured with unit character image areas UI for each of the six characters, for example, "ABCDEF." Step S11 corresponds to the "image acquisition step" of the present invention.

[0066] After step S11, the control unit 12 inputs the workpiece image WI acquired in step S11 into the neural network (step S12). The processing from step S12 onward corresponds to the "inspection execution step" of the present invention. In the above description of step S12, for convenience, it was stated that the control unit 12 inputs the workpiece image WI into the neural network. However, in more detail, the control unit 12 identifies an inspection area from the workpiece image WI using information indicating the inspection area set as setting information related to the OCR tool. Then, the control unit 12 inputs an image of the identified inspection area into the neural network as the workpiece image WI.

[0067] The neural network is, for example, a convolutional neural network, and outputs feature quantities that indicate the characteristics of the input data of the workpiece image WI. The feature quantities are represented as vectors in a feature space.

[0068] After step S12, the control unit 12 identifies a feature corresponding to the unit character image area UI from the feature output from the neural network (step S13). If the workpiece image WI includes multiple unit character image areas UI, a feature is acquired for each unit character image area UI. Note that the position of the unit character image area UI in the workpiece image WI may be identified by a known method, and may be identified by pixel values ​​of the workpiece image WI, for example, as described in Patent Document 1.

[0069] After step S13, the control unit 12 acquires a character type recognition result as an inspection result for each unit character image area UI based on the feature amount acquired in step S13 and information related to character types recognizable by the OCR tool (step S14). In step S14, the control unit 12 calculates a confidence score P for each character type of the unit character image area UI using the feature amount associated with each character type as information related to character types recognizable by the OCR tool. The confidence score P indicates the probability that the character type shown in the unit character image area UI corresponds to the character type indicated in the character type recognition result R. Then, the control unit 12 outputs the character recognition result by taking the character type with the highest confidence score P as the character type of the unit character image area UI. The character type recognition result indicates the character type of the unit character image area UI included in the work image WI acquired in step S11 and the position (x, y coordinates) of the unit character image area UI.

[0070] After step S14, the control unit 12 determines whether the multiple calculation flag stored in the memory 125 is ON (step S15).

[0071] If it is determined that the multiple calculation flag is not ON, that is, the multiple calculation flag is OFF (step S15: NO), the control unit 12 calculates a single quality score for each unit character image region UI (step S16).

[0072] The quality score indicates the degree of similarity between a master image corresponding to the character type indicated in the character type recognition result obtained in step S14 and an image of the unit character image area UI included in the work image WI obtained in step S11. As described above, the master image is associated with each character type recognizable by the OCR tool and stored in memory 125. For example, the greater the degree of dirt or rubbing in the image of the unit character image area UI, and the lower the density, the lower the quality score.

[0073] The normalized correlation method is used to calculate the quality score. The normalized correlation method is a method of deriving the correlation coefficient between the test image and the master image as the similarity, and the similarity when the correlation coefficient is maximized is adopted as the quality score. Note that although the normalized correlation method is used in this embodiment, any method capable of calculating the similarity between images may be used, and the quality score may also be calculated using a pixel difference method. The pixel difference method is a method of deriving the difference in pixel value for each pixel between the test image and the master image and deriving the similarity based on the difference derived for all pixels. The test image may be either an image including text and a background, or an image of only the text portion excluding the background. However, the latter is more preferable from the viewpoint of improving the accuracy of the quality score related to the character type.

[0074] Furthermore, the quality score is calculated using information about the position of the unit character image area UI indicated in the character type recognition result acquired in step S14. That is, the control unit 12 calculates the quality score based on the position of the unit character image area UI indicated in the character type recognition result acquired in step S14. Specifically, the control unit 12 does not use the entire work image WI as the calculation area for the quality score, but uses a certain range based on the unit character image area UI in the work image WI as the calculation area, compares the image of the inspection area with the master image while slightly changing the x and y coordinates, and calculates the highest quality score within the certain range as the quality score for that unit character image area UI. That is, the control unit 12 performs a normalized correlation search on the unit character image area UI in the work image WI to calculate a single quality score. Note that, if the position at which the highest quality score is calculated as a result of the normalized correlation search is different from the position of the unit character image area UI, the position at which the highest quality score is calculated may be updated as the position of the unit character image area UI.

[0075] If it is determined that the multiple calculation flag is ON (step S15: YES), the control unit 12 calculates multiple quality scores for each unit character image area UI (step S17). The multiple quality scores include a first quality score and a second quality score. The second quality score indicates the similarity when at least one of the angle of the master image relative to the unit character image area UI and the scale of the master image relative to the unit character image area UI is changed relative to the calculation of the first quality score. In step S17, a normalized correlation search is performed using a master image in which at least one of the angle relative to the unit character image area UI and the scale relative to the unit character image area UI has been changed, and multiple quality scores are calculated for each change in the master image.

[0076] The multiple quality scores may include three or more quality scores. That is, the multiple quality scores may include a third quality score in addition to the first and second quality scores. In this case, the third quality score indicates the similarity when at least one of the angle of the master image relative to the unit character image area UI and the scale of the master image relative to the unit character image area UI is changed relative to the calculation of the first quality score and the calculation of the second quality score. In this case, the highest quality score identified in step S18 described below is one of the first quality score and the second quality score, and any other quality score is the other of the first quality score and the second quality score.

[0077] Furthermore, when calculating the quality score, differences may occur in the angle, scale, etc. between the inspection area and the area of ​​the master image. In such cases, if the angle, scale, etc. of the master image relative to the inspection area are kept constant and a single quality score is calculated as in step S16, this difference cannot be addressed. Therefore, the above difference can be addressed by calculating multiple quality scores by changing the angle, scale, etc. of the master image relative to the inspection area as in step S17.

[0078] After step S17, the control unit 12 identifies the highest quality score among the multiple quality scores calculated in step S17 for each unit character image region UI (step S18). That is, the control unit 12 identifies the higher quality score from the first quality score and the second quality score.

[0079] After step S16 or step S18, the control unit 12 refers to the information stored in the memory 125 and determines whether or not a threshold value for the quality score has been set (step S19).

[0080] If it is determined that a quality score threshold has been set (step S19: YES), the control unit 12 determines whether the quality score calculated in step S16 or determined in step S18 for all unit character image areas UI whose positions are determined by the character type recognition results is equal to or greater than the threshold stored in memory 125 (step S20).

[0081] In step S20, the control unit 12 compares the quality score with a threshold for each unit character image region UI. The threshold to be compared with the quality score here may be set for each character type.

[0082] If it is determined that no threshold value for the quality score has been set (step S19: NO) or if it is determined that the quality scores of all unit character image regions UI are equal to or greater than the threshold value (step S20: YES), the control unit 12 determines whether the character type indicated in the character type recognition result acquired in step S14 satisfies the inspection conditions (step S21), and determines the execution result of the OCR tool according to the determination result. If the control unit 12 determines that the character type indicated in the character type recognition result satisfies the inspection conditions (step S21: YES), the control unit 12 determines the execution result of the OCR tool as "good" (step S22). If the control unit 12 determines that the character type indicated in the character type recognition result does not satisfy the inspection conditions (step S21: NO), the control unit 12 determines the execution result of the OCR tool as "bad" (step S23).

[0083] If it is determined that the character type recognition result obtained in step S14 includes a unit character image area UI whose quality score is not equal to or greater than the threshold (step S20: NO), the control unit 12 determines the execution result of the OCR tool as "bad" (step S23).

[0084] After step S22 or step S23, the control unit 12 displays the quality score in association with the character type indicated in the character type recognition result acquired in step S14 (step S24), and ends the OCR tool execution flow.

[0085] In step S11, an image of the unit character image area UI of the work image WI may be input to the neural network, instead of the work image WI including the character image area CI.

[0086] In step S18, the highest quality score among the multiple quality scores is identified, and in step S24, the identified quality score is output, but this is not limited to this. In other words, any of the multiple quality scores may be output as the quality score, and for example, the lowest score among the multiple quality scores may be output as the quality score. Specifically, the lower of the first quality score and the second quality score may be output as the quality score. Alternatively, the average value of the multiple quality scores may be output as the quality score.

[0087] Next, an example of the process of step S24 in FIG. 9 will be described with reference to FIG.

[0088] 10, for example, the character type indicated in the character type recognition result R acquired in step S14, the confidence score P, and the quality score Q calculated in step S16 or identified in step S18 are displayed on a single screen for each unit character image area UI together with the work image WI on the display 15a provided in the PC 2. The confidence score P indicates the probability that the character type indicated in the unit character image area UI corresponds to the character type indicated in the character type recognition result R, and may be calculated by any method.

[0089] 10, a frame T indicating the position of the unit character image area UI corresponding to each character type is further displayed on the screen. The frame T corresponds to the "position indication section" according to the present invention.

[0090] The control unit 12 changes the display mode of at least one of the character type, quality score Q, and frame T shown in the character type recognition result R, depending on the quality score. For example, as shown in Fig. 10, the frame T corresponding to the character type "A" with a quality score Q of 50 or more is displayed with a solid line, and the frame T corresponding to the character types "B," "C," "E," and "F" with a quality score Q of less than 50 is displayed with a dashed line.

[0091] The display in step S24 may be in a display form as shown in FIG.

[0092] The screen displayed on the display 15a in Figure 11 is approximately the same as the screen displayed on the display 15a in Figure 10, but for character types "C" and "F" whose quality score Q is less than 30, which is set as the threshold, the character type is not output in the character type recognition result R.

[0093] In FIG. 11, for the character types “C” and “F” whose quality score Q is less than 30, the confidence score P and the quality score Q are output, excluding the character type recognition result R, but the confidence score P and the quality score Q do not have to be output.

[0094] As described above, according to this embodiment, when an OCR tool is executed as an inspection tool using a neural network (see steps S12 to S14 in FIG. 9), not only the character type indicated in the character type recognition result R but also the quality score Q associated with the character type is output (see steps S16, S17, and S24 in FIG. 9 and FIG. 10). By using the quality score Q, appropriate inspection results can be obtained.

[0095] The control unit 12 calculates the quality score based on the position of the unit character image area UI shown in the character type recognition result acquired in step S14. If the control unit 12 calculates the quality score using the entire work image WI as the inspection area, it takes time to calculate the quality score. In contrast, in this embodiment, the control unit 12 does not use the entire work image WI as the score calculation area, but calculates the quality score using a certain range based on the unit character image area UI in the work image WI as the calculation area. This reduces the time required to calculate the quality score.

[0096] The control unit 12 receives an additional instruction to update the character types recognizable by the OCR tool as a setting related to the OCR tool, and stores an additional dictionary in which additional unit character images included in the additional instruction correspond to the character types specified in the additional instruction (see step S2 in FIG. 3 and FIGS. 4 to 6). Thereafter, the control unit 12 receives registration of a master image in response to a user's input based on the additional dictionary (see step S4 in FIG. 3 and FIGS. 7 and 8). In this case, the user can select a master image based on the additional dictionary and register the master image.

[0097] The control unit 12 calculates multiple quality scores in step S17, identifies the highest score among the multiple quality scores in step S18, and outputs the quality score identified in step S18 in step S24 (see FIG. 9). In this case, by calculating multiple quality scores by changing the angle, scale, etc. of the master image relative to the inspection area, it is possible to deal with differences in the angle, scale, etc. of the character type between the inspection area and the area of ​​the master image.

[0098] The control unit 12 outputs a character type recognition result in accordance with a comparison between the quality score and a threshold value (see steps S20 to S22 in FIG. 9, and FIGS. 10 and 11). In this case, an appropriate inspection result according to the quality score can be obtained based on a preset threshold value.

[0099] The control unit 12 displays, as the quality score output, the character type indicated in the character type recognition result R and the quality score Q corresponding to the character type together with the workpiece image WI (see FIG. 10). In this case, the visibility of the inspection results by the user is improved.

[0100] The control unit 12 displays, together with the work image WI, the character type indicated in the character type recognition result R, the quality score Q corresponding to that character type, and a frame T indicating the position of the unit character image region UI corresponding to that character type, as a quality score output (see FIG. 10). In this case, the control unit 12 changes the display mode of at least one of the character type, the quality score Q, and the frame T according to the quality score. By changing the display mode, the user can easily visually recognize the inspection result according to the quality score.

[0101] The control unit 12 displays the quality score Q as an output of the quality score together with the confidence score P (see FIG. 10). This allows the user to visually recognize the inspection result according to the quality score Q as well as the confidence score P related to the recognition result by the OCR tool.

[0102] The control unit 12 displays the master image candidates MIa and MIb for each character type, and differentiates the display mode of the master image candidate MIa being selected by the user (see FIG. 7) from the master image candidate MIa selected by the user as the master image (see FIG. 8). In this case, the user can easily select the master image.

[0103] The control unit 12 accepts a setting as to whether to calculate multiple quality scores, including a first quality score and a second quality score, as part of the quality score calculation process (see steps S7 and S8 in FIG. 3). Calculating multiple quality scores can accommodate differences in the angle, scale, and other characteristics of the character types between the inspection area and the master image area, but it takes more time to process than calculating a single quality score. Some users may prefer to shorten the processing time rather than accommodate the above differences. In this embodiment, accepting a setting in advance as to whether to calculate multiple quality scores allows for flexible response to user requests.

[0104] Second Embodiment Next, an image inspection device according to a second embodiment of the present invention will be described.

[0105] The control unit of the image inspection device according to the first embodiment stores the additional unit character images included in the addition instruction as an additional dictionary, and then accepts registration of a master image in accordance with user input based on the additional dictionary (see steps S1 to S4 in FIG. 3, and FIGS. 7 and 8).

[0106] In contrast, the control unit of the image inspection device according to the second embodiment stores the additional unit character image included in the addition instruction as an additional dictionary, and then registers the additional unit character image as a master image without relying on user input. In this case, the user does not need to select a master image based on the additional dictionary, which saves the user time and effort.

[0107] Third Embodiment Next, an image inspection device according to a third embodiment of the present invention will be described.

[0108] The control unit of the image inspection device according to the first embodiment stores the additional unit character images included in the addition instruction as an additional dictionary, and then accepts registration of a master image in accordance with user input based on the additional dictionary (see steps S1 to S4 in FIG. 3, and FIGS. 7 and 8).

[0109] In contrast, the control unit of the image inspection device according to the third embodiment stores the additional unit character images included in the addition instruction as an additional dictionary, and then accepts the registration of a master image independently of the settings related to the additional dictionary. For example, when registering a master image, the control unit displays an image based on data independent of the additional dictionary, rather than an image based on the additional dictionary. The user can select and register a master image from among these images. In this case, the registration of a master image can be flexibly accepted based on various data independent of the additional dictionary.

[0110] <Modification> Although the preferred embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments, and various design modifications are possible within the scope of the claims.

[0111] Multiple master images may be registered for one character type. When multiple master images are registered, for example, the control unit according to the above-described embodiment may calculate a score indicating the similarity between each of the multiple master images and the image of the unit character image area UI when calculating the quality score in steps S16 and S17, and may use the maximum of the calculated scores as the quality score. In this case, the search range for each master image may be changed according to the confidence score P of the unit character image area UI identified in step S14. More specifically, when multiple master images including a first master image and a second master image are registered for one character type, the confidence score P of the unit character image area UI is the higher of the confidence score P1 when compared with the first master image and the confidence score P2 when compared with the second master image. Therefore, it is estimated that a quality score calculated using a master image with a higher confidence score P is higher than a quality score calculated using a master image with a lower confidence score P. Therefore, for example, when the confidence score P1 is higher than the confidence score P2, the range of the normalized correlation search using the first master image can be made wider than the range of the normalized correlation search using the second master image, thereby enabling efficient calculation of multiple quality scores. When outputting the quality score in step S24, the control unit 12 may output the dictionary number in which the master image corresponding to the score is registered together with the adopted quality score.

[0112] Furthermore, when multiple master images are registered for one character type, the positional relationship between the unit character image area UI and one of the multiple master images when a score to be used as a quality score is calculated in comparison with the master image may be used to determine the search range for master images other than the one of the multiple master images. By using such a configuration, the search range for subsequent master images can be narrowed down to a range that is likely to have the maximum score, and multiple quality scores can be calculated efficiently.

[0113] The control unit 12 is not limited to a configuration that accepts registration of a master image based on a user operation. For example, the control unit 12 may be configured to accept registration of all additional unit character images stored as an additional dictionary as master images, regardless of a user operation. This configuration reduces the effort required for the user to set a master image.

[0114] The inspection execution unit is not limited to displaying the character type and the quality score together with the workpiece image as the output of the quality score. For example, the inspection execution unit may display the character type and the quality score on a screen separate from the screen on which the workpiece image is displayed.

[0115] In the above-described embodiment, the display 15a outputs the display information, but the present invention is not limited to this. For example, in the above-described embodiment, the display may be displayed on the control panel 3 or the PLC 4 (external equipment outside the image inspection device 1) connected to the control unit 12. Also, the information may be output by a method other than visual information (for example, a speaker that outputs audio). In this case, the control unit may output the character type and quality score by audio via the speaker.

[0116] The image inspection program according to the present invention can be distributed by recording it on a removable recording medium such as a flexible disk or a fixed recording medium such as a hard disk, or can be distributed via a communication line. [Explanation of symbols]

[0117] 1. Image inspection equipment 11 Imaging unit 12 Control unit (image acquisition unit, inspection execution unit, inspection setting unit) 121 CPU 122 DSP 123 FPGA 124 Accelerator 125 memory 126 Communication Board 2 PC 15a Display 3. Control Panel 4 PLC 31 Image acquisition unit 32 Inspection setting section 33 Inspection Execution Department CI Character Image Area MIa,MIb Master image candidates P Confidence Score Q Quality Score R Character type recognition result (test result) T Position indicator UI unit character image area double work WI work image

Claims

1. an image acquisition unit that acquires a workpiece image showing the workpiece; an inspection execution unit that executes an inspection tool and outputs an inspection result for the workpiece image; an inspection setting unit that accepts settings for the inspection tool, the inspection setting unit accepts registration of a master image in association with a character type recognizable by the OCR tool as a setting related to the OCR tool serving as the inspection tool; The inspection execution unit executes an OCR tool as the inspection tool, inputting one of the work image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and acquiring a character type recognition result as the inspection result, which indicates the character type of the unit character image area and the position of the unit character image area, based on the information related to the recognizable character type; calculating a quality score indicating a similarity between the master image corresponding to the character type indicated in the character type recognition result and an image of the unit character image region based on the position of the unit character image region; an image inspection device that outputs the quality score in association with the character type indicated in the character type recognition result.

2. The test setting unit receiving an additional instruction to update the character types that can be recognized by the OCR tool as a setting related to the OCR tool; an additional dictionary in which the additional unit character images included in the addition instruction are associated with the character types specified in the addition instruction; The image inspection device according to claim 1 , wherein the master image is registered based on the additional dictionary.

3. The test setting unit receiving an additional instruction to update the character types that can be recognized by the OCR tool as a setting related to the OCR tool; an additional dictionary in which the additional unit character images included in the addition instruction are associated with the character types specified in the addition instruction; The image inspection device according to claim 1 , wherein the additional unit character image is registered as the master image.

4. The test setting unit receiving an additional instruction to update the character types that can be recognized by the OCR tool as a setting related to the OCR tool; an additional dictionary in which the additional unit character images included in the addition instruction are associated with the character types specified in the addition instruction; The image inspection device according to claim 1 , wherein the registration of the master image is accepted independently of the setting related to the additional dictionary.

5. The inspection execution unit calculating a first quality score indicating a degree of similarity between the master image and an image of the unit character image region; calculating a second quality score indicating the degree of similarity when at least one of an angle of the master image with respect to the unit character image region and a scale of the master image with respect to the unit character image region is changed in relation to the calculation of the first quality score; The image inspection device according to claim 1 , wherein one of the first quality score and the second quality score is output as the quality score.

6. the test setting unit accepts a setting of a threshold related to the quality score calculated by the test execution unit; The image inspection device according to claim 1 , wherein the inspection execution unit outputs an execution result of the OCR tool in response to a comparison between the quality score and the set threshold value.

7. 2. The image inspection device according to claim 1, wherein the inspection execution unit displays, as an output of the quality score, the character type indicated in the character type recognition result and the quality score corresponding to the character type together with the work image.

8. The inspection execution unit As an output of the quality score, the character type indicated in the character type recognition result, the quality score corresponding to the character type, and a position indicator indicating the position of the unit character image area corresponding to the character type are displayed together with the work image; The image inspection device according to claim 1 , wherein a display mode of at least one of the character type, the quality score, and the position indicator is changed in accordance with the quality score.

9. 2. The image inspection device according to claim 1, wherein the inspection execution unit displays, as the output of the quality score, the quality score together with a confidence score indicating a probability that the character type shown in the unit character image area corresponds to the character type shown in the character type recognition result.

10. The test setting unit Displaying candidates for the master image for each of the character types; The image inspection device according to claim 1 , wherein the display mode of the candidate master image being selected by a user and the candidate master image selected by a user as the master image are made different from each other.

11. The image inspection device according to claim 5 , wherein the inspection setting unit accepts a setting as to whether or not the inspection execution unit is to calculate the first quality score and the second quality score as part of the quality score calculation process.

12. an image acquisition step of acquiring a workpiece image showing the workpiece; an inspection execution step of executing an inspection tool and outputting an inspection result for the workpiece image; an inspection setting step of accepting settings for the inspection tool, The inspection setting step includes accepting registration of a master image in association with a character type recognizable by the OCR tool as a setting related to the OCR tool serving as the inspection tool; The inspection execution step executes an OCR tool as the inspection tool, inputting one of the work image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and acquiring a character type recognition result as the inspection result, which indicates the character type of the unit character image area and the position of the unit character image area, based on the information related to the recognizable character type; calculating a quality score indicating a similarity between the master image corresponding to the character type indicated in the character type recognition result and an image of the unit character image region based on the position of the unit character image region; and outputting the quality score in association with the character type indicated in the character type recognition result.

13. Image inspection equipment, an image acquisition means for acquiring a workpiece image showing the workpiece; an inspection execution means for executing an inspection tool and outputting an inspection result for the workpiece image; and an inspection setting means for receiving settings for the inspection tool; In an image inspection program that functions as the inspection setting means accepts registration of a master image in association with a character type recognizable by the OCR tool as a setting related to the OCR tool serving as the inspection tool; The inspection execution means executes an OCR tool as the inspection tool, inputting one of the work image including a character image area and an image of a unit character image area of ​​the work image into a neural network, and acquiring a character type recognition result as the inspection result, which indicates the character type of the unit character image area and the position of the unit character image area, based on the information related to the recognizable character type; calculating a quality score indicating a similarity between the master image corresponding to the character type indicated in the character type recognition result and an image of the unit character image region based on the position of the unit character image region; an image inspection program that outputs the quality score in association with the character type indicated in the character type recognition result.

Citation Information

Patent Citations

  • JP1974009216A