Detection device and foreign object detection method

The detection device uses oscillation and image comparison to accurately identify foreign matter in light-transmitting containers, distinguishing between floating and adhered foreign matter and scratches, enhancing detection accuracy.

JP7801174B2Active Publication Date: 2026-01-16CANADEVIA CO LTD
View PDF 10 Cites 0 Cited by

Patent Information

Application Number
JP2022081954
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2026-01-16
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

Existing detection devices struggle to accurately distinguish between floating foreign matter and adhered foreign matter in light-transmitting containers, as well as differentiate between foreign matter and scratches on the container surface.

Method used

A detection device that includes an imaging unit, a swinging unit to oscillate the container, and a detection unit to compare images captured at different focal positions before and after oscillation, allowing for the differentiation of foreign matter based on image differences.

Benefits of technology

The device effectively detects foreign matter in light-transmitting containers with high accuracy by distinguishing between floating and adhered foreign matter, as well as differentiating it from scratches on the container surface.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007801174000001
    Figure 0007801174000001
  • Figure 0007801174000002
    Figure 0007801174000002
  • Figure 0007801174000003
    Figure 0007801174000003
Patent Text Reader

Abstract

To provide a detection device and a foreign matter detection method for accurately detecting a foreign matter in a container having translucency.SOLUTION: A detection device 10 for detecting a foreign matter G in a container 90 having translucency comprises: a camera 15 for imaging the container 90; a rocking device 11 for rocking the container 90 imaged by the camera 15; and a detection unit 22 for detecting the foreign matter G in the container 90 based on a comparative image 33 of the container 90 imaged by the camera 15. The camera 15 images the container 90 before being rocked by the rocking device 11 as a first image 31 at a plurality of focal positions S, and images the container 90 after being rocked by the rocking device 11 as a second image 32 at a plurality of focal positions S. The detection unit 22 detects the foreign matter G in the container 90 by comparing the first image 31 and the second image 32 at each of the same focal points S imaged by the camera 15.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical Field]

[0001] The present invention relates to a detection device and a method for detecting foreign matter in a light-transmitting container. [Background technology]

[0002] Patent Document 1 discloses a detection device for detecting foreign matter in a translucent container. The detection device in Patent Document 1 includes an imaging means provided above the container and capable of capturing images while changing the focal position, a light source provided above the container that irradiates the focal position of the imaging means with light, and an image processing means. In the detection device in Patent Document 1, the imaging means captures image data of the liquid surface in the container illuminated by the light source. The image processing means then captures the image data captured by the imaging means and detects foreign matter in the liquid based on the image data. [Prior art documents] [Patent documents]

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

[0004] However, the detection device in Patent Document 1 images a fixed container while changing the focal position of the imaging means, and detects foreign matter in the liquid based on the image data of the imaged container.While the presence or absence of foreign matter in the container can be detected to some extent from the image data, it is difficult to distinguish between foreign matter moving in the liquid (floating foreign matter), foreign matter attached to the outer surface of the container (adhered foreign matter), and scratches on the outer surface of the container.As a result, the detection device in Patent Document 1 has the problem of being unable to accurately detect foreign matter in the liquid (floating foreign matter).

[0005] SUMMARY OF THE INVENTION It is therefore an object of the present invention to provide a detection device and a method for detecting foreign matter in a light-transmitting container with high accuracy by solving the above problems. [Means for solving the problem]

[0006] In order to achieve this object, the detection device of the present invention is a detection device for detecting foreign matter in a light-transmitting container, From the side The apparatus includes an imaging unit that captures an image of the container, a swinging unit that swings the container, and a detection unit that detects a foreign object in the container based on the image of the container captured by the imaging unit, and the imaging unit captures an image of the container in a first state. Determined by the depth of field of the imaging unit and the size of the container The container is photographed at a plurality of focal positions, and the images of the container that have been swung by the swinging unit to a second state different from the first state are captured. The aforementioned An image is captured at a focal position, and the detection unit detects foreign matter in the container by comparing the image of the container in the first state with the image of the container in the second state for each of the same focal positions captured by the imaging unit.

[0007] According to the detection device of the present invention, it is preferable that the imaging unit images the container in the first state before being oscillated by the oscillating unit as a first image at a plurality of focal positions, and images the container in the second state after being oscillated by the oscillating unit as a second image at a plurality of focal positions.

[0008] According to the detection device of the present invention, it is preferable that the imaging unit captures the container in the second state after being oscillated by the oscillating unit as a first image at a plurality of focal positions, and captures the container in the first state after a predetermined time has elapsed since capturing the first image as a second image at a plurality of focal positions.

[0009] According to the detection device of the present invention, it is preferable that the detection unit compares the first image and the second image captured by the imaging unit at the same focal position, and determines that a part that differs between the first image and the second image is the foreign object.

[0010] According to the detection device of the present invention, it is preferable that the detection unit compares the first image and the second image captured by the imaging unit at the same focal position, and if there is a difference between the first image and the second image within a predetermined range of pixels, determine that the part with the difference is the foreign substance.

[0011] According to the detection device of the present invention, it is preferable that the detection unit compares the first image and the second image captured by the imaging unit at the same focal position, indicates the magnitude of the difference between the first image and the second image by the shade of the image, and judges the foreign object based on the shade of the image.

[0012] The foreign matter detection method of the present invention is a method for detecting foreign matter in a light-transmitting container, the method comprising: a shaking step of shaking the container; an imaging unit that images the container from the side, An image of the container in a first state Determined by the depth of field of the imaging unit and the size of the container a first imaging step of capturing images at a plurality of focal positions; The imaging unit The image of the container that has been shaken in the shaking step to a second state different from the first state is displayed on a plurality of images. The aforementioned The method includes a second imaging step of capturing an image at a focal position, and a foreign object detection step of detecting a foreign object in the container by comparing the image of the container captured in the first imaging step with the image of the container captured in the second imaging step for each of the same focal positions. [Effects of the Invention]

[0013] According to the detection device and foreign matter detection method of the present invention, foreign matter in a container is detected by comparing, for each identical focal position, an image of the container in a first state with an image of the container in a second state different from the first state after being shaken by the shaker, captured by the image capture unit. This not only makes it possible to detect the presence or absence of foreign matter in the container, but also makes it easy to distinguish between foreign matter moving in the liquid in the container (floating foreign matter) and foreign matter that is scratched on the outer surface of the container or adhered to the outer surface of the container (adhered foreign matter). Therefore, foreign matter in a light-transmitting container can be detected with high accuracy. [Brief explanation of the drawings]

[0014] [Figure 1] 1 is a schematic diagram showing the overall configuration of a detection device according to an embodiment of the present invention. [Figure 2] 10 is a schematic diagram showing the positional relationship between a camera and a container when detecting foreign matter in the detection device. FIG. [Figure 3] 10 is a diagram showing a first image and a second image captured by a camera of the detection device at a predetermined focal position, and a comparison image formed from the first image and the second image. FIG. [Figure 4] 10 is a flowchart showing a method for detecting foreign matter in liquid in a container using the detection device. [Figure 5] 10 is a schematic diagram showing the positional relationship between a camera and a container when detecting foreign matter in a detection device according to another embodiment of the present invention. FIG. [Figure 6] 10 is a flowchart showing a method for detecting foreign matter in liquid in a container using a detection device according to another embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION

[0015] Hereinafter, a detection device and a foreign object detection method according to an embodiment will be described with reference to the drawings.

[0016] As shown in FIGS. 1 and 2, the detection device 10 in this embodiment is a device that detects foreign matter G in a liquid in a container 90. The container 90 in which the detection device 10 detects foreign matter G is a light-transmitting container. The container 90 is intended to store a liquid drug, such as a medicine, in a sealed state. The liquid stored in the container 90 is not particularly limited, and may be any liquid that is fluid and light-transmitting. The liquid stored in the container 90 may also contain nanoparticles that cannot be detected visually or by a camera 15. The container 90 is made of glass or the like.

[0017] The detection device 10 mainly comprises a rocking device 11 (an example of an "rocking unit") that rocks the container 90, a camera 15 (an example of an "imaging unit") that captures an image of the container 90, and a control device 20 that controls the entire detection device 10.

[0018] The shaking device 11 shakes the container 90, which is imaged by the camera 15. As the shaking device 11 shakes the container 90, the liquid in the container 90 is agitated. That is, as the shaking device 11 shakes the container 90, the state of the container 90 changes from a first state to a second state. That is, the state of the container 90 before being shaken by the shaking device 11 is the first state of the container 90, and the state of the container 90 after being shaken by the shaking device 11 is the second state of the container 90. As the liquid in the container 90 is agitated by the shaking device 11, foreign matter G moves within the liquid. Furthermore, as the liquid in the container 90 is agitated by the shaking device 11, foreign matter G attached to the inner wall surface of the container 90 (the wall surface above the liquid level) is taken into the liquid by the agitated liquid. That is, as the state of the container 90 changes from the first state to the second state, foreign matter G moves within the liquid, and foreign matter G attached to the inner wall surface of the container 90 is taken into the liquid. In this way, by using the rocking device 11 to agitate the liquid in the container 90, the detection device 10 can detect not only foreign matter G that has been floating in the liquid in the container 90 since it was stored in the container 90, but also foreign matter G that has adhered to the inner wall surface of the container 90. The rocking device 11 holds the container 90 at an imaging position P of the camera 15. As shown in FIG. 2 , the rocking device 11 moves the container 90 relative to the camera 15 in accordance with a focal position S of the camera 15. By using the rocking device 11 to move the container 90 relative to the camera 15, the camera 15 can capture images of the container 90 at multiple focal positions S.

[0019] As shown in FIG. 1 , the swinging device 11 mainly includes a gripping unit 12, a swinging arm 13, and a driving unit 14. The gripping unit 12 is a part that grips a container 90. The gripping unit 12 is provided at the tip of the swinging arm 13, and grips a lid 91 of the container 90. The swinging arm 13 is an arm that swings the container 90 gripped by the gripping unit 12. The driving unit 14 includes a motor (not shown), and operates the swinging arm 13 by driving the motor. The driving unit 14 is connected to a control device 20, and the motor is driven by a signal from the control device 20.

[0020] The rocking device 11 rocks the container 90 by operating the rocking arm 13 while holding the container 90 with the gripping part 12. At this time, the rocking device 11 rocks the container 90 by calculating the centrifugal force and the rise in the liquid level so that the liquid level in the container 90 does not rise to the position of the lid 91 of the container 90 and the liquid in the container 90 is not disturbed.

[0021] The rocking device 11 operates the rocking arm 13 while holding the container 90 with the gripper 12, thereby moving the container 90 in front of the camera 15. The rocking device 11 also moves the container 90 closer to or farther away from the camera 15, thereby moving the container 90 in accordance with the focal position S of the camera 15. The rocking device 11 then holds the container 90 at a position (the photographing position of the camera 15) in accordance with the focal position S of the camera 15.

[0022] The camera 15 is configured, for example, by a CCD camera or the like. The camera 15 is fixed at a predetermined position of the detection device 10. As shown in FIG. 3 , the camera 15 captures first images 31 (an example of an image of the container in the first state) of the container 90 (an example of a "container in the first state") at multiple focal positions before being shaken by the shaking device 11. That is, the camera 15 captures first images 31 of the container 90 at multiple focal positions before moving the foreign matter G in the liquid. Here, the first images 31 are cross-sectional images of the container 90 before being shaken by the shaking device 11, and are formed for each focal position of the camera 15.

[0023] 2, for example, the camera 15 captures a first image 31 of the container 90, with the container 90 having been moved to a first position T1 by the rocking device 11, at a focal position S of a portion of the container 90 that is on the rear side of the camera 15. Specifically, the camera 15 captures a cross-sectional image of a portion of the container 90 that is on the rear side of the camera 15, with the container 90 positioned at the first position T1. Here, the first position T1 is a position where the camera 15 can focus on a portion of the container 90 that is on the rear side of the camera 15 and capture an image of the container 90.

[0024] Next, the camera 15 captures a first image 31 of the container 90, with the central portion of the container 90 moved to the second position T2 by the rocking device 11 as the focal position S. Specifically, the camera 15 captures a cross-sectional image of the central portion of the container 90 located at the second position T2. ​​Here, the second position T2 is a position where the camera 15 can focus on the central portion of the container 90 and capture an image of the container 90. The rocking device 11 moves the container 90 located at the first position T1 in a direction away from the camera 15, thereby moving the container 90 to the second position T2.

[0025] Subsequently, the camera 15 captures a first image 31 of the container 90, with the container 90 having been moved to a third position T3 by the rocking device 11, with a focal position S being a portion of the container 90 that is in front of the camera 15. Specifically, the camera 15 captures a cross-sectional image of a portion of the container 90 that is in front of the camera 15, with the container 90 positioned at the third position T3. Here, the third position T3 is a position where the camera 15 can focus on a portion of the container 90 that is in front of the camera 15 and capture an image of the container 90. The rocking device 11 moves the container 90, which is positioned at the second position T2, in a direction away from the camera 15, thereby moving the container 90 to the third position T3.

[0026] In this way, the camera 15 captures the first images 31 of the container 90 (images of the container 90 in the first state) at multiple focal positions S formed by changing the position of the container 90 from the first position T1 to the third position T3, thereby being able to capture an image of the entire container 90 (the container 90 in the first state) before being shaken by the shaking device 11. Therefore, foreign matter G in the entire container 90 before being shaken by the shaking device 11 can be detected from the first images 31 captured by the camera 15. Note that the number of cross-sectional images of the container 90 captured as the first images 31 of the container 90 is determined by the depth of field of the camera 15 and the size of the container 90. In other words, the position of the container 90 moved by the shaking device 11 is determined by the depth of field of the camera 15 and the size of the container 90.

[0027] 3, the camera 15 captures second images 32 (an example of an image of the container in the second state) of the container 90 after being shaken by the shaking device 11 (an example of a "container in the second state") at multiple focal positions S. That is, the camera 15 captures second images 32 of the container 90 after the foreign matter G has been moved in the liquid at multiple focal positions S. Here, the second images 32 are cross-sectional images of the container 90 after being shaken by the shaking device 11, and are formed for each focal position S of the camera 15.

[0028] 2, similar to the case of capturing the first image 31 of the container 90, the camera 15 captures the second image 32 of the container 90 by setting a focal position S on a portion of the container 90 that is on the rear side of the container 90 relative to the camera 15 in the container 90 that has been moved to the first position T1 by the rocking device 11. Next, the camera 15 captures the second image 32 of the container 90 by setting a focal position S on a portion that is on the center of the container 90 that has been moved to the second position T2 by the rocking device 11. Further next, the camera 15 captures the second image 32 of the container 90 by setting a focal position S on a portion of the container 90 that is on the front side of the container 90 relative to the camera 15 in the container 90 that has been moved to the third position T3 by the rocking device 11. That is, the camera 15 captures the image of the container 90 after rocking by the rocking device 11 at the same positions (first position T1, second position T2, and third position T3) as those at which the image of the container 90 before rocking by the rocking device 11 was captured.

[0029] In this way, camera 15 captures second images 32 of container 90 (images of container 90 in the second state) at multiple focal positions S formed by changing the position of container 90 from first position T1 to third position T3, thereby making it possible to capture an image of the entire container 90 (container 90 in the second state) after being shaken by shaking device 11. Therefore, foreign matter G in the entire container 90 after being shaken by shaking device 11 (after the liquid in container 90 is stirred to move foreign matter G in the liquid) can be detected from second images 32 captured by camera 15. Note that the number of cross-sectional images of container 90 captured as second images 32 of container 90 is determined by the depth of field of camera 15 and the size of container 90.

[0030] As shown in Fig. 1, the control device 20 is connected to the camera 15 and the rocking device 11. The control device 20 controls the camera 15 to capture an image of the container 90. The control device 20 controls the rocking of the container 90 by the rocking device 11. The control device 20 is mainly composed of a control unit 21, a memory unit 23, and a display unit 24.

[0031] The control unit 21 is a CPU (Central Processing Unit), an MPU (Micro-processing Unit), or the like, and executes various processes in the detection device 10 in accordance with programs stored in the memory unit 23. The control unit 21 includes a detection unit 22 that detects foreign matter G in the container 90 based on images (first image 31 and second image 32) of the container 90 captured by the camera 15.

[0032] 2 and 3, the detection unit 22 detects a foreign object G in the container 90 by comparing the first image 31 and the second image 32 taken at the same focal position by the camera 15. Specifically, the detection unit 22 detects a foreign object G in a portion of the container 90 that is behind the camera 15 by comparing the first image 31 and the second image 32 taken at the focal position S of the camera 15 when the container 90 is located at the first position T1. The detection unit 22 also detects a foreign object G in a portion of the container 90 that is at the center by comparing the first image 31 and the second image 32 taken at the focal position S of the camera 15 when the container 90 is located at the second position T2. ​​The detection unit 22 also detects a foreign object G in a portion of the container 90 that is in front of the camera 15 by comparing the first image 31 and the second image 32 taken at the focal position S of the camera 15 when the container 90 is located at the third position T3.

[0033] The detection unit 22 compares the first image 31 and the second image 32 captured by the camera 15 at the same focal position S, and determines that any difference between the first image 31 and the second image 32 is a foreign object G. Specifically, as shown in FIG. 3 , the detection unit 22 forms a comparison image 33 by superimposing the first image 31 and the second image 32 captured by the camera 15 at the same focal position (e.g., the focal position S of the camera 15 formed when the container 90 is located at the first position T1). Here, the comparison image 33 is an image in which the difference between the first image 31 and the second image 32 is expressed in shading depending on the magnitude of the difference between the first image 31 and the second image 32. Note that the difference between the first image 31 and the second image 32 when forming the comparison image 33 may be expressed using brightness, contrast, or the like. Alternatively, the comparison image 33 may be formed by determining the difference between the first image 31 and the second image 32 using other known techniques. The detection unit 22 detects a portion where there is a difference between the first image 31 and the second image 32 from the formed comparison image 33. The detection unit 22 determines that the detected portion where there is a difference between the first image 31 and the second image 32 is a foreign object G.

[0034] As shown in FIG. 3 , for example, if foreign matter G (first foreign matter G1 and second foreign matter G2) is present in the liquid in container 90, first image 31 displays an image of first foreign matter G1, while second image 32 displays no image of first foreign matter G1. Conversely, first image 31 displays no image of second foreign matter G2, while second image 32 displays an image of second foreign matter G2. That is, a difference occurs between first image 31 and second image 32. This is because the container 90 is rocked by rocking device 11 while camera 15 captures the first image 31 and the second image 32, causing the first foreign matter G1 and second foreign matter G2 in the liquid in container 90 to move. In this case, in comparison image 33, the image of the portion that differs between first image 31 and second image 32 (first foreign matter G1 and second foreign matter G2 in the liquid) is displayed with a darker shade.

[0035] On the other hand, as shown in FIG. 3, for example, if there is a scratch K on the container 90 itself and a third foreign object G3 on the outside of the container 90, images of the scratch K and the third foreign object G3 will be displayed in the first image 31, and images of the scratch K and the third foreign object G3 will be displayed in the second image 32 at the same positions as in the first image 31. That is, no difference will occur between the first image 31 and the second image 32. This is because even if the container 90 is rocked by the rocking device 11 while the camera 15 captures the first image 31 and the second image 32, the scratch K on the container 90 itself and the third foreign object G3 on the outside of the container 90 will not move. In this case, in the comparison image 33, the image of the portion that does not differ between the first image 31 and the second image 32 (the scratch K on the container 90 and the third foreign object G3 on the outside of the container 90) will be displayed with a lighter shade.

[0036] Furthermore, the detection unit 22 detects foreign matter G based on a comparison image 33 formed by superimposing the first image 31 and the second image 32. Therefore, if there is a positional misalignment between the position of the container 90 when the first image 31 is captured and the position of the container 90 when the second image 32 is captured (if there is a misalignment due to the positioning accuracy of the rocking device 11), even if the container 90 itself has a scratch K or if a foreign matter G is present on the outside of the container 90, the comparison image 33 will display a darker shade of the image as an image of a portion where there is a difference between the first image 31 and the second image 32 (originally, a lighter shade of the image as an image of a portion where there is no difference between the first image 31 and the second image 32). For this reason, the detection unit 22 compares the first image 31 and the second image 32 captured by the camera 15 at the same focal position, and if there is a difference between the first image 31 and the second image 32 within a predetermined pixel range, the detection unit 22 determines that the portion where there is a difference is a foreign matter G. That is, the detection unit 22 compares the first image 31 with the second image 32, and if the difference between the images on the comparison image 33 displayed as a foreign substance G in the first image 31 and the second image 32 is a difference ranging from a few pixels to several tens of pixels, the detection unit 22 determines that the difference is a foreign substance G, but if the difference is around one pixel, the detection unit 22 does not determine that the difference is a foreign substance G.

[0037] Furthermore, the detection unit 22 compares the first image 31 and the second image 32 captured at the same focal position by the camera 15, indicates the magnitude of the difference between the first image 31 and the second image 32 by the shade of the image, and determines the presence of foreign matter G based on the shade of the image.

[0038] As shown in FIG. 3, in the comparison image 33, the image of the portion where there is a difference between the first image 31 and the second image 32 (the first foreign matter G1 and the second foreign matter G2 in the liquid) is displayed in a darker shade. In addition, in the comparison image 33, the image of the portion where there is no difference between the first image 31 and the second image 32 (the scratch K on the container 90 and the third foreign matter G3 on the outside of the container 90) is displayed in a lighter shade. That is, in the comparison image 33, when the difference between the first image 31 and the second image 32 is large, the image is displayed in a darker shade, and when the difference is small, the image is displayed in a lighter shade. Therefore, by detecting the image shade in the comparison image 33, the detection unit 22 can distinguish between the foreign matter G in the liquid and the scratch K on the container 90 and the foreign matter G on the outside of the container 90 and determine the foreign matter G.

[0039] The detection unit 22 sets a predetermined threshold value for the image shading of the portion displayed as foreign matter G on the comparison image 33. Here, the predetermined threshold value is a threshold value for the image shading that serves as a reference for determining that the image of the portion displayed on the comparison image 33 is an image of foreign matter G. In other words, if the detection unit 22 determines that the image shading of the portion displayed as foreign matter G on the comparison image 33 is equal to or greater than the predetermined threshold value, it determines that the portion is foreign matter G in the liquid. On the other hand, if the detection unit 22 determines that the image shading of the portion displayed as foreign matter G on the comparison image 33 is less than the predetermined threshold value, it determines that the portion is a scratch K on the container 90 and a foreign matter G outside the container 90.

[0040] The storage unit 23 is a flash memory, a RAM (Random Access Memory), or the like, and stores programs executed by the control unit 21, data generated by the control unit 21 executing the programs, and the like.

[0041] The display unit 24 performs various displays in the detection device 10. The display unit 24 is configured by, for example, a monitor, a touch panel, or the like.

[0042] Next, a method for detecting foreign matter G in the liquid in the container 90 using the detection device 10 will be described.

[0043] In the detection device 10, the container 90 is photographed multiple times by shifting the focal position S, and then the container 90 is shaken to move any foreign matter G (floating foreign matter) present in the liquid in the container 90 within the liquid, and the container 90 is photographed again to check whether the foreign matter G (floating foreign matter) has moved, thereby detecting the foreign matter G in the liquid in the container 90.

[0044] Specifically, as shown in FIG. 4, the camera 15 captures a first image 31 (an image of the container 90 in a first state) of the container 90 positioned at a first position T1 to a third position T3 (S1, first imaging step). That is, the camera 15 captures the first image 31 of the container 90 at a plurality of focal positions S. Specifically, as shown in FIG. 2, the camera 15 captures the first image 31 of the container 90 held by the rocking device 11 at the first position T1. Next, the camera 15 captures the first image 31 of the container 90 held by the rocking device 11 at the second position T2. ​​Further next, the camera 15 captures the first image 31 of the container 90 held by the rocking device 11 at the third position T3.

[0045] As shown in FIG. 4, when the camera 15 captures a first image 31 of the container 90 (S1), the shaking device 11 shakes the container 90 (S2, shaking step). This agitates the liquid in the container 90. Here, foreign matter G in the liquid in the container 90 moves, for example, from the center of the container 90 to one side of the container 90 (the front side of the container 90 relative to the camera 15) as shown in FIG. 2. On the other hand, scratches K on the container 90 itself do not move due to the shaking of the container 90. When the shaking device 11 shakes the container 90 (S2), the camera 15 captures a second image 32 (an image of the container 90 in a second state) of the container 90 positioned from the first position T1 to the third position T3 (S3, second imaging step). That is, the camera 15 captures the second image 32 of the container 90 after being shaken in the shaking step at multiple focal positions S. 2, the camera 15 captures an image of the container 90 held by the rocking device 11 at the first position T1 as the second image 32. Next, the camera 15 captures an image of the container 90 held by the rocking device 11 at the second position T2 as the second image 32. Next, the camera 15 captures an image of the container 90 held by the rocking device 11 at the third position T3 as the second image 32.

[0046] 4, when the camera 15 captures the second image 32 of the container 90 (S3), the detection unit 22 compares the first image 31 and the second image 32 of the container 90 captured from the first position T1 to the third position T3 (S4, foreign object detection step). That is, the detection unit 22 detects a foreign object G in the container 90 by comparing the first image 31 and the second image 32 for each identical focal position S. Specifically, the detection unit 22 forms a comparison image 33 of the container 90 at the first position T1 by superimposing the first image 31 and the second image 32 of the container 90 captured at the first position T1, and detects a foreign object G in the container 90 at the first position T1 based on the formed comparison image 33. Similarly, the detection unit 22 forms a comparison image 33 of the container 90 at the second position T2 by superimposing the first image 31 and the second image 32 of the container 90 taken at the second position T2, and detects a foreign object G in the container 90 at the second position T2 based on the formed comparison image 33. Furthermore, the detection unit 22 forms a comparison image 33 of the container 90 at the third position T3 by superimposing the first image 31 and the second image 32 of the container 90 taken at the third position T3, and detects a foreign object G in the container 90 at the third position T3 based on the formed comparison image 33.

[0047] The detection unit 22 detects whether or not the formed comparison image 33 includes any portion where the image shading is equal to or greater than a predetermined threshold (S5). That is, the detection unit 22 detects any portion where the image difference between the first image 31 and the second image 32 is large in the formed comparison image 33. If the detection unit 22 determines that the comparison image 33 includes any portion where the image shading is equal to or greater than a predetermined threshold (S5-Yes), the detection unit 22 determines that a foreign substance G is present in the liquid in the container 90 (S6). On the other hand, if the detection unit 22 determines that the comparison image 33 does not include any portion where the image shading is equal to or greater than a predetermined threshold (S5-No), the detection unit 22 determines that a foreign substance G is not present in the liquid in the container 90 (S7). In addition, if the detection unit 22 determines that there are no parts in the comparison image 33 where the image shading is above a predetermined threshold (S5-No), it may determine that there is no foreign matter G in the liquid in the container 90 (S7), and may also determine that there is a scratch K on the container 90 or that there is a foreign matter G on the outside of the container 90.

[0048] As described above, according to the present embodiment, foreign matter G in the container 90 is detected by comparing the first image 31 (an image of the container 90 in a first state) taken of the container 90 before being shaken by the shaking device 11 with the second image 32 (an image of the container 90 in a second state) taken of the container 90 after being shaken by the shaking device 11 for each identical focal position S taken by the camera 15. This not only makes it possible to detect the presence or absence of foreign matter G in the container 90, but also makes it possible to easily distinguish between foreign matter G moving in the liquid in the container 90 (floating foreign matter) and a scratch K on the outer surface of the container 90 or foreign matter G attached to the outer surface of the container 90 (attached foreign matter). Therefore, foreign matter G in the light-transmitting container 90 can be detected with high accuracy.

[0049] Furthermore, according to this embodiment, the detection unit 22 determines that the part where there is a difference between the first image 31 and the second image 32 is a foreign object G when the part where there is a difference is within a range of a predetermined number of pixels. Therefore, it is possible to determine the foreign object G by comparing the first image 31 and the second image 32, taking into account errors in the imaging by the camera 15 (deviations due to positioning accuracy), etc., and therefore it is possible to detect the foreign object G more accurately.

[0050] Furthermore, according to this embodiment, the detection unit 22 determines the presence or absence of foreign matter G based on the shade of the image, which indicates the magnitude of the difference between the first image 31 and the second image 32, so that the presence or absence of foreign matter G can be visually determined.

[0051] In this embodiment, the focal position S of the camera 15 is changed by moving the container 90 relative to the camera 15, but this is not limited to this, and the focal position S of the camera 15 may also be changed by moving the camera 15 relative to the container 90 while the container 90 is fixed by the rocking device 11.

[0052] In addition, in this embodiment, the position of the container 90 is changed from the first position T1 to the third position T3 to capture the first image 31, and then the container 90 is swung, and the position of the container 90 is again changed from the first position T1 to the third position T3 to capture the second image 32, but this is not limited to this and the method shown below may also be used.

[0053] In this method, the container 90 after being shaken by the shaking device 11 is captured as a first image 31. Here, the state of the container 90 after being shaken by the shaking device 11 is the second state of the container 90. Specifically, the second state of the container 90 is the state in which the container 90 is shaken to agitate the liquid inside the container 90.

[0054] Furthermore, in this method, a first image 31 of the container 90 is captured and then a second image 32 of the container 90 is captured a predetermined time later. That is, in this method, the second image 32 of the container 90 is captured at the same position as the position where the first image 31 of the container 90 was captured. Here, the state of the container 90 a predetermined time after the first image 31 is captured is the first state of the container 90. Specifically, the first state of the container 90 is the state in which the container 90 is held for a predetermined time after the container 90 is shaken to stir the liquid in the container 90.

[0055] 5 and 6, in this method, the shaking device 11 shakes the container 90 at an initial position T0 (S11). Then, the shaking device 11 moves the container 90 to a first position T1 (S12).

[0056] The camera 15 captures a first image 31 (an image of the container 90 in the second state) of the container 90 at the first position T1 (the container 90 in the second state) with a focal position S set to a portion of the container 90 that is behind the camera 15 when the container 90 has been moved to the first position T1 by the rocking device 11 (S13). Furthermore, the camera 15 captures a second image 32 (an image of the container 90 in the first state) of the container 90 at the first position T1 (the container 90 in the first state) a predetermined time (e.g., one to two seconds) after capturing the first image 31 of the container 90 at the first position T1. At this time, as shown in FIG. 5 , the foreign matter G in the liquid in the container 90 in the first state moves to a position different from its position in the liquid in the container 90 in the second state. Meanwhile, the scratch K on the container 90 in the first state itself is present in the same position as the container 90 in the second state.

[0057] 5 and 6, the shaking device 11 shakes the container 90 at the first position T1 (S15), and then moves the container 90 to the second position T2 (S16).

[0058] The camera 15 captures a first image 31 (an image of the container 90 in the second state) of the container 90 at the second position T2 (S17), with the central portion of the container 90 (the container 90 in the second state) moved to the second position T2 by the rocking device 11 as the focal position S. Furthermore, the camera 15 captures a second image 32 (an image of the container 90 in the first state) of the container 90 at the second position T2 (the container 90 in the first state) a predetermined time later (e.g., one to two seconds after the first image 31 of the container 90 at the second position T2) (S18). At this time, as shown in FIG. 5 , the foreign matter G in the liquid in the container 90 in the first state moves to a position different from its position in the liquid in the container 90 in the second state.

[0059] 5 and 6, the shaking device 11 shakes the container 90 at the second position T2 (S19). Subsequently, the shaking device 11 moves the container 90 to the third position T3 (S20).

[0060] The camera 15 captures a first image 31 (an image of the container 90 in the second state) of the container 90 at the third position T3 (S21) with a focal position S set to a portion of the container 90 in front of the camera 15 when the container 90 has been moved to the third position T3 by the rocking device 11 (the container 90 in the second state). Furthermore, the camera 15 captures a second image 32 (an image of the container 90 in the first state) of the container 90 at the third position T3 (the container 90 in the first state) a predetermined time (e.g., one to two seconds) after capturing the first image 31 of the container 90 at the third position T3. At this time, as shown in FIG. 5 , the foreign matter G in the liquid in the container 90 in the first state moves to a position different from its position in the liquid in the container 90 in the second state.

[0061] 5 and 6, when the camera 15 captures a first image 31 (an image of the container 90 in the second state) of the container 90 from the first position T1 to the third position T3 and a second image 32 (an image of the container 90 in the first state) of the container 90 from the first position T1 to the third position T3, the detection unit 22 compares the first image 31 and the second image 32 of the container 90 captured from the first position T1 to the third position T3 (S23). Specifically, the detection unit 22 forms a comparison image 33 of the container 90 at the first position T1 by superimposing the first image 31 and the second image 32 of the container 90 captured at the first position T1, and detects a foreign object G in the container 90 at the first position T1 based on the formed comparison image 33. Similarly, the detection unit 22 forms a comparison image 33 of the container 90 at the second position T2 by superimposing the first image 31 and the second image 32 of the container 90 taken at the second position T2, and detects a foreign object G in the container 90 at the second position T2 based on the formed comparison image 33. Furthermore, the detection unit 22 forms a comparison image 33 of the container 90 at the third position T3 by superimposing the first image 31 and the second image 32 of the container 90 taken at the third position T3, and detects a foreign object G in the container 90 at the third position T3 based on the formed comparison image 33.

[0062] The detection unit 22 detects whether or not there is a portion in the formed comparison image 33 where the image shading is equal to or greater than a predetermined threshold (S24). If the detection unit 22 determines that there is a portion in the comparison image 33 where the image shading is equal to or greater than the predetermined threshold (S24-Yes), the detection unit 22 determines that there is a foreign matter G in the liquid in the container 90 (S25). On the other hand, if the detection unit 22 determines that there is no portion in the comparison image 33 where the image shading is equal to or greater than the predetermined threshold (S24-No), the detection unit 22 determines that there is no foreign matter G in the liquid in the container 90 (S26).

[0063] In this method, the first image 31 and the second image 32 of the container 90 are captured at the same position, so that an error in capturing images by the camera 15 (deviation due to positioning accuracy) is unlikely to occur between the first image 31 and the second image 32 of the container 90. Therefore, the foreign matter G can be accurately determined by comparing the first image 31 and the second image 32 of the container 90, and the foreign matter G can be detected more reliably. [Explanation of symbols]

[0064] 10. Detection Device 11 Swinging device (swinging part) 15 Camera (imaging unit) 22 Detection unit 31 First image 32 Second image 33 Comparison image (image) 90 containers G Foreign object S Focus position

Claims

1. A detection device for detecting foreign matter in a light-transmitting container, an imaging unit that images the container from the side; A swinging unit that swings the container; a detection unit that detects foreign matter in the container based on an image of the container captured by the imaging unit; Equipped with The imaging unit capturing images of the container in a first state at a plurality of focal positions determined by the depth of field of the imaging unit and the size of the container; capturing images of the container that has been swung by the swinging unit to a second state different from the first state at a plurality of focal positions; The detection unit detects a foreign object in the container by comparing an image of the container in the first state with an image of the container in the second state for each of the same focal positions captured by the imaging unit. A detection device characterized by:

2. The imaging unit capturing first images of the container in the first state before being swung by the swinging unit at a plurality of focal positions; capturing second images of the container in the second state after being swung by the swinging unit at a plurality of focal positions; The detection device according to claim 1 .

3. The imaging unit capturing first images of the container in the second state after being swung by the swinging unit at a plurality of focal positions; capturing second images of the container in the first state at a plurality of focal positions after a predetermined time has elapsed since the first image was captured. The detection device according to claim 1 .

4. The detection unit comparing the first image and the second image captured at the same focal position by the imaging unit; determining a portion where there is a difference between the first image and the second image as the foreign substance; 4. The detection device according to claim 2 or 3, wherein:

5. The detection unit comparing the first image and the second image captured at the same focal position by the imaging unit; If there is a difference between the first image and the second image within a range of a predetermined number of pixels, the part with the difference is determined to be the foreign substance.

4. The detection device according to claim 2 or 3, wherein:

6. The detection unit comparing the first image and the second image captured at the same focal position by the imaging unit; The magnitude of the difference between the first image and the second image is indicated by the shading of the image; Determining the foreign matter based on the density of the image.

4. The detection device according to claim 2 or 3, wherein:

7. A foreign object detection method for detecting a foreign object in a light-transmitting container, comprising: a shaking step of shaking the container; a first imaging step of imaging the container in a first state at a plurality of focal positions determined by a depth of field of the imaging unit and a size of the container by an imaging unit that images the container from the side; a second imaging step of imaging, by the imaging unit, images of the container that has been swung in the shaking step to be in a second state different from the first state, at a plurality of the focal positions; a foreign object detection step of detecting a foreign object in the container by comparing the image of the container captured in the first imaging step with the image of the container captured in the second imaging step for each of the same focal positions; Contains A foreign object detection method comprising:

Citation Information

Patent Citations

  • Kaijotaaminarusochi

    JP1976083396A

  • Method of automatically detecting solid matter

    JP1977123293A

  • Inspection device for foreign matter

    JP1987220844A

  • Method for inspecting inner surface of container

    JP1988225156A

  • Apparatus for detecting foreign substance

    JP2005283527A