Bubble recognition device, bubble recognition method, and foreign matter detection system

By setting a reference line group and utilizing the brightness distribution characteristics of bubble images, especially edge pair conditions, bubble images can be identified, solving the problem of false detection of bubbles in liquids and improving the accuracy of foreign object detection.

CN116710960BActive Publication Date: 2026-01-02SYNTEGON TECH KK
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202180086568.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Priority Date
2020-12-24
Filing Date
2021-12-21
Publication Date
2026-01-02
Estimated Expiration
2041-12-21

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify air bubbles in liquids, leading to false detections and affecting the accuracy of foreign object detection.

Method used

By setting a reference line group, the brightness distribution characteristics of the bubble image, especially the edge pair condition, are used to identify the bubble image, reducing the amount of computation and improving the recognition accuracy.

Benefits of technology

It achieves simple and high-precision bubble recognition, reduces the false detection rate, and improves the accuracy of foreign object detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116710960B_ABST
    Figure CN116710960B_ABST
Patent Text Reader

Abstract

A plurality of reference lines are set to a spot (78) in an object image. The spot (78) is composed of an outer portion as a low luminance portion and an inner portion (84) as a high luminance portion. An edge pair condition is included in the bubble determination condition. In a case where two edge pairs EP1, EP2 are detected on any one of the reference lines (100), it is judged that the edge pair condition is satisfied. An edge interval condition can also be included in the bubble determination condition.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present disclosure relates to a bubble recognition device, a bubble recognition method, and a foreign matter detection system, and particularly relates to a technology for recognizing a bubble suspended in a liquid. BACKGROUND

[0002] A foreign matter detection system is a system for detecting a foreign matter contained in an inspection object. In the case where the inspection object is a liquid, a foreign matter suspended in the liquid is detected. For example, in a pharmaceutical factory, a foreign matter detection system is used to inspect a medicine contained in each container. As the container, a syringe, a vial, an ampoule, and the like can be given. As the foreign matter, a metal piece, a resin piece, a rubber piece, a fiber, and the like mixed in the medicine in the manufacturing process can be given. The foreign matter detection system is also used for beverage inspection, chemical medicine inspection, and the like.

[0003] A typical foreign matter detection system is a system for detecting a foreign matter by photographing an inspection object and analyzing an image obtained thereby. In detecting a foreign matter, a scratch or dirt of a container becomes a main cause of false detection. In this regard, in Patent Literature 1, a technology for distinguishing a non-suspended matter and a suspended matter by comparing an object image and a reference image is disclosed.

[0004] In addition, in detecting a foreign matter, a bubble suspended in a liquid becomes a main cause of false detection. In this regard, in Patent Literature 2, a technology for distinguishing a bubble and a foreign matter based on a feature quantity of a bubble (to be exact, a bubble image) is disclosed. In Patent Literature 1 and Patent Literature 2, a technology for recognizing a bubble image using a brightness pattern inherent to the bubble image is not disclosed, and particularly a technology for recognizing a bubble image using a reference line for brightness pattern analysis is not disclosed.

[0005] PRIOR ART DOCUMENTS

[0006] PATENT LITERATURE

[0007] Patent Literature 1: Japanese Patent Application Laid-Open No. 2004-226228

[0008] Patent Literature 2: Japanese Patent Application Laid-Open No. 2004-354100 SUMMARY

[0009] PROBLEMS TO BE SOLVED BY THE INVENTION

[0010] An object of the present disclosure is to recognize a bubble contained in an inspection object with ease and high accuracy. Alternatively, an object of the present disclosure is to improve detection accuracy of a foreign matter contained in an inspection object.

[0011] MEANS FOR SOLVING THE PROBLEMS

[0012] The bubble recognition device of the present disclosure is characterized by including a setting section that sets at least one reference line that crosses a spot in an image, and a recognition section that recognizes the spot as a bubble image based on a brightness distribution on the at least one reference line satisfying a bubble determination condition, the bubble determination condition including an edge pair condition that requires that two edge pairs be included in the brightness distribution of interest.

[0013] The bubble recognition method of the present disclosure is characterized by including a step of setting a plurality of reference lines at a spot in an image, and a step of recognizing the spot as a bubble image based on n (where n is an integer of 1 or more) of a plurality of brightness distributions on the plurality of reference lines satisfying a bubble determination condition, the bubble determination condition including an edge pair condition that requires that two edge pairs be included in the brightness distribution of interest.

[0014] The foreign matter detection system of the present disclosure is characterized by including an imaging device that images an inspection target, and a processor that processes an image acquired by the imaging device, the processor applying a pre-processing that excludes non-suspended spots to the image, setting a reference line group at a suspended spot in the pre-processed image, recognizing the suspended spot as a bubble image based on n (where n is an integer of 1 or more) of a plurality of brightness distributions on the reference line group satisfying a bubble determination condition, determining the suspended spot as a foreign matter image in a case where the suspended spot is not recognized as the bubble image, the bubble determination condition including an edge pair condition that requires that two edge pairs be included in the brightness distribution of interest. BRIEF DESCRIPTION OF DRAWINGS

[0015] Figure 1 is a diagram showing a configuration example of a foreign matter detection system of an embodiment.

[0016] Figure 2 is a diagram showing a plurality of kinds of bubble images.

[0017] Figure 3 is a diagram showing a plurality of kinds of foreign matter images.

[0018] Figure 4 is a diagram showing a pre-processing.

[0019] Figure 5 is a diagram showing a region of interest.

[0020] Figure 6 is a diagram showing a reference line group.

[0021] Figure 7 is a diagram showing edge detection on a bubble image.

[0022] Figure 8 is a diagram showing other reference line groups.

[0023] Figure 9 is a diagram showing edge detection on a foreign matter image.

[0024] Figure 10 is a diagram showing edge detection on a special bubble image.

[0025] Figure 11 is a diagram showing a foreign matter determination method including a bubble recognition method.

[0026] Figure 12 is a flowchart showing a motion example. DETAILED DESCRIPTION

[0027] Hereinafter, an embodiment will be described based on the drawings.

[0028] (1) Outline of the embodiment

[0029] The bubble recognition apparatus of the embodiment has a setting section and a recognition section. The setting section sets at least one reference line that passes through a spot in an image. The recognition section recognizes the spot as a bubble image based on the fact that the luminance distribution on the at least one reference line satisfies a bubble determination condition. The bubble determination condition includes an edge pair condition. The edge pair condition is a condition that requires that two edge pairs be included in the luminance distribution of interest.

[0030] A bubble image has a luminance pattern that has non-uniformity or has structure. A bubble image is roughly divided into an outer portion and an inner portion. Generally, a clear luminance difference is generated between the outer portion and the inner portion. A clear luminance difference is also generated between the outer portion and the background. On the other hand, a foreign matter image has a luminance pattern that has uniformity or does not have structure. Generally, a clear luminance difference is generated between the foreign matter image and the background, but no clear luminance difference is generated in the foreign matter image.

[0031] The above structure recognizes a bubble image and a foreign matter image according to the difference between the luminance pattern of the bubble image and the luminance pattern of the foreign matter image. Specifically, a reference line that passes through a spot (recognition target image) is set. In the case where the reference line passes through the outer portion and the inner portion of the bubble image, two edge pairs (two luminance difference pairs) are generated on the reference line. That is, in the case where edge detection is repeatedly performed from one end of the reference line to the other end, a first edge pair is detected in the process of initially passing through the outer portion, and a second edge pair is detected in the process of subsequently passing through the outer portion. If the edge pair condition is included in the bubble determination condition, the spot can be recognized as a bubble image at the time point at which the edge pair condition is satisfied. In the case where a reference line is set for a foreign matter image that has uniformity, only two edges are detected on the reference line. Therefore, it is possible to distinguish between a bubble image and a foreign matter image.

[0032] Because the shape and orientation of the bubble image are various, in the embodiment, a plurality of reference lines are set to the spot. Thereby, it is possible to improve the possibility that the spot having a smaller inner portion and the spot having a partially-defective outer portion are respectively recognized as the bubble image. In order to improve the recognition accuracy of the bubble image, a condition other than the edge pair condition can be included in the bubble determination condition. If the recognition processing is applied to each spot included in the object image, it is possible to reduce the amount of calculation compared to the case where the recognition processing is applied to the entire object image.

[0033] In the embodiment, the setting section sets a reference line group constituted by a plurality of reference line columns having a crossing relationship to the spot. The recognition section recognizes the spot as the bubble image based on n (where n is an integer of 1 or more) of the brightness distributions in the brightness distribution group on the reference line group satisfying the bubble recognition condition.

[0034] If the reference line group is used, it is possible to correctly recognize the bubble image having various shapes. n can be set to 1. In the case where there is a possibility of misrecognition, n can be set to a value of 2 or more. The number of the reference lines constituting the reference line column, the interval in the reference line column, and the like can be variable depending on the situation. According to this structure, it is possible to take into account both the improvement of the recognition accuracy and the reduction of the amount of calculation.

[0035] In the embodiment, the reference line group includes a first reference line column constituted by a plurality of reference lines parallel to a first direction and a second reference line column constituted by a plurality of reference lines parallel to a second direction crossing the first direction. In the bubble image, the direction in which the partial defect occurs is various, but if two reference line columns having a crossing relationship are used, it is possible to improve the recognition accuracy of the bubble image having a partial defect.

[0036] In the embodiment, the edge determination condition is included in the bubble determination condition. The edge determination condition is a condition in which the profile in the direction satisfying the contrast threshold condition is determined as an edge in the case where the direction enters a certain angle range with reference to the reference line direction (for example, in the case where an angle close to perpendicular to the reference line direction is formed). By applying this edge determination condition, it is possible to reduce the possibility that the foreign matter having a curved shape such as a fiber is misrecognized as an edge.

[0037] In an embodiment, an edge interval condition is included in the bubble determination condition. The edge interval condition is a condition regarding two edge intervals determined by two edge pairs. In an embodiment, the edge interval condition is satisfied in a case where a difference between the two edge intervals is within a prescribed range. In the bubble image, it can be seen that there is a tendency that a difference between the first edge interval, which is an interval (distance) of the two edges constituting the first edge pair, and the second edge interval, which is an interval (distance) of the two edges constituting the first edge pair, is small. The above-described structure utilizes this tendency to improve the bubble image recognition accuracy. In addition, the bubble recognition device can also be used for purposes other than foreign matter detection. For example, the bubble recognition device can also be used in a case where it is necessary to determine bubbles in a liquid.

[0038] The bubble recognition method of the embodiment has a setting step and a recognition step. In the setting step, a plurality of reference lines are set for a spot in an image. In the recognition step, the spot is recognized as a bubble image based on n (where n is an integer of 1 or more) of the plurality of luminance distributions satisfying a bubble determination condition among a plurality of luminance distributions on the plurality of reference lines. The bubble determination condition includes an edge pair condition. The edge pair condition is a condition that requires two edge pairs to be included in a luminance distribution of interest.

[0039] The above-described bubble recognition method can be executed on an information processing device. In this case, a program for implementing the bubble recognition method is installed in the information processing device via a network or a removable storage medium. The object image can also be displayed to the user. In this case, the plurality of reference lines set in units of spots can also be displayed on the object image. In this case, the user can confirm that the spot recognition processing is being properly performed. The concept of the information processing device includes a computer, a bubble recognition device, a foreign matter detection system, and the like. The information processing device has a non-transitory storage medium that stores a program.

[0040] The foreign matter detection system of the embodiment includes a photographing device that photographs an inspection object and a processor that processes an image acquired by the photographing device. The processor applies a pre-processing that excludes non-suspended spots to the image, sets a reference line group for a suspended spot in the image after the pre-processing, recognizes the suspended spot as a bubble image based on n (where n is an integer of 1 or more) of luminance distributions satisfying a bubble determination condition among a luminance distribution group on the reference line group, and determines the suspended spot as a foreign matter image in a case where the suspended spot is not recognized as the bubble image. The bubble determination condition includes an edge pair condition. The edge pair condition is a condition that requires two edge pairs to be included in a luminance distribution of interest.

[0041] A backlight can also be used at the time of photographing. In this case, a contour image can be acquired as the image. In excluding non-suspended spots caused by a scratch or dirt of the container, various methods can be used.

[0042] (2) Details of the Embodiments

[0043] An embodiment of the foreign matter detection system is shown in Figure 1 The foreign matter detection system has a bubble image recognition function, in other words, a bubble recognition device is included in the foreign matter detection system. The foreign matter detection system is used in, for example, an inspection process in a pharmaceutical factory, and detects foreign matter in a medicine. In this case, the medicine is a medicinal liquid. As the foreign matter, a metal sheet, a resin sheet, a rubber sheet, a fiber, and the like can be given. The size of the foreign matter that becomes a detection target is, for example, 50 μm to several mm. A foreign matter having a size below the range or a foreign matter having a size above the range can also be set as a detection target. A plurality of foreign matter detection methods can also be applied simultaneously or in stages. A foreign matter contained in drinking water or a chemical product, and the like can also be detected by the foreign matter detection system.

[0044] The foreign matter detection system has a measurement section 10 and an information processing section 12. The measurement section 10 has a frame 14, and a conveyance line 16 that conveys a syringe row is provided inside the frame 14. A prescribed site on the conveyance line 16 is a photographing site 18. A photographing device 30 is provided at the photographing site 18. In the illustrated example, a syringe 22 that is an object of inspection is loaded on a base 20 that has a rotation function. The syringe 22 is a container that houses a medicine 28. As another container that houses a medicine, a tube bottle, an ampoule, and the like can be given.

[0045] The syringe 22 has a main body 24, a stopper (internal sealing plug) 25, and a cap (external sealing plug) 26. The medicine is housed inside the main body 24. The main body 24 is composed of a material that has transparency, such as resin, glass, or the like. The illustration of a member for fixing the syringe 22 on the base 20 is omitted.

[0046] The photographing device 30 has a camera 32, a lens 34, a back light 38, and the like. The back light 38 is a lamp that irradiates parallel light from the back surface side of the syringe 22. In this state, a profile image of the medicine 28 in the syringe 22 is acquired by the camera 32. The field of view 36 of the camera 32 covers the entire medicine 28. The profile image is a black and white image, but a color image can also be acquired. A plurality of syringes can also be simultaneously photographed by the camera 32. A polarizing plate can also be provided between the syringe 22 and the back light 38, and a polarizing plate can also be provided between the syringe 22 and the camera 32.

[0047] In the embodiment, the syringe 22 is rotationally driven around the center axis thereof by the base 20, and thereafter, the rotation of the syringe 22 is stopped to form a stationary state of the syringe 22. In the stationary state, the rotational state of the medicament 28 continues due to inertia. The medicament 28 in the rotational state is intermittently imaged by the camera 32. Thus, a raw image series (frame series) composed of a plurality of images arranged in time series is acquired. Each current image constituting the raw image series becomes an image processing target.

[0048] The information processing section 12 functions as a bubble recognition device or a foreign matter detection device. The information processing section 12 has a processor 40 that executes a program, a storage section 42, an inputter 44, and a display 46. The storage section 42 is constituted by a semiconductor memory or the like. The inputter 44 is constituted by a keyboard or the like, and the display 46 is constituted by an LCD (Liquid Crystal Display) or the like. A touch panel can be constituted by the inputter 44 and the display 46. The processor 40 is constituted by a CPU (Central Processing Unit) or the like.

[0049] In the information processing section 12, a plurality of functions that the processor 40 functions as are represented by a plurality of blocks. A preprocessor 48 applies pre-processing to each raw image constituting the raw image series. In the pre-processing, processing of removing a non-suspended matter image corresponding to a scratch or dirt generated on the main body 24 of the syringe 22, processing of extracting a suspended matter image, and the like are included. Specifically, in the pre-processing, processing of difference, binarization, dilation and contraction, labeling, and the like are included. Hereinafter, each isolated block included in the object image after the pre-processing is referred to as a blob. Figure 1

[0050] A ROI setter 52 sets a region of interest (ROI) to each blob included in the object image after the pre-processing. Recognition of a bubble image or the like can be performed without the ROI setting.

[0051] A bubble recognizer 54 functions as a setting unit (setting section) and a recognition unit (recognition section). The bubble recognizer 54 performs analysis of a blob for each region of interest set on the object image. Specifically, it is recognized whether the blob is a bubble image or not. At this time, as described below, a reference line group is set for each ROI, and a luminance distribution on each reference line is evaluated. In a case where it is determined that a luminance distribution inherent to a bubble image exists, it is recognized that the blob is a bubble image. In a case where it is not determined that the luminance distribution inherent to the bubble image exists, the result is transmitted to a foreign matter determiner 56.

[0052] ​The foreign matter determiner 56 determines that the spot is a foreign matter image when it is determined that the spot is not a bubble image. At this time, other information can be referred to in addition to the recognition result of the bubble recognizer 54. For example, an evaluation result regarding the shape of the spot can be referred to. When it is determined that the spot is a foreign matter image, that is, when a foreign matter is detected, a control signal 60 for transporting the syringe 22 that is to be the subject of the inspection to a prescribed management area is output. In the case where a foreign matter is detected, the fact can be displayed on the display 46.

[0053] The display processing section 58 is a processing section that generates an image displayed on the display 46. Each image captured by the camera 32 can be displayed on the display 46. In this case, the foreign matter image in the image can be displayed in a recognized manner. For example, the foreign matter can be displayed in a specific color. The bubble image can also be displayed in a recognized manner.

[0054] Since each image acquired during the rotation of the medicine becomes an image processing target, even if the bubble image and the foreign matter image occasionally coincide in a certain image, they appear in a separated state in other images. Therefore, the detection accuracy of the foreign matter is improved.

[0055] Figure 2 Various bubble images that can be observed are shown in FIG. 6. The bubble image shown in (A) is composed of an outer portion 62 and an inner portion 64. The outer portion 62 is a low-luminance portion (for example, a portion having a value of 0 after binarization), and the inner portion 64 is a high-luminance portion (for example, a portion having a value of 1 after binarization). The outer portion 62 is a portion in which the surface layer or the contour of the bubble is imaged, and the inner portion 64 is a portion in which the inside of the bubble, that is, the air layer is imaged. The outer portion 62 has a ring shape, and has no defect portion. The inner portion has an elliptical shape, and is not connected to the background (the outside). In the bubble images shown in (B) to (E), the gray portions are low-luminance portions, and the white portions are high-luminance portions. Like the bubble image shown in (A), the bubble image shown in (B) is also composed of a ring-shaped outer portion and an elliptical inner portion. The outer portion has a slightly large thickness.

[0056] The bubble image shown in (C) is composed of a partially defective outer portion 66 and an inner portion 68 surrounded thereby. Reference numeral 66a denotes a defect portion generated in the outer portion 66. The inner portion 68 is connected to the background (the outside) through the defect portion 66a. Generally, the outer portion having a defect portion has, for example, a C shape, a U shape, a semicircular shape, a circular arc shape, or the like. Like the bubble image shown in (C), the bubble image shown in (D) is also composed of an outer portion having a defect portion and an inner portion surrounded thereby.

[0057] The bubble image shown in (E) has a special shape (similar to the number "8"), consisting of a real bubble image 70 and a fake bubble image 72. The real bubble image 70 is reflected by the liquid surface 74, creating the fake bubble image 72. When they are connected in the image, the bubble image shown in (E) is produced.

[0058] In all bubble images, there are distinguishable outer and inner portions based on brightness. That is, multiple bubble images share a common, inherent brightness pattern (two-dimensional structure). Significant brightness differences arise at the boundaries between the outer portions and the background, and between the outer and inner portions. Even when processing a non-binarized, grayscale image, the brightness variations within the outer or inner portions are far smaller than the brightness differences at the boundaries, thus clearly distinguishing between simple brightness variations and boundary brightness differences.

[0059] Figure 3 Images of various foreign objects that could potentially be observed are shown. Figure 3 In the diagram, gray areas represent low-brightness areas and white areas (background) represent high-brightness areas. The foreign object image shown in (A) has the same brightness (low brightness) within its interior 76 sections. The foreign object images shown in (B), (C), and (D) all have the same brightness (low brightness). None of the foreign object images possess a two-dimensional structure within them, and their brightness patterns are monotonous. It is possible to identify the bubble image based on the difference in brightness patterns between the bubble image and the foreign object image; in other words, it is possible to identify the bubble image using its inherent brightness pattern.

[0060] Figure 4 The preprocessing steps are shown in the figure. As indicated by reference numeral 170, the syringe rotation is stopped after the syringe has been rotated, thus creating a state where only the liquid inside the syringe is rotating. In this state, the original image column 172 is acquired by continuously photographing the syringe. The horizontal axis is the time axis t.

[0061] The first processing 174 is applied to each of two original images adjacent to each other. The first processing 174 includes a subtraction operation, negative component deletion, and the like. In an embodiment, of two original images adjacent to each other, a later original image in time is set as a target image, and an earlier original image in time is set as a reference image. A subtraction operation is performed between the target image and the reference image. In a case where a bright portion is extracted instead of a highlight portion, for example, the target image is subtracted from the reference image. On this basis, negative components in a difference image resulting from the subtraction operation are deleted (or are disregarded in the course of the subtraction operation). By the first processing 174, a non-suspended matter image caused by a scratch, dirt, or the like on the injector is removed from the difference image (along with the background), leaving only a suspended matter image corresponding to a bubble or a foreign matter. The suspended matter image can also be left by another method. As the reference image, instead of the previous current image, the original image at the beginning, or the like can be used. By the first processing 174 described above, a difference image column 176 is generated from the original image column 172.

[0062] The second processing 178 is applied to each difference image constituting the difference image column 176. The second processing 178 includes binarization (inverted binarization), dilation and contraction, labeling, and the like. By the labeling, isolated individual spots are extracted. Specifically, each spot is managed by being given a number. For example, the spot is managed in units of spots by a spot number, a center coordinate, a width size, a height size, and the like. From the difference image column 176, an object image column 180 is generated.

[0063] Using Figures 5 to 10 The bubble recognition method will be described. The following processing is performed on each spot.

[0064] In Figure 5 , the spot 78 has an outer portion 82 and an inner portion 84. In the illustrated example, the outer portion 82 is a portion having a value of 0, and the inner portion is a portion having a value of 1. The spot 78 is determined by a center coordinate O, a width size W, and a height size H. Reference numeral 80 denotes a figure of a rectangle circumscribing the spot 78. Instead of the width size W and the height size H, a top-left corner coordinate Q of the rectangle 80 can be managed. Further, the x direction is a horizontal direction in the image, and the y direction is a vertical direction in the image.

[0065] As Figure 6 indicated, based on the center coordinate O, the width size W, and the height size H, an ROI 86 circumscribing the spot 78 in a non-contact manner is set. For example, i pixels can be set as a margin. i is an integer of 1 or more. A reference line group 88 is set to the ROI 86. It can be understood that the reference line group 88 is set to the spot 78. The reference line group 88 is constituted by a first reference line column 92 and a second reference line column 94.

[0066] The first reference line column 92 consists of multiple reference lines 96 parallel to the y-direction. The reference lines 96 are arranged at equal intervals in the x-direction. The first reference line column 92 covers the entire x-direction of ROI 86. The second reference line column 94 consists of multiple reference lines 98 parallel to the x-direction. The reference lines 98 are arranged at equal intervals. The second reference line column 94 covers the entire y-direction of ROI 86.

[0067] Multiple reference lines 96 and 98 can also be configured with non-uniform intervals, or they can be concentrated in areas where the internal portion is highly likely to be generated. The spacing between the multiple reference lines 96 and 98 is, for example, 1 pixel. The spacing can also be configured so that it can be changed by the user or automatically.

[0068] In practice, the reference lines constituting reference line group 88 are set sequentially. During this process, if the bubble determination conditions described later are met, the spot is identified as a bubble image. At this point, the setting of a new reference line for the spot is completed. Furthermore, each reference line is usually set within a ROI (where edge detection described below is performed), but each reference line is prominently displayed in each image.

[0069] like Figure 7 As shown, edge detection is repeatedly performed from one end to the other along each reference line. The spacing is, for example, 1 pixel. An edge detection filter can be used during edge detection.

[0070] For example, on reference line 100, when edge detection is performed sequentially from top to bottom, four edges (boundary points) E1, E2, E3, and E4 are detected on spot 78 as a result. Edge E1 is located on the boundary between the background and the outer portion 82, edge E2 is located on the boundary between the outer portion 82 and the inner portion 84, edge E3 is located on the boundary between the inner portion 84 and the outer portion 82, and edge E4 is located on the boundary between the outer portion 82 and the background. Edges E1 and E2 form a first edge pair EP1, and edges E3 and E4 form a second edge pair EP2.

[0071] Figure 7 The figure shows the brightness distribution 102 on the reference line. In the illustrated example, since the binarized image is the object of processing, each value constituting the brightness distribution 102 is either 1 or 0. The recesses indicated by reference numerals 102A and 102B correspond to the outer portions (low-brightness portions). Even when the image being processed has grayscale, it is possible to detect the two edge pairs EP1 and EP2.

[0072] In an embodiment, an edge pair condition is included in the bubble determination condition. The edge pair condition is a condition that requires the luminance distribution on the reference line of interest to include two edge pairs. In Figure 7 In the example shown, two edge pairs EP1, EP2 are included on the reference line 100, satisfying the edge pair condition. In a case where only the edge pair condition is included in the bubble determination condition, the spot is recognized as a bubble image at the time point at which the edge pair condition is satisfied.

[0073] In Figure 7 In the example shown, two edge pairs EP1, EP2 are included on the reference line 100, satisfying the edge pair condition. In a case where only the edge pair condition is included in the bubble determination condition, the spot is recognized as a bubble image at the time point at which the edge pair condition is satisfied.

[0074] In Figure 8 Another reference line group 112 is shown in The spot 104 is composed of an outer portion 106 that is a low luminance portion and an inner portion 108 that is a high luminance portion. The outer portion 106 has a crescent shape on which a large defect portion has been produced. The inner portion 108 is connected to the background. In order to correctly recognize such a spot 104 as a bubble image, and in particular in order to correctly recognize a bubble image regardless of the orientation of the defect portion on the spot, it is desirable to set a more diverse reference line group 112 to the spot 104.

[0075] The reference line group 112 is composed of a first reference line column 114, a second reference line column 116, a third reference line column 118, and a fourth reference line column 120. In Figure 8In the drawing, only a part of each reference line column 114 to 120 is shown. The first reference line column 114 is composed of a plurality of reference lines parallel to the y direction, which are arranged in the x direction. The second reference line column 116 is composed of a plurality of reference lines parallel to the x direction, which are arranged in the y direction. The third reference line column 118 is composed of a plurality of reference lines parallel to a +45-degree inclined axis inclined by +45 degrees with respect to the y direction, which are arranged in a direction of a -45-degree inclined axis inclined by -45 degrees with respect to the y direction (a +45-degree inclined axis inclined by +45 degrees in the counterclockwise direction). The fourth reference line column 120 is composed of a plurality of reference lines parallel to the -45-degree inclined axis, which are arranged along the +45-degree inclined axis.

[0076] For example, four edges E5 to E8 are detected on the reference line 122, that is, two edge pairs are detected. Four edges E9 to E12 are also detected on the reference line 124, that is, two edge pairs are detected. If the edge pair condition is satisfied on any reference line constituting the reference line group, the spot 104 is recognized as a bubble image. In the case where the edge interval condition is included in the bubble determination condition, the number of reference line columns constituting the reference line group can be further increased. Alternatively, a reference line group composed of a plurality of reference lines extending radially from the center point of the spot or other reference points can be used.

[0077] In Figure 9 A spot 126 corresponding to a foreign matter image is shown in FIG. 12. The image including the spot is binarized. An ROI surrounding the spot 126 is set. The inside 128 of the spot 126 has the same brightness (low brightness). A reference line group is set for the spot 126. Among them, a reference line 130 is focused on. In Figure 9 A brightness distribution 132 on the reference line 130 is shown in FIG. 13. A concave portion 132A corresponds to the inside (low brightness portion) 128 of the spot 126. Only two edges E13, E14 are detected on the reference line 130. The edge pair condition is not satisfied, and thus the bubble determination condition is not satisfied. In the case where the bubble determination condition is not satisfied in all reference lines constituting the reference line group, the spot is determined to be a foreign matter image. Of course, other information can be considered together when determining a foreign matter image.

[0078] As described above, the bubble recognition method of the embodiment is premised on the difference in the brightness pattern of the bubble image and the brightness pattern of the foreign matter image, and recognizes whether the spot is a bubble image by setting a plurality of reference lines for the spot and analyzing the edge structure on each reference line. In the case where the orientation and the shape of the spot can be determined in advance, a single reference line can be set for the spot at an appropriate position and inclination angle. This can be used to recognize whether it is a bubble image.

[0079] In Figure 10A spot 140 having a special form is shown in FIG. 12. An ROI 146 is set in a manner surrounding the spot 140. The spot 140 is composed of a first portion 142 and a second portion 144, which are connected together. The first portion 142 is a portion corresponding to a true bubble image, and the second portion 144 is a portion corresponding to a false bubble image generated by reflection from a liquid surface. The first portion 142 is composed of an outer portion 142A as a low-luminance portion and an inner portion 142B as a high-luminance portion. The second portion 144 is also composed of an outer portion 144A as a low-luminance portion and an inner portion 144B as a high-luminance portion. The outer side of the spot 140 is a background 148 as a high-luminance portion.

[0080] A set of reference lines is set for the spot 140. For example, in a case where a reference line 150 is set, edge detection is repeated on the reference line 150. As a result, six edges E15 to E20 are detected. Since two edge pairs are included therein, the edge pair condition is satisfied. The same is true for a case where a reference line 152 is set. However, in a case where a special spot as shown in FIG. 13 is present, it is considered that the bubble recognition accuracy is reduced. In a case where the number of edge pairs on the reference line is three or more, attention-drawing display can be performed. Figure 10

[0081] In a case where a special spot as shown in FIG. 13 is present, it is considered that the bubble recognition accuracy is reduced. In a case where the number of edge pairs on the reference line is three or more, attention-drawing display can be performed. Figure 11 The gist of the foreign matter determination method of the embodiment is summarized in FIG. 14. It is determined for each spot whether it is a bubble image, that is, whether it is a foreign matter image. Specifically, it is judged whether the bubble determination condition 154 is satisfied. In the example shown in the drawing, the edge pair condition 136 and the edge interval condition 138 are included in the bubble determination condition 154. The bubble determination condition is satisfied only in a case where these conditions are satisfied simultaneously. Actually, in a case where n reference lines satisfying the bubble determination condition are present, the spot is recognized as a bubble image (see reference numeral 158). n is, for example, 1. n can be set to a value of two or more. In a case where the spot is not recognized as a bubble image, it is determined that the spot is a foreign matter image (see reference numeral 160). In the recognition of the bubble image and the determination of the foreign matter image, other information can be referred to. For example, the outer shape, size, and the like of the spot can be considered.

[0082] In a case where a special spot as shown in FIG. 13 is present, it is considered that the bubble recognition accuracy is reduced. In a case where the number of edge pairs on the reference line is three or more, attention-drawing display can be performed. Figure 12 ​In the above embodiment, the inspection object is a medicine, but foreign matter detection can be performed on other inspection objects using the above-described structure.

[0083] In S16, the kth ROI is determined, and in S18, it is identified whether the blob within the kth ROI is a bubble image. If it is a bubble image, S22 is executed, and if it is not a bubble image, the blob is determined to be a foreign matter image in S20. That is, a foreign matter is detected. The fact is recorded, and necessary control is executed. In S22, it is determined whether the final ROI has been processed, and if it is "No", k is incremented by one in S24, and the procedures after S16 are repeatedly executed on this basis.

[0084] In the above embodiment, the inspection object is a medicine, but foreign matter detection can be performed on other inspection objects using the above-described structure.

Claims

1. A bubble recognition device, characterized in that, The image includes: a setting unit that sets multiple reference lines traversing a spot in an image; and a recognition unit that identifies the spot as a bubble image based on n brightness distributions among multiple brightness distributions on the multiple reference lines satisfying a bubble determination condition, where n is an integer greater than or equal to 1; the image has an x-direction and a y-direction, and the setting unit sets a group of reference lines consisting of multiple reference line columns that have an intersecting relationship as the multiple reference lines for the spot, wherein the multiple reference line columns include a first reference line column consisting of multiple reference lines parallel to the y-direction and a second reference line column consisting of multiple reference lines parallel to the x-direction. The plurality of reference lines are respectively used as reference lines of interest, and the plurality of brightness distributions are respectively used as brightness distributions of interest on the reference lines of interest. The recognition unit performs edge detection on the brightness distributions of interest. When the spot is a bubble image consisting of an outer portion and an inner portion surrounded by the outer portion, and the reference line of interest on the spot crosses the outer portion twice, two edge pairs are detected by edge detection on the brightness distributions of interest. The bubble determination condition includes an edge pair condition, which is a condition that is satisfied when the brightness distributions of interest contain the two edge pairs.

2. The bubble recognition device according to claim 1, characterized in that, The setting unit sets the reference line group for the spot based on the ROI surrounding the spot by setting the reference line column throughout the entire ROI.

3. The bubble recognition device according to claim 1, characterized in that, The reference line group further includes: a third reference line column, which consists of multiple reference lines inclined relative to the x-direction and the y-direction; and a fourth reference line column, which consists of multiple reference lines inclined relative to the x-direction and the y-direction and intersects the third reference line column.

4. The bubble recognition device according to claim 1, characterized in that, The bubble determination criteria include an edge spacing condition, which is a condition relating to the two edge spacings determined by the two edge pairs.

5. The bubble recognition device according to claim 4, characterized in that, The edge spacing condition is satisfied when the difference between the two edge spacings is within a specified range.

6. A bubble recognition method, characterized in that, include: The process of setting multiple reference lines that cross a spot in an image; The process includes identifying the spot as a bubble image based on n brightness distributions among multiple brightness distributions on the multiple reference lines satisfying the bubble determination condition, where n is an integer greater than or equal to 1; the image has an x-direction and a y-direction; the setting unit sets a group of reference lines consisting of multiple reference line columns with intersecting relationships as the multiple reference lines for the spot; the multiple reference line columns include a first reference line column consisting of multiple reference lines parallel to the y-direction and a second reference line column consisting of multiple reference lines parallel to the x-direction; the multiple reference lines are respectively used as reference lines of interest. Each brightness distribution is used as a brightness distribution on the reference line of interest. In the process of identifying the spot as a bubble image, edge detection is performed on the brightness distribution of interest. When the spot is a bubble image consisting of an outer portion and an inner portion surrounded by the outer portion, and the reference line of interest for the spot crosses the outer portion twice, two edge pairs are detected by the edge detection of the brightness distribution of interest. The bubble determination condition includes an edge pair condition, which is a condition that is satisfied when the brightness distribution of interest contains the two edge pairs.

7. A foreign object detection system, characterized in that, The image includes: an imaging device for capturing images of an object under inspection; and a processor for processing the images acquired by the imaging device. The processor applies preprocessing to the images to exclude non-suspended spots, sets multiple reference lines traversing the suspended spots in the preprocessed image, and identifies the suspended spots as bubble images based on n brightness distributions in a brightness distribution group on the multiple reference lines satisfying bubble detection criteria, where n is an integer greater than or equal to 1. If the suspended spots are not identified as bubble images, they are identified as foreign object images. The images have x and y directions. The processor sets a group of reference lines consisting of multiple intersecting reference line columns as the multiple reference lines for the suspended spots. Among the multiple reference line columns, there are columns intersecting the y-direction reference line. A first reference line column consisting of multiple parallel reference lines and a second reference line column consisting of multiple reference lines parallel to the x-direction, wherein the multiple reference lines constituting the reference line group are respectively used as reference lines of interest, and the multiple brightness distributions constituting the brightness distribution group are respectively used as brightness distributions of interest on the reference lines of interest, wherein the processor performs edge detection on the brightness distributions of interest, wherein in the case where the suspended spot is a bubble image consisting of an outer portion and an inner portion surrounded by the outer portion, and the reference lines of interest for the suspended spot are set to cross the outer portion twice, two edge pairs are detected by edge detection on the brightness distributions of interest, wherein the bubble determination condition includes an edge pair condition, and the edge pair condition is a condition satisfied when the brightness distributions of interest contain the two edge pairs.

Citation Information

Patent Citations

  • Method and device for inspecting foreign matter in solution

    JP2004226228A

  • Method and apparatus for detecting foreign matter in liquid within container

    JP2004354100A

  • Foreign matter detection device and foreign matter detection method

    JP2008102027A

  • Air bubble discrimination and examination apparatus and air bubble discrimination and examination method

    JP2013044688A