Inspection device and inspection method
The inspection device addresses the challenge of curled container lids by using near-infrared light and image processing to detect and calculate specific areas, ensuring accurate lid state assessment.
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2022-03-25
- Publication Date
- 2026-03-06
AI Technical Summary
Existing inspection devices fail to adequately detect defects in container lids that are curled up, as the distance between the lid's outer edge and the container opening does not significantly change before and after curling, leading to insufficient detection.
An inspection device with an irradiation unit, imaging unit, and processing unit that detects specific positions and areas on the lid, calculates the area of these ranges, and judges the lid's state based on these calculations, using near-infrared light to enhance detection and correct image angles and densities.
Effectively determines the state of the lid by accurately detecting and calculating specific areas, even when the lid is curled, ensuring proper inspection and defect detection.
Smart Images

Figure 0007825477000001 
Figure 0007825477000002 
Figure 0007825477000003
Abstract
Description
[Technical Field]
[0001] The present invention relates to an inspection device and an inspection method. [Background technology]
[0002] A technique is known in which a container having an opening and a lid covering the opening is imaged and the container is inspected based on the acquired image. For example, the inspection device disclosed in JP 2021-173667 A includes an irradiation unit, an imaging unit, an opening position detection unit, a lid outer edge position detection unit, and a determination unit. The opening position detection unit detects the position of the opening based on the inspection image captured by the imaging unit. The lid outer edge position detection unit detects the position of the outer edge of the lid based on the inspection image. The determination unit determines the state of the lid based on the position of the opening detected by the opening position detection unit and the position of the outer edge of the lid detected by the lid outer edge position detection unit. [Patent Document 1] Patent Publication No. 2021-173667 Summary of the Invention [Problem to be solved by the invention]
[0003] When the lid of the container being inspected is curled up, the inspection device detects the defect by comparing the distance between the outer edge of the lid at the curled part and the outer edge of the container opening with a predetermined lower limit. However, if the distance between the outer edge of the lid and the outer edge of the container opening does not change significantly before and after the curling occurs, the defect may not be detected sufficiently.
[0004] The present invention has been made in view of the above circumstances, and aims to provide a technique for effectively inspecting the state of a lid on a container. [Means for solving the problem]
[0005] In order to solve the above problem, a first aspect is an inspection device for a container having an opening and a lid that covers the opening, and includes an irradiation unit that irradiates light onto the outer surface of the container, an imaging unit that images the container, a specific position detection unit that detects a specific position including the outer shape of the lid from an inspection image captured by the imaging unit, a detection area determination unit that determines a predetermined detection area from the inspection image based on the specific position, a specific range detection unit that detects a predetermined specific range from the detection area, an area calculation unit that calculates the area of the specific range, and a judgment unit that judges the state of the lid based on the calculation result of the area calculation unit. [Effects of the Invention]
[0006] According to the inspection device of the first aspect, the state of the lid of the container can be appropriately determined based on the predetermined specific range detected from the inspection image. [Brief explanation of the drawings]
[0007] [Figure 1] FIG. 1 is a diagram showing an inspection device according to an embodiment. [Figure 2] FIG. 2 is a top view of the vicinity of a container in the inspection device of the embodiment. [Figure 3] FIG. 3 is a diagram showing an example of an inspection image captured by the imaging unit. [Figure 4] FIG. 4 is a block diagram showing the configuration of the inspection unit shown in FIG. [Figure 5] FIG. 5 is a diagram showing the flow of inspection in the inspection device shown in FIG. [Figure 6] FIG. 6 is a diagram showing an example of an inspection image corrected by the image correcting unit. [Figure 7] FIG. 7 is a diagram showing a specific position detected in the first side image. [Figure 8] FIG. 8 is a diagram showing a detection region determined in the first side image. [Figure 9A] FIG. 9A is a diagram showing a first specific range detected in the third side image. [Figure 9B]FIG. 9B is a diagram showing a second specific range detected in the first side image. [Figure 9C] FIG. 9C is a diagram showing a third specific range detected in the fourth side image. [Figure 10] FIG. 10 is a diagram showing an example of a top surface image included in the inspection image. [Figure 11] FIG. 11 is a diagram showing an example of an unfolded image generated from a top surface image. DETAILED DESCRIPTION OF THE INVENTION
[0008] Hereinafter, an embodiment of the present invention will be described with reference to the accompanying drawings. Note that the components described in the embodiment are merely examples and are not intended to limit the scope of the present invention. In the drawings, the dimensions and number of each part may be simplified as necessary to facilitate understanding.
[0009] <1. Inspection equipment configuration> Fig. 1 is a diagram showing an inspection device 1 according to an embodiment. Fig. 2 is a top view of the vicinity of a container 9 in the inspection device 1 according to an embodiment. The inspection device 1 is a device that inspects a container 9 that has an opening 90 and a lid 91 that covers an opening OP1 of the opening 90, and more specifically, is a device that inspects the state of the lid 91 on the container 9.
[0010] As shown in FIG. 1, the container 9 includes a lid 91 and a main body 92. The main body 92 is made of, for example, resin. The opening 90 is located at the upper end of the main body 92. The opening OP1 is a hole surrounded by the opening 90. The opening OP1 is located at the upper end of the main body 92. The shape of the opening OP1 is circular. However, the shape of the opening OP1 is not limited to a circular shape, and may be an elliptical shape or a polygonal shape such as a square shape.
[0011] The lid 91 is attached to the upper surface of the opening 90 and closes the opening OP1. The lid 91 is, for example, a metal foil such as aluminum. The material of the lid 91 is not limited to metal, and may be paper, a resin film, or the like. The lid 91 does not necessarily have to be a metal foil, and may be a member having a certain degree of thickness. The lid 91 is fixed to the opening 90 via an adhesive such as hot melt. It is not essential that the lid 91 be adhered to the opening 90.
[0012] Lid 91 has a top surface portion 911 and a hanging portion 912. Top surface portion 911 is a circular portion that covers opening 90 and opening OP1. Hanging portion 912 is an annular portion that is located around top surface portion 911 and extends outward from opening 90. Hanging portion 912 also extends downward from top surface portion 911.
[0013] The inspection device 1 includes a transport unit 10, an irradiation unit 20, an imaging unit 30, a mirror 40, and an inspection unit 50.
[0014] The conveying unit 10 has a plurality of conveying rollers 11 arranged at predetermined intervals along the conveying direction in which the containers 9 are conveyed, and a belt 12 attached to the plurality of conveying rollers 11. The containers 9 are placed on the upper surface of the belt 12 at predetermined intervals. The conveying unit 10 conveys the containers 9 in the conveying direction by moving the belt 12 in the conveying direction. As a result, the containers 9 are conveyed sequentially to the inspection position P1.
[0015] The irradiation unit 20 irradiates light onto the outer surface of the container 9 transported to the inspection position P1. As shown in FIGS. 1 and 2, the irradiation unit 20 is provided above the container 9 transported to the inspection position P1. As shown in FIG. 2, the irradiation unit 20 has an annular shape, and the inner diameter of the irradiation unit 20 is larger than the outer diameter of the container 9. Note that the inspection device 1 may be provided with multiple irradiation units 20.
[0016] The irradiating section 20 preferably emits infrared light. More preferably, the irradiating section 20 emits near-infrared light. Specifically, the irradiating section 20 emits near-infrared light with a wavelength of 850 nm to 860 nm.
[0017] In particular, when a picture, pattern, or the like is printed on the lid 91 of the container 9, it is preferable to irradiate the container 9 with infrared light from the irradiation unit 20. This causes the printed portion to become blurred or disappear in the inspection image 80 acquired by the imaging unit 30, which will be described later. This makes it easier to detect a specific position Q and a specific area A, which will be described later, in the inspection image 80. Note that the irradiation unit 20 may also irradiate the container 9 with visible light.
[0018] The imaging unit 30 captures an image of the container 9 being transported by the transport unit 10, and acquires an inspection image 80. The imaging unit 30 is located above the transport unit 10. The imaging unit 30 has an imaging axis 31. The imaging axis 31 is an imaginary line that passes through the center of the angle of view of the imaging unit 30. The imaging axis 31 intersects, preferably perpendicular to, the top surface 911 of the container 9 located at the inspection position P1.
[0019] The imaging unit 30 may be configured to capture images at predetermined time intervals. Alternatively, the imaging unit 30 may be configured to capture images when each container 9 reaches the inspection position P1. In this case, the inspection device 1 may be provided with a position sensor that detects that the container 9 has reached the inspection position P1.
[0020] The mirror 40 is located outside the container 9 placed at the inspection position P1 and further reflects light reflected by the outer surface of the container 9, thereby directing an image of the outer surface of the container 9 to the imaging unit 30. The inspection device 1 of this embodiment includes four mirrors 40: a first mirror 41, a second mirror 42, a third mirror 43, and a fourth mirror 44. The mirrors 41 to 44 are arranged at equal intervals on a concentric circle centered at the inspection position P1. This allows the imaging unit 30 to simultaneously image multiple imaging locations on the container 9. Furthermore, the imaging unit 30 can also image locations that cannot be directly imaged by the imaging unit 30. The number of mirrors 40 included in the inspection device 1 is not limited to four. The inspection device 1 may include one mirror 40 or a number other than four. Alternatively, multiple imaging locations may be imaged without the mirror 40 by widening the angle of view of the lens used in the imaging unit 30 or by moving the imaging unit 30 for each imaging location.
[0021] Each of mirrors 41-44 is provided so that at least a portion thereof is located below lid 91. As a result, each of mirrors 41-44 guides an image including hanging portion 912 of lid 91 to imaging unit 30. Therefore, even if the field of view of imaging unit 30 is narrow, imaging unit 30 can capture an image including hanging portion 912 of lid 91. Furthermore, imaging unit 30 can capture an image of hanging portion 912 at an angle close to horizontal.
[0022] As shown in FIG. 2, the mirrors 41-44 are positioned so as not to overlap the transport unit 10 in a top view. This prevents physical interference between the container 9 transported by the transport unit 10 and the mirrors 41-44. Furthermore, there are cases where the transport unit 10 transports multiple containers 9 continuously while narrowing the gap between adjacent containers 9. In this case, if the transport unit 10 and the mirrors 41-44 are positioned so as to overlap in a top view, images of containers 9 other than the container 9 positioned at the inspection position P1 may be reflected in the mirrors 41-44. However, by positioning the mirrors 41-44 so as not to overlap with the transport unit 10 in a top view, only the image of the container 9 positioned at the inspection position P1 can be reflected to the imaging unit 30.
[0023] Therefore, the imaging unit 30 simultaneously captures an image including the top surface 911 that is directly incident on the imaging unit 30 and an image including the hanging portion 912 that is reflected by each of the mirrors 41 to 44. This allows the state of the lid 91 to be properly inspected by the inspection unit 50, which will be described later.
[0024] FIG. 3 is a diagram showing an example of an inspection image 80 captured by the imaging unit 30. As shown in FIG. 3, in this embodiment, the inspection image 80 includes an image including the side surface of the container 9 captured by reflecting it off the mirror 40, and an image of the container 9 captured from above the container 9. Hereinafter, the image including the side surface of the container 9 reflected off the mirror 40 will be referred to as a "side image," and the image of the container 9 captured from above the container 9 will be referred to as a "top image." As shown in FIG. 3, in this embodiment, the inspection image 80 includes four side images (first side image 81, second side image 82, third side image 83, and fourth side image 84) and one top image (top image 85). Also, as shown in FIG. 3, in this embodiment, each of the side images 81 to 84 includes an image of the hanging portion 912, and the top image 85 includes an image of the top portion 911. That is, in this embodiment, the imaging unit 30 captures an image of an imaging location including the top portion 911 and the hanging portion 912. Note that imaging unit 30 may capture an image of an imaging location that includes only either top surface portion 911 or hanging portion 912. Furthermore, imaging unit 30 may capture an image of only an imaging location that does not include top surface portion 911 or hanging portion 912.
[0025] As shown in FIG. 1, the inspection device 1 includes an inspection unit 50. The inspection unit 50 includes a processor 51, a ROM 52, a RAM 53, and a storage unit 54. The processor 51 is configured with a CPU, a GPU, or the like. The ROM 52, the RAM 53, and the storage unit 54 are electrically connected to the processor 51 via a bus wiring. The ROM 52 is a read-only memory that stores a basic program. The RAM 53 is a readable and writable memory that stores various information. The storage unit 54 is a non-transitory recording medium such as a hard disk drive that stores a program P. As shown in FIG. 1, the inspection unit 50 is electrically connected to the imaging unit 30.
[0026] 4 is a block diagram showing the configuration of the inspection unit 50 shown in FIG. When the processor 51 executes the program P, the inspection unit 50 functions as an image correction unit 511, a top surface center detection unit 512, an unfolded image generation unit 513, a specific position detection unit 514, a detection region determination unit 515, a specific range detection unit 516, an area calculation unit 517, and a determination unit 518. Note that a dedicated circuit (such as an ASIC) may be provided instead of the processor 51. The image correction unit 511, the top surface center detection unit 512, the unfolded image generation unit 513, the specific position detection unit 514, the detection region determination unit 515, the specific range detection unit 516, the area calculation unit 517, or the determination unit 518 may be realized by hardware.
[0027] As shown in FIG. 4, the inspection unit 50 is electrically connected to the notification unit 70 in addition to the imaging unit 30.
[0028] The image correcting unit 511 corrects the density value of the inspection image 80 captured by the imaging unit 30. The image correcting unit 511 also corrects the angles of the side images 81 to 84 included in the inspection image 80 captured by the imaging unit 30. Specific correction processing of the inspection image 80 by the image correcting unit 511 will be described later.
[0029] The top surface center detection unit 512 detects the position of the top surface center C1, which is the center of the top surface 911, from the top surface image 85 included in the inspection image 80.
[0030] The unfolded image generation unit 513 generates the unfolded image 86. The unfolded image 86 is an image obtained by unfolding the top surface image 85 into a strip shape. The unfolded image generation unit 513 unfolds the top surface image 85 so that the top surface portion 911 and the hanging portion 912 are included in the unfolded image 86.
[0031] The specific position detection unit 514 detects a specific position Q including the outline of the lid 91 from within the inspection image 80 captured by the imaging unit 30. When the imaging unit 30 captures images of multiple locations on the container 9, the specific position detection unit 514 detects the specific position Q for each of the multiple locations. As will be described later, the specific position detection unit 514 detects the specific position Q based on the density values of pixels included in the inspection image 80.
[0032] The detection region determination unit 515 determines a detection region R from within the inspection image 80 based on the specific position Q. The specific process of determining the detection region R by the detection region determination unit 515 will be described later.
[0033] The specific area detection unit 516 detects a predetermined specific area A from the detection area R. As will be described later, the specific area detection unit 516 detects the specific area A based on the density values of the pixels included in the detection area R.
[0034] Area calculation unit 517 calculates the area of specific range A. As will be described later, area calculation unit 517 calculates the area of specific range A by counting the number of pixels in specific range A.
[0035] The determination unit 518 determines the condition of the lid 91 based on the calculation result of the area calculation unit 517. If the area of the specific range A is outside the predetermined threshold range, the determination unit 518 outputs an error signal indicating that the condition of the lid 91 is poor. As shown in FIG. 4, the determination unit 518 outputs the error signal to the notification unit 70. The notification unit 70 is an output device configured with a display, a speaker, a lamp, or the like. The notification unit 70 operates in response to the error signal. If the determination unit 518 determines that the condition of the lid 91 of the container 9 is poor, the notification unit 70 operates to notify the user.
[0036] <2. Container inspection process using inspection equipment> <2-1. Acquiring inspection images> FIG. 5 is a diagram showing the flow of inspection by the inspection device 1. With reference to FIG. 5, the inspection process of a container 9 by the inspection device 1 will be described. First, as shown in FIG. 1, the container 9 to be inspected is transported to a predetermined inspection position P1 by the transport unit 10. The irradiation unit 20 irradiates light onto the outer surface of the container 9 located at the inspection position P1 (irradiation process S1). Next, the imaging unit 30 images the container 9 irradiated with light and the mirror surface of the mirror 40 that reflects the image of the container 9 (imaging process S2). An inspection image 80 is obtained by the imaging process S2. As described above, the inspection image 80 of this embodiment includes side surface images 81 to 84 and a top surface image 85.
[0037] As shown in FIG. 5, the steps performed after the imaging step S2 is completed are steps S3 to S7 performed on the side images 81 to 84 and steps S8 to S13 performed on the top image 85, which are different from each other.
[0038] <2-2. Processes performed on side images> First, steps S3 to S7 performed on the side images 81 to 84 will be described. After the imaging step S2 is completed, the image correction unit 511 in the inspection unit 50 corrects the angles and density values of the side images 81 to 84 (image correction step S3). FIG. 6 is a diagram showing an example of an inspection image 80 including each of the side images 81 to 84 corrected by the image correction unit 511. As shown in FIG. 6, the image correction unit 511 corrects the angles of the side images 81 to 84 so that they are horizontal with respect to the inspection image 80. This makes it easier to detect the specific position Q in the specific position detection step S4, which will be described later. Furthermore, as shown in FIG. 6, the image correction unit 511 equalizes the variations in density values of the pixels included in each of the side images 81 to 84. This makes it easier to detect the specific position Q in the specific position detection step S4, which will be described later.
[0039] After the image correction step S3 is completed, the specific position detection unit 514 detects a specific position Q including the outline of the lid 91 from each of the side images 81 to 84 obtained in the imaging step S2 (specific position detection step S4). FIG. 7 is a diagram showing the specific position Q detected in the first side image 81. As shown in FIG. 7, the specific position Q in the first side image 81 includes an upper end position Q1, a left end position Q2, a right end position Q3, and a lower end position Q4. Note that in steps S4 to S7, the same process is performed on each of the side images 81 to 84. Therefore, unless otherwise specified, steps S4 to S7 will be described using only the first side image 81 as an example, and redundant description of the remaining side images 82 to 84 will be omitted.
[0040] First, the specific position detection unit 514 detects the top end position Q1 within a predetermined range of the first side image 81. Specifically, the specific position detection unit 514 detects, as the top end position Q1, a substantially horizontal line segment including a portion where the density values of adjacent pixels change by more than a predetermined value. The specific position detection unit 514 stores the top end position Q1 in the storage unit 54.
[0041] Next, the specific position detection unit 514 detects the left end position Q2 and the right end position Q3 within a predetermined range of the first side image 81. Specifically, the specific position detection unit 514 detects, as the left end position Q2 and the right end position Q3, a substantially vertical line segment including a portion where the density values of adjacent pixels change by more than a predetermined value. Here, the specific position detection unit 514 detects the left end position Q2 and the right end position Q3 so that the amount of inclination of the right end position Q3 relative to the left end position Q2 is a predetermined angle and the distance between the left end position Q2 and the right end position Q3 is a predetermined value. This allows the left end position Q2 and the right end position Q3 to be appropriately detected even if a portion of the hanging portion 912 is curled up. Note that the left end position Q2 and the right end position Q3 may be parallel to each other. The amount of inclination of the right end position Q3 relative to the left end position Q2 can be arbitrarily set based on an operation input by the operator. When detecting the left edge position Q2 and the right edge position Q3, the specific position detection unit 514 may set the amount of tilt of the left edge position Q2 relative to the right edge position Q3 to a specific angle, instead of setting the amount of tilt of the right edge position Q3 relative to the left edge position Q2 to a specific angle. The specific position detection unit 514 stores the detected left edge position Q2 and right edge position Q3 in the storage unit 54.
[0042] Next, the specific position detection unit 514 detects the bottom end position Q4 based on the top end position Q1, left end position Q2, and right end position Q3 stored in the memory unit 54. Specifically, the specific position detection unit 514 determines both ends of the line segment indicating the bottom end position Q4 based on the left end position Q2 and the right end position Q3. Then, below the top end position Q1, the specific position detection unit 514 detects a substantially horizontal line segment including a portion where the density values of adjacent pixels change by more than a predetermined value as the bottom end position Q4. The specific position detection unit 514 stores the bottom end position Q4 in the memory unit 54.
[0043] When the specific position detection unit 514 has completed the detection of the lower end position Q4, the image correction unit 511 returns the density values of the side images 81 to 84 to the state before the image correction step S3 was performed.
[0044] When the specific position detecting step S4 is completed, the detection area determining unit 515 determines a predetermined detection area R in the first side image 81 based on the specific position Q detected in the specific position detecting step S4 and stored in the storage unit 54 (detection area determining step S5). FIG. 8 is a diagram showing the detection area R determined in the first side image 81. As shown in FIG. 8, the detection area R in the first side image 81 includes a first detection area R1, a second detection area R2, and a third detection area R3. Also, as shown in FIG. 8, the first detection area R1, the second detection area R2, and the third detection area R3 have a rectangular shape with a predetermined width and a predetermined height.
[0045] 8, the left edge of the first detection region R1 is located a predetermined distance to the right of the left edge position Q2. The right edge of the first detection region R1 is located a predetermined distance to the left of the right edge position Q3. The bottom edge of the first detection region R1 is located a predetermined position above the bottom edge position Q4.
[0046] As shown in Fig. 8, the right end of the second detection area R2 is located a predetermined distance to the left of the left end position Q2, and the left end of the third detection area R3 is located a predetermined distance to the right of the right end position Q3.
[0047] When the detection area determination step S5 is completed, the specific area detection unit 516 detects a predetermined specific area A from the detection area R (specific area detection step S6). The specific area A in the first side image 81 to the fourth side image 84 may include a first specific area A1, a second specific area A2, and a third specific area A3.
[0048] 9A is a diagram showing a first specific range A1 detected in the third side image 83. The first specific range A1 refers to a range consisting of pixels included in the first detection region R1 whose density values are lower than a predetermined threshold value T1. The "threshold value T1" corresponds to the "first threshold value" in the present invention.
[0049] 9A, when lid 91 is turned up, a portion of first detection region R1 may be blocked by turned-up hanging portion 912. In this case, first detection region R1 will have a portion where the pixel density values are lower than when lid 91 is not turned up. Therefore, specific range detection unit 516 measures the density values of the pixels included in first detection region R1 and detects the range where the pixel density values are lower than threshold value T1 as first specific range A1.
[0050] 9B is a diagram showing a second specific range A2 detected in the first side image 81. The second specific range A2 refers to a range consisting of pixels included in the second detection region R2 whose density values are higher than a predetermined threshold value T2. The "threshold value T2" corresponds to the "second threshold value" of the present invention.
[0051] As shown in FIG. 9B, when lid 91 is turned up, the turned-up hanging portion 912 may enter the second detection region R2. In this case, a portion of the second detection region R2 will have higher pixel density values than when lid 91 is not turned up. Therefore, specific range detection unit 516 measures the density values of the pixels included in second detection region R2 and detects the range where the pixel density values are higher than threshold value T2 as second specific range A2. Note that "second specific range A2" is included in the "second specific range" of the present invention.
[0052] 9C is a diagram showing a third specific range A3 detected in the fourth side image 84. The third specific range A3 refers to a range consisting of pixels included in the third detection region R3 whose density values are higher than a threshold value T2.
[0053] As shown in FIG. 9C, when lid 91 is turned up, the turned-up hanging portion 912 may enter the third detection region R3. In this case, a portion of the third detection region R3 will have higher pixel density values than when lid 91 is not turned up. Therefore, specific range detection unit 516 measures the density values of the pixels included in third detection region R3 and detects the range where the pixel density values are higher than threshold value T2 as third specific range A3. Note that the "third specific range A3" is included in the "second specific range" of the present invention.
[0054] When the specific area detection step S6 is completed, the area calculation unit 517 calculates the area of each of the specific areas A1 to A3 detected in the specific area detection step S6 (area calculation step S7). The area calculation unit 517 calculates the area of each of the specific areas A1 to A3 by counting the number of pixels in each of the specific areas A1 to A3.
[0055] <2-3. Processes for top surface images> Next, steps S8 to S13 performed on the top surface image 85 will be described. FIG. 10 is a diagram showing an example of the top surface image 85 included in the inspection image 80. When the imaging step S2 is completed, the top surface center detection unit 512 detects the top surface center C1, which is the center of the top surface 911, in the top surface image 85 (top surface center detection step S8). As shown in FIG. 10, in the top surface image 85, the density value of the pixels included in the hanging portion 912 of the lid 91 is lower than the density value of the pixels included in the top surface 911. The top surface center detection unit 512 detects the boundary B1 between the top surface 911 and the hanging portion 912 based on the difference in density values of the pixels between the top surface 911 and the hanging portion 912 in the top surface image 85. Furthermore, the top surface center detection unit 512 detects the center of the boundary B1 detected in the inspection image 80 as the top surface center C1.
[0056] FIG. 11 is a diagram showing an example of an unfolded image 86 generated from the top surface image 85. When the top surface center detection step S8 is completed, the unfolded image generation unit 513 generates the unfolded image 86 (unfolded image generation step S9). Specifically, the unfolded image generation unit 513 performs polar coordinate expansion on the top surface image 85 based on the top surface center C1 in the top surface image 85. Polar coordinate expansion is a method of converting the radial directions from the top surface center C1 toward the periphery in the top surface image 85 and the circumferential directions around the central axis passing through the top surface center C1 into the X and Y directions in the unfolded image 86. The unfolded image generation unit 513 generates the unfolded image 86 unfolded along the periphery of the top surface 911 by polar coordinate expansion, as shown in FIG. 11. Note that the unfolded image 86 is a deformation of the top surface image 85, and is therefore included in the inspection image 80, just like the top surface image 85.
[0057] When the unfolded image generating step S9 is completed, the specific position detecting unit 514 detects, from within the unfolded image 86, an outer edge position Q5 that includes the outline of the lid 91 (specific position detecting step S10). Specifically, the specific position detecting unit 514 detects, as the outer edge position Q5, a substantially horizontal straight line that includes a portion where the density values of adjacent pixels change by more than a predetermined value within a predetermined range of the unfolded image 86. The specific position detecting unit 514 stores the outer edge position Q5 in the memory unit 54. Note that the outer edge position Q5 is included in the specific position Q, along with the top end position Q1, the left end position Q2, the right end position Q3, and the bottom end position Q4.
[0058] When the specific position detecting step S10 is completed, the detection area determining unit 515 determines a fourth detection area R4 from within the unfolded image 86 based on the outer edge position Q5 detected in the specific position detecting step S10 (detection area determining step S11). As shown in Fig. 11, the detection area determining unit 515 determines the area above the outer edge position Q5 in the unfolded image 86 as the fourth detection area R4. Note that the fourth detection area R4 is included in the detection area R, just like the first detection area R1, second detection area R2, and third detection area R3.
[0059] When the detection area determination step S11 is completed, the specific area detection unit 516 detects a fourth specific area A4 from the fourth detection area R4 (specific area detection step S12). The fourth specific area A4 is included in the specific area A, just like the first specific area A1, the second specific area A2, and the third specific area A3.
[0060] The fourth specific range A4 refers to a range of pixels included in the fourth detection region R4 whose density values are higher than the threshold value T2. As shown in FIG. 11, when the lid 91 is turned up, the turned-up hanging portion 912 may enter the fourth detection region R4. In this case, the fourth detection region R4 contains a portion where the pixel density values are higher than when the lid 91 is not turned up. Therefore, the specific range detection unit 516 measures the density values of the pixels included in the fourth detection region R4 and detects the range where the pixel density values are higher than the predetermined threshold value T2 as the fourth specific range A4. The "fourth specific range A4" is included in the "second specific range" of the present invention.
[0061] The specific range detection unit 516 may detect the fourth specific range A4 based on a predetermined threshold value that is different from the threshold value T2.
[0062] When the specific area detection step S12 is completed, the area calculation unit 517 calculates the area of the fourth specific area A4 detected in the specific area detection step S12 (area calculation step S13). The area calculation unit 517 calculates the area of the fourth specific area A4 by counting the number of pixels in the fourth specific area A4.
[0063] <2-4. Judgment process> After the area calculation step S7 and the area calculation step S13 are completed, the determination unit 518 determines the condition of the lid 91 based on the areas of the specific ranges A1 to A4 calculated in the area calculation step S7 and the area calculation step S13 (determination step S14). Specifically, the determination unit 518 determines whether the areas of the specific ranges A1 to A4 are within a predetermined reference value range set for each of the specific ranges A1 to A4. If all of the areas of the specific ranges A1 to A4 are within the reference value range (Yes in the determination step S14), the determination unit 518 determines that the condition of the lid 91 is good (evaluation step S15). On the other hand, if any one of the area values of the specific ranges A1 to A4 is outside the reference value range, the determination unit 518 determines that the container 9 is defective (evaluation step S16).
[0064] The determination unit 518 has a first reference value for the first specific range A1, second reference values for the second specific range A2 and the third specific range A3, and a third reference value for the fourth specific range A4. The first reference value, the second reference value, and the third reference value may be set as appropriate based on an operation input by an operator.
[0065] In the example shown in FIG. 9A, the area of the first specific area A1 in the third side image 83 is larger than the first reference value. In the example shown in FIG. 9B, the area of the second specific area A2 in the first side image 81 is larger than the second reference value. In the example shown in FIG. 9C, the area of the third specific area A3 in the fourth side image 84 is larger than the second reference value. In the example shown in FIG. 11, the area of the fourth specific area A4 in the unfolded image 86 is larger than the third reference value. Therefore, the determination unit 518 determines that the condition of the lid 91 is poor.
[0066] When the evaluation step S15 or the evaluation step S16 is completed, the inspection device 1 completes the inspection of the container 9 transported to the inspection position P1. As described above, the inspection device 1 repeatedly performs the irradiation step S1 to the determination step S16 every time the container 9 is transported to the inspection position P1.
[0067] <3. Modifications> Although the embodiments of the present invention have been described above, the present invention is not limited to the above-described embodiments.
[0068] In the above embodiment, the imaging axis 31 intersects with, and is preferably perpendicular to, the top surface 911 of the container 9 located at the inspection position P1. However, the imaging axis 31 may be parallel to the top surface 911. In this case, it becomes easier for the imaging unit 30 to capture an image of the hanging portion 912.
[0069] In the above embodiment, the specific position detection unit 514 detects the specific position Q based on the density values of pixels included in the inspection image 80. However, the specific position detection unit 514 may detect the specific position Q based on pixel values other than density values of pixels included in the inspection image 80. In this case, the image correction unit 511 may correct the pixel values other than density values of the inspection image 80 in the image correction step S3.
[0070] In the above embodiment, the specific range detection unit 516 detects the specific range A based on the density values of the pixels included in the detection region R. However, the specific range detection unit 516 may detect the specific range A based on pixel values other than the density values of the pixels included in the detection region R. In this case, the image correction unit 511 may correct the pixel values other than the density values of the inspection image 80 in the image correction step S3.
[0071] In the above embodiment, the inspection device 1 detects defects in the container 9 by using the unfolded image 86 generated from the top surface image 85. However, the inspection device 1 may detect defects in the container 9 by using the top surface image 85. In this case, the inspection device 1 may use the top surface image 85 instead of the unfolded image 86, or may use both the top surface image 85 and the unfolded image 86.
[0072] Although the present invention has been described in detail, the above description is merely an example, and within the scope of the spirit of the present invention, the configurations (elements) described in the above-mentioned embodiments, variants, and notes may be combined as appropriate as long as they are not mutually contradictory, and addition, omission, substitution, and other modifications of the configurations are possible. [Industrial Applicability]
[0073] The present invention can be used in an inspection device and an inspection method. [Explanation of symbols]
[0074] 1: Inspection equipment 9: Container 10: Transport unit 11: Transport roller 12: Belt 20: Irradiation unit 30: Imaging unit 31: Imaging axis 40: Mirror 50: Inspection Department 51: Processor 52:ROM 53: RAM 54: Storage section 70: Information Department 80: Inspection image 85: Top image 86: Expanded image 90: Opening 91: Lid 92: Main body 511: Image correction unit 512:Top center detection section 513: Exploded image generation unit 514: Specific position detection unit 515: Detection area determination unit 516: Specific range detection unit 517:Area calculation part 518: Judgment section 911:Top section 912: Drooping part A: Specific range B1: Boundary C1: Center of top surface OP1: Opening P: Program P1: Inspection position Q:Specific position R: Detection area
Claims
1. An inspection device for a container having an opening and a lid that closes the opening, an irradiation unit that irradiates light onto the outer surface of the container; an imaging unit that images the container; a specific position detection unit that detects a specific position including the outer shape of the lid from within the inspection image captured by the imaging unit; a detection area determination unit that determines a predetermined detection area from within the inspection image based on the specified position; a specific range detection unit that detects a predetermined specific range from the detection area; an area calculation unit that calculates the area of the specific range; a determination unit that determines the state of the lid based on the calculation result of the area calculation unit; Equipped with the inspection image includes a side image that is an image including a side surface of the container, the specific positions include an upper end position, a left end position, a right end position, and a lower end position corresponding to the outer shape of the lid; The predetermined detection area is a first detection area that is to the right of the left end position, to the left of the right end position, above the bottom end position, and closer to the bottom end position than the top end position; a second detection area located to the left of the left end position; a third detection area located to the right of the right end position; 12. An inspection device comprising:
2. The inspection device according to claim 1, An inspection device comprising: a mirror positioned outside the container and directing light reflected by the container to the imaging unit.
3. 3. The inspection device according to claim 2, At least a portion of the mirror is located below the lid.
4. The inspection device according to claim 2 or 3, An inspection apparatus comprising a plurality of the mirrors.
5. The inspection device according to claim 4, An inspection apparatus comprising four of said mirrors.
6. The inspection device according to any one of claims 1 to 5, The imaging unit images a plurality of imaging locations in the container, The specific position detection unit detects the specific position for each of the plurality of image capturing locations.
7. The inspection device according to any one of claims 1 to 6, The specific position detection unit detects the specific position based on pixel values of pixels included in the inspection image.
8. The inspection device according to any one of claims 1 to 7, The specific range detection unit detects the specific range based on pixel values of pixels included in the detection area.
9. The inspection device according to claim 8, the specific range includes a first specific range, The specific range detection unit detects, as the first specific range, a range in which pixel values of pixels included in the detection area are lower than a predetermined first threshold.
10. The inspection device according to claim 8 or claim 9, the specific range includes a second specific range, The specific range detection unit detects, as the second specific range, a range in which pixel values of pixels included in the detection area are higher than a predetermined second threshold.
11. The inspection device according to any one of claims 1 to 10, An inspection device comprising an image correction unit that corrects pixel values of the inspection image.
12. The inspection device according to any one of claims 7 to 11, The pixel values are density values.
13. The inspection device according to any one of claims 1 to 12, The lid is a top surface portion covering the opening; a hanging portion extending downward from the top surface portion; and The imaging unit captures an image of an imaging location including the hanging portion.
14. The inspection device according to any one of claims 1 to 13, the lid has a top surface portion that covers the opening, The imaging unit captures an image of an imaging location including the top surface portion.
15. The inspection device according to any one of claims 1 to 14, The irradiation unit irradiates infrared rays.
16. A method for inspecting a container having an opening and a lid that closes the opening, comprising: (a) an irradiation step of irradiating the outer surface of the container with light; (b) an imaging step of imaging the container irradiated with the light; (c) a specific position detection step of detecting a specific position including the outer shape of the lid from the inspection image obtained by the imaging step; (d) a detection area determination step of determining a predetermined detection area from within the inspection image based on the specific position detected in the specific position detection step; (e) a specific range detection step of detecting a predetermined specific range from the detection area; (f) an area calculation step of calculating an area of the specific range detected by the specific range detection step; (g) a determination step of determining the state of the lid based on the area of the specific range calculated by the area calculation step; Including, the inspection image includes a side image that is an image including a side surface of the container, the specific positions include an upper end position, a left end position, a right end position, and a lower end position corresponding to the outer shape of the lid; The predetermined detection area is a first detection area that is to the right of the left end position, to the left of the right end position, above the bottom end position, and closer to the bottom end position than the top end position; a second detection area located to the left of the left end position; a third detection area located to the right of the right end position; 12. A testing method comprising:
Citation Information
Patent Citations
Method and apparatus for detecting internal breakage of cap handle
JP1994058889A
Color image processing device
JP2004212167A
Defect inspection method for metallic cap, regulation method for inspection thereof, and defect inspection method for metallic cap
JP2006300711A
Inspection device and inspection method
JP2021173667A
Defect detection device and defect detection method
WO2020059743A1