Image Processing Device
The image processing device automates the adjustment of detection parameters to address uneven illumination issues, ensuring consistent object detection by evaluating multiple settings, thereby reducing skill-dependent variations and enhancing detection reliability.
Patent Information
- Application Number
- JP2022574037
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2021-01-06
- Filing Date
- 2021-12-28
- Publication Date
- 2024-10-16
- Estimated Expiration
- 2041-12-28
AI Technical Summary
Conventional image processing systems for object detection on production lines suffer from uneven illumination, leading to inconsistent detection results due to manual parameter adjustments based on individual skill levels, which are not quantifiable.
An image processing device that automatically adjusts detection parameters by generating and evaluating combinations of imaging conditions and detection parameters to determine the optimal settings for consistent object detection, using a detection parameter generation unit, imaging condition setting unit, detection possibility determination unit, and imaging range calculation unit.
This approach allows for standardized and efficient adjustment of detection parameters, reducing variability due to skill level and ensuring consistent detection across varying lighting conditions, while optimizing parameter settings for wide-ranging imaging conditions.
Smart Images

Figure 0007568751000001 
Figure 0007568751000002 
Figure 0007568751000003
Abstract
Description
[Technical field]
[0001] The present invention relates to an image processing device. [Background technology]
[0002] Conventionally, when a visual sensor such as a camera is used to detect an object to be imaged on a production line equipped with a robot, it has been common practice to set up lighting appropriately and create an environment in which an image can be taken that makes it easy to find the object to be imaged.
[0003] However, ideal lighting conditions may not always be achieved due to the performance of the lighting used, the influence of ceiling lighting, etc. For example, the brightness of the entire imaging range may not be uniform, and the brightness at the edge of the imaging range may be darker than the brightness at the center of the imaging range. If there is uneven lighting between the center and the edges of the imaging range, a phenomenon occurs in which a workpiece is found at the edge of the imaging range but not in the center of the imaging range, or conversely, a workpiece is found in the center of the imaging range but not at the edge of the imaging range.
[0004] In conventional methods, the object to be imaged is placed at the edge and center of the imaging range, and the instructor of the image processing device manually adjusts the parameters to find both the edge and center objects while visually checking the image processing results.
[0005] In this regard, a technology is known in which multiple sets of parameters, each consisting of a combination of shooting parameters (imaging conditions) for photographing an object to be imaged and acquiring an image, and image processing parameters for detecting the object to be imaged from an image, are manually input, and multiple reduced images showing the results of executing a processing sequence including shooting and image processing for the multiple sets of parameter settings are displayed on a display unit as a list of multiple result images (see, for example, Patent Document 1). [Prior art documents] [Patent documents]
[0006] [Patent Document 1] JP 2019-204185 A Summary of the Invention [Problem to be solved by the invention]
[0007] However, because the quality of the image processing parameters for detecting an object to be captured from an image cannot be quantified, there is a problem that individual differences arise in the adjustment of the image processing parameters depending on the instructor's level of skill. [Means for solving the problem]
[0008] One aspect of the present disclosure is an image processing device that automatically adjusts detection parameters used in image processing to detect an object to be imaged, and includes a detection parameter generation unit that generates a combination of multiple detection parameters, an imaging condition setting unit that sets a plurality of imaging conditions for each combination of the detection parameters generated by the detection parameter generation unit, a detection feasibility determination unit that determines whether the object to be imaged can be detected for each combination of the detection parameters and the imaging conditions, an imaging range calculation unit that calculates the range of imaging conditions for which it is determined that the object to be imaged has been detected by the detection feasibility determination unit, and a parameter determination unit that determines the combination of detection parameters that has the widest range of imaging conditions calculated by the imaging range calculation unit. Effect of the Invention
[0009] According to one aspect, by quantifying the quality of the detection parameters, it becomes possible to adjust the detection parameters regardless of the skill level of the instructor. [Brief description of the drawings]
[0010] [Figure 1] 1 is a functional block diagram of an image processing device according to an embodiment. [Diagram 2] 4 is a flowchart illustrating an operation of an image processing device according to an embodiment. [Diagram 3] 1 is a table showing a method for determining optimal parameters of an image processing device according to an embodiment. [Figure 4] 1 is a table showing a method for determining optimal parameters of an image processing device according to an embodiment. [Diagram 5] 1 is a table showing a method for determining optimal parameters of an image processing device according to an embodiment. [Figure 6] 5 is an example of an operation screen of an image processing apparatus according to an embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] Hereinafter, an embodiment of the present invention will be described with reference to FIGS.
[0012] [Configuration of one embodiment] 1 is a functional block diagram of an image processing device 1 according to this embodiment. The image processing device 1 includes a control unit 10, a storage unit 20, and an operation unit 30.
[0013] The control unit 10 includes a CPU, a ROM, a RAM, a CMOS memory, etc., which are configured to be able to communicate with each other via a bus, and are well known to those skilled in the art.
[0014] The CPU is a processor that performs overall control of the image processing device 1. The CPU reads out the system program and application program stored in the ROM via the bus, and controls the entire image processing device 1 in accordance with the system program and application program, thereby configuring the control unit 10 to realize the functions of the detection parameter generation unit 11, the imaging condition setting unit 12, the detection feasibility determination unit 13, the imaging range calculation unit 14, and the detection parameter determination unit 15, as shown in FIG.
[0015] The detection parameter generating unit 11 generates a combination of a plurality of detection parameters for each of the plurality of detection parameters.
[0016] The "detection parameters" vary depending on the image processing algorithm, but may include, for example, a score threshold, a contrast threshold, and a distortion tolerance.
[0017] The "score threshold" is the threshold for whether the detection result is OK or NG. Specifically, the accuracy of the object detection result is expressed as a score out of 100 (unit: %). If this score is equal to or greater than the "score threshold", the detection is OK, and if it is less than the "score threshold", the detection is NG.
[0018] The "contrast threshold" is a threshold that indicates how much contrast (light-dark difference) is required in a captured image to be recognized as a feature. If a small value is set as the contrast threshold, it is possible to detect objects that are not clearly visible, but image processing will take time. If a low contrast value is set, simple dirt on the object or other low contrast objects are erroneously detected, Increase.
[0019] "Distortion tolerance" is a threshold value (in pix) that allows for deviation (distortion) in the shape between the taught model and the pattern to be fitted to the object shown in the image. If a large value is specified as the distortion tolerance, it can be detected even if the deviation in shape is large, but the possibility of false detection also increases.
[0020] The imaging condition setting unit 12 sets a plurality of imaging conditions for each combination of the detection parameter sets generated by the detection parameter generating unit 11 . The "imaging conditions" differ depending on the imaging device, but are, for example, the exposure time of a camera serving as the imaging device, the amount of light of the lighting used for imaging, and the reduction ratio of the captured image.
[0021] The imaging condition setting unit 12 prepares multiple sets of combinations of detection parameters (detection parameter sets), for example, combinations of score threshold, contrast threshold, and distortion tolerance, and sets multiple imaging conditions for each set, such as the camera exposure time, the amount of light of the lighting used for imaging, and the reduction ratio of the captured image.
[0022] The multiple detection parameter sets may include all possible combinations of values that can be set for each parameter. In this case, the values of each parameter may be determined by equally dividing the range that can be set for the parameter, for example.
[0023] Alternatively, all combinations of values that can be set within a predetermined range centered on a value manually adjusted to some extent by the user of the image processing device 1 may be used.
[0024] The detection feasibility determination unit 13 determines whether or not an image capturing target can be detected for each combination of a detection parameter set and an image capturing condition.
[0025] Specifically, first, the detection feasibility determination section 13 determines whether or not an image capturing target can be detected when an image is captured under a first imaging condition using a first detection parameter set. Next, the detection feasibility determination unit 13 determines whether or not the image capture target can be detected when an image is captured under the second imaging condition using the first detection parameter set. Similarly, the detection feasibility determination section 13 determines whether or not the image capture target is detectable when images are captured under all imaging conditions using the first detection parameter set. After determining whether the object to be imaged can be detected when imaged under all imaging conditions using the first detection parameter set, the detection feasibility determination unit 13 then determines whether the object to be imaged can be detected when imaged under all imaging conditions using the second detection parameter set. Thereafter, in a similar manner, the detection feasibility determination section 13 determines whether or not the image capture target is detectable when images are captured under all imaging conditions for all detection parameter sets.
[0026] Here, the detection feasibility determination section 13 may determine whether or not the detection is possible based on whether or not the detection result of the image capture object matches a predetermined correct answer condition.
[0027] Alternatively, the detection feasibility determination section 13 may determine whether or not a known image capture object is detectable based on whether or not a detection position at which the known image capture object is actually detected matches a known installation position of the image capture object.
[0028] In the case of judging whether or not detection is possible based on whether or not the correct answer condition is met, a step of determining the correct answer condition may be performed before the step of judging whether or not detection is possible (step S5 in the operation of the embodiment described later). Examples of the correct answer condition include "detection accuracy", "detection position", "detection number", and "detection time".
[0029] "Detection accuracy" is the variation in the detection position when the same object is repeatedly detected without changing the parameters. Increasing the image reduction rate shortens the "detection time" but also reduces the detection accuracy. According to the accuracy condition based on the "detection position", by specifying the position and range in which the imaged object is detected in advance, if the object is detected in an unexpected position, it can be determined that the detection is a false positive. If the score threshold is too low or the distortion tolerance is too large, false positives are more likely to occur.
[0030] According to the correct answer condition based on the "detection number", if the actual detection number differs from the preset detection number, it can be determined that the detection has failed. If the "detection number" is 0, it can be determined that the detection has failed because the parameters are too strict. Conversely, if the "detection number" is greater than the expected number, it can be determined that the detection has failed because the parameters are too lenient. "Detection time" refers to the time required for detection. Even if detection is successful, if the "detection time" is too long, it will not meet the cycle time, and is an unusable parameter. If the image reduction rate is small or the score threshold is small, the "detection time" will be long.
[0031] The imaging range calculation unit 14 calculates the range of imaging conditions in which the detection feasibility determination unit 13 has determined that the imaging object has been detected.
[0032] Specifically, the detection feasibility determination unit 13 determines whether the object to be imaged can be detected when imaged under all imaging conditions using the first detection parameter set, and then the imaging range calculation unit 14 calculates the range of imaging conditions in which the object to be imaged was successfully detected. Next, the detection feasibility determination unit 13 determines whether the object to be imaged can be detected when imaged under all imaging conditions using the second detection parameter set, and then the imaging range calculation unit 14 calculates the range of imaging conditions in which the object to be imaged was successfully detected. Similarly, for all the detection parameter sets, the imaging range calculation unit 14 calculates the range of imaging conditions in which the detection of the imaging object is successful.
[0033] The detection parameter determination unit 15 determines a set of image processing parameters based on the range of the imaging conditions calculated by the imaging range calculation unit .
[0034] For example, the detection parameter determination section 15 may determine the detection parameter set having the widest range of imaging conditions calculated by the imaging range calculation section 14 as the image processing parameter set to be actually used.
[0035] The memory unit 20 stores, for example, the imaging conditions set by the imaging condition setting unit 12, the detection results by the detection feasibility determination unit 13, the imaging range calculated by the imaging range calculation unit 14, and the detection parameter set determined by the detection parameter determination unit 15.
[0036] The operation unit 30 sets detection parameters and imaging conditions, and adjusts the detection parameters. The operation unit 30 may be realized by a monitor that displays an operation screen described later with reference to Fig. 6. In this case, a touch panel that accepts operations from a user of the image processing device 1 is laminated on the monitor. Alternatively, the operation unit 30 may be realized by an input device such as a keyboard or a mouse for inputting to the operation screen of Fig. 6.
[0037] In another embodiment, the image may be divided into one or more regions and a set of detection parameters may be determined for each region.
[0038] [Operation of the second embodiment] 2 is a flowchart showing the operation of the image processing device 1 according to this embodiment. The operation of the image processing device 1 will be described below with reference to FIG.
[0039] In step S1, the detection parameter generating unit 11 sets a parameter set for detecting an image capturing object (detection parameter set). More specifically, the detection parameter set is initially set by combining, for example, a score threshold, a contrast threshold, and a distortion tolerance.
[0040] In step S2, the control unit 10 sets the value of the score threshold to 0 among the score threshold, contrast threshold, and distortion tolerance initially set. In the example shown in FIG. 2, as described later, an example is described in which image capture object detection is attempted while the contrast threshold and distortion tolerance are fixed at the initial setting values and the score threshold is incremented by 1 from 0 to 100, but the present embodiment is not limited to this. For example, image capture object detection may be attempted while changing the contrast threshold while keeping the score threshold and distortion tolerance fixed at the initial setting values, or image capture object detection may be attempted while changing the distortion tolerance while keeping the score threshold and contrast threshold fixed at the initial setting values.
[0041] In step S3, the imaging condition setting unit 12 sets imaging conditions and captures an image of the imaging target with the imaging device. More specifically, for example, the imaging condition setting unit 12 sets a certain exposure time as the imaging condition, and then captures an image of the imaging target with the visual sensor.
[0042] In step S4, the control unit 10 detects the imaging target object from the image captured in step S3 using the detection parameters.
[0043] In step S5, if the detection feasibility determination unit 13 determines that the detection of the image capture object is OK (S5: YES), the process proceeds to step S6. If the detection feasibility determination unit 13 determines that the detection of the image capture object is NG (S5: NO), the process proceeds to step S7.
[0044] Note that a step of determining correctness conditions may be performed before step S5 of determining whether detection is possible.
[0045] In step S6, the control unit 10 adds 1 to the score threshold.
[0046] In step S7, if the object is detected under all the imaging conditions (S7: YES), the process proceeds to step S8. If the object is not detected under all the imaging conditions (S7: NO), the process proceeds to step S3, where the imaging conditions are changed and an image is captured.
[0047] In step S8, the imaging range calculation unit 14 calculates the range of imaging conditions in which it is determined that the imaging object has been detected, and the detection parameter determination unit 15 selects and updates an optimal detection parameter set based on the calculated range of imaging conditions.
[0048] 3 to 5 show examples of selecting an optimal detection parameter set. FIG. 3 is a table showing the range of imaging conditions for each detection parameter set when the illumination light intensity and image reduction values are fixed and the exposure time is changed from 10 ms to 400 ms. The imaging condition range for parameter set A is 20 ms. The imaging condition range for parameter set B is 20 ms to 30 ms. The imaging condition range for parameter set C is 10 ms to 40 ms. The imaging condition range for parameter set D is 10 ms to 400 ms. Among parameter sets A to D, parameter set D has the widest range of imaging conditions, and therefore detection parameter determination unit 15 determines parameter set D as the optimal detection parameter set.
[0049] FIG. 4 is a table showing the range of imaging conditions for each detection parameter set when the exposure time and image reduction values are fixed and the illumination light amount is changed from 1 to 16. The illumination light amount range for parameter set A is 2 to 3. The illumination light amount range for parameter set B is 2 to 4. The illumination light amount range for parameter set C is 1 to 4. The imaging conditions range for parameter set D is 1 to 16. Among parameter sets A to D, parameter set D has the widest range of imaging conditions, and therefore detection parameter determination unit 15 determines parameter set D as the optimal detection parameter set.
[0050] FIG. 5 is a table showing the range of imaging conditions for each detection parameter set when the exposure time and illumination light intensity are fixed and the image reduction ratio is changed from 1 to 1 / 8. The reduction ratio range for parameter set A is 1 to 1 / 2. The reduction ratio range for parameter set B is 1 to 1 / 3. The reduction ratio range for parameter set C is 1 to 1 / 4. The reduction ratio range for parameter set D is 1 to 1 / 8. Of parameter sets A to D, parameter set D has the widest range of imaging conditions, and therefore detection parameter determination unit 15 determines parameter set D as the optimal detection parameter set. Although in FIGS. 3 to 5, one imaging condition is changed and an optimal detection parameter set is determined, the present invention is not limited to this, and a plurality of imaging conditions may be changed and an optimal detection parameter set may be determined.
[0051] In step S9, if all the detection parameter sets have been evaluated (S9: YES), all the processes are terminated. If all the detection parameter sets have not yet been evaluated (S9: NO), the process returns to step S1, and the detection parameter set for detecting the imaging object is changed.
[0052] [3 Examples] FIG. 6 shows an example of an operation screen of the image processing device 1. As shown in FIG. The operation screen shown in FIG. 6 includes a detection parameter setting item, an imaging condition setting item, and a detection parameter determination button. A value range and an adjustment increment can be set for each detection parameter. An operation screen for adding or deleting detection parameters to be adjusted may be further provided. A value range and adjustment increment can be set for each of the imaging conditions. An operation screen for adding or deleting imaging conditions may be further provided. After setting the automatic adjustment range and adjustment increment of the detection parameters and imaging conditions, the detection parameters are adjusted by pressing the detection parameter determination button. Instead of pressing a button on the operation screen, an API for adjusting the detection parameters may be called from a program to perform the adjustment.
[0053] [4. Effects of the embodiment] The image processing device according to this embodiment (for example, the above-mentioned "image processing device 1") is an image processing device that automatically adjusts detection parameters used in image processing to detect an image capture object, and includes a detection parameter generation unit (for example, the above-mentioned "detection parameter generation unit 11") that generates a plurality of detection parameter sets for each combination of detection parameters, an imaging condition setting unit (for example, the above-mentioned "imaging condition setting unit 12") that sets a plurality of imaging conditions for each combination of detection parameter sets generated by the detection parameter generation unit, a detection feasibility determination unit (for example, the above-mentioned "detection feasibility determination unit 13") that determines whether an image capture object can be detected for each combination of a detection parameter set and an imaging condition, an imaging range calculation unit (for example, the above-mentioned "imaging range calculation unit 14") that calculates the range of imaging conditions in which it is determined that an image capture object has been detected by the detection feasibility determination unit, and a detection parameter determination unit (for example, the above-mentioned "detection parameter determination unit 15") that determines a detection parameter set based on the range of imaging conditions calculated by the imaging range calculation unit.
[0054] By quantifying the quality of the detection parameters, it becomes possible to automatically adjust the detection parameters. In particular, by quantifying the evaluation index, individual differences among instructors are eliminated, allowing for stable adjustment. Furthermore, by automatically adjusting the detection parameters, they can be efficiently readjusted even if the imaging environment, such as indoor lighting, changes.
[0055] Furthermore, the parameter determination section may determine a combination of detection parameters that has the widest range of imaging conditions as the combination of detection parameters.
[0056] This makes it possible to accommodate a wider range of imaging conditions.
[0057] The detection feasibility determination section may determine whether or not the image capture target object is detectable based on whether or not the detection result of the image capture target object matches a predetermined correct answer condition.
[0058] This makes it possible to meet the need to artificially set correct answer conditions in advance.
[0059] The detection feasibility determination section may determine whether or not a known image capture object is detectable based on whether or not a detection position at which the known image capture object is actually detected matches a known installation position of the image capture object.
[0060] This makes it possible to determine whether or not an object to be imaged can be detected as long as the known installation position of the object is known.
[0061] The image processing device may further include an operation unit for setting detection parameters and imaging conditions and for adjusting the detection parameters.
[0062] This allows the user of the image processing device to manually adjust the detection parameters.
[0063] Although the embodiment of the present invention has been described above, the present invention is not limited to the above-described embodiment. Furthermore, the effects described in the present embodiment are merely a list of the most preferable effects resulting from the present invention, and the effects of the present invention are not limited to those described in the present embodiment.
[0064] The image processing method by the image processing device 1 is realized by software. When realized by software, a program constituting this software is installed in a computer (image processing device 1). These programs may be recorded on removable media and distributed to users, or may be distributed by being downloaded to the user's computer via a network. Furthermore, these programs may be provided to the user's computer (image processing device 1) as a Web service via a network without being downloaded. [Explanation of symbols]
[0065] 1 Image processing device 10 Control section 11 Detection parameter generation unit 12 Imaging condition setting section 13. Detection feasibility determination section 14 Imaging range calculation unit 15 Detection parameter determination unit (parameter determination unit) 20 Memory section 30 Control section
Claims
1. An image processing device that automatically adjusts detection parameters used in image processing for detecting an object to be imaged, a detection parameter generating unit for generating a combination of a plurality of the detection parameters; an imaging condition setting unit that sets a plurality of imaging conditions for each combination of the detection parameters generated by the detection parameter generation unit; a detection feasibility determination unit that determines whether an image capture target can be detected for each combination of the detection parameters and the image capture conditions; an imaging range calculation unit that calculates a range of imaging conditions in which it is determined that the imaging object has been detected by the detection feasibility determination unit; and a parameter determination unit that determines a combination of the detection parameters based on the range of the imaging conditions calculated by the imaging range calculation unit; An image processing device comprising:
2. The image processing device according to claim 1 , wherein the parameter determination unit determines, as the combination of the detection parameters, a combination of the detection parameters that has a widest range of the imaging conditions.
3. The image processing device according to claim 1 , wherein the detection feasibility determination unit determines whether the detection is possible based on whether the detection result of the image capture object matches a predetermined correct answer condition.
4. The image processing device according to claim 1 , wherein the detection feasibility determination unit determines whether or not the detection is possible based on whether or not a detection position at which the known imaging object is actually detected matches a known installation position of the imaging object.
5. The image processing device according to claim 1 , further comprising an operation unit for setting the detection parameters and imaging conditions and for adjusting the detection parameters.
6. The image processing device according to claim 1 , further comprising: dividing an image into one or more regions; and determining a combination of the detection parameters for each region.
Citation Information
Patent Citations
Image recognition parameter setting device, image recognition parameter setting method and image recognition parameter setting program
JP2018005505A
Image processing device, robot, and robot system
JP2019204185A
Information processing device, information processing method, and program
JP2020181374A
Individual identification system
WO2020065798A1
