System and method for detecting a film defect
An image system with specific distances and patterns, combined with pixel and blob count algorithms, addresses the challenge of detecting film defects in medicant cassettes, ensuring reliable medicant delivery by classifying films as defective.
Patent Information
- Application Number
- PCT/US2025/033013
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2024-07-29
- Filing Date
- 2025-06-10
- Publication Date
- 2026-02-05
AI Technical Summary
Detecting defects in thin, transparent films used for medicant cassettes is challenging due to the clear nature of the material, making conventional computer vision techniques ineffective in capturing film defects, which can lead to fluid leakage and incorrect medicant injection.
An image system that captures distortions in transparent films by analyzing pixel and blob counts in images, using specific distances and patterns to focus on film defects, and employing algorithms to classify films as defective based on threshold criteria.
Effectively detects film defects, ensuring accurate classification and preventing leakage by identifying films with sufficient distortions, thereby ensuring reliable medicant delivery.
Smart Images

Figure US2025033013_05022026_PF_FP_ABST
Abstract
Description
SYSTEM AND METHOD FOR DETECTING A FILM DEFECTCROSS REFERENCE TO RELATED APPLICATION(S)
[0001] None.RESERVATION OF COPYRIGHTS
[0002] Portions of the disclosure of this document contain material that is subject to copyright protection. The copyright owner does not object to any reproduction of the document or disclosure as it appears in official records, but reserves all remaining rights under copyright.BACKGROUND
[0003] The present disclosure relates to medicant infusing, and more specifically to assuring integrity of a cassette adapted for receiving and dispensing a medicant.
[0004] Accurate and timely injection of a medicant, such as insulin, plays a critical role in the health and wellbeing of diabetic patients. Thus, advanced insulin pumps that can automatically inject the correct amount of insulin in a timely manner can significantly improve the quality of life for diabetic patients.
[0005] Some insulin pumps include a cassette that is configured to receive and dispense insulin. Such cassette may have a chamber lined with a transparent film to hold the fluid (insulin) in place without leakage. This transparent lining is welded onto the cassette. Defects in the transparent film used for the lining can result in poor welds. Regions containing poor welds significantly increase the risk of fluid leakage from the cassette. A leakage in a pump due to poor welding of the defective film lining can lead to an incorrect amount of insulin being injected into a patient. Thus, it is a safety critical issue which requires defective film linings to be detected early in the production process and prevented from getting welded onto any cassette.
[0006] Detecting defects in thin, transparent films is highly challenging. Due to clear nature of the material, conventional computer vision techniques are not directly applicable because when taking images computer vision tends to look through the film to the background, without capturing enough details of the material itself. Thus, the challenges of detecting faulty / defective film is twofold: (i) develop an effective imaging techniques that obtain meaningful signals from the surface of the film; and (ii) develop computer vision algorithms to detect defects on the film from the image signals, in some embodiments with sensitivity to determine whether the detected defects are severe enough to merit rejecting the film.
[0007] What is needed is an image system that can pick up distortions in transparent films as light travels through defective parts of the film.SUMMARY OF THE INVENTION
[0008] The invention is an image system that can pick up distortions in transparent films as light travels through defective parts of the film.
[0009] An embodiment of a method configured according to principles of the invention includes counting pixels that are distorted in an image of the film and defining a pixel count and, if the pixel count equals or exceeds a first threshold, then defining the film as defective, or else counting blobs in the image and defining a blob count and, if the blob count equals or exceeds a second threshold, then defining the film as defective.
[0010] An embodiment of a system configured according to principles of the invention includes a processor configured for counting pixels that are distorted in an image of the film and defining a pixel count and, if the pixel count equals or exceeds a first threshold, then defining the film as defective, or else counting blobs in the image and defining a blob count and, if the blob count equals or exceeds a second threshold, then defining the film as defective.
[0011] The invention provides improved elements and arrangements thereof, for the purposes described, which are inexpensive, dependable and effective in accomplishing intended purposes of the invention.
[0012] Other features and advantages of the invention will become apparent from the following description of the embodiments, which refers to the accompanying drawings.BRIEF DESCRIPTION OF THE DRAWINGS
[0013] The invention is described in detail below with reference to the following figures, throughout which similar reference characters denote corresponding features consistently, wherein:
[0014] Fig. 1A is a schematic representation of an embodiment of a system for detecting a film defect configured according to principles of the invention;
[0015] Fig. 1 B is a plan view of a pattern configured according to principles of the invention;
[0016] Figs. 2A, 2B, 3B, 3D, 4B, 4C, 4D, 5B, 5C, 5D and 6C are images of a film being evaluated according to a method configured according to principles of the invention;
[0017] Fig. 6E is a compilation of Figs. 6B and;
[0018] Fig. 6F is an enlarged view of Fig. 6D;
[0019] Figs. 3A, 3C, 4A, 5A, 6A, 6B and 6D are images of a reference image configured according to principles of the invention;
[0020] Figs. 7-9 are images of algorithms configured according to principles of the invention; and
[0021] Fig. 10 is a diagrammatic representation of a method configured according to principles of the invention.DETAILED DESCRIPTION OF EMBODIMENTS
[0022] The examples shown in drawings are presented to demonstrate examples of the disclosure. The drawings are illustrative and non-limiting. In the drawings, for illustrative purposes, the size of some of the elements may be exaggerated and not drawn to a particular scale. Additionally, elements shown within the drawings that have the same numbers may be identical elements or may be similar elements, depending on the context.
[0023] Where the term "comprising" is used in the present description and claims, it does not exclude other elements or steps. Where an indefinite or definite article is used when referring to a singular noun, e.g., "a", "an", or "the", this includes a plural of that noun unless something otherwise is specifically stated. Hence, the term "comprising" should not be interpreted as being restricted to the items listed thereafter; it does not exclude other elements or steps, and so the scope of the expression "a device comprising items A and B" should not be limited to devices consisting only of components A and B. Furthermore, to the extent that the terms “includes”, “has”, “possesses”, and the like are used in the present description and claims, such terms are intended to be inclusive in a manner similar to the term “comprising,” as “comprising” is interpreted when employed as a transitional word in a claim.
[0024] Furthermore, the terms "first", "second", "third", and the like, whether used in the description or in the claims, are provided to distinguish between similar elements and not necessarily to describe a sequential or chronological order. It is to be understood that the terms so used are interchangeable under appropriate circumstances (unless clearly disclosed otherwise) and that the aspects of the disclosure described herein are capable of operation in other sequences and / or arrangements than are described or illustrated herein.
[0025] In the following description, numerous specific details are set forth to provide a thorough understanding of various aspects and arrangements. It will be recognized, however, that the techniques described herein can be practiced without one or more of the specific details, or withother methods, components, materials, etc. In other instances, well known structures, materials, or operations may not be shown or described in detail to avoid obscuring certain aspects.
[0026] Reference throughout this specification to “an aspect,” “an arrangement,” “a configuration,” or “an example” indicates that a particular feature, structure, or characteristic is described. Thus, appearances of phrases such as “in one aspect,” “in one arrangement,” “in a configuration,” “in some examples,” or the like in various places throughout this specification do not necessarily each refer to the same aspect, feature, configuration, example, or arrangement. Furthermore, the particular features, structures, and / or characteristics described may be combined in any suitable manner.
[0027] To the extent used in the present disclosure and claims, the terms “component,” “system,” “platform,” “layer,” “selector,” “interface,” and the like are intended to refer to a computer-related entity or an entity related to an operational apparatus with one or more specific functionalities, wherein the entity may be either hardware, a combination of hardware and software, software, or software in execution. As an example, a component may be, but is not limited to being, a process running on a processor, a processor, an object, an executable, a thread of execution, a program, and / or a computer. By way of illustration and not limitation, both an application running on a server and the server itself can be a component. One or more components may reside within a process and / or thread of execution and a component may be localized on one computer and / or distributed between two or more computers. In addition, components may execute from various computer-readable media, device-readable storage devices, or machine-readable media having various data structures stored thereon. The components may communicate via local and / or remote processes such as in accordance with a signal having one or more data packets (e.g., data from one component interacting with another component in a local system, a distributed system, and / or across a network such as the Internet with other systems via the signal). As another example, a component can be an apparatus with specific functionality provided by mechanical parts operated by electric or electronic circuitry, which may be operated by a software or firmware application executed by a processor, wherein the processor can be internal or external to the apparatus and executes at least a part of the software or firmware application. As yet another example, a component can be an apparatus that provides specific functionality through electronic components without mechanical parts; the electronic components can include a processor therein to execute software or firmware that confers at least in part the functionality of the electronic components.
[0028] To the extent used in the subject specification, terms such as “store,” “storage,” “data store,” data storage,” “database,” and the like refer to memory components, entities embodied ina memory, or components comprising a memory. It will be appreciated that the memory components described herein can be either volatile memory or nonvolatile memory, or can include both volatile and nonvolatile memory.
[0029] In addition, the term “or” is intended to mean an inclusive “or” rather than an exclusive “or.” That is, unless specified otherwise, or clear from context, “X employs A or B” is intended to mean any of the natural inclusive permutations. That is, if X employs A, X employs B, or X employs both A and B, then “X employs A or B” is satisfied under any of the foregoing instances. Moreover, articles “a” and “an” as used in the subject disclosure and claims should generally be construed to mean “one or more” unless specified otherwise or clear from context to be directed to a singular form.
[0030] The words “exemplary” and / or “demonstrative,” to the extent used herein, mean serving as an example, instance, or illustration. For the avoidance of doubt, the subject matter disclosed herein is not limited by disclosed examples. In addition, any aspect or design described herein as “exemplary” and / or “demonstrative” is not necessarily to be construed as preferred or advantageous over other aspects or designs, nor is it meant to preclude equivalent exemplary structures and techniques. Furthermore, to the extent that the terms “includes,” “has,” “contains,” and other similar words are used in either the detailed description or the claims, such terms are intended to be inclusive, in a manner similar to the term “comprising” as an open transition word, without precluding any additional or other elements.
[0031] As used herein, the term “infer” or “inference” refers generally to the process of reasoning about, or inferring states of, the system, environment, user, and / or intent from a set of observations as captured via events and / or data. Captured data and events can include user data, device data, environment data, data from sensors, application data, implicit data, explicit data, etc. Inference can be employed to identify a specific context or action or can generate a probability distribution over states of interest based on a consideration of data and events, for example.
[0032] The disclosed subject matter can be implemented as a method, apparatus, or article of manufacture using standard programming and / or engineering techniques to produce software, firmware, hardware, or any combination thereof to control a computer to implement the disclosed subject matter. The term "article of manufacture," to the extent used herein, is intended to encompass a computer program accessible from any computer-readable device, machine- readable device, computer-readable carrier, computer-readable media, or machine-readable media. For example, computer-readable media can include, but are not limited to, a magnetic storage device, e.g., hard disk; floppy disk; magnetic strip(s); an optical disk (e.g., compact disk(CD), digital video disc (DVD), Blu-ray Disc (BD)); a smart card; a flash memory device (e.g., card, stick, key drive); a virtual device that emulates a storage device; and / or any combination of the above computer-readable media.
[0033] Generally, program modules include routines, programs, components, data structures, etc., that perform particular tasks or implement particular abstract data types. The illustrated aspects of the subject disclosure may be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules can be located in both local and remote memory storage devices.
[0034] Computing devices can include at least computer-readable storage media, machine- readable storage media, and / or communications media. Computer-readable storage media or machine-readable storage media can be any available storage media that can be accessed by the computer and includes both volatile and nonvolatile media, removable and non-removable media. By way of example, and not limitation, computer-readable storage media or machine- readable storage media can be implemented in connection with any method or technology for storage of information such as computer-readable or machine-readable instructions, program modules, structured data, or unstructured data.
[0035] Computer-readable storage media can include, but are not limited to, random access memory (RAM), read only memory (ROM), electrically erasable programmable read only memory (EEPROM), flash memory or other memory technology, compact disk read only memory (CD ROM), digital versatile disk (DVD), Blu-ray disc (BD) or other optical disk storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, solid state drives or other solid state storage devices, or other tangible and / or non-transitory media that can be used to store desired information. In this regard, the terms “tangible” or “non-transitory” herein as applied to storage, memory, or computer-readable media, are to be understood to exclude only propagating transitory signals per se as modifiers, and do not exclude any standard storage, memory, or computer-readable media that are not only propagating transitory signals per se.
[0036] Computer-readable storage media can be accessed by one or more local or remote computing devices, e.g., via access requests, queries, or other data retrieval protocols, for a variety of operations with respect to the information stored by the medium.
[0037] A system bus, as may be used herein, can be any of several types of bus structure that can further interconnect to a memory bus (with or without a memory controller), a peripheral bus, and a local bus using any of a variety of commercially available bus architectures. A database, as may be used herein, can include basic input / output system (BIOS) that can be stored in a non-volatile memory such as ROM, EPROM, or EEPROM, with BIOS containing the basic routines that help to transfer information between elements within a computer, such as during startup. RAM can also include a high-speed RAM such as static RAM for caching data.
[0038] As used herein, a computer can operate in a networked environment using logical connections via wired and / or wireless communications to one or more remote computers. The remote computer(s) can be a workstation, server, router, personal computer, portable computer, microprocessor-based entertainment appliance, peer device, or other common network node. Logical connections depicted herein may include wired / wireless connectivity to a local area network (LAN) and / or larger networks, e.g., a wide area network (WAN). Such LAN and WAN networking environments are commonplace in offices and companies, and facilitate enterprisewide computer networks, such as intranets, any of which can connect to a global communications network, e.g., the Internet.
[0039] When used in a LAN networking environment, a computer can be connected to the LAN through a wired and / or wireless communication network interface or adapter. The adapter can facilitate wired or wireless communication to the LAN, which can also include a wireless access point (AP) disposed thereon for communicating with the adapter in a wireless mode.
[0040] When used in a WAN networking environment, a computer can include a modem or can be connected to a communications server on the WAN via other means for establishing communications over the WAN, such as by way of the Internet. The modem, which can be internal or external, and a wired or wireless device, can be connected to a system bus via an input device interface. In a networked environment, program modules depicted herein relative to a computer or portions thereof can be stored in a remote memory / storage device.
[0041] When used in either a LAN or WAN networking environment, a computer can access cloud storage systems or other network-based storage systems in addition to, or in place of, external storage devices. Generally, a connection between a computer and a cloud storage system can be established over a LAN or a WAN, e.g., via an adapter or a modem, respectively. Upon connecting a computer to an associated cloud storage system, an external storage interface can, with the aid of the adapter and / or modem, manage storage provided by the cloud storage system as it would other types of external storage. For instance, the external storage interface can be configured to provide access to cloud storage sources as if those sources were physically connected to the computer.
[0042] As employed in the subject specification, the term “processor” can refer to substantially any computing processing unit or device comprising, but not limited to comprising, single-core processors; single-core processors with software multithread execution capability; multi-coreprocessors; multi-core processors with software multithread execution capability; multi-core processors with hardware multithread technology; vector processors; pipeline processors; parallel platforms; and parallel platforms with distributed shared memory. Additionally, a processor can refer to an integrated circuit, an application specific integrated circuit (ASIC), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic controller (PLC), a complex programmable logic device (CPLD), a state machine, a discrete gate or transistor logic, discrete hardware components, or any combination thereof designed to perform the functions described herein. Processors can exploit nano-scale architectures such as, but not limited to, molecular and quantum-dot based transistors, switches, and gates, in order to optimize space usage or enhance performance of user equipment. A processor may also be implemented as a combination of computing processing units. For example, a processor may be implemented as one or more processors together, tightly coupled, loosely coupled, or remotely located from each other. Multiple processing chips or multiple devices may share the performance of one or more functions described herein, and similarly, storage may be effected across a plurality of devices. A processor may be implemented to reside in a cloud-based network such as, e.g., the Internet.
[0043] The actions of a method or algorithm described in connection with the arrangements disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in RAM memory, flash memory, ROM memory, EPROM memory, EEPROM memory, registers, hard disk, a removable disk, a CD-ROM, or any other known form of storage medium. A storage medium may be coupled to the processor such that the processor can read information from, and write information to, the storage medium. In the alternative, the storage medium may be integral to the processor. The processor and the storage medium may reside in an ASIC. The ASIC may reside in functional equipment such as, e.g., a computer, a robot, a user terminal, a mobile telephone or tablet, a car, or an IP camera. In the alternative, the processor and the storage medium may reside as discrete components in such functional equipment. Additionally or alternatively, at least one of the processor and / or the storage medium may reside in a cloud-based network such as, e.g., the Internet.
[0044] Configurations of the present teachings are directed to computer systems for accomplishing the methods discussed in the description herein, and to computer readable media containing programs for accomplishing these methods. The raw data and results can be stored for future retrieval and processing, printed, displayed, transferred to another computer, and / or transferred elsewhere. Communications links can be wired or wireless, for example, using cellularcommunication systems, military communications systems, and satellite communications systems. Parts of the system can operate on a computer having a variable number of CPUs. Other alternative computer platforms can be used.
[0045] The present configuration is also directed to software / firmware / hardware for accomplishing the methods discussed herein, and computer readable media storing software for accomplishing these methods. The various modules described herein can be accomplished on the same CPU, or can be accomplished on different CPUs. In compliance with the statute, the present configuration has been described in language more or less specific as to structural and methodical features. It is to be understood, however, that the present configuration is not limited to the specific features shown and described, since the means herein disclosed comprise exemplary forms of putting the present configuration into effect.
[0046] Methods can be, in whole or in part, implemented electronically. Signals representing actions taken by elements of the system and other disclosed configurations can travel over at least one live communications network. Control and data information can be electronically executed and stored on at least one computer-readable medium. The system can be implemented to execute on at least one computer node in at least one live communications network. Common forms of at least one computer-readable medium can include, for example, but not be limited to, a floppy disk, a flexible disk, a hard disk, magnetic tape, or any other magnetic medium, a compact disk read only memory or any other optical medium, punched cards, paper tape, or any other physical medium with patterns of holes, a random access memory, a programmable read only memory, and erasable programmable read only memory (EPROM), a Flash EPROM, or any other memory chip or cartridge, or any other medium from which a computer can read. Further, the at least one computer readable medium can contain graphs in any form, subject to appropriate licenses where necessary, including, but not limited to, Graphic Interchange Format (GIF), Joint Photographic Experts Group (JPEG), Portable Network Graphics (PNG), Scalable Vector Graphics (SVG), and Tagged Image File Format (TIFF).
[0047] Various arrangements are described herein. For simplicity of explanation, the methods or algorithms are depicted and described as a series of steps or actions. It is to be understood and appreciated that the various arrangements are not limited by the actions illustrated and / or by the order of actions. For example, actions can occur in various orders and / or concurrently, and with other actions not presented or described herein. Furthermore, not all illustrated actions may be required to implement the methods. In addition, the methods could alternatively be represented as a series of interrelated states via a state diagram or events. Additionally, the methodsdescribed hereafter are capable of being stored on an article of manufacture, as defined herein, to facilitate transporting and transferring such methodologies to computers.
[0048] As noted earlier, detecting defects in a thin, transparent film is quite a difficult task because camera systems tend to look through the film and focus on the background beyond and overlook defects. The invention overcomes this difficulty with an image system that is responsive to distortions caused by the film with respect to a pattern in the background as light travels through defective parts of the film.
[0049] Referring to Fig. 1A, the invention includes three components that makes it effective at capturing the defects in transparent films: a camera 5, a light source 10 and a patterned background 15 disposed in front of light source 10. A film sample F to be tested passes between background 15 and camera 5 so that light from light source 10 passes through background 15, then film then to camera 5.
[0050] An embodiment of the invention proscribes a specific distance 20 between the background and the film. Distance 20 is selected so as to ensure that camera 5 focuses on rather than beyond film F and not miss defects that may exist in film F. One embodiment of the invention defines distance 20 as four inches.
[0051] An embodiment of the invention proscribes a specific distance 25 between film F and camera 5. Distance 25 is selected to ensure that any defects in film F will be detected. One embodiment of the invention defines distance 25 as five inches.
[0052] An embodiment of the invention employs as light source 10 a white LED light source with a diffuser. However, an embodiment of camera 5 captures grayscale images. Therefore, light source 10 may project any color. Light sources that produced exclusively red, blue or green light did not appear to impair the invention. While an embodiment of diffuser emits light in all directions, diffusers that only restrict emission to projecting perpendicular to light source 10 did not appear to impair the invention.
[0053] An embodiment of the invention employs as background 15 a pattern printed on a transparent sheet and placed on top of or near light source 10. In one embodiment, the transparent sheet is different and independent from the film F being tested for defects.
[0054] Another embodiment of the invention includes a light source (not shown) that is configured to project a beam having a pattern, such as, but not limited to an LED display.
[0055] Extensive testing of different patterns, sizes and line widths, and variants of checkered, grid and slit patterns, revealed that the most effective pattern is a vertical slit pattern wherein the slits are perpendicular to the direction B in which the transparent film moves in the production line. This pattern and orientation produces the best results because it enables accurate detectionof distortions caused by defects and is easier to work with the computer vision algorithms that are applied later.
[0056] Extensive testing also revealed that the transparent film should ideally be maintained at a distance 20 of about four inches from light source 10 and pattern 15. Distance 20 seems to be the minimum distance required for light to travel before encountering defects in film F such the defects are apparent to camera 5. Simply laying the film on the light source / background pattern tends to cause the camera focus beyond the film or otherwise miss defects therein.
[0057] In one embodiment, the camera is placed at a distance 25 of five inches away from the film, perpendicular to the direction B of travel of film F, which distance permits capturing the entire width of the transparent film. This distance 25 can be adjusted based on the width of the film and the field of view of the camera system.
[0058] Referring to Figs. 2A and B, the effectiveness of the present imaging technique is evident from comparing images of a section of a transparent film wherein the image of Fig. 2B is of a film sample backlit by a light source without an intervening pattern and does not appear to have defects, and Fig. 2A is an image of the same film sample backlit by the same light source but with an intervening pattern, as described above, that reveals the defects.
[0059] Defect Detection Algorithm
[0060] Once an image with sufficient signals for defects, such as in Fig. 2A, is captured according the system described in accordance with Figs. 1 A and B, the next objective is to classify the film as ‘good’ or ‘bad’ based on the amount of defects it has. Given the safety critical nature of this work, two separate classification algorithms are employed to determine the quality of the transparent film.
[0061] To this end, referring to Fig. 10, an embodiment of a method 100 of detecting a defect in a film configured according to principles of the invention includes a step 105 of evaluating an amount of noise in an image of the film. If the amount equals or exceeds a noise threshold, then the film is deemed defective.
[0062] If the amount of noise is below the noise threshold, then method 100 includes a step 110 of counting pixels that are distorted in the image, as described in greater detail below. If the pixel count equals or exceeds a pixel threshold, then the film is deemed defective.
[0063] If the pixel count is below the pixel threshold, then method 100 includes a step 115 of counting blobs in the image, as described in greater detail below. If the blob count equals or exceeds a blob threshold, then the film is deemed defective.
[0064] If the blob count is below the blob threshold, then the film is deemed not defective.
[0065] 1. Noise Detection
[0066] Defects in a film can cause distortions in images, specifically the pixels thereof, taken of the film. Thus, analysis of images taken of films regards distorted as noise. The threshold for what is noisy or defective can be determined against the number of distorted pixels that are typical in a good sample. Bad samples will have distorted pixel count greater than the baseline of the good sample.
[0067] If the noise equals or exceeds a noise threshold, then the sample film is deemed defective and the algorithm terminates. Otherwise, the algorithm continues to the distorted pixel count algorithm.
[0068] 2. Distorted Pixel Count
[0069] This classification algorithm measures the number of pixels that are distorted / defective in a sample image of the transparent film as compared to a reference image. A reference image is an image taken of the background pattern with the imaging setup described above but without the transparent film in the middle. Then an image is an image taken of the film with the background pattern behind it. If the difference between the distorted / defective pixel count in a sample image and the reference image equals or exceeds a threshold, then that sample film is classified as defective.
[0070] However, comparison of a sample image with the reference image is not sufficient because defects in a sample image can appear as black blobs on white bars or white blobs on black bars as shown in Fig. 2A. Thus, defects in a sample image can be both black and white. This challenge is overcome by unifying the white and black blobs, including converting the black blobs to white and “adding” the converted blobs to the original white blobs.
[0071] The first step is converting the sample image and the reference image from gray-scale to their respective binary image. Employing Otsu’s thresholding limits the binary images to only two values {0, 1}, where 0 represents a black pixel and 1 represents a white pixel.
[0072] Otsu’s thresholding algorithm is used for image barbarization and has 5 main steps: (1 ) A histogram is generated form the intensity values of the pixels wherein the x-axis represents the pixel intensity and the y-axis represents their frequency; (2) A Cumulative Distribution Function (CDF) is calculated from the histogram wherein the frequency is summed to an intensity value; (3) For each possible threshold value 7’, the mean of the background class is the cumulative sum of the intensity values times its probability from 0 to ‘ / ’ and the mean of the foreground class is the cumulative sum of intensity values times its probability form 7+ / ’ to the maximum value; (4) within- or between-class variance is be calculated for each t’ and (5) the threshold value ‘t’ that maximizes between-class variance or minimizes the within-class variance is picked.
[0073] Referring to Fig. 3a-d, to unify the different color blobs, a logical AND operation is applied between the reference binary image, as shown in Fig. 3a, and the sample binary image, as shown in Fig. 3b. Since background pattern is similar for reference and sample, all blobs (black or white) will turn black. The logical AND operation naturally yields 0 (black) for any disagreement between the reference and the sample binary image, producing a unified image where all distortions are black pixels with value 0. Since it is not possible to sum over 0, a logical INVERSE operation is applied on the unified image that generates an inverse, unified binary image, as shown in Fig. 3d. The distorted pixel count then is calculated by taking the absolute difference of the sum of the white pixels in the inverse reference binary image, as shown in Fig. 3c, and the sum of the white pixels in the inverse unified binary image. This process is formally presented in Algorithm 1 , as shown in Fig. 7.
[0074] If the distorted pixel count equals or exceeds a threshold, then the sample film is deemed defective and the algorithm terminates. Otherwise, the algorithm continues to the blog segmentation algorithm.
[0075] 3. Blob segmentation and count
[0076] Referring to Fig. 8, the invention employs the algorithm shown to segment each blob formed in the background slit pattern and identify defects in the transparent weld film. This however is not trivial because the blobs are amorphous in shape and vary in size. Additionally, blobs can appear in complementary colors relative to the pattern used to detect them, i.e., black blobs on white bars and white blobs on black bars. Once the blobs are isolated, they can be counted.
[0077] The invention employs the blob segmentation algorithm for detecting and counting complementarily-colored blobs, i.e. black blobs on white bars and white blobs on black bars. The algorithm is split or executed in two parts, first segmenting white blobs on black bar and then black blobs on the white bars.
[0078] 3.a. Segmenting white blobs on black bars
[0079] Bearing in mind that the focus of this part of the segmentation algorithm is to isolate white blobs on black bars, a binary image (i.e., pixel values = {0, 1}) is created with a lower threshold value. The lower threshold value will tend to favor more white or 1 -valued pixels to appear in the binary image. Since segmenting the white blobs is desired, this approach makes the white blobs more apparent for detection, as shown in Fig. 4b.
[0080] Next, the binary image of the reference photo, as shown in Fig. 4a, is referenced to find any disagreements with the low threshold binary image of the sample, as shown in Fig. 4b, and produce a new binary image as shown in Fig. 4c, where all disagreements are labeled as whitepixels with value 1 and everything else as black with value 0. Since the white blobs, caused by defects in the transparent film, are the primary source of disagreement with the reference, this process leads to the extraction of the white blobs on the black bars. However, this binary image (Fig. 4c) is noisy, particularly because of the distortions in the edges of each black bar. Such distortions at the edges of the bars are not due to defects in the transparent film but a consequence of light scattering as it travels through the film.
[0081] Consequently, referring to Fig. 9, the invention includes a technique called ‘Pressing’ (Algorithm 3) to manage or eliminate this noise. The concept behind ‘Pressing’ is: since the source of the noise are the edges of each black bar, “pressing” the bar from both sides eliminates such noise. “Pressing” is achieved by using an inverse binary image of the reference in which each black bar in the sample binary image is complemented by a white bar in the inverse binary image of the reference. Applying an erosion operation or eroding on the inverse binary image of the reference causes the complementary white bars to shrink in as the black bars on either side expand and “press” on the white bars, as shown in Fig. 5d.
[0082] Erosion is a morphological operation that erodes the boundaries of an object (white pixels) in a binary image. The erosion operation uses a structuring element or a kernel, which is a small grid, typically 3x3. The structuring element is placed on each pixel of a binary image. If every pixel of the image covered by the structuring element is 1 , then the origin pixel is labeled 1 , otherwise 0 in the resulting output image.
[0083] Since the white bars on the inverse reference image are complementary to the black bars on the noisy image, subsequently performing a logical AND operation between the pressed inverse binary image of the reference and the noisy binary image retains all of the white blobs on the black bars of the noisy binary image. The expanded black bars of the inverse reference image “press” away the edges of the black bars in the noisy binary image, as shown in Fig. 5d. The final result, as shown in Fig. 4d, is a clean image of the blobs with the noise from the edges of the bars removed.
[0084] Segmenting black blobs on white bars
[0085] The algorithm for segmenting black blobs from white bars is very similar to the one described above with a few differences. First, the low threshold binary image of the sample is replaced with a high threshold binary image, as shown in Fig. 6b. This is because, since the objective is to extract the black blobs in this case, a higher threshold value will yield more black or 0 value pixels. Next, similar to algorithm 3, disagreements between the high threshold binary image and the reference binary image are identified. The defects on the transparent film that produces the black blobs on the white bar are the primary cause of the disagreement betweenthe sample and the reference, as shown in Fig. 6c. However, similar to the foregoing algorithm, this algorithm results in a noisy image, as shown in Fig. 6c. The source of the noise is the distortion around the edges of the white bars. Accordingly, the “pressing” technique is applied to remove such noise. In this instance of pressing, erosion is applied to the reference binary image because it has complementary bars to the noisy binary image. Finally, a logical AND operation is applied between the noisy binary image and the eroded binary reference image to get a clean binary image, as shown in Fig. Fig. 6d., where blobs on the white bars are preserved and noise around the edges of the white bars is removed.
[0086] Counting Blobs
[0087] Since the white blobs on black bars and black blobs on white bars are segmented independently, combining the binary images with a logical OR operation and executing a Connected Components algorithm on the merged binary image reveals the total number of independent blobs that occurred on the background pattern due to defects in the transparent film.
[0088] If the segmented blob count equals or exceeds a threshold, then the sample film is deemed defective and the algorithm terminates. Otherwise, the sample film is deemed not defective and the algorithm terminates.
[0089] Transparent Film Classification
[0090] Predicting the status (good or bad) of a sample of the transparent welding film is based on algorithms above. If a sample has both a lower distortion count than a threshold and has a lower blob count than a threshold, then it is classified a good sample. Otherwise it is rejected and the next sample is tested with our algorithm.
[0091] While the principles of the invention have been described herein, the foregoing description is only an example and not a limitation on the scope of the invention. Other embodiments are contemplated within the scope of the present invention in addition to the exemplary embodiments shown and described herein. Modifications and substitutions by one of ordinary skill in the art are within the scope of the present invention. The invention is not limited to the particular embodiments described and depicted herein, rather only to the following claims.
Claims
CLAIMSWE CLAIM:1 . Method of detecting a defect in a film comprising: counting pixels that are distorted in an image of the film and defining a pixel count; and if the pixel count equals or exceeds a first threshold, then defining the film as defective; else counting blobs in the image and defining a blob count; and if the blob count equals or exceeds a second threshold, then defining the film as defective.
2. Method of claim 1 further comprising, prior to said counting pixels: determining an amount of noise in the image; and if the amount equals or exceeds a third threshold, then defining the film as defective.
3. Method of claim 1 wherein said counting pixels comprises: unifying the image and defining a unified image; and subtracting a sum of pixels having a color in a reference image from a sum of pixels having the color in the unified image.
4. Method of claim 3 wherein: the image comprises a gray-scale image; and said unifying comprises converting the gray-scale image to a binary image.
5. Method of claim 4 wherein said converting comprises Otsu’s thresholding.
6. Method of claim 3 further comprising, prior to said counting, inverting the unified image and defining an inverse unified image.
7. Method of claim 1 wherein said counting pixels comprises segmenting the blobs.
8. Method of claim 7 wherein said segmenting comprises favoring pixels having a value and defining a segmented image.
9. Method of claim 8 wherein the value is selected to favor a pixel color.
10. Method of claim 1 wherein said counting blobs comprises segmenting the blobs and defining a segmented image.11 . Method of claim 10 wherein said segmenting comprises favoring pixels having a value.
12. Method of claim 11 wherein the value is selected to favor a pixel color.
13. Method of claim 10 further comprising pressing the segmented image and defining a pressed image.
14. Method of claim 13 wherein said pressing comprises: eroding an inverse image of a reference and defining an eroded image; and adding the eroded image and the unified image.
15. Method of claim 10 wherein said segmenting comprises: a first segmenting defining a first segmented image; and a second segmenting defining a second segmented image; further comprising: combining the first segmented image and the second segmented image and defining a combined image; and revealing all blobs in the combined image and defining revealed blobs; wherein said counting blobs comprises counting the revealed blobs.
16. Method of claim 15 wherein said first segmenting relates to pixels having a color that is different from pixels to which said second segmenting relates.
17. System for detecting defects in a film comprising a processor configured for: counting pixels that are distorted in an image of the film and defining a pixel count; and if the pixel count equals or exceeds a first threshold, then defining the film as defective; else counting blobs in the image and defining a blob count; and if the blob count equals or exceeds a second threshold, then defining the film as defective.
18. System of claim 17 further comprising, prior to the counting pixels: determining an amount of noise in the image; and if the amount equals or exceeds a third threshold, then defining the film as defective.
19. System of claim 17 wherein the counting pixels comprises: unifying the image and defining a unified image; and subtracting a sum of pixels having a color in a reference image from a sum of pixels having the color in the unified image.
20. System of claim 19 wherein: the image comprises a gray-scale image; and the unifying comprises converting the gray-scale image to a binary image.21 . System of claim 20 wherein the converting comprises Otsu’s thresholding.
22. System of claim 19 further comprising, prior to the counting, inverting the unified image and defining an inverse unified image.
23. System of claim 17 wherein the counting pixels comprises segmenting the blobs.
24. System of claim 23 wherein the segmenting comprises favoring pixels having a value and defining a segmented image.
25. System of claim 24 wherein the value is selected to favor a pixel color.
26. System of claim 17 wherein the counting blobs comprises segmenting the blobs and defining a segmented image.
27. System of claim 26 wherein the segmenting comprises favoring pixels having a value.
28. System of claim 27 wherein the value is selected to favor a pixel color.
29. System of claim 26 further comprising pressing the segmented image and defining a pressed image.
30. System of claim 29 wherein the pressing comprises: eroding an inverse image of a reference and defining an eroded image; and adding the eroded image and the unified image.31 . System of claim 26 wherein the segmenting comprises: a first segmenting defining a first segmented image; and a second segmenting defining a second segmented image; further comprising: combining the first segmented image and the second segmented image and defining a combined image; and revealing all blobs in the combined image and defining revealed blobs; wherein the counting blobs comprises counting the revealed blobs.
32. System of claim 31 wherein the first segmenting relates to pixels having a color that is different from pixels to which the second segmenting relates.
33. System of claim 17 wherein said processor is configured for receiving an image from a camera.
34. System of claim 17 further comprising a light source configured for revealing defects in a film to the camera.
35. System of claim 34 wherein said light source is configured for presenting a projection having a pattern.
36. System of claim 35 wherein the pattern is configured for revealing defects in the film.
37. System of claim 34 further comprising a background configured for imparting a pattern in light projected from said light source.
38. System of claim 37 wherein the pattern is configured for revealing defects in the film.
Citation Information
Patent Citations
Apparatus and method for the integrated processing of defect images
EP0974831A2
Automatic Inspection Method
US20010031079A1