Inspection area setting device, inspection area setting method, and inspection area setting program

The inspection area setting device adjusts inspection areas using both inspectable ranges and image detection segments to address misalignment and non-inspection areas, ensuring accurate and reliable image-based visual inspections.

WO2025253699A1PCT designated stage Publication Date: 2025-12-11KONICA MINOLTA INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
PCT/JP2025/004241
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2024-06-04
Filing Date
2025-02-07
Publication Date
2025-12-11

AI Technical Summary

Technical Problem

Conventional image inspection devices struggle with setting accurate inspection areas due to misalignment during transportation of larger objects, difficulty in setting areas based on edge information for large machines, and inclusion of non-inspection areas like jigs, leading to inappropriate inspection areas and potential overdetection.

Method used

An inspection area setting device and method that utilize a correction unit to adjust inspection areas based on both an inspectable range and detection segments within the image, incorporating a first correction unit for alignment with the inspectable range and a second correction unit for luminance-based adjustments, along with a selection unit to determine the most appropriate inspection area.

Benefits of technology

The solution allows for the automatic setting of precise inspection areas that exclude non-targeted segments and include all relevant segments, improving the accuracy and reliability of image-based visual inspections.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure JP2025004241_11122025_PF_FP_ABST
    Figure JP2025004241_11122025_PF_FP_ABST
Patent Text Reader

Abstract

Provided are a device, a method, and a program that make it possible to more appropriately set an inspection area in visual inspection that uses images. This inspection area setting device comprises: a setting unit that sets an inspection area in an input image (40); and a correction unit that defines a result obtained by correcting said inspection area as a new inspection area. The correction unit includes: a first correction unit which performs correction on the basis of an inspectable range that is set as a range suitable for inspection; a second correction unit which performs correction on the basis of a detection segment distributed in the input image; and an execution unit which inputs the inspection area to the first correction unit, and inputs an output therefrom to the second correction unit to execute correction on the output. The correction unit outputs, as a new inspection area, an inspection area (442) resulting from correction by the second correction unit.
Need to check novelty before this filing date? Find Prior Art

Description

Inspection area setting device, inspection area setting method, and inspection area setting program

[0001] The present invention relates to an apparatus, a method, and a program for setting an inspection area to be inspected in an image-based visual inspection.

[0002] Visual inspection using images is performed in manufacturing processes of industrial products, etc. Visual inspection using images can automate the detection of surface defects, etc. by capturing an image of an object to be inspected using a camera or the like and processing the image. For example, Patent Document 1 describes an image inspection device that extracts a predetermined area from an image of an object to be inspected and performs an inspection.

[0003] JP 2013-140090 A

[0004] In the image inspection device described in Patent Document 1, the inspection area to be inspected in an image is set by comprehensively evaluating color, brightness, and edge information for a sample image of a non-defective product captured under the same conditions as actual inspection. The position and shape of the set inspection area are fixed. However, for example, when the size of the object to be inspected increases, misalignment during transportation may occur, causing the area to fall outside the inspection area. Furthermore, when there is little edge information in the image, such as in the case of a large machine such as an automobile, it is difficult to set the inspection area based on edge information. Specifically, if a non-inspection area such as a jig is included in the captured image, overdetection may occur during image processing. Therefore, conventional image inspection devices determine the brightness of the non-inspection area or create inspectable range data from virtual data, and then exclude the non-inspection area through methods other than image processing. However, because the inspectable range data is created in advance from virtual data, it may not fit the actual image and errors may occur. Relying on an inspectable range with errors may result in an inappropriate inspection area being set. The present invention has been made to solve the above problems, and aims to provide an apparatus, method, and program that can more appropriately set an inspection area in an image-based appearance inspection.

[0005] In order to solve the above problems, an inspection area setting device, an inspection area setting method, and an inspection area setting program according to the present invention comprise the following configurations (1) to (19): (1) An inspection area setting device comprising: a setting unit that sets an inspection area from an input image; and a correction unit that sets a result of correcting the inspection area as a new inspection area, the correction unit having: a first correction unit that performs correction based on an inspectable range that is set as a range suitable for inspection; a second correction unit that performs correction based on detection segments distributed in the input image; and an execution unit that inputs the inspection area to one of the first correction unit and the second correction unit and inputs the output thereof to the other to execute correction.

[0006] (2) The inspection area setting device according to (1), wherein the inspectable range is set in advance by simulation. (3) The inspection area setting device according to (2), wherein the first correction unit sets an overlapping portion of the input inspection area and the inspectable range as the corrected inspection area. (4) The inspection area setting device according to (2), wherein the second correction unit performs correction based on the luminance of the detection segments distributed across the inside and outside of the input inspection area.

[0007] (5) The inspection area setting device described in (4), wherein the second correction unit corrects the inspection area to include a detection segment that is outside the input inspection area and has pixels connected to pixels inside. (6) The inspection area setting device described in (4), wherein the second correction unit corrects the inspection area to include a detection segment that is outside the input inspection area and has a predetermined area or more. (7) The inspection area setting device described in (2), wherein the correction unit further has a simulation unit that simulates a virtual input image under conditions for setting the inspectable range, and a position adjustment unit that adjusts the position of the inspectable range using the results of the simulation, and the execution unit inputs the inspectable range whose position has been adjusted by the position adjustment unit to the first correction unit and causes it to perform the correction.

[0008] (8) The inspection area setting device according to (7), wherein the position adjustment unit adjusts the position of the inspectable range by aligning a detection segment in the input image with a detection segment in the simulation. (9) The inspection area setting device according to (7), wherein the position adjustment unit adjusts the position of the inspectable range by aligning edge information in the input image with edge information in the simulation. (10) The inspection area setting device according to (7), wherein the position adjustment unit adjusts the position of the inspectable range for a location specified by a user by aligning information in the input image with information in the simulation.

[0009] (11) The inspection area setting device according to any one of (1) to (10), wherein the execution unit inputs the inspection area set by the setting unit to the first correction unit and inputs the output of the first correction unit to the second correction unit to perform correction. (12) The inspection area setting device according to (11), wherein the correction unit further has a selection unit that selects one of the first inspection area that is the output of the first correction unit and the second inspection area that is the output of the second correction unit based on a predetermined criterion.

[0010] (13) The inspection area setting device according to (12), wherein the selection unit selects the first inspection area if the similarity between the first inspection area and the second inspection area is less than a predetermined threshold, and selects the second inspection area if the similarity is equal to or greater than a predetermined threshold. (14) The execution unit inputs the inspection area set by the setting unit to the second correction unit, and inputs the output of the second correction unit to perform correction.

[0011] (15) An inspection area setting system comprising: a setting unit that sets an inspection area from an input image; and a correction unit that sets the result of correcting the inspection area as a new inspection area, wherein the correction unit comprises: a first correction unit that makes correction based on an inspectable range that is set as a range suitable for inspection; a second correction unit that makes correction based on detection segments distributed in the input image; and an execution unit that inputs the inspection area to one of the first correction unit and the second correction unit and inputs the output to the other to perform correction.

[0012] (16) An inspection area setting method comprising the steps of: setting an inspection area from an input image, correcting the inspection area to set it as a first inspection area based on an inspectable range set as a range suitable for inspection, correcting the first inspection area to set it as a second inspection area based on detection segments distributed in the input image, and selecting one of the first inspection area and the second inspection area to set it as a new inspection area based on a predetermined criterion. (17) An inspection area setting method comprising the steps of setting an inspection area from an input image, correcting the inspection area based on detection segments distributed in the input image, and further correcting the corrected inspection area to set it as a new inspection area based on an inspectable range set as a range suitable for inspection.

[0013] (18) An inspection area setting program that causes a computer to execute the following procedures: setting an inspection area from an input image, correcting the inspection area to set it as a first inspection area based on an inspectable range that is set as a range suitable for inspection, correcting the first inspection area to set it as a second inspection area based on detection segments distributed in the input image, and selecting one of the first inspection area and the second inspection area to set it as a new inspection area based on a predetermined criterion. (19) An inspection area setting program that causes a computer to execute the following procedures: setting an inspection area from an input image, correcting the inspection area based on detection segments distributed in the input image, and further correcting the corrected inspection area to set it as a new inspection area based on an inspectable range that is set as a range suitable for inspection.

[0014] According to the present invention, it is possible to provide an apparatus, a method, and a program that can more appropriately set an inspection area in an appearance inspection using an image.

[0015] 1 is a diagram illustrating a situation in which an inspection area setting device according to an embodiment is used. FIG. 2 is a block diagram of an inspection area setting device according to an embodiment. FIG. 3 is a diagram illustrating an inspection area set by a setting unit in the first embodiment. FIG. 4 is a diagram illustrating an inspectable range in the first embodiment. FIG. 5 is a diagram illustrating an overlapping portion between the inspection area set by the setting unit and the inspectable range. FIG. 6 is a diagram illustrating an inspection area corrected by a first correction unit in the first embodiment. FIG. 7 is a diagram illustrating detection segments distributed across the inside and outside of the inspection area. FIG. 8 is a diagram illustrating an inspection area further corrected by a second correction unit in the first embodiment. FIG. 9 is a diagram illustrating detection segments in a simulation. FIG. 10 is a diagram illustrating detection segments in an input image. FIG. 11 is a diagram illustrating adjustment of the position of the inspectable range. FIG. 12 is a diagram illustrating edge information in a simulation. FIG. 13 is a diagram illustrating edge information in an input image. FIG. 14 is a diagram illustrating adjustment of the position of the inspectable range. FIG. 15 is a diagram illustrating a user-specified location in a simulation. FIG. 16 is a diagram illustrating a user-specified location in an input image. FIG. 17 is a diagram illustrating adjustment of the position of the inspectable range. FIG. 18 is a diagram illustrating an example of an overlapping first inspection area and a second inspection area. FIG. 10 is a diagram illustrating an inspection area set by a setting section in a second embodiment. FIG. 11 is a diagram illustrating an inspection area corrected by a second correction section in a second embodiment. FIG. 12 is a diagram illustrating an inspection area corrected by a second correction section in a second embodiment, with an inspectable range superimposed thereon. FIG. 13 is a diagram illustrating an inspection area further corrected by a first correction section in a second embodiment. FIG. 14 is a diagram illustrating an inspection area setting system according to an embodiment. FIG. 15 is a flowchart of an inspection area setting process according to an embodiment. FIG. 16 is a flowchart of an inspection area setting process according to an embodiment.

[0016] Embodiments and modifications of the present invention will be described with reference to the drawings, but the present invention is not limited to these embodiments and modifications.

[0017] First Embodiment An inspection area setting device 1 according to a first embodiment will be described with reference to FIGS. 1 to 6B. The inspection area setting device 1 is an information processing device that sets an inspection area in an image-based inspection. The inspection area is an area to be inspected in a captured image. In an image-based inspection, inspection is performed on a portion of the captured image, rather than the entire image. By setting the inspection area, it is possible to perform the inspection without inspecting parts of the object that are not the object of inspection, or jigs that are not the object of inspection. While the object of inspection is not particularly limited, the following description will be given taking the example of a visual inspection of a vehicle's paint. As illustrated in FIG. 1, the visual inspection can be performed by combining the inspection area setting device 1, a light source 81 that emits inspection light, a camera 82 that captures the light reflected from the object of inspection 90, and an appearance inspection device 200 that detects paint defects and the like through image processing. The object of inspection 90 may be, for example, the entire vehicle or the vehicle body.

[0018] 2, the inspection area setting device 1 includes a setting unit 10 and a correction unit 20. The correction unit 20 includes a first correction unit 21, a second correction unit 22, and an execution unit 23. Each component of the inspection area setting device 1 will be described below.

[0019] (Setting Unit) The setting unit 10 is a means for setting an inspection area 41 from an input image 40. As illustrated in Fig. 3, the input image 40 is an image of an inspection object 90 captured by a camera 82. The input image 40 includes an area formed by strong reflected light, and this area is called a detection segment. In the example of Fig. 3, a large detection segment 421 is located in the center of the door 91, and a detection segment 423, which is smaller in area than the detection segment 421, is located on the outer edge of the door 91. The doorknob 92 also includes a small detection segment 422.

[0020] The image-based visual inspection is performed on the detection segment included in the inspection area 41. The inspection area 41 can be set in a rectangular shape so as to surround the detection segment. In this example, the inspection area 41 includes three detection segments 421, 422, and 423. The setting of the inspection area 41 can be performed by predetermined image processing or artificial intelligence inference, and here it is set by artificial intelligence inference based on the input image 40.

[0021] (Correction Unit) The correction unit 20 is a means for correcting the inspection area 41 set by the setting unit 10 and setting the corrected result as a new inspection area 42. The inspection area 41 includes three detection segments 421, 422, and 423. Here, the detection segments 422 and 423, which are found in areas where there is a large change in the shape or material of the object to be inspected, are not subject to inspection. For this reason, the correction unit 20 excludes the detection segments 422 and 423 and corrects the inspection area 41 so that it includes the entire detection segment 421, thereby setting the new inspection area 42. The correction unit 20 has a first correction unit 21, a second correction unit 22, and an execution unit 23.

[0022] (First Correction Unit) The first correction unit 21 is a means for correcting an input inspection area based on an inspectable range 411 set as a range suitable for inspection. Here, the input inspection area is the inspection area 41 set by the setting unit 10. The inspectable range 411 is input from outside the inspection area setting device 1. The inspectable range 411 can be set using the depth of field of the camera 82 that captures the input image 40. As illustrated in FIG. 4 , the inspectable range 411 is set with respect to a frame (image frame) 451 of the camera 82 with respect to a virtual input image 43. Here, the inspectable range 411 is set in advance by simulation. The simulation can be performed using the shape of the inspection object 90 and the positions and orientations of the light source 81 and the camera 82 as conditions. Design data can be used for the shape of the inspection object 90.

[0023] As illustrated in FIG. 5A , first correction unit 21 calculates an overlapping portion 461 between inspection area 41 and inspectable range 411. Then, first correction unit 21 determines the area including overlapping portion 461 as the corrected inspection area. Here, first correction unit 21 determines a rectangular area circumscribing overlapping portion 461 as first inspection area 441, which is the corrected inspection area. As illustrated in FIG. 5B , detection segments 422 and 423 are entirely outside first inspection area 441. Part of detection segment 421 is inside first inspection area 441, and the rest is outside, so that detection segment 421 is distributed across the inside and outside of first inspection area 441.

[0024] (Second Correction Unit) The second correction unit 22 corrects the input inspection area based on the detection segments distributed in the input image 40. In this example, the input inspection area is the first inspection area 441 set by the first correction unit 21. The second correction unit 22 performs correction based on the luminance of the detection segments. The second correction unit 22 can correct the input inspection area so that it includes a detection segment that is located outside the input inspection area and has pixels connected to pixels inside. Connected pixels refers to pixels whose luminance difference is less than a predetermined value being located at a distance less than a predetermined value. In this embodiment, the predetermined value for the luminance difference is ±10% or less, and the predetermined distance is 3 pixels or less. The second correction unit 22 may predetermine a luminance value and correct pixels whose luminance is equal to or greater than that value so that they include the detection segment with the connected pixels. As illustrated in FIG. 6A , a case will be described in which the detection segment 4210 is distributed across both the inside and outside of the first inspection area 441. The portion of detection segment 4210 inside first inspection region 441 is designated detection segment 4211, and the portion outside is designated detection segment 4212. Detection segment 4212 is a detection segment that is outside first inspection region 441 and has pixels 32 connected to pixels 31 inside. Second correction unit 22 corrects the inspection region so that it includes detection segment 4212. In other words, second correction unit 22 designates second inspection region 442, which is an extension of first inspection region 441, as the corrected inspection region.

[0025] As illustrated in Figure 6B, the second inspection area 442, which is the corrected inspection area obtained by correcting the first inspection area 441 in Figure 5B, includes the detection segment 421. The entire detection segments 422 and 423 are located outside the second inspection area 442. The correction by the second correction unit 22 can correct the inspection area to include the entire detection segment 421 to be inspected while excluding the detection segments 422 and 423 that are not to be inspected. Note that in the correction by the second correction unit 22, an additional condition may be added, so that the correction includes an outer detection segment that has multiple pixels, for example, three or more, connected to an inner pixel.

[0026] (Execution Unit) The execution unit 23 is a means for inputting the inspection area 41 to one of the first correction unit 21 and the second correction unit 22 and inputting the output thereof to the other unit to perform correction. Here, the execution unit 23 inputs the inspection area 41 to the first correction unit 21 and inputs the output thereof to the second correction unit 22 to perform correction. The execution unit 23 also inputs data to the position adjustment unit, simulation unit, and selection unit (described later) to perform processing, receives the output, and performs data input / output with the outside. The execution unit 23 inputs the inspection area 41 output from the setting unit 10 and the inspectable range 411 input from the outside to the first correction unit 21 to perform correction. Next, the execution unit 23 inputs the first inspection area 441 output from the first correction unit 21 and the input image 40 input from the outside to the second correction unit 22 to perform correction. Then, the execution unit 23 outputs the second inspection area 442 output from the second correction unit 22 as a new inspection area.

[0027] The inspection area setting device 1 having the above configuration includes a setting unit that sets an inspection area from an input image and a correction unit that sets the result of correcting the inspection area as a new inspection area. The correction unit includes a first correction unit that performs correction based on the inspectable range, a second correction unit that performs correction based on the detection segment, and an execution unit that inputs the set inspection area to the first correction unit and inputs its output to the second correction unit to perform correction, thereby enabling the device to automatically output an appropriate inspection area by performing correction based on the inspectable range and then correction based on the detection segment. The second correction unit corrects the inspection area based on the luminance of the detection segment distributed both inside and outside the inspection area to include a detection segment that is outside the inspection area and has pixels connected to pixels inside the inspection area. This allows the inspection area to be expanded and corrected to include the entire detection segment, even if the detection segment is distributed both inside and outside the inspection area after correction by the first correction unit.

[0028] Inference using artificial intelligence has tended to set the inspection area to include detection segments that are not the target of inspection, such as reflected light from a jig, even if the input image contains such segments. Therefore, conventionally, a correction has been performed to exclude detection segments that are not the target of inspection using an inspectable range created in advance. However, the inspectable range created in advance may not fit the input image acquired for each inspection. The inspection area setting device 1 can automatically output an appropriate inspection area that excludes detection segments that are not the target of inspection and includes detection segments that are the target of inspection by further correcting the inspection area based on the detection segments of the input image after the correction using the inspectable range.

[0029] Note that first correction unit 21 may set the overlapping portion of the input inspection area and inspectable range 411 as the corrected inspection area. That is, the inspection area does not have to be rectangular, and overlapping portion 461 of inspection area 41 and inspectable range 411 in Fig. 5A can be used as the inspection area as is. Although the outer shape of the inspection area of ​​inspection area setting device 1 is rectangular, it does not have to be rectangular, and the shape of the inspection area is not particularly limited.

[0030] 6A , for example, when a detection segment 4212 outside the first inspection region 441 occupies an area equal to or greater than a predetermined area, the second correction unit 22 may perform correction to include the detection segment 4212. Note that the detection segment 4212 is part of the detection segment 4210 that is distributed both inside and outside the first inspection region 441.

[0031] The predetermined area may be, for example, 10% of the area of ​​the detection segment 4211 inside the first inspection region 441, or may be a value between 10% and 30%. The predetermined area is a lower limit value of the area of ​​the detection segment. Furthermore, in addition to being equal to or greater than the predetermined area, an upper limit may be set. In this case, the second correction unit 22 can make correction so that the detection segment 4212 includes an area that is 10% to 100% of the area of ​​the detection segment 4211 inside the first inspection region 441.

[0032] The predetermined area, which is the lower limit of the area, may be determined using the number of pixels, and may be, for example, a value between 100 and 300. Furthermore, when a detection segment 4212 outside the first inspection region 441 has pixels connected to pixels inside and occupies an area equal to or greater than the predetermined area, the second correction unit 22 may make correction so as to include the detection segment 4212.

[0033] 7A to 9C . The first to third modified examples differ from the inspection area setting device 1 according to the first embodiment in that the correction unit includes a simulation unit and a position adjustment unit. In common with the first to third modified examples, the correction unit 20 further includes a simulation unit 26 that performs a simulation of a virtual input image 43 under condition C1 under which the inspection range 411 is set, and a position adjustment unit 25 that adjusts the position of the inspection range 411 using the results of the simulation. The execution unit 23 inputs the inspection range 412, the position of which has been adjusted by the position adjustment unit 25, to the first correction unit 21, causing the first correction unit 21 to perform correction.

[0034] The simulation unit 26 is a means for simulating a virtual input image 43. The simulation of the virtual input image 43 can be performed under conditions C1 for setting an inspectable range 411. The conditions C1 are conditions for setting the inspectable range 411, and include the shape of the inspection target 90 and the positions and orientations of the light source 81 and the camera 82. The simulation unit 26 can use, for example, design data for the shape of the inspection target 90, etc. The position adjustment unit 25 is a means for adjusting the position of the inspectable range 411. The position of the inspectable range 411 is adjusted using the input image 40 and the results of the simulation by the simulation unit 26.

[0035] The execution unit 23 inputs the condition C1 under which the inspectable range 411 is set to the simulation unit 26, causing the simulation unit 26 to execute a simulation of a virtual input image 43. The execution unit 23 also inputs the input image 40, the inspectable range 411, and the simulation results of the simulation unit 26 to the position adjustment unit 25, causing the position adjustment of the inspectable range 411. The execution unit 23 then inputs the inspectable range 412, the position of which has been adjusted by the position adjustment unit 25, to the first correction unit 21, causing the first correction unit 21 to execute correction. The first to third modified examples differ in the process of adjusting the position of the inspectable range 411 in the position adjustment unit 25. Next, the position adjustment of the inspectable range 411 in each of the first to third modified examples will be described.

[0036] The position adjustment unit 25 of the first modified example focuses on the detection segment of the input image 40, and adjusts the position of the inspection range by aligning the detection segment of the input image 40 with the detection segment in the simulation. As illustrated in Fig. 7A , in the virtual input image 43, the inspection range 411 includes the entire virtual detection segment 4531 in the simulation, and excludes detection segments 4532 and 4533.

[0037] On the other hand, as illustrated in FIG. 7B , when the inspection range 411 is superimposed on the input image 40, the detection segment 4231 in the input image 40 is not included in the inspection range 411. This may be caused, for example, by the fact that the relative positional relationship between the actually installed inspection target 90 and the light source 81 or camera 82 differs from condition C1. As illustrated in FIG. 7C , the position adjustment unit 25 aligns the virtual detection segment 4531 so that it overlaps with the detection segment 4231 in the input image 40. The alignment is performed by fixing the input image 40 and translating or rotating the virtual input image 43. The position adjustment unit 25 moves the virtual input image 43, for example, so that the overlap area between the detection segment 4231 and the virtual detection segment 4531 is maximized, and the inspection range 411 after the movement can be set to the adjusted inspection range 412.

[0038] The position adjustment unit 25 of the second modified example focuses on the edges of the input image 40 and adjusts the position of the inspectable range by aligning the edge information of the input image 40 with the edge information in the simulation. As shown in Fig. 8A, an edge 46 of the object to be inspected in the simulation is displayed in a virtual input image 43. The edge 46 is, for example, the outer edge of a door.

[0039] As illustrated in FIG. 8B , when the inspectable range 411 is superimposed on the input image 40, the positional relationship with the edge 47 differs from that of the virtual input image 43, and the edges 46 and 47 do not coincide. As illustrated in FIG. 8C , the position adjustment unit 25 aligns the edge 46 in the virtual input image 43 so that it coincides with the edge 47 of the input image 40. As in the first modified example, the alignment is performed by fixing the input image 40 and translating or rotating the virtual input image 43. The position adjustment unit 25 moves the virtual input image 43, for example, so that the overlap area of ​​the edges 46 and 47 is maximized, and the inspectable range 411 after the movement can be set to the adjusted inspectable range 412.

[0040] The position adjustment unit 25 of the third modified example adjusts the position of the inspectable range 411 for a location specified by the user by aligning the information in the input image 40 with the information in the simulation. In the third modified example, the user can specify a desired location on the inspection target 90. The user specifies the desired location in the input image 40 and the virtual input image 43. The desired location may be specified by providing a display device for displaying the input image, etc., in the inspection area setting device 1 and specifying a position on the image displayed on the display device, or by inputting numerical values ​​such as coordinates. Furthermore, the input image 40 may be specified by marking the inspection target 90. As illustrated in FIG. 9A , a location 481 specified by the user is displayed in the virtual input image 43.

[0041] As illustrated in FIG. 9B , when the inspectable range 411 is superimposed on the input image 40, the positional relationship with the user-specified location 480 differs from that of the virtual input image 43, and the user-specified locations 480 and 481 do not match. As illustrated in FIG. 9C , the position adjustment unit 25 aligns the location 481 specified by the user in the virtual input image 43 so that it matches the location 480 specified by the user in the input image 40. As in the first modified example, the alignment is performed by fixing the input image 40 and translating or rotating the virtual input image 43. The position adjustment unit 25 moves the virtual input image 43 so that the user-specified locations 480 and 481 match, and the inspectable range 411 after the movement can be set to the adjusted inspectable range 412. The location specified by the user may be a point or a line, or may be an area surrounded by a line. The position adjustment unit 25 can adjust the inspectable range 411 so that the overlapping area of ​​the user-specified areas is maximized.

[0042] The first to third variants have a position adjustment unit that adjusts the position of the inspectable range, so that the position of the pre-set inspectable range can be adjusted to suit each input image, and the inspectable range can be more appropriately reflected in the correction of the inspection area.

[0043] 10A and 10B , a fourth modification in which the correction unit has a selection unit will be described. In the fourth modification, the correction unit 20 further has a selection unit 24 that selects one of a first inspection area 441 that is the output of the first correction unit 21 and a second inspection area 442 that is the output of the second correction unit 22 based on a predetermined criterion. The selection unit 24 selects the first inspection area 441 if the similarity between the first inspection area 441 and the second inspection area 442 is less than a predetermined threshold, and selects the second inspection area 442 if the similarity is equal to or greater than the predetermined threshold.

[0044] 10A and 10B illustrate examples of the first inspection area 441 and the second inspection area 442 input to the selection unit 24. To explain the relationship with the detection segment, the detection segment 4220 of the input image 40 is also illustrated. A criterion can be set so that the selection unit 24 selects the first inspection area 441 in FIG. 10A and the second inspection area 442 in FIG. 10B as the new inspection area 42. The selection unit 24 selects one of the first inspection area 441 and the second inspection area 442 based on a preset criterion. Here, the preset criterion is the similarity between the first inspection area 441 and the second inspection area 442. Here, the similarity is the value obtained by dividing the area of ​​((first inspection area)∩(second inspection area)) by the area of ​​((first inspection area)∪(second inspection area)). The area can be expressed as the number of pixels.

[0045] The selection unit 24 selects the first inspection area 441 if the similarity is less than a predetermined threshold, and selects the second inspection area 442 if the similarity is equal to or greater than the predetermined threshold. The predetermined threshold can be set to a value between 0.6 and 1, for example, and is set to 0.6 here. In the fourth modified example, the execution unit 23 inputs the first inspection area 441 and the second inspection area 442 to the selection unit 24 and causes it to perform selection. Then, the execution unit 23 outputs the inspection area output from the selection unit 24 as a new inspection area 42.

[0046] In the fourth modification, the correction unit includes a selection unit that selects one of the first and second inspection areas, enabling the correction unit to select and output a more appropriate inspection area. The selection unit selects the first inspection area when the similarity between the first inspection area and the second inspection area is smaller than a threshold, and selects the second inspection area when the similarity is larger than a threshold. A small similarity between the first inspection area and the second inspection area corresponds to the presence of detected segments distributed across the inside and outside of the first inspection area, and a large portion not included in the first inspection area. The first inspection area is a corrected inspection area based on the inspectable range, and the portion not included in the first inspection area may be outside the range suitable for inspection. Therefore, the inspection area setting device selects the first inspection area when the similarity between the first inspection area and the second inspection area is smaller than a threshold, thereby improving the reliability of the new inspection area. The fourth modification can be combined with the first to third modifications.

[0047] Second Embodiment Next, an inspection area setting device 2 according to a second embodiment will be described with reference to Figures 11A to 11D. The inspection area setting device 2 differs from the first embodiment in that the execution unit 23 inputs the inspection area 41 set by the setting unit 10 to the second correction unit 22, and inputs the output of the second correction unit 22 to the first correction unit 21 to perform correction, but is otherwise the same. As illustrated in Figure 11A, the inspection area 41 set by the setting unit 10 is set in a rectangular shape, encompassing part of the detection segment 426 and detection segments 427 and 428 that are not to be inspected. The detection segment 426 is distributed across the inside and outside of the inspection area 41.

[0048] The execution unit 23 inputs the inspection area 41 and the input image 40 to the second correction unit 22 and causes the second correction unit 22 to perform correction. As illustrated in FIG. 11B , the inspection area 443 corrected by the second correction unit 22 encompasses the entire detection segment 426. The execution unit 23 inputs the inspection area 443 and the inspectable range 411 to the first correction unit 21 and causes the first correction unit 21 to perform correction. As illustrated in FIG. 11C , a portion of the detection segment 426 is encompassed within the inspectable range 411. The entire detection segments 427 and 428 are outside the inspectable range 411. The first correction unit 21 calculates an overlapping portion 462 between the inspection area 443 and the inspectable range 411, and defines the area encompassing the overlapping portion 462 as the corrected inspection area. Here, the first correction unit 21 defines a rectangular area circumscribing the overlapping portion 462 as the corrected inspection area 444. 11D , the inspection area 444 corrected by the first correction unit 21 includes the entire detection segment 426 and excludes the detection segments 427 and 428. The execution unit 23 then outputs the inspection area 444 as a new inspection area 42.

[0049] In the inspection area setting device 2 according to the second embodiment, the execution unit inputs the inspection area set by the setting unit to the second correction unit, and inputs the output of the second correction unit to cause the first correction unit to perform correction. This allows a new inspection area to be created by correcting the result based on the inspectable range, based on the detection segments of the input image, so as to encompass all of the detection segments distributed across the inside and outside of the inspection area, thereby ensuring reliability in setting the inspection area. The inspection area setting device 2 according to the second embodiment can be combined with the modified examples described in the first embodiment.

[0050] [Inspection Area Setting System] Next, an inspection area setting system 100 according to an embodiment will be described with reference to Fig. 12. The inspection area setting system 100 comprises a setting unit 10 that sets an inspection area 41 from an input image 40, and a correction unit 20 that sets a result of correcting the inspection area as a new inspection area. Similar to the inspection area setting device 1, the correction unit 20 comprises a first correction unit that performs correction based on an inspectable range that is set as a range suitable for inspection, a second correction unit that performs correction based on detection segments distributed in the input image, and an execution unit that inputs the inspection area to one of the first correction unit and the second correction unit and inputs the output of the first correction unit to the other to perform correction.

[0051] As illustrated in FIG. 12 , the inspection area setting system 100 includes, in addition to the inspection area setting device 1, a server 52, a user terminal 53, and a storage device 60, all of which are interconnected via a network 70. The server 52 is equipped with a simulation unit 26, which can execute a simulation of a virtual input image. The inspection area setting device 1, the server 52, the user terminal 53, and the storage device 60 each have a communication interface, allowing them to communicate with other devices and terminals. The user terminal 53 has an input device such as a keyboard and an output device such as a display, and can be used to confirm the inspection area in the input image and specify alignment points when adjusting the position of the inspectable range. The storage device 60 can store and provide design data of the object to be inspected, simulation results and conditions of the inputable range, etc. The network 70 is, for example, a local area network (LAN) or the Internet. Here, as an example, an appearance inspection device 200 is connected to the network 70, and a light source 81 and a camera 82 are connected to the appearance inspection device 200.

[0052] Similar to the inspection area setting device 1, the inspection area setting system 100 can automatically output an appropriate inspection area that excludes detection segments that are not to be inspected and includes detection segments that are to be inspected. This can distribute the load on the device, increase the degree of freedom in placement, and improve user convenience. Note that a separate server may be provided, and the position adjustment unit 25, for example, may be placed on that server.

[0053] [Inspection Area Setting Method] Next, two inspection area setting processes according to the embodiments will be described with reference to FIGS. 13 and 14 . The processing in each step is performed by the inspection area setting devices 1 and 2, and an outline of the processing flow will be described. One of the inspection area setting processes can be performed by the inspection area setting device 1 according to the first embodiment. One of the inspection area setting processes includes step S20 of setting an inspection area from an input image, step S50 of correcting the inspection area to set a first inspection area based on an inspectable range set as a range suitable for inspection, step S60 of correcting the first inspection area to set a second inspection area based on detection segments distributed in the input image, and step S70 of selecting one of the first inspection area or the second inspection area to set a new inspection area based on a predetermined criterion. One of the inspection area setting processes can further include step S40 of adjusting the inspectable range. Here, the case where step S40 of adjusting the inspectable range is included will be described.

[0054] 13 , when the inspection area setting process is started, the setting unit 10 receives the input image 40 (step S10), sets an inspection area, and outputs it to the correction unit 20 (step S20). The correction unit 20 also receives an inspectable range 411 from an external device (step S30). The execution unit 23 of the correction unit 20 inputs the conditions under which the inspectable range is set to the simulation unit 26, causing the simulation unit 26 to execute a simulation of a virtual input image. The execution unit 23 then inputs the simulation results, the received input image, and the inspectable range to the position adjustment unit 25, causing the position adjustment of the inspectable range to be executed (step S40). The position adjustment of the inspectable range may be the alignment of the detection segment in the first modified example, the alignment of edge information in the second modified example, or the alignment of a location designated by the user in the third modified example.

[0055] The execution unit 23 inputs the inspection area and the inspectable range after the position adjustment to the first correction unit 21, which then executes a process of correcting the inspection area to form a first inspection area (step S50). The execution unit 23 also inputs the input image and the first inspection area to the second correction unit 22, which then executes a process of correcting the first inspection area to form a second inspection area (step S60). The execution unit 23 then inputs the first inspection area and the second inspection area to the selection unit 24, which then selects one of them (step S70). The execution unit 23 outputs the selected one of the first inspection area and the second inspection area as a new inspection area (step S70), and ends the process.

[0056] The other inspection area setting process can be performed by the inspection area setting device 2 according to the second embodiment. The other inspection area setting method includes step S20 of setting an inspection area from an input image, step S60A of correcting the inspection area based on detection segments distributed in the input image, and step S50A of further correcting the corrected inspection area based on an inspectable range set as a range suitable for inspection to set a new inspection area S50A. The other inspection area setting process can further include step S40 of adjusting the inspectable range, and the case where step S40 of adjusting the inspectable range is included will be described here.

[0057] As illustrated in FIG. 14 , when the inspection area setting process begins, the setting unit 10 receives an input image (step S10), sets an inspection area, and outputs it to the correction unit 20 (step S20). The execution unit 23 of the correction unit 20 inputs the received inspection area and input image to the second correction unit 22, which then performs correction based on the detected segments (step S60A). The correction unit 20 also receives an inspectable range from an external device (step S30). The execution unit 23 inputs the conditions under which the inspectable range is set to the simulation unit 26, which then performs a simulation of a virtual input image. The execution unit 23 then inputs the simulation results, the received input image, and the inspectable range to the position adjustment unit 25, which then performs position adjustment of the inspectable range (step S40). The position adjustment of the inspectable range can be performed as in the first, second, or third modification. The execution unit 23 inputs the inspection area corrected by the second correction unit 22 and the inspection range after position adjustment to the first correction unit 21, performs correction based on the inspection range after position adjustment to create a new inspection area (step S50A), outputs the new inspection area, and ends the processing.

[0058] [Inspection Area Setting Program] Next, two inspection area setting programs according to the embodiment will be described. The inspection area setting programs according to the embodiment are programs that are loaded into a computer to execute processing. One of the inspection area setting programs can cause a computer to execute one of the inspection area setting processes, and can also cause the computer to function as the inspection area setting device 1. That is, one of the inspection area setting programs is a program that causes a computer to execute the following procedures: setting an inspection area 41 from an input image 40; correcting the inspection area 41 to set it as a first inspection area 441 based on an inspectable range 411 that is set as a range suitable for inspection; correcting the first inspection area 441 to set it as a second inspection area 442 based on detection segments distributed in the input image 40; and selecting one of the first inspection area 441 and the second inspection area 442 based on predetermined criteria to set it as a new inspection area 42.

[0059] The other inspection area setting program can cause a computer to execute the other inspection area setting process, and can also cause the computer to function as inspection area setting device 2. In other words, the other inspection area setting program is a program that causes a computer to execute the procedure of setting an inspection area 41 from input image 40, the procedure of correcting inspection area 41 based on detection segments distributed in input image 40, and the procedure of further correcting the corrected inspection area to create a new inspection area based on inspectable range 411 that is set as a range suitable for inspection. These inspection area setting programs can be obtained via electric communication lines, and can be recorded on computer-readable recording media.

[0060] REFERENCE SIGNS LIST 1 Inspection area setting device 10 Setting unit 20 Correction unit 21 First correction unit 22 Second correction unit 23 Execution unit 24 Selection unit 25 Position adjustment unit 26 Simulation unit 40 Input image 41 Inspection area 411 Inspectable range 42 New inspection area 441 First inspection area 442 Second inspection area 81 Light source 82 Camera 90 Inspection object 100 Inspection area setting system

Claims

1. An inspection area setting device comprising: a setting unit that sets an inspection area from an input image; and a correction unit that sets the result of correcting the inspection area as a new inspection area, wherein the correction unit comprises: a first correction unit that makes correction based on an inspectable range that is set as a range suitable for inspection; a second correction unit that makes correction based on detection segments distributed in the input image; and an execution unit that inputs the inspection area to one of the first correction unit and the second correction unit and inputs the output of the first correction unit to the other to execute correction.

2. The inspection area setting device according to claim 1, wherein the inspectable range is set in advance by simulation.

3. The inspection area setting device according to claim 2, wherein the first correction section sets the overlapping portion of the input inspection area and the inspectable range as the corrected inspection area.

4. The inspection area setting device according to claim 2, wherein the second correction section performs correction based on the brightness of the detection segments distributed across the inside and outside of the input inspection area.

5. The inspection area setting device according to claim 4, wherein the second correction section corrects the input inspection area so as to include a detection segment having pixels that are outside the inspection area and connected to pixels inside the area.

6. An inspection area setting device according to claim 4, wherein the second correction section corrects the input inspection area so as to include detection segments that are outside the input inspection area and occupy a predetermined area or more.

7. The inspection area setting device of claim 2, wherein the correction unit further includes a simulation unit that performs a simulation of a virtual input image under the conditions under which the inspection range is set, and a position adjustment unit that adjusts the position of the inspection range using the results of the simulation, and the execution unit inputs the inspection range whose position has been adjusted by the position adjustment unit into the first correction unit and causes it to perform correction.

8. An inspection area setting device according to claim 7, wherein the position adjustment unit adjusts the position of the inspectable range by aligning the detection segment of the input image with the detection segment in the simulation.

9. The inspection area setting device according to claim 7, wherein the position adjustment unit adjusts the position of the inspectable range by aligning edge information of the input image with edge information in the simulation.

10. An inspection area setting device as described in claim 7, wherein the position adjustment unit adjusts the position of the inspectable range for a location specified by a user by aligning information in the input image with information in the simulation.

11. An inspection area setting device as described in any one of claims 1 to 10, wherein the execution unit inputs the inspection area set by the setting unit to the first correction unit, and inputs the output thereof to the second correction unit to perform correction.

12. The inspection area setting device according to claim 11, wherein the correction unit further has a selection unit that selects one of a first inspection area that is the output of the first correction unit and a second inspection area that is the output of the second correction unit based on a predetermined criterion.

13. An inspection area setting device as described in claim 12, wherein the selection unit selects the first inspection area if the similarity between the first inspection area and the second inspection area is less than a predetermined threshold, and selects the second inspection area if the similarity is equal to or greater than the predetermined threshold.

14. An inspection area setting device as described in any one of claims 1 to 10, wherein the execution unit inputs the inspection area set by the setting unit to the second correction unit, and inputs its output to the first correction unit to perform correction.

15. An inspection area setting system comprising: a setting unit that sets an inspection area from an input image; and a correction unit that sets the result of correcting the inspection area as a new inspection area, wherein the correction unit comprises: a first correction unit that makes correction based on an inspectable range that is set as a range suitable for inspection; a second correction unit that makes correction based on detection segments distributed in the input image; and an execution unit that inputs the inspection area to one of the first correction unit and the second correction unit and inputs the output thereof to the other to execute correction.

16. A method for setting an inspection area, comprising: a step of setting an inspection area from an input image; a step of correcting the inspection area to set it as a first inspection area based on an inspectable range set as a range suitable for inspection; a step of correcting the first inspection area to set it as a second inspection area based on detection segments distributed in the input image; and a step of selecting one of the first inspection area and the second inspection area to set it as a new inspection area based on a predetermined criterion.

17. A method for setting an inspection area, comprising the steps of: setting an inspection area from an input image; correcting the inspection area based on detection segments distributed in the input image; and further correcting the corrected inspection area to create a new inspection area based on an inspectable range set as a range suitable for inspection.

18. An inspection area setting program for causing a computer to execute the following steps: a procedure for setting an inspection area from an input image; a procedure for correcting the inspection area to set it as a first inspection area based on an inspectable range set as a range suitable for inspection; a procedure for correcting the first inspection area to set it as a second inspection area based on detection segments distributed in the input image; and a procedure for selecting one of the first inspection area and the second inspection area to set it as a new inspection area based on a predetermined criterion.

19. An inspection area setting program for causing a computer to execute the following steps: setting an inspection area from an input image; correcting the inspection area based on detection segments distributed in the input image; and further correcting the corrected inspection area to create a new inspection area based on an inspectable range set as a range suitable for inspection.

Citation Information

Patent Citations

  • Sphere surface flaw inspection device

    JP1992029043A

  • Inspection system, inspection method, and program

    JP2020085678A

  • Masc image generation method, inspection method, and inspection apparatus

    JP2023083699A

  • Illumination / image-pickup system for surface inspection and data structure

    WO2011027848A1