Off-line troubleshooting and development for automated visual inspection stations

JP7640545B2Active Publication Date: 2025-03-05AMGEN INC
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
JP2022527125
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Priority Date
2019-11-15
Filing Date
2020-11-10
Publication Date
2025-03-05
Estimated Expiration
2040-11-10

Smart Images

  • Figure 0007640545000001
    Figure 0007640545000001
  • Figure 0007640545000002
    Figure 0007640545000002
  • Figure 0007640545000003
    Figure 0007640545000003
Patent Text Reader

Abstract

In a method for replicating the operation of an automated visual inspection (AVI) station, an imitation AVI station is constructed to perform one or more AVI functions of the AVI station. One or more container images are captured by an imaging system of the AVI station while a lighting system of the AVI station illuminates the container, and one or more additional container images are captured by an imitation imaging system of the imitation AVI station. The method also includes identifying, by one or more processors, one or more differences between the one or more additional container images and the one or more container images, generating, by the one or more processors, one or more suggested visual indications for modifying the differences and / or the imitation AVI station, and modifying the imitation AVI station based on the visual indications.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] This application relates generally to automated visual inspection (AVI) systems for pharmaceutical or other products, and more particularly to techniques for performing offline troubleshooting and / or development for AVI stations. [Background technology]

[0002] In certain situations, such as quality control procedures for manufactured pharmaceutical products, it is necessary to examine a sample (e.g., a container such as a syringe or vial and / or contents such as a liquid or lyophilized pharmaceutical product) for defects. The acceptability of a particular sample under the applicable quality standard may depend on metrics such as, for example, the type and / or size of the container defect (e.g., chips or cracks) or the type, number and / or size of undesirable particles (e.g., fibers) in the pharmaceutical product. If the sample has an unacceptable metric, the sample may be rejected and / or discarded.

[0003] To handle the volumes typically associated with commercial production of pharmaceutical products, defect inspection tasks are becoming more and more automated. Moreover, the specialized equipment used to support automated defect inspection has become very large, very complex, and very expensive, requiring significant investments in human and other resources to qualify and commission each new product line. As just one example, the Bosch® 296S commercial line equipment used in the fill-finish inspection stage of pre-filled syringes contains 15 individual visual inspection stations with a total of 23 cameras (i.e., one or two cameras per station). The equipment is designed to detect a wide variety of defects, including defects related to container integrity, such as large cracks in the container closure system, defects related to the surface appearance of the container, such as scratches or stains on the container surface, and defects related to the pharmaceutical product itself, such as the color of the liquid or the presence of foreign particles.

[0004] Because purchasing additional AVI line equipment can be prohibitively expensive, troubleshooting and new product characterization activities typically must be performed on-site, which typically requires significant downtime and results in less than optimal long-term production rates. Summary of the Invention [Means for solving the problem]

[0005] The embodiments described herein relate to systems and methods in which a "mimicking" AVI station is built or upgraded to replicate the operation of an existing AVI station, thereby enabling offline troubleshooting or new product characterization and / or qualification work with no or less interference with production line operations. In some embodiments, the mimicking AVI station is a dedicated offline (e.g., laboratory-based) station that mimics one or more AVI functions of a station (e.g., one of multiple stations in a line of equipment) of an existing commercial line of equipment. In such embodiments, the mimicking AVI station can be used to troubleshoot issues with a particular corresponding station in the commercial line of equipment or improve the operation of another corresponding station without requiring an extended shutdown of the commercial line of equipment. For example, offline modifications can be made to hardware components (e.g., lighting devices, star wheels, etc.), hardware configurations (e.g., distance or angle between the specimen and the camera or lighting device, lighting device configuration, etc.) and / or software (e.g., code implementing inspection algorithms). Once appropriate modifications are identified, the commercial line of equipment can be shut down for a relatively short period of time to implement those changes to the original AVI station. In some cases, some degree of on-site qualification work is then performed. Because the imitation AVI station is offline, it provides an opportunity to perform root cause investigations, recipe development and / or other support activities in the laboratory rather than on commercial line equipment.

[0006] In other embodiments, the mimic AVI station is alternatively a station on a commercial line equipment, with the goal of mimicking the characteristics / operations of a laboratory-based AVI station. In such an embodiment, the laboratory-based AVI station can be used to characterize new drugs and qualify tests on new drugs, which would traditionally require extensive downtime of the line equipment and preclude concurrent use for other drugs. Once the appropriate hardware components / configurations and appropriate software are identified, the line equipment can be shut down for a relatively short period of time to implement those changes (again, possibly followed by some degree of on-site qualification work). As with the previously described embodiment, this embodiment provides the opportunity to perform recipe development, root cause investigations and / or other support activities in the laboratory rather than on commercial line equipment.

[0007] In any of these embodiments, there is a significant challenge in constructing a suitably similar mimic AVI station. In particular, the imager (e.g., camera, imaging optics), lighting (e.g., lighting device, environmental / ambient lighting or reflections), relative geometry (i.e., spatial arrangement), image processing software, computer hardware, and / or mechanical movement of the product can all potentially affect inspection performance and are important to closely match the AVI station being recreated. This is particularly difficult because many of these components / characteristics tend to be unique to any given AVI station. Thus, in embodiments of the present disclosure, a robust and reliable process is used to replicate the AVI station as closely as possible (or as closely as necessary).

[0008] First, the components / configuration of the AVI station can be identified using any of a variety of suitable techniques. For example, detailed manual photography, 3D scans and measurements can be taken. Alternatively or additionally, a three-dimensional computer-aided design (CAD) file (e.g., a technical exploded view in vector image pdf or other format) can be used for this purpose. Using this information, the hardware of the mimicked AVI station can be obtained and / or assembled and placed in the same relative arrangement / geometry as the original AVI station (i.e., the station being mimicked). A 3D scanner or other equipment / techniques can also be used to recreate the AVI station.

[0009] Using the various techniques disclosed herein, a constructed or partially constructed mimicked AVI station can be improved and validated by comparing sample (e.g., container) images captured by the mimicked AVI station to sample images captured by the recreated AVI station. Feedback obtained from this process allows a user (e.g., a technician) to determine whether the mimicked AVI station operates sufficiently similarly to the original AVI station, as well as which aspects of the mimicked AVI station should be modified to better replicate the operation of the original AVI station.

[0010] In some embodiments, for this purpose, an image comparison software tool performs the comparison and generates a corresponding output. For example, the image comparison tool can calculate and report salient image metrics (e.g., metrics indicative of light intensity, camera noise, camera / sample alignment, defocus, motion blur, etc.) in real time to the user, providing the user with a relatively quick and reliable process for fine-tuning and evaluating the viability of the mimic AVI station. In some embodiments, the image comparison tool generates specific suggestions based on the metrics (e.g., "closer distance between camera and container"), which are displayed to the user. Advantageously, the image comparison tool can enable accurate reproduction of the operation of the AVI station even when the original and mimic AVI stations are located far apart. That is, the operation of the AVI station can be adequately reproduced even in certain situations where it is difficult or impossible to accurately reproduce the hardware geometry, computer hardware, and / or other aspects of the AVI station. The image comparison tool generally provides a scientific and reproducible process that reduces the risks associated with human error and human subjectivity, and thus is more likely to convince regulators regarding the true equivalence between the AVI station and the corresponding mimic station.

[0011] Those skilled in the art will appreciate that the figures described herein are included for illustrative purposes and are not intended to limit the present disclosure. The figures are not necessarily to scale, with emphasis instead being placed on illustrating the principles of the present disclosure. It should be understood that in some instances, various aspects of the described embodiments may be shown exaggerated or enlarged to facilitate understanding of the described embodiments. In the drawings, like reference numbers generally refer to functionally similar and / or structurally similar components throughout the various views. [Brief description of the drawings]

[0012] [Figure 1A]1 illustrates an exemplary process for troubleshooting an AVI station on a commercial line of equipment by building and using a mimic AVI station. [Figure 1B] 1 illustrates an exemplary process for troubleshooting an AVI station on a commercial line of equipment by building and using a mimic AVI station. [Diagram 2] 1 illustrates an exemplary process for developing AVI recipes and / or hardware setups for use in an AVI station on a commercial line instrument by mimicking a laboratory-based setup. [Diagram 3] FIG. 1C is a simplified block diagram of an example system that may implement the processes of FIGS. 1A and 1B. [Figure 4A] 1 shows an exemplary laboratory-based setup and associated vessel images that may mimic an AVI station on a line instrument or may be used as a development platform for an AVI station on a line instrument. [Figure 4B] 1 shows an exemplary laboratory-based setup and associated vessel images that may mimic an AVI station on a line instrument or may be used as a development platform for an AVI station on a line instrument. [Figure 4C] 1 shows an exemplary laboratory-based setup and associated vessel images that may mimic an AVI station on a line instrument or may be used as a development platform for an AVI station on a line instrument. [Figure 4D] 1 shows an exemplary laboratory-based setup and associated vessel images that may mimic an AVI station on a line instrument or may be used as a development platform for an AVI station on a line instrument. [Diagram 5] 1 illustrates another exemplary lab-based setup that can mimic an AVI station of the line instrument or can be used as a development platform for an AVI station of the line instrument. [Figure 6]1 illustrates an exemplary image comparison tool that may be used to facilitate the construction or upgrade of a mimic AVI station. [Figure 7] 7 illustrates an exemplary algorithm that may be implemented by the image comparison tool of FIG. 6. [Figure 8] FIG. 1 is a flow diagram of an exemplary method for replicating the operation of a lab-based or line instrument AVI station. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] The various concepts described introductory above and discussed in more detail below can be implemented in any of numerous ways, and the concepts described are not limited to any particular manner of implementation. Example embodiments are provided for illustrative purposes.

[0014] 1A and 1B illustrate an exemplary process 100 for troubleshooting an automated visual inspection (AVI) station of a commercial line equipment by building and using a mimic AVI station. Referring first to FIG. 1A, in stage 102, a commercial line equipment with one or more AVI stations runs in a normal / production operation mode. The commercial line equipment may be used, for example, in a "fill-finish" stage for quality control in the manufacture of pharmaceutical products (e.g., syringes containing liquid pharmaceutical products or glass vials containing lyophilized pharmaceutical products). The AVI stations may include one or more stations dedicated to container inspection (e.g., syringes, vials, etc.) and / or one or more stations dedicated to sample inspection (e.g., detection and / or characterization of particles in pharmaceutical products in containers). The commercial line equipment may be, for example, commercial line equipment 302, discussed in more detail below in connection with FIG. 3. The horizontal line / arrow at the top of FIGS. 1A and 1B extends from stage 102 to stage 142 (described below) and represents continuous product line inspection using the commercial line equipment. The horizontal axis of Figures 1A and 1B generally represents time, but is not necessarily proportional to a time scale, and Figures 1A and 1B do not necessarily represent an order of operations (although they may represent an order of operations) (e.g., stage 110 may occur before or after the first iteration of stage 122, etc.).

[0015] Problematic AVI stations within the commercial line equipment are identified at stage 104. For example, a person monitoring the production process may observe that a particular AVI station on the line equipment is identifying a large number of false positives (e.g., samples that are marked as defective by the line equipment but are determined to be acceptable upon more rigorous manual or automated inspection) and / or is failing to identify defective samples.

[0016] At stage 110, an operator downloads and / or installs the software code used for the problematic AVI station onto a computing system associated with the lab-based setup (i.e., what will be the mimic AVI station). The code may be transferred directly from line equipment or installed in another manner (e.g., from a portable memory device or download via the Internet, etc.). In some embodiments, the installed code includes code responsible for container movement, image capture, and image processing. For example, the code may control mechanisms for agitating (e.g., rotating, rocking, inverting, etc.) the container before and / or during imaging, trigger one or more cameras at the appropriate times, and process the camera images to detect defects in the container (e.g., cracks, chips) and / or defects in the contents (e.g., large fibers or other foreign objects).

[0017] In stage 112, a problematic AVI station in the line equipment captures one or more images of the container. Depending on the embodiment and / or scenario, stage 112 may or may not require an interruption to normal / production operation of the line equipment. For example, the captured images may be images that are also used during production.

[0018] In stage 114, the hardware of the problematic AVI station is reverse engineered to initiate the mimic AVI station setup procedure 120. Stage 114 may include reverse engineering of the hardware components of the problematic AVI station (e.g., cameras, optical components, lighting devices, mechanisms for moving the container, etc.), the hardware component assembly of the problematic AVI station (e.g., how the various components and subcomponents are assembled), the relative geometry / positioning of the hardware components in the problematic AVI station (e.g., orientation and distance of the container relative to the lighting devices and cameras), and / or other characteristics of the problematic AVI station (e.g., rotational speed of the container, etc.). In some embodiments, the reverse engineering is purely manual and includes precise measurements (e.g., with calipers, rulers, etc.), review of available drawings, etc. A 3D scanner may also be used to accurately capture the dimensions of the AVI station. In other embodiments, at least a portion of the reverse engineering is automated, for example, by processing a file or image showing the dimensions (angles, distances, etc.) of the problematic AVI station.

[0019] In the first iteration of stage 122, a mimic AVI station is constructed using the knowledge gained in stage 114. The construction can be partially manual or completely manual. Any suitable fabrication technique can be used to construct certain non-electronic hardware components of the mimic AVI station (e.g., star wheels, etc.), such as CNC machining of metal and plastic and / or 3D printing. The first iteration of stage 122 can also include purchasing or otherwise acquiring various off-the-shelf components, such as cameras, LED rings or other lighting devices. The first iteration of stage 122 can also include setting various software parameters to match the parameter settings used in stage 112. For example, a user can set the rotation speed of the container to be equal to the rotation speed setting used by the line equipment when capturing the image in stage 112.

[0020] In the first iteration of stage 124, after an initial attempt (in stage 122) to replicate the problematic AVI station, one or more images of the container are captured by one or more imagers (e.g., cameras) of the imitation AVI station. The container is assumed to be of the same type as the container imaged in stage 112, and may in fact be the same container.

[0021] In the first iteration of stage 126, the image comparison tool determines whether the container image captured in stage 112 matches to some acceptable degree the container image captured in the first iteration of stage 124. To make this determination, the image comparison tool may generate a number of metrics for each of the images or sets of images and compare the metrics to determine a measure of similarity (e.g., a similarity score). For example, the image comparison tool may generate metrics related to size (e.g., the size of the container shown in the image), orientation (e.g., the angle of the container wall relative to the vertical axis of the image), light intensity (e.g., as shown by the pixel intensities of the image), defocus, motion blur, and / or other characteristics. The image comparison tool may also compare corresponding metrics (e.g., by calculating difference values) of the images from stage 112 and the images from stage 124. Exemplary metrics are discussed in more detail below with reference to FIGS. 6 and 7. The determination in stage 126 may be made by a user observing the output of the image comparison tool or by the tool itself, depending on the embodiment.

[0022] If the image comparison tool (or a user of the tool) determines that the image or set of images are not sufficiently similar in the first iteration of stage 126, the mimic AVI station is modified in the second iteration of stage 122. The modifications in the second iteration of stage 122 are focused on the output of the image comparison tool in the first iteration of stage 126. For example, if the image comparison tool indicates that the light intensity of the images captured by the mimic AVI station in the first iteration of stage 124 is too low, the user can move a lighting device closer to the container or change the lens aperture size, etc. during the second iteration of stage 122. As another example, if the image comparison tool indicates that the images captured in the first iteration of stage 124 are less focused than the images captured in stage 112, the user can move the container closer or farther away from the camera of the mimic AVI station. In some embodiments, the image comparison tool processes metrics of the compared images and provides suggestions at stage 126 such as "move illuminator closer to the container," "move illuminator B closer to the container," or "move illuminator B 3 mm closer to the container."

[0023] After the developer makes modifications in the second iteration of stage 122, the mimicking AVI station captures a new set of one or more images in the second iteration of stage 124 (e.g., in response to a manual trigger from the user), and the image comparison tool compares the new images to the images captured in stage 112 (or possibly new images captured by the problematic AVI station) in the second iteration of stage 126. As can be seen from FIG. 1A, the loop in procedure 120 can continue for any number of iterations until the image comparison tool (or a user observing its output) determines that the mimicking AVI station has replicated the behavior / characteristics of the problematic AVI station with sufficient accuracy, as indicated by a sufficient degree of similarity between the images captured by the mimicking AVI station and the images captured by the problematic AVI station of the line equipment in the iteration of stage 126. In some scenarios, a sufficient degree of similarity can be achieved even when there are significant differences in hardware components and / or geometry. In other scenarios, a sufficient degree of similarity requires an exact replication of hardware components and geometry.

[0024] Once a sufficient degree of similarity is achieved, the mimic AVI station can be used in a troubleshooting role during process 130 (see FIG. 1B ). In the exemplary process 130, in a first iteration of stage 132, a user (e.g., a technician) considers / theorizes appropriate modifications to the inspection algorithm / recipe and / or modifications to the hardware setup (e.g., different cameras, lenses, lighting equipment types, etc., and / or different arrangements and / or settings of such equipment / components) to attempt to correct the problems observed in stage 104. Thereafter, in a first iteration of stage 134, an operator modifies the hardware and / or code according to the modifications identified in the first iteration of stage 132.

[0025] In a first iteration of stage 136, the mimic AVI station is used to test whether operation of the mimic AVI station is acceptable, i.e., whether the problems observed in stage 104 have been sufficiently corrected. Stage 136 may include, for example, comparing statistical results (e.g., false positive rates, etc.) to standards-based requirements. Each iteration of stage 136 may be time- and / or labor-intensive, as it may require multiple images and / or various container / product samples to determine whether the problems have been resolved (e.g., in the case of a low number of observed problems, but still unacceptable false positive or false negative rates). However, the time investment may be acceptable, as it does not require interruption of commercial line equipment.

[0026] If the operation is not determined to be passable / acceptable in stage 136, then process 130 is repeated and a new fix is ​​identified / theorized in the second iteration of stage 132. Process 130 may be repeated for any number of iterations without interrupting operation of the line equipment until the operation is determined to be passable / acceptable in the iteration of stage 136. At that point, troubleshooting process 130 is complete and, if the qualification and commissioning activities were successful (in stage 140), then the fixes made during process 130 (i.e., as reflected in the final state of the mimicked AVI system after the final iteration of stage 134) are applied to the problematic AVI station in stage 142. Stage 142 typically requires stopping production on the commercial line equipment to make the changes from process 130 (and possibly for some abbreviated qualification / commissioning operations), but results in significantly less downtime than if the troubleshooting process 130 had to be performed on-site on the problematic AVI station itself. After changes are applied to the problematic AVI stations in stage 142, production (ie, normal / production operation of the line equipment) is resumed in stage 144.

[0027] Although process 100 has been described in the context of troubleshooting a problematic AVI station, it should be understood that process 100 may alternatively be used to improve an AVI station that is already operating reasonably well (e.g., to further optimize inspection performance or to make it more cost-effective, etc.). Additionally, while process 100 has been described in the context of the fill-finish stage of a pharmaceutical manufacturing line, it should be understood that process 100 may alternatively be used at a different stage (e.g., when inspecting products after assembly of the equipment, or when inspecting product labeling and / or packaging, etc.) and / or may alternatively be used in a non-pharmaceutical context (e.g., another context involving relatively strict quality standards).

[0028] Figures 1A and 1B illustrate a process 100 for troubleshooting an AVI station of a commercial line equipment by building and using an imitation AVI station, while Figure 2 illustrates an exemplary process 200 for upgrading an AVI station of a commercial line equipment to mimic the operation of a laboratory-based AVI setup. The commercial line equipment of Figure 2 includes one or more AVI stations and can be, for example, any of the line equipment discussed above in connection with Figures 1A and 1B or the line equipment discussed below with reference to Figure 3 (i.e., commercial line equipment 302).

[0029] In stage 202, the commercial line equipment operates in a normal / production run mode, for example, for fill-finish stage inspection of a particular pharmaceutical product (e.g., pre-filled syringes). As discussed above in connection with FIGS. 1A and 1B, process 200 of FIG. 2 may alternatively be applied to different inspection stages (e.g., device assembly, packaging, etc.) and / or process 200 may be used in non-pharmaceutical contexts. The horizontal line / arrow at the top of FIG. 2 extends from stage 202 to stage 220 (described below) and represents continuous product line inspection using commercial line equipment. The horizontal axis of FIG. 2 generally represents time, but is not necessarily proportional to a time scale, and FIG. 2 does not necessarily represent a sequence of operations (although it may represent a sequence of operations) (e.g., stage 202 may occur before or after the start of stage 204).

[0030] At stage 204, it is decided to adapt the commercial line equipment for use in fill-finish inspection of the new drug product. The new drug product may require custom modifications to one or more AVI stations of the commercial line equipment for a variety of reasons. For example, the new drug product may be less transparent than the previous product (e.g., requiring a higher light intensity for imaging) or may be packaged in a different type of container that may have different types of defects and / or defects in different areas.

[0031] The lab-based setup is then used to develop an AVI station tailored to the new pharmaceutical product in a development procedure 210. Within the development procedure 210, at stage 212, an imaging system (one or more cameras and any associated optical components) of the lab-based setup captures an image of an illuminated sample (e.g., a liquid or lyophilized product) within a container (e.g., a syringe or vial).

[0032] In stage 214, utilizing the captured images, a user of the lab-based setup develops an inspection recipe / algorithm and adjusts various parameters of the lab-based setup to achieve a desired performance (e.g., performance that is below a threshold amount of false positives and / or false negatives for a particular type of defect). The adjusted "parameters" may include any settings, types, positions and / or other characteristics of software, imaging hardware, lighting hardware and / or computer hardware. For example, the user may adjust light intensity settings, camera settings, camera lens type or other optical components, imaging and lighting system geometry, etc. It should be understood that the term "user" as used throughout this disclosure may refer to one person or a team of two or more people. In some scenarios, the user may develop an entirely new software algorithm in stage 214.

[0033] In stage 216, a user performs characterization and qualification operations to determine whether the lab-based setup / station developed / tuned in stage 214 operates satisfactorily (e.g., in accordance with applicable regulations). If not, the lab-based setup / station can be used for further development / tuning in the next iteration of stage 214, which may also require capturing additional images in the next iteration of stage 212. Stages 212, 214, 216 of the development procedure 210 may be repeated for any number of iterations until the results of the characterization / qualification operations in stage 216 are deemed acceptable.

[0034] Once the results are deemed acceptable and the new drug is ready for commercial scale production, the commercial line equipment is shut down and the hardware and / or software of the line equipment's AVI station is updated in stage 220 to mimic the behavior of the laboratory-based setup. Although not explicitly shown in FIG. 2, the mimicking process in stage 220 may include similar steps to the iterative setup procedure 120 (i.e., stages 122, 124, 126) of FIG. 1A, but with a first iteration of stage 122 that does not require "building" due to the fact that the AVI station to be updated already exists. Indeed, in some scenarios, stage 122 may be skipped entirely for the first iteration (if the developer believes that the existing AVI station is already close enough to the laboratory-based setup to proceed directly to the image comparison tool phase) and only performed in subsequent iterations.

[0035] The developer may also need to perform some level of on-site qualification work in stage 220 (after successful updates based on the image comparison tools) which will increase line equipment downtime. However, the time required for this may be much shorter than the qualification work during development step 210, and in any case, the fact that the development work (in step 210) is performed offline significantly reduces line equipment downtime. In stage 222, after successful qualification, production resumes on the commercial line equipment, but this time for the new drug product.

[0036] In some scenarios, both process 100 and process 200 are performed sequentially. For example, if it is determined that the AVI station of the line equipment is producing an unacceptable number of false positives (i.e., flagging significant defects when such defects are not present), then process 100 can be used to build and tune the mimic AVI station. It may then be determined that a different hardware component is required (e.g., an LED ring light instead of multiple directional lights) by using the mimic AVI station. After qualification of the new design on the mimic AVI station, process 200 can be used when upgrading the AVI station of the line equipment to ensure that the upgraded station accurately / sufficiently matches the operation of the mimic station.

[0037] Figure 3 is a simplified block diagram of an example system 300 that may implement the techniques described herein. In particular, Figure 3 illustrates an embodiment of using a mimic AVI station to troubleshoot an AVI station of a commercial line of equipment. Thus, for example, system 300 may implement and / or be used to implement process 100 of Figures 1A and 1B.

[0038] As can be seen in FIG. 3, the system 300 includes a commercial line equipment 302 and a simulated AVI station 304. The line equipment 302 can be any production-grade equipment with N (N≧1) AVI stations 310-1 to 310-N (also collectively referred to as AVI stations 310). By way of example only, the line equipment 302 can be a Bosch® 296S line equipment. In the example of FIG. 3, the i-th AVI station 310-i of the line equipment 302 requires troubleshooting (or is alternatively the subject of optimization), where i is equal to 1, N, or any number from 1 to N. Each of the AVI stations 310 is responsible for capturing images used to inspect different aspects of the containers and / or samples within the containers. For example, a first AVI station 310-1 can capture an image of a top view of a syringe or vial to inspect it for cracks or chips, while a second AVI station 310-2 can capture an image of a side view to inspect the contents of the syringe or vial (e.g., a liquid or lyophilized pharmaceutical product) for foreign particles, etc.

[0039] 3 illustrates in simplified block diagram form the general components of an ith AVI station 310-i. In particular, AVI station 310-i includes an imaging system 312, an illumination system 314, and sample positioning hardware 316. It should be understood that the other AVI stations 310 (if present) may be similar, but may have different component types and configurations depending on the purpose of each given station 310.

[0040] The imaging system 312 includes one or more imaging devices and possibly associated optical components (e.g., additional lenses, mirrors, filters, etc.) for capturing an image of each sample (e.g., container and pharmaceutical product). The imaging device may be, for example, a camera with a charge-coupled device (CCD) sensor. As used herein, the term "camera" or "imaging device" may refer to any suitable type of imaging device (e.g., a camera capturing the human visible frequency spectrum portion or an infrared camera, etc.). The illumination system 314 includes one or more illumination devices, for example, a light-emitting diode (LED) array (e.g., a panel or ring device), for illuminating each sample for imaging.

[0041] The sample positioning hardware 316 may include any hardware that holds or otherwise supports the samples for the AVI station 310-i, as well as hardware that optionally transports and / or otherwise moves the samples. For example, the sample positioning hardware 316 may include star wheels, a rotating stage, a robotic arm, etc. In some embodiments, depending on the function of the AVI station 310-i, the sample positioning hardware 316 also includes hardware for agitating each sample. For example, if the AVI station 310-i is inspecting for foreign particles in a liquid, the sample positioning hardware 316 may include components to spin / rotate, invert, and / or rock each sample.

[0042] The line equipment 302 also includes a processing unit 320 and a memory unit 322. The processing unit 320 includes one or more processors, each of which may be a programmable microprocessor that executes software instructions stored in the memory unit 322 to perform some or all of the software-controlled functions of the commercial line equipment 302 described herein. Alternatively or additionally, some of the processors in the processing unit 320 may be other types of processors (e.g., application specific integrated circuits (ASICs), field programmable gate arrays (FPGAs), etc.), and some of the functions of the processing unit 320 described herein may alternatively be implemented in hardware. The memory unit 322 may include one or more volatile and / or non-volatile memories. The memory unit 322 may include one or more of any suitable memory types, such as read-only memory (ROM), random access memory (RAM), flash memory, solid-state drive (SSD), hard disk drive (HDD), etc. Collectively, memory unit 322 may store one or more software applications, data received / used by those applications, and data output / generated by those applications.

[0043] The processing unit 320 and the memory unit 322 are configured together to control / automate the operation of the AVI station 310 and to process images captured / generated by the AVI station 310 to detect corresponding types of defects in the containers and / or their contents (e.g., pharmaceutical products). In an alternative embodiment, the functions of the processing unit 320 and / or the memory unit 322 are distributed among N different processing units and / or memory units, each specific to a different one of the AVI stations 310-1 to 310-N. In yet another embodiment, some of the functions of the processing unit 320 and the memory unit 322 (e.g., for transporting, stirring and / or imaging the samples) are distributed among the AVI stations 310, while other functions of the processing unit 320 and the memory unit 322 (e.g., for processing the sample images to detect defects) are performed by a centralized processing unit. In some embodiments, at least a portion of the processing unit 320 and / or memory unit 322 are included in a computing system (e.g., a specially programmed general-purpose computer) that is external to (and possibly remote from) the line equipment 302.

[0044] The memory unit 322 stores the sample (container / product) images captured by the AVI station 310, and also stores the AVI code 326. When executed by the processing unit 320, the AVI code 326 (1) causes the AVI station 310 to capture an image, and (2) processes the captured image (e.g., as described above) to detect defects. For example, for AVI station 310-i, the AVI code 326 includes a corresponding portion shown as code 328 in FIG. 3. As an example of one embodiment, the code 328 may trigger the imaging system 312 to capture an image while the sample is illuminated by the illumination system 314, control the sample positioning hardware 316 to place the sample in the correct position at the appropriate time, and optionally agitate the sample according to an agitation profile at the appropriate time. After the image is captured and stored as image 324, the code 328 processes the image 324 to detect the specific type of defect associated with the station 310-i. As noted above, in some embodiments, the portions of code 328 that process images may be executed by different processors, components and / or devices than the portions of code 328 that control imaging, agitation, etc.

[0045] The mimic AVI station 304 may be a lab-based setup constructed to replicate (to a sufficient degree) the operation of a particular AVI station 310-i (e.g., in response to learning that the AVI station 310-i has an unacceptable level of false positives or negatives). The mimic AVI station 304 includes a mimic imaging system 332, a mimic lighting system 334, and a mimic sample positioning hardware 336. The mimic imaging system 332 includes one or more imaging devices (and possibly associated optical components) for capturing images of each sample (e.g., containers and pharmaceutical products), the mimic lighting system 334 includes one or more lighting devices for illuminating each sample for imaging, and the sample positioning hardware 316 includes hardware for holding or otherwise supporting the samples and possibly hardware for transporting and / or otherwise moving the samples.

[0046] Ideally, the mimicked imaging system 332, the mimicked lighting system 334, and the mimicked sample positioning hardware 336 would perfectly replicate the imaging system 312, the lighting system 314, and the sample positioning hardware 316, respectively, of the AVI station 310-i. More importantly, the mimicked AVI station 304 would ideally replicate the operation of the AVI station 310-i as a whole. However, in the real world, an exact match of operation is extremely difficult to achieve. As discussed above in connection with FIG. 1A, various manual and / or automated reverse engineering techniques may be used to construct (e.g., at stage 122) the mimicked AVI station 304 that initially has operation "close" to that of the AVI station 310-i.

[0047] After the mimicked AVI station 104 is initially constructed as described above in connection with stage 126 of FIG. 1A, software can be used to facilitate fine-tuning of the mimicked AVI station 304 to improve motion matching. To this end, the mimicked AVI station 304 is coupled to a computing system 340 (e.g., a specially programmed general-purpose computer) that includes a processing unit 342 and a memory unit 344. The computing system 340 may be separate or integral to the mimicked AVI station 304, and may be local or remote to the mimicked AVI station 304. In some embodiments, for example, the computing system (or a portion thereof) receives images from the mimicked AVI station 304 via an Internet link.

[0048] The processing unit 342 includes one or more processors, each of which may be a programmable microprocessor that executes software instructions stored in the memory unit 344 to perform some or all of the software-controlled functions of the computing system 340 described herein. Alternatively or additionally, some of the processors in the processing unit 342 may be other types of processors (e.g., ASIC, FPGA, etc.), and some of the functions of the processing unit 342 described herein may alternatively be implemented in hardware. The memory unit 344 may include one or more volatile and / or non-volatile memories. The memory unit 344 may include one or more of any suitable memory types, such as ROM, RAM, flash memory, SSD, HDD, etc. Collectively, the memory unit 344 may store one or more software applications, data received / used by those applications, and data output / generated by those applications.

[0049] The memory unit 344 stores images 346 captured by the emulated imaging system 332 and images 348 captured by the imaging system 312 of the AVI station 310-i. The memory unit 344 also stores an image comparison tool (ICT) 350 and AVI code 352. In general, the image comparison tool 350 facilitates the process of tuning the emulated AVI station 304 so that its operation matches the AVI station 310-i (e.g., as described above in connection with stage 126 and below in connection with FIGS. 6 and 7), and the AVI code 352 is used to control the constructed and tuned emulated AVI station 304 during a troubleshooting or optimization process. The AVI code 352 may be, for example, an exact (or very close) replica of the code 328 and may be downloaded or uploaded from the line equipment 302, a portable memory device, the Internet, or another suitable source. In other embodiments, the AVI code 352 includes only a portion of the code 328 (eg, excluding the portion used to control transportation of the sample to and from the appropriate imaging position).

[0050] The computing system 340 is coupled to an output unit 360. The output unit 360 may be any type of visual and / or audio output device (e.g., a computer monitor, touch screen or other display and / or speakers of the computing system 340 or a separate computing device having a display and / or speakers and coupled to the computing system 340, etc.). The image comparison tool 350 and the AVI code 352 may cause the output unit 360 to provide various visual and / or audio output to a developer or user of the mimicked AVI station 304. For example, the image comparison tool 350 may cause the output unit 360 to display various metrics representing the differences between the images 346 and 348 (as discussed further below), and the AVI code 352 may cause the output unit 360 to display information such as an indication of whether a particular sample is defective or not.

[0051] 3 illustrates an embodiment in which a mimic AVI station (station 304) is used to troubleshoot an AVI station of a commercial line equipment (station 310-i of line equipment 302), it should be understood that similar components may be used for embodiments in which an AVI station of a commercial line equipment is updated / modified to replicate the operation of a lab-based setup / station (e.g., as in process 200 of FIG. 2). In such an embodiment, the i-th AVI station 310-i is a "mimic" station that mimics AVI station 304 (i.e., the lab-based setup). Further, in such an embodiment, image comparison tool 350 may alternatively reside in memory 322 of line equipment 302. Alternatively, image comparison tool 350 may remain in computing system 340.

[0052] In some embodiments, system 300 provides access to remote sites (e.g., global manufacturing sites) so that distant users can directly access laboratory-based setups regardless of their respective laboratory and manufacturing locations. Such an approach allows for real-time collaboration between sites / users over the network, leveraging the expertise of individuals (e.g., engineers) in diverse locations while, for example, providing troubleshooting and / or development support at a global centralized facility. Thus, a networked approach may result in a more efficient organizational structure.

[0053] Figures 4 and 5 show exemplary lab-based setups, either of which may be the mimicked AVI station 304 of Figure 3 (e.g., the mimicked AVI station of process 100) or alternatively a lab-based AVI station used as a development platform (e.g., the lab-based setup used in process 200). It should be understood that these lab-based setups / stations are merely exemplary and that a virtually unlimited number of alternative types and configurations exist.

[0054] Referring first to FIG. 4A, a first laboratory-based setup 400 may be used, for example, to inspect the tops of containers (e.g., tops of syringes filled with liquid pharmaceuticals) for defects (e.g., cracks, chips, etc.). The setup 400 includes a camera 402 for imaging the containers and an LED ring 404 for illuminating each container while imaging each container. The sample positioning hardware 406 includes a platform 406A and a star wheel 406B attached to the platform 406A. The camera 402 and LED ring 404 may also be attached (directly or indirectly) to the platform 406A. The star wheel 406B may hold the containers (e.g., syringes) in fittings along the periphery of the star wheel 406B, and the star wheel 406B may rotate relative to the platform 406A to move each container into an imaging position (i.e., centered within the LED ring 404 and directly beneath the camera 402). However, in some embodiments and / or scenarios, it is only important that setup 400 match or closely approximate the characteristics (e.g., lighting, optics, etc.) of a line equipment AVI station for imaging a single container, rather than being able to sequentially image several successive containers. Thus, in some embodiments, star wheel 406B need not be designed to hold or rotate to hold multiple containers, even if the AVI station being emulated (or an AVI station for which development activity is being conducted) requires such hardware or functionality.

[0055] 4B shows an example image 450 that may be captured by setup 400 for an embodiment in which setup 400 (and a corresponding AVI station on the line equipment) captures an image from above the syringe to detect defects on the syringe flange. As can be seen from this example, the defects may include chips and cracks of various locations and sizes on the syringe flange.

[0056] FIG. 4C shows an example image 460 representing an image captured by a line equipment AVI station (e.g., AVI station 310-i of FIG. 3), and FIG. 4D shows an example image 470 representing an image captured by a mimic AVI station (e.g., setup 400) after successful troubleshooting. In this example, the line equipment AVI station has an unacceptably high false positive rate due to light reflections seen in image 460, and corrections during troubleshooting (e.g., changing from a different type of lighting device to an LED ring or changing the orientation of the camera or lighting device relative to the container) result in significantly fewer reflections seen in image 470. Reducing artifacts associated with light reflections may reduce the likelihood of defects going unseen and / or reflections being misinterpreted as defects.

[0057] Referring now to the example of FIG. 5, a lab-based setup 500 may be used, for example, to view a syringe from the side (e.g., the side of a syringe filled with a liquid pharmaceutical) and inspect it for defects (e.g., cracks, chips, stains, etc. on the sidewall of the container-syringe and / or unacceptable types and / or numbers of particles in the pharmaceutical). The setup 500 includes a camera 502 for imaging the containers and an LED backlight 504 for backlighting each container while imaging it. The sample positioning hardware includes a rotating stage 506 that holds several syringes and positions a single syringe between the camera 502 and the LED backlight 504. The rotating stage 506 may rotate to move each syringe into position for imaging. As mentioned above, in some embodiments and / or scenarios, it is only important that the setup 500 matches or closely approximates the characteristics of a line equipment AVI station for imaging a given sample, rather than having the same capability to sequentially image several consecutive samples. Thus, in some embodiments, the turntable 506 does not need to be designed to hold or rotate to hold multiple syringes, even if the AVI station being emulated (or the AVI station on which development activity is being conducted) requires such hardware or functionality.

[0058] FIG. 6 illustrates an exemplary image comparison tool 600 (e.g., image comparison tool 350 of FIG. 3) that may be used to facilitate the construction and / or upgrade of a mimicked AVI station (e.g., a lab-based setup in process 100 of FIG. 1, a line equipment AVI station in process 200 of FIG. 2, or a mimicked AVI station 304 of FIG. 3). As can be seen in FIG. 6, the image comparison tool 600 receives an original image 602 and a mimicked image 604, and depending on whether process 100 or process 200 is being performed, the original image 602 may be an image captured by the line equipment AVI station and the mimicked image 604 may be an image captured by the lab-based setup, or vice versa. In some embodiments, it is envisioned that the images 602, 604 use a lossless image compression format.

[0059] The image comparison tool 600 includes a metric generation unit 612 and a feedback unit 614. The metric generation unit 612 processes the images 602 and 604, generates / calculates metrics characteristic of the images 602, 604, and calculates one or more additional metrics indicative of the difference between the images 602, 604 based on the metrics. In some embodiments, the metric generation unit 612 calculates the metrics on an image-by-image basis, i.e., by comparing one of the original images 602 with one of the mimicked images 604. In other embodiments, the metric generation unit 612 calculates each of the metrics based on a set of multiple original images 602 and multiple mimicked images 604. For example, a set of x images (x>1) of the original images 602 may be averaged or overlapped with each other, and a set of x images of the mimicked images 604 may be averaged or overlapped with each other, possibly after applying an alignment technique. Such an approach can, for example, reduce the effect of outlier images. The averaging / overlay / alignment may be performed, for example, by the same computing device or processor that implements the image comparison tool 600, or may be performed by a different device or processor. In an alternative embodiment (e.g., when a line scan camera is used), x images of the original image 602 are stitched together (e.g., in an embodiment where each container is rotated to view the container from all directions) and x images of the mimic image 604 are stitched together before the unit 612 calculates any metrics. Other pre-processing of the images 602 and 604 (e.g., generating an image where each pixel has a maximum intensity for that pixel location across all of the x images) is also possible. For ease of explanation, the remaining description of FIG. 6 and the description of FIG. 7 refer to only one original image 602 and one mimic image 604. However, it should be understood that the above or other suitable variations are possible. Some specific examples of metrics that the metric generation unit 612 may calculate are described below with reference to FIG. 7.

[0060] The feedback unit 614 causes one or more outputs to be presented to a user (e.g., an engineer, developer, technician, etc.) in visual and / or audio form based on the difference metrics generated by the metric generation unit 612. The outputs may be generated (e.g., displayed and / or emitted) by, for example, the output unit 360 of FIG. 3. In some embodiments, the feedback unit 614 simply presents the generated metrics to the user (e.g., on a graphical user interface (GUI)). For example, the feedback unit 614 may cause intensity level metrics, image defocus metrics, and / or other metrics to be displayed to the user.

[0061] In other embodiments, the feedback unit 614 may alternatively or additionally generate one or more user suggestions based on one or more metrics. For example, the feedback unit 614 may generate suggestions to move the camera, move a lighting device, change the light intensity, change the camera settings, etc. Other example suggestions are described below with reference to FIG.

[0062] In some embodiments, the metric generation unit 612 and the feedback unit 614 operate substantially in real-time as the mimicked image 604 is captured by the imaging system of the mimicked AVI station (e.g., the mimicked imaging system 332) and / or as the mimicked image 604 is received by a device or system implementing the image comparison tool 600 (e.g., by the computing system 340). Thus, for example, a user may be able to capture a mimicked station image by selecting an interactive control on a GUI presented on the output unit 360 and then almost immediately see the corresponding metrics and / or suggestions generated by the metric generation unit 612 and / or the feedback unit 614. In this manner, the user can rapidly proceed through iterations of modifying the mimicked AVI station (e.g., tweaking component positions, settings, etc.) and observing the effect of the modifications on the behavior of the mimicked AVI station (i.e., how much the modifications move the mimicked AVI station closer to or further from the behavior of the original AVI station).

[0063] 7 illustrates an exemplary algorithm 700 that may be implemented, for example, by the image comparison tool 600 (more specifically, the metric generation unit 612) of FIG. 6. As can be seen in FIG. 7, the algorithm 700 accepts as input a single original image 702 (e.g., one of the images 702) and a single mimicked image 704 (e.g., one of the images 704). As mentioned above, in some embodiments, these "single" images may be a composite (e.g., average) of multiple images. In one embodiment, the algorithm 700 is implemented in Python code using the OpenCV library.

[0064] At stage 712, the algorithm 700 determines one or more aggregate image parameters (P1 to Pj, where j>=1) for the original image 702 and the mimicked image 704 and compares the parameters to check for consistency. The aggregate image parameters may represent relatively basic image parameters, such as, for example, image size, image resolution, color depth, and / or image file format. The image comparison tool 600 may determine the aggregate image parameters, for example, using configuration files input to or generated by the various hardware components (e.g., cameras) of the original AVI station and the mimicked AVI station. The algorithm 700 may cause a GUI (e.g., displayed by the output unit 360 of FIG. 3) to indicate any differences in the aggregate image parameters. Thus, for example, a user may be easily able to detect when the camera (or subsequent processing) in the original AVI station has altered the captured image in some way (e.g., cropping, format conversion, resizing, etc.) and can manually reconfigure the mimicked AVI station to replicate those image processing operations.

[0065] In stages 714A and 714B, the algorithm 700 calculates one or more metrics (C1 to Ck, where k>1) of the original image 702 and the mimicked image 704, respectively. Stages 714A and 714B may assume that the total image parameters of the images 702, 704 are identical. The metrics may represent any image characteristic that is or may be related to inspection accuracy. The algorithm 700 also includes a metric (denoted as ΔC1 to ΔCk in FIG. 7) that indicates the difference between the corresponding metrics of the two images 702, 704. The algorithm may calculate some or all of the differences, for example, by simple subtraction (e.g., where ΔC1 is equal to the absolute value of the difference between C1 of image 702 and C1 of image 704) or using other techniques (e.g., element-wise subtraction, dot product, etc.).

[0066] As an example, the metrics may include one or more light intensity metrics. The light intensity may be measured in one or more ways depending on the embodiment. For example, for each of the images 702, 704, the algorithm 700 may average the intensity values ​​of all pixels to generate an average value and compare (e.g., subtract) the average values ​​of the images 702, 704. As another example, the algorithm 700 may generate pixel intensity histograms for each of the images 702, 704 and then mathematically compare the histograms using known techniques. Some techniques that may be used and that result in a single-valued output reflecting the difference between the histograms include the Bhattacharyya distance method, correlation methods, chi-squared methods, and intersection methods. The best technique to be used may vary depending on the nature of the images considered. Histogram-based intensity analysis allows the algorithm 700 to take into account the dynamic range of the intensities within each image (i.e., the range between the minimum and maximum intensity values).

[0067] For complex images, intensity metrics such as those discussed above may be insufficient because non-uniform illumination may be reflected disproportionately from a subset of the container's facets and its surroundings. Additionally, roughness effects due to non-uniform ambient lighting (e.g., from windows or fluorescent ceiling lights) may result in large wavelength gradual variations in intensity across the image. In some embodiments, the algorithm 700 uses a low-pass frequency filter to capture such variations. Additionally or alternatively, the algorithm 700 may compute a fast Fourier transform (FFT) for each of the images 702, 704 and process the corresponding FFT outputs to determine whether the frequency content is similarly distributed for the images 702, 704.

[0068] As another example, the metric may include one or more metrics indicative of the defocus of the image. For example, the algorithm 700 may calculate the Laplacian of each of the images 702, 704 to generate a single-valued parameter that may be easily compared. If the algorithm 700 is implemented as Python code using, for example, the OpenCV library, the defocus may be calculated for each of the images 702, 704 as follows: defocus = cv2.Laplacian(image,cv2.CV_64F).var() The Laplacian metric can also indicate motion of the imaged container / sample relative to the imaging camera. In commercial AVI systems, it is not uncommon to move the sample rapidly relative to the inspection station. For example, to achieve sharp imaging, commercial systems often employ short camera exposure times, strobing of the illumination light, moving the imaging components to track the part, or a combination of one or more of these features. If the mimic AVI station mismatches the original AVI station in one or more of these features, some degree of motion blur or streaking may occur. The result is similar to defocus, but with a directional component. Thus, metrics calculated using Laplacian techniques may also indicate motion. In addition to the Laplacian, first-order filters such as Sobel or Prewitt can be used to obtain additional information about the sharpness of the image.

[0069] As another example, the metric may include one or more metrics indicative of camera noise. In modern industrial digital cameras, noise may only occur in the sensor itself. In general, signals are less corrupted after being digitized. When building an imitation AVI station, camera brands and models may be easily matched in some cases, so noise levels may be similar. As an example, the cumulative noise level on a given pixel in an 8-bit grayscale image may range from 0 to 10, out of a dynamic range of 0 to 255, for a particular camera brand and model. This results in negligible noise at room temperature in most AVI applications. However, in some cases, it is conceivable that the camera noise level may affect inspection performance and / or the camera model may be missing and unavailable due to obsolescence. For digital images, camera noise is typically high frequency in nature. Thus, the algorithm 700 may generate a metric indicative of camera noise by computing an FFT for each of the images 702, 704 and processing the FFT output to generate a metric indicative of the level or relative level of high frequency content.

[0070] As another example, the metrics may include one or more metrics indicative of the alignment and scaling of the imaged vessel (and possibly other imaged objects, such as portions of sample positioning hardware). For example, algorithm 700 may determine the relative rotation of the imaged vessel (e.g., the angle of the vertical wall of the imaged vessel relative to the vertical or horizontal axis of the image itself, i.e., relative to the axis established by the camera frame) and the lateral and / or scale depth offset / shift (e.g., determined based on the length and / or width measured in pixels).

[0071] At stage 716, the algorithm 700 generates a weighted comparison score for the image pair 702, 704 based on the metrics calculated at stages 714A and 714B. In particular, in this example, the algorithm 700 calculates the score as Score=(W1*ΔC1)+(W2*ΔC2)+...+(Wk*ΔCk), where ΔCi (as described above) is the difference measure corresponding to Ci for the two images 702, 704. The weights W1, W2,...Wk may represent the importance of each metric in achieving similarity, particularly with respect to which metric is more or less important for achieving comparable AVI inspection performance. The weights may be application specific to some extent. For example, in some embodiments or scenarios, pixel intensity levels are more important than focus blur, and therefore intensity differences may be weighted more heavily than differences in Laplacian scalar values ​​(or other metrics indicative of focus blur).

[0072] 6, image comparison tool 600 may cause output unit 360 to display some or all of the calculated metrics (e.g., only the difference metrics ΔC1-ΔCk, or only the difference metrics that exceed corresponding thresholds, etc.) in real time. Alternatively or additionally, tool 600 may cause output unit 360 to display the scores generated at stage 716. In embodiments where a score is calculated, displayed, and deemed sufficient (e.g., above some pre-determined threshold), a technician or other user may determine that the mimicked AVI station sufficiently matches the original AVI station and proceed to use the mimicked AVI station for troubleshooting and / or optimization.

[0073] If the score is not sufficient, or if no score is presented and the individual metrics do not appear close enough, the user may analyze the displayed metrics to "tweak" the mimic AVI station as necessary to achieve a better match. For example, if the metrics indicate that the mimic image 704 is overall dimmer (e.g., has a lower average intensity) relative to the original image 702, the user may review the settings of the lighting or camera equipment (e.g., light intensity settings, lens aperture settings, camera gain settings, camera exposure time settings, etc.) and / or move the lighting equipment closer to the sample, etc.

[0074] There are several aspects related to the illumination source that can affect the intensity of the image pixels. In general, in a typical AVI application, the effects are likely to be macroscopic across the entire image. High-end industrial LEDs are commonly used in modern AVI stations. When building an imitation AVI station, the LED light source may be placed at a poor distance from the container, resulting in reduced intensity. Since intensity falls off with the square of the distance from the light source, slight positioning differences may have a detectable effect on the final image. Once the position relative to the container is set, the brightness of the LED light source may still vary due to the power source. After all other factors have been ruled out, the image comparison tool 600 may be used in real time to fine-tune the power and subsequent brightness of the LED light source. Image processing techniques such as those described above provide a more accurate and more nuanced solution than the traditional approach of using a lux meter to measure the brightness of the light source in AVI applications.

[0075] Some optical components, such as lenses, may include manual apertures or other components that may affect the overall image intensity (and possibly other image characteristics, such as aperture settings, that affect image sharpness). These are often manual dials or screws on the lens that do not provide digital feedback. Also, these components may not have visible grades or rulings. To achieve high fidelity product images, telecentric lenses are commonly used in automated inspection stations in factories. These lenses include a pinhole aperture, some of which can be manually adjusted in size. This affects the amount of light that can pass through the lens, and also has a characteristic effect on image sharpness. Thus, by considering and combining the two factors, users observing the metric can appropriately set the lens characteristics related to intensity.

[0076] Also, a large and consistent drop in intensity across the image may indicate that a filter is not correctly placed across the illumination source (such as a polarizer or diffuser) or in front of the camera (such as an alternative polarizer or wavelength filter). Thus, a user may attempt to adjust filter placement if they observe large differences in image intensity.

[0077] As another example, a user examining intensity histograms and / or the output of a low pass frequency filter for images 702, 704 may determine whether there are significant local differences in intensity between images 702, 704. If local differences exist, the user can attempt to identify and eliminate the source of those local differences by studying images 702, 704 along with histograms and / or other metrics.

[0078] As another example, if the metrics indicate that the container in the mimicked image 704 is out of alignment and / or improperly scaled relative to the container in the original image 702, the user may adjust the container and / or camera alignment (e.g., angle or rotation), the distance between the container and the camera, the camera zoom level (e.g., lens type or digital zoom setting), etc.

[0079] As another example, if the metric (e.g., difference in scalar Laplacian output) indicates a defocus of one image 702, 704 relative to the other, the user may adjust the distance between the container and the camera, the motor speed, the camera exposure time, etc. Telecentric lenses of the kind often used in inspection applications typically have such a shallow depth of field that even slight errors in the relative placement of the lens and the container result in blurred images. Thus, even small distance differences can have a large effect on the defocus. Additionally, as mentioned above, some of these lenses have a variable pinhole aperture, which can also contribute to image blur if set improperly. Thus, even if the metric indicates a defocus difference, the user can adjust the aperture.

[0080] Other metrics can guide the user to adjust these and / or other aspects of the mimicking AVI station to achieve a better match, such as, for example, stray light reflections in the image, the presence of important objects in the image, image dynamic range, image bleaching, image contrast, etc.

[0081] In some embodiments, as described above, image comparison tool 600 generates one or more suggestions based on the metric. Thus, for example, image comparison tool 600 may cause output unit 360 to display (and / or generate a computer voice message describing) any of the improvement techniques described above (e.g., increasing or decreasing the distance between the camera and the container, possibly increasing or decreasing the lens aperture, etc., if a metric reflecting a difference in intensity and / or defocus of images 702, 704 exceeds a threshold value, etc.).

[0082] FIG. 8 is a flow diagram of an example method 800 for replicating the operation of an AVI station (e.g., AVI station 310-i in a troubleshooting scenario or a lab-based setup used in development, etc.). In method 800, a mimic AVI station (e.g., mimic AVI station 304 or AVI station 310-i in a troubleshooting scenario, etc.) is constructed that performs one or more AVI functions of the original AVI station at block 802. Block 802 may be performed manually by reverse engineering the original AVI station. However, in some embodiments, block 802 includes using software to aid the reverse engineering process (e.g., by interpreting a CAD file or the output of a 3D scanner). Block 802 may include, for example, a first iteration of stage 122.

[0083] At block 804, one or more container images (i.e., images of the container at appropriate imaging locations within the original AVI station) are captured by an imaging system (e.g., a single camera) at the original AVI station. At block 806, one or more additional container images are captured by an imaging system (e.g., a single camera of the same type) at the mimic AVI station. Blocks 804 and 806 may be similar to, for example, stages 112 and 124, respectively, of process 100.

[0084] Thereafter, in block 808, one or more differences between the container image captured by the original AVI station and the container image captured by the mimic AVI station are identified. Block 808 may be performed by a processing unit (e.g., processing unit 342) executing an image comparison tool (e.g., tool 350). For example, the image comparison tool may generate one or more metrics reflecting the differences in block 808. Block 808 may include, for example, stages 714A and 714B of algorithm 700 followed by generation of the difference metric (e.g., metrics ΔC1-ΔCk of FIG. 7).

[0085] At block 810, a visual indication of the differences identified at block 808 is generated to assist the user in modifying the mimic AVI station. The visual indication may include, for example, one or more of the metrics (e.g., difference metrics) calculated at block 808 and / or one or more suggestions based on those metrics (e.g., as discussed above in connection with FIGS. 6 and 7). Block 810 may be performed by the same processing unit that performs block 808 and may include, for example, causing an output unit (e.g., output unit 360) to present the visual indication (i.e., the metrics and / or the suggestions).

[0086] At block 812, the mimicked AVI station is modified based on the visual indications generated at block 810. Block 812 may be performed entirely by a user (i.e., manually) or may be performed at least partially automatically (e.g., by computing system 340 adjusting digital settings of cameras or lighting devices of the mimicked AVI station, etc.). Block 812 may include, for example, a second (or subsequent) iteration of stage 122 of process 100.

[0087] Although the systems, methods, devices and their components have been described in terms of exemplary embodiments, they are not limited to these exemplary embodiments. The detailed description is to be construed as an example only and does not describe all possible embodiments of the invention, since describing all possible embodiments would be impractical, if not impossible. Many alternative embodiments can be implemented using either current technology or technology developed after the filing date of this patent, which would still fall within the scope of the claims that define the invention.

[0088] Those skilled in the art will understand that various modifications, variations and combinations can be made to the above-described embodiments without departing from the scope of the present invention, and such modifications, variations and combinations are to be construed as being within the scope of the concept of the present invention.

Claims

1. 1. A method for replicating the operation of an automated visual inspection (AVI) station, comprising: constructing an emulated AVI station to perform one or more AVI functions of the AVI station, the emulated AVI station including an emulated illumination system, an emulated imaging system, and emulated sample positioning hardware configured to hold and / or support a container containing a sample; capturing one or more container images with an imaging system of the AVI station while the container is illuminated by an illumination system of the AVI station; capturing one or more additional container images with the emulated imaging system while the container is illuminated by the emulated illumination system; determining, by one or more processors, one or more differences between the one or more additional container images and the one or more container images, where determining the one or more differences includes calculating one or more metrics indicative of imaging sensor noise of the one or more container images and the one or more additional container images; generating, by the one or more processors, one or more visual indications of suggestions for modifying the mimicked AVI station based on (i) the one or more differences, and / or (ii) the one or more metrics; modifying the emulated AVI station by modifying at least the emulated illumination system, the emulated imaging system, and / or the emulated sample positioning hardware based on the visual indication; The method includes:

2. 2. The method of claim 1, wherein either (i) the AVI station is included in commercial line equipment and the mimicked AVI station is a laboratory-based setup, or (ii) the mimicked AVI station is included in commercial line equipment and the AVI station is the laboratory-based setup.

3. Modifying the emulated AVI station includes: modifying the spatial arrangement of at least one illumination device of the emulated illumination system, at least one imaging device of the emulated imaging system and / or the emulated sample positioning hardware; and / or Modifying at least one illumination device of the emulated illumination system, at least one imaging device of the emulated imaging system and / or hardware components of the emulated sample positioning hardware. The method of claim 1 , comprising:

4. installing, on a computer system of said emulated AVI station, AVI software implementing inspection algorithms that are also implemented by the AVI equipment; After modifying the emulated AVI station, capturing one or more new container images with the emulated imaging system while the test container is illuminated by the emulated illumination system; determining one or more characteristics of the test container and / or a sample within the test container by processing the one or more new container images according to the inspection algorithm; The method of claim 1 further comprising:

5. 5. The method of claim 4, further comprising troubleshooting or optimizing the emulated AVI station based at least in part on the determined one or more characteristics, including modifying or further modifying the emulated illumination system, the emulated imaging system, the emulated sample positioning hardware, and / or the AVI software.

6. The method of claim 5 , further comprising modifying the AVI station in response to the modifications or further modifications to the emulated illumination system, the emulated imaging system, the emulated sample positioning hardware, and / or the AVI software.

7. the one or more container images include a first plurality of container images; the one or more additional container images include a second plurality of container images; and 2. The method of claim 1 , wherein identifying one or more differences between the one or more additional container images and the one or more container images includes identifying one or more differences between a first composite image obtained from the first plurality of container images and a second composite image obtained from the second plurality of container images.

8. Determining the one or more differences between the one or more additional container images and the one or more container images includes: Container alignment, Out of focus, strength, Intensity fluctuations, and / or Motion Blur The method of claim 1 , further comprising determining a difference with respect to:

9. 2. The method of claim 1, wherein determining the one or more differences between the one or more additional container images and the one or more container images comprises: (i) calculating a Fast Fourier Transform (FFT) of the one or more container images or a composite image derived therefrom; and (ii) calculating an FFT of the one or more additional container images or a composite image derived therefrom.

10. 2. The method of claim 1, wherein identifying the one or more differences between the one or more additional container images and the one or more container images comprises generating (i) a histogram of pixel intensity levels of the one or more container images or a composite image derived therefrom, and (ii) a histogram of pixel intensity levels of the one or more additional container images or a composite image derived therefrom.

11. 2. The method of claim 1 , wherein determining the one or more differences between the one or more additional container images and the one or more container images comprises calculating (i) a Laplacian of the one or more container images or a composite image derived therefrom, and (ii) a Laplacian of the one or more additional container images or a composite image derived therefrom.

12. 2. The method of claim 1, wherein (i) identifying the one or more differences and (ii) generating the visual indication are performed in real time as the one or more additional container images are captured.

13. 2. The method of claim 1, further comprising generating, by the one or more processors, one or more suggestions for modifying the mimicked AVI station based on the one or more differences, wherein generating the visual indication comprises generating the visual indication of the one or more suggestions.

14. Generating the one or more suggestions comprises: a proposal to modify one or more configurable settings of at least one imaging device of the emulated imaging system; - a proposal to modify one or more configurable settings of at least one lighting device of said mimicking lighting system; a proposal to modify the position of at least one imaging device of the emulated imaging system; and / or Proposal for modifying the position of at least one lighting device of the mimicking lighting system. The method of claim 13, comprising generating

15. the mimic sample positioning hardware is configured to move the container according to a movement profile; and The method of claim 13 , wherein generating the one or more suggestions comprises generating suggestions to modify one or more characteristics of the movement profile.

16. receiving, by the one or more processors, one or more operating parameters of the imaging system and one or more operating parameters of the emulated imaging system; comparing, by the one or more processors, the one or more operating parameters of the imaging system to the one or more operating parameters of the mimic imaging system; generating, by the one or more processors, an additional visual indication of at least one operating parameter that differs between the imaging system and the mimicking imaging system; The method of claim 1 further comprising:

17. 17. A non-transitory computer readable medium storing instructions that, when executed by one or more processors, cause the one or more processors to perform the method of any one of claims 1 to 16.

18. 1. An automated visual inspection (AVI) station, comprising: An imaging system; A lighting system; sample positioning hardware configured to hold and / or support a container containing the sample; an automated visual inspection (AVI) station including: a mimicking AVI station for performing one or more AVI functions of the AVI station, Imitation lighting system; An imitation imaging system; and a simulated sample positioning hardware configured to hold and / or support a container containing the sample. An imitation AVI station including: A computing system configured to carry out the method of any one of claims 1 to 16; A system including:

Citation Information

Patent Citations

  • Visual inspection apparatus and method thereof

    JP2004069673A

  • Image processing device, inspection system, image processing method, image processing program, computer-readable recording medium recording the program

    JP2009181508A

  • Image processing device and image processing method

    JP2013140042A

  • Information acquisition device, imaging device and information acquisition method

    JP2018000587A