Visual inspection method and system for injection molding and blow molding based on quality online monitoring
By combining cylindrical coordinates and virtual anchor point arrays with optical transfer function matrices, the problems of dynamic deformation of bottles and light interference on high-speed production lines were solved, achieving high-precision defect identification and automatic rejection, and improving real-time detection and production efficiency.
Patent Information
- Application Number
- CN202511638188.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-10
- Publication Date
- 2026-07-03
- Estimated Expiration
- 2045-11-10
AI Technical Summary
Existing technologies cannot effectively adapt to the dynamic deformation of bottles on high-speed production lines, nor can they accurately identify defect levels and suppress light interference. This makes it difficult to balance detection accuracy with production speed, and thus cannot meet the high-precision detection requirements of highly transparent bottles.
By constructing a cylindrical coordinate system and a virtual anchor point array, combined with the optical transfer function matrix and a multi-dimensional judgment model, we can achieve adaptive identification of dynamic deformation of the bottle and three-dimensional feature analysis of defects, eliminate false judgments due to light interference, and establish a multi-dimensional judgment model to accurately reject unqualified products and identify equipment malfunctions.
It achieves adaptive recognition of dynamic deformation of the bottle, eliminates false judgments due to light interference, accurately rejects unqualified products, improves the real-time performance of detection and the efficiency of production line operation, and ensures product quality.
Smart Images

Figure CN121437479B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of visual inspection technology, and more specifically, to a visual inspection method and system for injection molding and blow molding based on online quality monitoring. Background Technology
[0002] In the injection molding and blow molding production sectors, with the widespread adoption of high-speed production lines and the increasing demand for transparent materials, the problems of traditional fixed-area inspection being unsuitable for dynamic deformation, light interference leading to misjudgments, and the lack of quantitative defect assessment have become prominent. The synergy between accurate bottle defect identification, adaptive dynamic deformation detection, and efficient rejection of non-conforming products remains a key technical challenge for the industry.
[0003] In the prior art, Chinese Patent No. CN222652855U discloses a visual inspection device for the appearance of blow-molded parts. This device includes an inspection box, a placement table, and an inspection mechanism. The inspection mechanism includes inspection components, adjustment components, cleaning components, and brushing components. The cleaning component, in conjunction with the brushing component, quickly removes dust from the inspection components, facilitating the acquisition of clear images by the imaging device and improving the inspection effect. By optimizing image quality through dust removal, it solves the problem of misjudgment caused by contamination of the inspection components, and is suitable for preliminary screening of appearance defects in blow-molded parts. Chinese Patent No. CN116558438B discloses a blow-molded bottle quality inspection device and method. This device includes a first-angle laser projector, a second laser projector, a camera, a rotating fixture, and a support frame. It forms straight lines and arcs through laser projection, and photographs the arc segments to determine whether the blow-molded bottle is out of round. Combined with the rotating fixture, it achieves 360° inspection, improving the efficiency and accuracy of blow-molded bottle inspection. It achieves deformation judgment through laser line shape detection, providing an automated solution for blow-molded bottle shape defect detection.
[0004] However, while the two existing technologies mentioned above have some value in improving image clarity and detecting out-of-roundness of blow-molded bottles, they fail to address the core pain points of dynamic deformation adaptation, quantitative assessment of three-dimensional defect features, and suppression of light interference in current high-speed production scenarios. Specifically, the Chinese patent with authorization announcement number CN222652855U focuses on dust removal and cleaning of the detection component, without addressing adaptive detection area adjustment for dynamic deformation of the bottle body, and lacks three-dimensional feature analysis such as defect depth. The Chinese patent with authorization announcement number CN116558438B focuses on out-of-roundness detection of blow-molded bottles, but does not address the light interference problem of transparent materials, and can only determine shape defects, failing to achieve quantitative assessment of defect severity. Neither technology establishes a multi-dimensional judgment model, making it either difficult to adapt to the dynamic deformation during the blow molding process or unable to accurately distinguish defect levels. This results in an inability to provide early warning of quality risks caused by minor defects, and an inability to balance detection accuracy with production speed, failing to meet the refined quality control requirements of high-transparency, high-speed injection blow molding bottle production. Summary of the Invention
[0005] This invention is applicable to quality inspection scenarios in injection molding and blow molding production, especially suitable for high-cycle production lines and the high-precision inspection requirements of transparent bottles. By constructing a grid defect map using a cylindrical coordinate system, a virtual anchor point array, and a virtual anchor point reference position dataset, combined with a matching template and a set of displacement vectors, it achieves adaptive recognition of dynamic deformation of the bottle, solving the problem of poor adaptability of traditional fixed inspection areas. It utilizes optical transfer function matrices, abnormal pixel distribution data, and phase difference sets to calculate three-dimensional defect feature data, eliminating misjudgments caused by light interference and enabling quantitative defect analysis. Based on the three-dimensional defect feature data, a multi-dimensional judgment model is established, and a data inspection method incorporating a rejection system and a self-protection system is developed using a set of key parameters. This accurately rejects defective products and identifies equipment faults in real time, ensuring product quality while improving inspection real-time performance and production line efficiency.
[0006] To achieve the above objectives, the present invention provides the following technical solution:
[0007] Visual inspection methods for injection molding and blow molding based on online quality monitoring include:
[0008] Construct a cylindrical coordinate system for the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, and combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set; acquire and calculate the real-time position image set of the production line to obtain the displacement vector set, and mark the displacement vector set to obtain the mesh defect map;
[0009] In the mesh defect map, a target area is selected for data acquisition, and an optical transfer function matrix is established; the bottle reference image is calculated to obtain abnormal pixel distribution data; the optical transfer function matrix and abnormal pixel distribution data are calculated to obtain a phase difference set; the phase difference set is calculated to obtain the three-dimensional feature data of the defect.
[0010] The three-dimensional feature data of defects are judged to obtain the judgment results of the multi-dimensional judgment model. The judgment results of the multi-dimensional judgment model are combined with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain the key parameter set. A data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment is formulated based on the key parameter set.
[0011] Furthermore, the method for constructing the cylindrical coordinate system of the bottle includes:
[0012] Obtain the set of three-dimensional coordinate points of the bottle bottom and bottle mouth, calculate the set of three-dimensional coordinate points of the bottle bottom and bottle mouth to obtain the coordinates of the geometric center of the bottle bottom plane and the geometric center of the bottle mouth plane.
[0013] The line connecting the geometric center coordinates of the bottom plane and the geometric center coordinates of the mouth plane is taken as the central axis of the bottle body. The straight line distance perpendicular to the central axis from any point on the cross-section of the bottle body is taken as the radial distance. The geometric center coordinates of the bottom of the bottle body are taken as the origin O, the origin O is taken as the center of rotation, the central axis of the bottle body is taken as the axis of rotation, and the angle of the circumferential orientation of any point on the cross-section of the bottle body around the axis of rotation is called the circumferential angle.
[0014] A cylindrical coordinate system is constructed with the geometric center coordinates of the bottle bottom as the origin O, the central axis of the bottle body as the Z-axis, the radial distance as the r-axis, and the circumferential angle as the θ-axis.
[0015] Furthermore, the method for acquiring the bottle reference image and the bottle 3D point cloud set, and combining the bottle 3D point cloud set with virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set includes:
[0016] Q sampling points are set on the surface of the bottle. The Q sampling points are photographed from multiple angles and scanned in three dimensions to obtain the reference image and three-dimensional point cloud of the Q sampling points. The reference images of the Q sampling points are stitched together to form a reference image of the bottle covering the entire surface of the bottle. The three-dimensional point clouds of the Q sampling points are combined to obtain a set of three-dimensional point clouds of the bottle.
[0017] Using each virtual anchor point in the virtual anchor point array as the search center, the sampling point closest to the corresponding virtual anchor point in the three-dimensional point cloud set of the bottle is searched by the search radius. The three-dimensional point cloud of the sampling point is combined with the corresponding virtual anchor point to obtain the reference position data of the corresponding virtual anchor point. The reference position data of all virtual anchor points are combined into a set of virtual anchor point reference position data.
[0018] Furthermore, the method for acquiring a set of real-time position images of the production line and calculating the set of displacement vectors includes:
[0019] Create a pixel region as a matching template for each virtual anchor point;
[0020] Capture the real-time position image set of the production line in production status. The real-time position image set of the production line refers to the continuous shooting of the bottle, conveying component, data acquisition station and rejection station from a fixed camera angle. The resulting image sequence of the bottle, the conveying component, the data acquisition station and the rejection station are composed of four image sequences and the shooting timestamps of the four image sequences are consistent.
[0021] Search the bottle image sequence in the real-time position image set of the production line to obtain multiple candidate matching blocks. Combine the candidate matching blocks with the matching template to calculate the correlation coefficient. Among the multiple candidate matching blocks, the candidate matching block with the largest correlation coefficient obtained by combining with the matching template is combined with the matching template to obtain the final matching point of the virtual anchor point.
[0022] The radial, circumferential, and axial displacements of the virtual anchor points are calculated for the final matching points; the displacement vector magnitudes of the virtual anchor points are also calculated based on the radial, circumferential, and axial displacements of the virtual anchor points.
[0023] The displacement vector magnitudes, radial displacements, circumferential displacements, and axial displacements of all virtual anchor points are combined to obtain a set of displacement vectors.
[0024] Furthermore, the method for selecting a target region in the mesh defect map for data acquisition and establishing an optical transfer function matrix includes:
[0025] Different numbers of light sources are configured for different target areas. Each light source emits coded light to the bottle. The coded light path emission data and the light intensity emitted by each light source are recorded. The coded light path emission data includes the cylindrical coordinates of the light source, the emission angle of the light source, and the light intensity distribution.
[0026] After the encoded light passes through the bottle, the actual received light intensity is received by the sensor. The light intensity transmission ratio is calculated by comparing the light intensity emitted by the light source with the actual received light intensity.
[0027] Construct an optical transfer function matrix M, whose number of rows consists of the number of light sources and whose number of columns consists of the total number of sensor pixels. Any element in the matrix represents the proportion of light intensity transfer formed at the j-th pixel of the sensor after the coded light emitted by the i-th light source passes through the bottle.
[0028] Furthermore, the method for calculating the phase difference set to obtain the three-dimensional feature data of the defect includes:
[0029] The optical path deviation is calculated by using the phase difference set, and the defect depth is obtained by combining the optical path deviation with the emission angle of the light source.
[0030] Transform the cylindrical coordinates of the light source into three-dimensional coordinates of the light source in a rectangular coordinate system, and construct the three-dimensional coordinates of the defect using the three-dimensional coordinates of the light source.
[0031] The surface area of the defect is calculated from the abnormal pixel distribution data; the defect volume is then calculated using the surface area and depth of the defect.
[0032] The 3D coordinates, depth, and volume of all abnormal pixels are combined to obtain the 3D feature data of the defect.
[0033] Furthermore, the method for judging the three-dimensional feature data of defects to obtain the judgment result of the multi-dimensional judgment model includes:
[0034] By combining grid defect maps, 3D defect feature data, and abnormal pixel distribution data as conditions, potential defective products are screened out.
[0035] Using the set of displacement vectors as a basis for judgment, we can further determine whether a potential non-conforming product is a non-conforming product or a conforming product.
[0036] Potentially non-conforming products, non-conforming products, and conforming products constitute the judgment results of the multi-dimensional assessment model.
[0037] Furthermore, the method for combining the judgment results of the multi-dimensional analysis model with the three-dimensional feature data of defects and the real-time location images of the production line to obtain a set of key parameters includes:
[0038] A defective bottle is extracted from the results of the multi-dimensional judgment model. The three-dimensional coordinates of the defect corresponding to the defective bottle are extracted from the three-dimensional feature data of the defect. A series of consecutive multi-frame bottle images, data acquisition station image sequences, and rejection station image sequences of the defective bottle are extracted from the real-time position image set of the production line. The series of consecutive multi-frame bottle images, data acquisition station image sequences, and rejection station image sequences are calculated to obtain the conveying speed of the conveying component and the physical distance between the data acquisition station and the rejection station under actual working conditions.
[0039] The physical distance between the data acquisition station and the rejection station, as well as the conveying speed of the conveying components, are calculated to obtain the movement time of the defective bottle from the data acquisition station to the rejection station.
[0040] The key parameter set is obtained by combining the conveying speed of all non-conforming products' conveying components, the physical distance between the data acquisition station and the rejection station, the three-dimensional coordinates of the defects corresponding to the non-conforming products, and the movement time.
[0041] Furthermore, the data detection method includes:
[0042] Extract the movement time of a single non-conforming product from the set of key parameters, send a rejection trigger signal to the rejection station based on the movement time, reject the non-conforming product according to the rejection trigger signal, generate a unique defect ID for each non-conforming product, and record and store each non-conforming product.
[0043] When the three-dimensional coordinates of defects of E consecutive non-conforming products are concentrated within the same circumferential angle deviation range and the absolute value of the radial displacement of the non-conforming products is greater than the allowable deviation of the bottle wall thickness, it is judged as local wear of the mold cavity.
[0044] When the three-dimensional coordinates of defects of E consecutive defective products are concentrated within a fixed axial range, and the absolute value of the axial displacement of the defective products is greater than the height allowable deviation, it is determined to be a misalignment of the mold parting surface.
[0045] If the absolute value of the radial displacement of E consecutive defective products is greater than the allowable deviation of the bottle wall thickness and the three-dimensional coordinates of the defects of the defective products are concentrated within the circumference of the bottle, it is determined that the equipment pressure control is abnormal.
[0046] If the absolute value of the axial displacement of E consecutive defective products is greater than the allowable deviation of the bottle height, and the three-dimensional coordinates of the defects of the defective products are concentrated within the axial range of the bottle, it is determined to be an equipment positioning deviation.
[0047] When a problem is identified as localized wear of the mold cavity, misalignment of the mold parting surface, abnormal equipment pressure control, or equipment positioning deviation, information is sent to maintenance personnel in real time for repair.
[0048] A visual inspection system for injection molding and blow molding based on online quality monitoring, used to implement the aforementioned visual inspection method for injection molding and blow molding based on online quality monitoring, the system comprising:
[0049] Mesh Defect Module: Used to construct the cylindrical coordinate system of the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set; acquire the production line real-time position image set and calculate to obtain the displacement vector set, mark the displacement vector set to obtain the mesh defect map;
[0050] 3D Defect Module: Used to select target areas in the mesh defect map for data acquisition and establish the optical transfer function matrix; calculate the abnormal pixel distribution data of the bottle reference image; calculate the phase difference set by combining the optical transfer function matrix and the abnormal pixel distribution data; and calculate the 3D feature data of the defect by combining the phase difference set.
[0051] Data detection module: used to judge the three-dimensional feature data of defects and obtain the judgment results of the multi-dimensional judgment model; combine the judgment results of the multi-dimensional judgment model with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain the key parameter set, and formulate a data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment based on the key parameter set.
[0052] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0053] This invention constructs a mesh defect map by combining a cylindrical coordinate system, a virtual anchor point array, and a virtual anchor point reference position dataset with a matching template and a set of displacement vectors. This enables adaptive recognition of dynamic deformation of the bottle, solving the problem that traditional fixed detection areas cannot adapt to dynamic deformation of the bottle. By using the optical transfer function matrix, abnormal pixel distribution data, and phase difference set to calculate the three-dimensional feature data of defects, it eliminates misjudgments caused by light interference in the detection of transparent materials. At the same time, it enables quantitative analysis of defect depth and volume, solving the problem of lack of quantitative assessment of defects in traditional detection. Based on the three-dimensional feature data of defects, a multi-dimensional judgment model is established. Combined with the key parameter set, a data detection method including a rejection system and a self-protection system is formulated. This not only accurately rejects unqualified products to avoid missed or incorrect rejections, but also identifies mold and equipment faults in real time to reduce the lag of manual inspection, ensuring product quality while improving the real-time performance of detection and the efficiency of production line operation. Attached Figure Description
[0054] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0055] Figure 1 A flowchart of a visual inspection method for injection molding and blow molding based on online quality monitoring is provided for embodiments of the present invention.
[0056] Figure 2 This is a flowchart illustrating the triggering criteria for mold protection in the self-protection system of this invention.
[0057] Figure 3 This is a flowchart illustrating the triggering criteria for device protection by the self-protection system in this embodiment of the invention.
[0058] Figure 4 This is a functional block diagram of the visual inspection system for injection molding and blow molding based on online quality monitoring in this invention. Detailed Implementation
[0059] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0060] Example 1
[0061] Please see Figure 1As shown, this embodiment provides a visual inspection method for injection molding and blow molding based on online quality monitoring, including:
[0062] Step S10: Construct a cylindrical coordinate system for the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, and combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain a virtual anchor point reference position data set; acquire and calculate the real-time position image set of the production line to obtain a displacement vector set, and mark the displacement vector set to obtain a mesh defect map.
[0063] Further, step S10 includes:
[0064] Step S11: Perform a three-dimensional scan of the bottle bottom and bottle mouth to obtain a set of three-dimensional coordinate points of the bottle bottom and bottle mouth. Construct a cylindrical coordinate system for the bottle body based on the set of three-dimensional coordinate points, and divide the cylindrical coordinate system into a virtual anchor point array composed of virtual anchor points.
[0065] n sampling points are set on the bottom plane of the bottle. A laser rangefinder is used to perform a 3D scan on the n sampling points to obtain the 3D coordinates of the n sampling points. The 3D coordinates of the n sampling points are combined to form a set P of 3D coordinates of the bottom of the bottle. The number of sampling points, n, is set based on the physical dimensions of the bottle bottom, the required detection accuracy, the scanning frequency of the laser rangefinder, and the constraints of the industrial production line cycle time. This represents the three-dimensional coordinates of the nth sampling point. , , These represent the horizontal position, vertical distance, and height distance of the nth sampling point on the bottom plane of the bottle, respectively, pointing towards the bottle opening.
[0066] The coordinates of the bottom three-dimensional coordinate points are fitted using the least squares method to obtain the coordinates of the geometric center of the bottom plane. The same method is used to obtain the coordinates of the mouth three-dimensional coordinate points, which are then fitted using the least squares method to obtain the coordinates of the mouth plane's geometric center. The line connecting the bottom and mouth planes is taken as the bottle's central axis. The straight-line distance perpendicular to the central axis from any point on the bottle's cross-section is taken as the radial distance *r*. The origin *O* is taken as the bottom geometric center, and the central axis is taken as the rotation axis. The angle of any point on the bottle's cross-section about the rotation axis is called the circumferential angle. , Calculated using the arctangent function, the formula is as follows: ,in, , This represents the X and Y coordinate values of any point on the cross-section of the bottle in three dimensions. For example... The values corresponding to the X and Y axes are , .
[0067] Establish a cylindrical coordinate system with the origin O as the geometric center of the bottle bottom, the Z-axis as the central axis of the bottle body, the radial distance as the r-axis, and the circumferential angle as the θ-axis.
[0068] In a cylindrical coordinate system, a virtual anchor point array is defined. The virtual anchor point array is constructed as follows: using the geometric center coordinates of the bottle bottom and the central axis of the bottle as references, J virtual radial anchor points, K virtual circumferential anchor points, and L virtual axial anchor points are set in the radial, circumferential, and axial directions, respectively. A virtual anchor point array is formed by several virtual anchor points. J, K, and L are set according to the radial, circumferential, and axial dimensions of the bottle and the required deformation detection accuracy, ensuring that the radial surface of the bottle is densely covered. The maximum diameter D of the bottle and the height H of the bottle's central axis are measured using a laser rangefinder, and the theoretical spacing in the three directions is calculated. The theoretical spacing includes the radial spacing d1, the circumferential angular spacing d2, and the axial spacing d3. The radial spacing d1 represents the distance between two adjacent virtual anchor points in the radial direction. The circumferential angular spacing d2 represents the angular difference between two adjacent virtual anchor points along the circumference of the bottle. The axial spacing d3 represents the height difference between two adjacent virtual anchor points along the central axis of the bottle. .
[0069] Step S12: Obtain the reference image of the bottle and the three-dimensional point cloud set of the bottle. Combine the virtual anchor points of the virtual anchor point array with the three-dimensional point cloud set of the bottle to obtain the reference position data set of the virtual anchor points.
[0070] Q sampling points are set on the surface of the bottle. Multi-angle, surround-view photography is performed on these Q sampling points to obtain baseline images. These baseline images are then stitched together to form a baseline image covering the entire surface of the bottle. A 3D scan is then performed on the Q sampling points to obtain a 3D point cloud for each point. These 3D point clouds are then combined to obtain a set of 3D point clouds for the entire bottle. The value of Q is set based on the physical dimensions of the entire bottle surface to ensure coverage of the search range for all virtual anchor points.
[0071] Using each virtual anchor point in the virtual anchor point array as the search center, the nearest sampling point to the corresponding virtual anchor point in the 3D point cloud set of the bottle is searched using a search radius. The collected data of the sampling point is combined with the corresponding virtual anchor point to obtain the reference position data of the corresponding virtual anchor point. The reference position data of all virtual anchor points constitute the virtual anchor point reference position data set. The search radius is set based on the theoretical spacing in three directions, exemplarily set to half of the minimum theoretical spacing in the three directions, to ensure the uniqueness and accuracy of the matching. The reference position data of a single virtual anchor point includes the 3D coordinate position of the single virtual anchor point, the r-value in cylindrical coordinates, and... For ease of distinction, the r-value, Z-value, and 3D coordinates under a single virtual anchor point cylindrical coordinate system are used. The Z-value and Z-value are respectively represented as , , .
[0072] Step S13: Construct a matching template for the virtual anchor point, obtain a set of real-time position images of the production line, search for candidate matching blocks from the set of real-time position images of the production line, combine the candidate matching blocks with the matching template to obtain the final matching point, and combine the set of virtual anchor point reference position data with the final matching point to calculate and obtain a set of displacement vectors.
[0073] The pixel coordinates corresponding to each virtual anchor point in the reference image are located using camera calibration parameter technology. A pixel region is created as a matching template for each virtual anchor point, centered on the pixel coordinates. For example, a 3×3 pixel region is created. The matching template includes the pixel corresponding to the virtual anchor point's pixel coordinates and the grayscale values surrounding those pixel coordinates.
[0074] A camera is used to capture a real-time image set of the production line during production. This real-time image set refers to the continuous capture of images of the bottle, conveyor components, data acquisition station, and rejection station from a fixed camera perspective. The resulting image sequences are: bottle image sequence, conveyor component image sequence, data acquisition station image sequence, and rejection station image sequence. These four image sequences constitute the real-time image set, and their capture timestamps are consistent. The conveyor components refer to the mechanisms that transport the bottles, such as chains or conveyor belts. The data acquisition station is a specific station used to collect defect detection data for the bottle, aiming to monitor the status of the detection equipment and determine whether the detection components are functioning properly. The rejection station is a specific station used to automatically reject defective bottles, aiming to accurately trigger rejection actions and verify the rejection effect.
[0075] Within the search range of the real-time position image set of the production line, a sliding window method is used to search the bottle images to obtain multiple candidate matching blocks. The search range is set according to the actual operating speed and measurement accuracy of the production line, aiming to avoid an excessively large range that would reduce real-time detection, or an excessively small range that would miss the offset of the virtual anchor point caused by minor jitter. The size of the candidate matching blocks is set to the same size as the pixel area of the virtual anchor point. The multiple candidate matching blocks and their corresponding matching templates are correlated using a normalized cross-correlation algorithm to obtain correlation coefficients, ranging from [0,1]. The candidate matching block with the largest correlation coefficient is selected and combined with the matching template to obtain the final matching point of the virtual anchor point. The final matching point represents the optimal matching position of the virtual anchor point in the real-time position image set of the production line under production conditions, and is composed of the real-time radial coordinate value, circumferential angle value, and axial coordinate value in cylindrical coordinate system. .
[0076] The radial displacement of the virtual anchor point is calculated by combining the final matching point of the virtual anchor point with the reference position data set of the virtual anchor point. Circumferential displacement axial displacement Radial displacement represents the change in position perpendicular to the central axis of the bottle, and is used to detect changes in the bottle wall thickness. ,when A value greater than 0 indicates localized expansion of the bottle. When <0, it indicates that the bottle has partially shrunk. When the value is 0, it indicates that the bottle wall thickness is normal and unchanged. Circumferential displacement represents the angular change of the virtual anchor point around the bottle's central axis, used to identify torsional deformation of the bottle. , The positive and negative signs represent clockwise and counterclockwise directions, respectively. When the displacement exceeds the circumferential displacement threshold, it indicates that the bottle itself has undergone substantial torsional deformation. The circumferential displacement threshold is set according to the bottle's manufacturing process and quality requirements. Axial displacement represents the change in position parallel to the bottle's central axis and is used to identify deformation in the bottle's height direction. when When >0, it indicates localized tensile deformation of the bottle body. When <0, it indicates local compression deformation of the bottle body; when When = 0, it indicates that there is no axial deformation of the bottle.
[0077] The deformation in three independent directions is converted into the overall deformation strength index, namely the displacement vector magnitude of the virtual anchor point, and the displacement vector magnitude of a single virtual anchor point is calculated. , ,in, Since it is an angular quantity, it needs to be multiplied with the radial reference distance to convert it into a linear position. The displacement vector magnitude, radial displacement, circumferential displacement, and axial displacement of all virtual anchor points are combined to obtain a set of displacement vectors.
[0078] Step S14: Determine the set of displacement vectors, construct a virtual mesh, calculate the average mesh element deformation intensity using the set of displacement vectors, determine the average mesh element deformation intensity, and obtain the mesh defect map.
[0079] Perform deformation threshold judgment on the set of displacement vectors, and mark the deformation sensitive area when the magnitude of the displacement vector exceeds the deformation threshold.
[0080] In the virtual anchor point array, arbitrarily select a virtual anchor point as the initial node. Using the initial node as the reference, connect adjacent radial and axial virtual anchor points to form the basic edge of the grid cell. That is, the radial basic edge length of the grid cell is equal to the difference in the radial direction distance between two radially adjacent virtual anchor points, and the axial basic edge length is equal to the difference in the axial direction distance between two axially adjacent virtual anchor points. Then, connect the virtual anchor points at adjacent circumferential angles along the circumferential direction with the same logic, so that the radial, axial, and circumferential virtual anchor points are connected to form a continuous grid line, and finally enclose a virtual grid covering the entire surface of the bottle.
[0081] Calculate the average mesh element deformation intensity of each mesh in the virtual mesh. When the virtual mesh contains at least one virtual anchor point, the average mesh element deformation intensity is the average displacement vector magnitude of all virtual anchor points. When there are no virtual anchor points in the virtual mesh, one mesh element is diffused in the radial direction (left and right) and the axial direction (up and down). The displacement vector magnitude of all virtual anchor points in the adjacent meshes is extracted, and the average mesh element deformation intensity is the average displacement vector magnitude of all virtual anchor points in the adjacent meshes. If there are no virtual anchor points in the diffused mesh elements in the radial and axial directions, one more mesh element is added in each direction to continue the diffusion until there are virtual anchor points in the diffused mesh elements.
[0082] The average deformation intensity of each virtual mesh cell is determined to obtain the mesh region, which includes normal, slight, and severe regions. When, it indicates that the bottle surface area corresponding to the virtual grid unit is without deformation, that is, the normal area, where, The normal deformation threshold is set based on the elastic modulus and wall thickness tolerance of the bottle material. For example, for PET bottles, the normal deformation threshold can be set to the modulus value corresponding to the material's elastic deformation limit. When, it indicates that the bottle surface area corresponding to the virtual mesh unit has slight deformation, i.e., a slight area, where, The critical deformation threshold is set based on the normal deformation threshold; for example, it is set to 1.5 to 2 times the normal deformation threshold. When the virtual grid cell corresponds to a bottle surface area with significant deformation, it indicates a severely deformed area.
[0083] The areas identified by the virtual mesh are distinguished by color coding; for example, severe areas, minor areas, and normal areas are marked with red, yellow, and green, respectively. All color-coded virtual meshes are combined to obtain a mesh defect map.
[0084] Step S10 utilizes a cylindrical coordinate system, a virtual anchor point array, a virtual mesh, a virtual anchor point reference position dataset, and a mesh defect map to achieve adaptive identification of high-incidence locations of packaging bottle defects, solving the technical problem that traditional fixed inspection areas cannot adapt to the dynamic deformation of the bottle. In existing technologies, most inspections rely on multi-dimensional coordinate transformations in a Cartesian coordinate system, which involves complex computational logic, high data processing latency, and difficulty meeting the demands of high-speed production lines. Furthermore, defect locations are only marked with abstract coordinates, making it difficult for operators to quickly pinpoint specific problem areas. The cylindrical coordinate system avoids complex three-dimensional transformation calculations, reducing computational complexity and improving the real-time performance of the inspection system. In existing technologies, traditional visual inspection often uses a fixed inspection point mode, which cannot cover the dynamic deformation of the bottle caused by temperature fluctuations and pressure changes during production, easily leading to the omission of high-incidence defect areas such as sidewalls and transition rounded corners. The virtual mesh and virtual anchor point array ensure full coverage and high accuracy of deformation, while the mesh defect map makes specific defect locations more clearly visible.
[0085] Step S20: Select the target area in the mesh defect map for data acquisition and establish the optical transfer function matrix; calculate the abnormal pixel distribution data of the bottle reference image, calculate the phase difference set of the optical transfer function matrix and the abnormal pixel distribution data, and calculate the three-dimensional feature data of the defect.
[0086] Furthermore, S20 includes:
[0087] Step S21: Select the target area in the mesh defect map, configure the light source for the target area, receive the coded light emitted by the light source, record the coded light path emission data of the light source, and establish the optical transfer function matrix.
[0088] On the mesh defect map, severely affected and slightly affected areas are prioritized as target areas. A ring light source array method is used, configuring different numbers of light sources for different target areas. Each light source emits coded light rays to the bottle body. The coded light path emission data of each light source is recorded using structured light coding technology. The coded light path emission data includes the light source cylindrical coordinates, the light source emission angle, and the light intensity distribution. The number of light sources is set according to the number of circumferential virtual anchor points and axial anchor points in the target area to ensure that each mesh cell is covered. The light source cylindrical coordinates are used to define the position of the light source in space. The light source cylindrical coordinate r value is the radial distance from the light source to the central axis of the bottle body, the θ value is the angle of the light source in the circumferential direction of the bottle body, and the Z value is the height of the light source along the central axis of the bottle body. The light source emission angle refers to the angle between the emission direction of the light source and the central axis of the bottle body. The light intensity distribution refers to the intensity distribution characteristics of the light source emitted in different directions in space.
[0089] The sensor receives coded light emitted by a light source and converts the optical signal into an electrical signal. This electrical signal is then converted into a digital signal via analog-to-digital conversion (ADC) to obtain a pixel intensity matrix. The intensity value of each pixel corresponds to the light intensity response of the light source at a specific location. The pixel intensity matrix is set according to the sensor's resolution; for example, if the sensor resolution is 256×256, the order of the pixel intensity matrix is 256×256. The pixel intensity value represents the numerical value of the light intensity received by a single pixel on the sensor, obtained through analog-to-digital conversion. The intensity response represents the feedback generated on the corresponding pixel of the sensor after the coded light emitted by the light source passes through a specific location on the bottle.
[0090] Construct an optical transfer function matrix M, where the number of rows is determined by the number of light sources and the number of columns is determined by the total number of sensor pixels. Any element in the matrix... This represents the light intensity transfer ratio formed at the j-th pixel of the sensor after the coded light emitted by the i-th light source passes through the bottle. Here, i and j represent the row index and column index, respectively. The light intensity transfer ratio is obtained by recording the light intensity emitted by the light source using structured light coding technology. When emitted light passes through the bottle, it undergoes refraction and attenuation. The optical path length t is calculated using a ray tracing algorithm, the light intensity value I of the receiving pixel is calculated using Beer-Lambert's law, and the actual received light intensity I2 of the sensor is calculated using a fast Fourier transform algorithm. The light intensity transfer ratio W is also calculated. The formula for Beer-Lambert's law is as follows: α represents the absorption coefficient of the bottle material, which is set according to the bottle material, such as PET. =0.02.
[0091] Step S22: Obtain a reference image based on the baseline image to obtain abnormal pixel distribution data. Calculate the optical transfer function matrix in conjunction with the abnormal pixel distribution data to obtain a phase difference set.
[0092] Following the method for acquiring reference images described in step S12, a set of reference images of a standard defect-free bottle is acquired, namely, a standard image set. The standard image set is also scanned at Q sampling points to obtain Q reference images of the standard defect-free bottle. The Q reference images of the standard defect-free bottle form a standard image set. Sinusoidal fringe structured light is emitted through structured light coding technology so that the structured light covers the surface of the standard defect-free bottle. After the structured light is reflected or refracted by the surface of the defect-free bottle, the light signal is received by the camera sensor. The light signal is converted into a digital signal through analog-to-digital conversion. The digital signal is the light intensity value, which completely covers every pixel of the reference image set. The pixel coordinates of each reference image in the standard image set are associated with the light intensity value of the corresponding pixel to obtain a reference image P1. The light intensity value of any pixel coordinate (u, v) on the reference image is P1(u, v). For any real-time image P2 of a bottle to be inspected, the light intensity value of the corresponding pixel coordinate (u1, v1) is P2(u1, v1). The real-time image represents a single bottle that has not yet been determined to be qualified. Under the same acquisition conditions as the standard defect-free bottle reference image P1, the image containing the pixel information of the bottle surface is captured in real time.
[0093] The reference image and the image of the bottle to be detected are combined to calculate the pixel-level difference Q. When the pixel-level difference exceeds the anomaly threshold, the corresponding pixel in the bottle image to be inspected is marked as an anomaly pixel; otherwise, it is considered a normal pixel. The anomaly threshold is set to three times the standard deviation of the light intensity of the reference image, based on normal distribution statistical theory. The number of reference images ensures that normal light intensity fluctuations are filtered out, capturing real defects and reducing the false positive rate. The anomaly pixel distribution data S is obtained by combining all pixels of a single bottle to be inspected. This data includes the coordinates and pixel-level differences of the anomaly pixels.
[0094] Structured light coding technology is used to emit sinusoidal fringe structured light, and four-frame phase-shifted structured light images of all abnormal pixels of a single bottle under inspection are acquired to obtain the light intensity values of the four-frame structured light images. The four-frame phase shift represents four sequentially shifted fringe phase images acquired by the camera from the same acquisition viewpoint. The phase shift amount is set according to phase accuracy requirements, ambient light interference intensity, and the matching of camera frame rate with production line cycle time. The purpose is to eliminate ambient light interference and sensor noise. The light intensity values of the four-frame structured light images are represented as L1, L2, L3, and L4, respectively. The actual acquired phase is calculated using a four-step phase shift algorithm. , Where i and j correspond to the row and column indices of the optical transfer function matrix, respectively; the actual phase represents the actual phase value of the structured light after reflection from the bottle; and L1, L2, L3, and L4 represent the light intensity values corresponding to the first, second, third, and fourth frames of the four-frame structured light images with sequentially shifted phases.
[0095] Calculate the phase delay of a defect-free light source The phase delay of a defect-free light source refers to the phase delay that occurs when light rays pass through a defect-free bottle. This is distinct from the normal phase loss caused by defects, preventing the misinterpretation of normal changes as abnormal changes caused by defects. For example, if the light ray from the i-th light source is considered as a defect-free light ray, then the phase delay of the i-th light source is... , The use of 2π is because it corresponds to one complete cycle of a sine wave. The refractive index of the bottle indicates the refractive index of the bottle material and is an inherent property of the bottle material. This represents the actual optical path length of the i-th light source passing through the defect-free bottle, obtained according to the ray tracing algorithm described in step S21. The wavelength of the structured light emitted by the i-th light source is an inherent property of structured light and is obtained from the device nameplate.
[0096] The phase difference is obtained by calculating the difference between the actual sampled phase of the abnormal pixel and the phase delay of the light source. , The phase differences of all abnormal pixels in a single bottle to be inspected are combined to obtain a phase difference set.
[0097] Step S23: Calculate the phase difference set to obtain the defect depth. Based on the coded optical path emission data, convert the light source cylindrical coordinates into the defect three-dimensional coordinates. Calculate the defect depth to obtain the defect volume. Combine the defect three-dimensional coordinates, defect depth, and defect volume to obtain the defect three-dimensional feature data.
[0098] Calculate optical path deviation using phase difference set t, Optical path deviation represents the difference between the optical path length of light passing through a defective bottle and that passing through a defect-free bottle, and is used to connect the phase difference with the defect depth; optical path deviation is combined with the emission angle of the light source. Calculate the depth of the defect Defect depth represents the depth of the defect in the direction perpendicular to the bottle surface. The depths of all defects in a single bottle under test are statistically analyzed and combined to form a defect depth dataset. The mean of the defect depth dataset is then calculated using the mean formula and the standard deviation formula. Standard deviation of the defect depth dataset .
[0099] The cylindrical coordinates of the light source described in step S21 are transformed into three-dimensional coordinates of the light source in a rectangular coordinate system. ,in, This represents the radial distance from the light source to the Z-axis. , This represents the horizontal distance of the light source perpendicular to the Z-axis. , This indicates the height position of the light source along the central axis of the bottle. The three-dimensional coordinates of the defect are constructed using the three-dimensional coordinates of the light source. The three-dimensional coordinates of the defect are used to describe the physical location of the defect on the bottle body, where, The X-axis coordinate represents the defect within a cross-section perpendicular to the central axis of the bottle. , The Y-axis coordinate represents the defect within a cross-section perpendicular to the central axis of the bottle. , The Z-axis coordinate represents the defect in a direction parallel to the central axis of the bottle. .
[0100] Calculate the volume of the defect: Using the number of pixels in the abnormal pixel distribution data (for example, let's say N) and the physical size p of the sensor pixels, determined according to the sensor nameplate, calculate the surface area of the defect. , The defect volume V is calculated using the surface area and depth of the defect. 缺 Considering the possibility of irregular defects, the coefficient of variation is calculated based on the defect depth. , The coefficient of variation is used to determine whether the depth distribution of all defects in a single tested bottle is uniform overall. When the value is less than or equal to the variation threshold, it indicates that the depth distribution of all defects in a single tested bottle is uniform overall. ,when When the depth exceeds the variation threshold, it indicates that the overall depth distribution of all defects in a single tested bottle is non-uniform, and the defect volume needs to be calculated by integration based on the actual depth of each defect. , in the formula, , These represent the upper and lower limits of the defect projection region on the X-axis of the rectangular coordinate system. , These represent the upper and lower limits of the defect projection area on the Y-axis of a Cartesian coordinate system. The upper and lower limits of the X and Y axes are determined based on abnormal pixel distribution data and the physical size of sensor pixels. The variation threshold is set based on the material characteristics of the bottle, the required defect depth detection accuracy, and production line quality standards.
[0101] The 3D coordinates, depth, and volume of all abnormal pixels are combined to obtain the 3D feature data of the defect.
[0102] Step S20 utilizes the optical transfer function matrix, abnormal pixel distribution data, coded optical path emission data, and three-dimensional defect feature data to achieve high-precision optical enhancement recognition of bottle defects. This solves the technical problems of misjudgment caused by light interference, ambiguous spatial positioning of defects, and cumbersome volume calculation processes in traditional transparent material detection. In existing technologies, the detection of PET or transparent materials often misjudges normal light intensity fluctuations as defects due to stray light interference from ambient light reflection and scratches on the bottle surface. The optical transfer function matrix eliminates the interference of ambient light fluctuations and sensor noise on detection, providing a reliable reference for defect anomaly recognition. In existing technologies, defect positioning relies solely on the pixel coordinates of two-dimensional images, failing to obtain depth information perpendicular to the bottle surface, leading to distorted defect morphology judgment. Furthermore, defect volume is often roughly estimated using the product of projected area and a fixed depth coefficient, without considering uneven depth distribution, making it difficult to support accurate quality assessment. In contrast, the phase difference set effectively correlates light signal changes with defect physical morphology, providing core data support for defect depth inference, and the three-dimensional defect feature data provides accurate defect information support for subsequent rejection decisions.
[0103] Step S30: Judge the three-dimensional feature data of the defect to obtain the judgment result of the multi-dimensional judgment model; combine the judgment result of the multi-dimensional judgment model with the three-dimensional feature data of the defect and the real-time position image set of the production line to obtain the key parameter set, and formulate a data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment for the key parameter set.
[0104] Further, step S30 includes:
[0105] Step S31: Use a multi-dimensional judgment model to detect the three-dimensional feature data of the defect and obtain the judgment result of the multi-dimensional judgment model.
[0106] The multi-dimensional analysis model consists of two parts: preliminary judgment and precise verification. Precise verification is a further verification of the conditions that meet the preliminary judgment.
[0107] The preliminary judgment criteria include the grid defect map, 3D defect feature data, and abnormal pixel distribution data. These criteria cover the entire process from location to quantification, avoiding misjudgments based on a single dimension and balancing generality with specificity. The aim is to improve the confidence level of the judgment and screen out potential non-conforming products. If the grid defect map of the bottle to be tested contains a severely affected area marked in red, or if the defect volume in the 3D defect feature data exceeds a volume threshold, or if the pixel difference in the abnormal pixel distribution data exceeds an abnormality threshold, then it is preliminarily judged as a potential non-conforming product; otherwise, it is considered a qualified product. The volume threshold is set comprehensively based on the physical properties of the bottle material, product quality standards, the impact of the defect on the bottle's functionality, and the required detection accuracy.
[0108] Precise verification further validates potentially non-conforming products, confirming whether they are indeed non-conforming. Precise verification uses a set of displacement vectors as the judgment criterion, and quantitative verification through this set of displacement vectors can solve problems such as misjudgment of defective products, ambiguous defect location, and poor verification efficiency. For example, radial displacement... The absolute value is greater than the allowable deviation of the bottle wall thickness, or the axial displacement. If the absolute value of the defect exceeds the allowable deviation of the bottle height, the potential non-conforming product is determined to be a non-conforming product. At the same time, multiple experts determine the defect type of the bottle to be tested, such as uneven wall thickness or local shrinkage. The defect type is then associated with the bottle to be tested. Otherwise, the product is considered acceptable.
[0109] The multi-dimensional assessment model determines three types of products: potentially non-conforming products, non-conforming products, and conforming products.
[0110] Step S32: Combine the judgment results of the multi-dimensional analysis model with the three-dimensional feature data of defects and the real-time location image set of the production line to obtain a set of key parameters.
[0111] A defective bottle is extracted from the results of the multi-dimensional analysis model. The three-dimensional coordinates of the defect corresponding to the defective bottle are extracted from the three-dimensional feature data of the defect. A series of consecutive multi-frame images of the defective bottle, the data acquisition station image sequence, and the rejection station image sequence are extracted from the real-time position image set of the production line. The images of the conveying component, the data acquisition station, and the rejection station are calculated to obtain the conveying speed of the conveying component and the physical distance between the data acquisition station and the rejection station under the actual working conditions.
[0112] The process of extracting the conveying speed of the conveying component is as follows: Fixed feature points of the same bottle are located from multiple consecutive frames of bottle images. The pixel displacements of these fixed feature points are converted into physical positions. The time interval between the multiple frames of bottle images is calculated using their timestamps. The conveying speed of the conveying component is then the ratio of the physical displacement to the time interval. For example, the fixed feature point is set as the pixel coordinates (u0, v0) of the bottle bottom center. When moving from the first frame to the second frame, the pixel coordinates of the second frame are (u4, v4), so the pixel displacement Δu is calculated as Δu = u4 - u0. Let the timestamp of the first frame of the real-time production line position image be s1, and the timestamp of the second frame be s2. Then the time interval Δs = s2 - s1. Therefore, the conveying speed q of the conveying component is calculated. .
[0113] The process of extracting the distance between the data acquisition station and the rejection station: By locating the pixel coordinates of preset markers at the data acquisition station and the rejection station, the pixel distance between the two preset marker pixel coordinates is calculated, and the pixel distance is converted into the physical distance, i.e., the physical distance between the data acquisition station and the rejection station. Here, the preset markers are pre-fixed physical markers with high visual recognizability at the data acquisition station and the rejection station, such as square positioning blocks of different colors, used to provide a stable visual reference for real-time position images of the production line. The pixel distance between the pixel coordinates of the two preset markers is calculated. For example, the pixel coordinates of the data acquisition station marker are set to (u2, v2), and the pixel coordinates of the rejection station marker are set to (u3, v3). The pixel distance D1 is obtained using the Euclidean distance formula, which is: The physical distance D2 is obtained by multiplying the pixel physical size and pixel distance in the camera calibration parameters. For example, if the pixel physical size is set to D3, then... .
[0114] The travel time T1 of the defective bottle from the data acquisition station to the rejection station is calculated by using the physical distance between the data acquisition station and the rejection station and the conveying speed of the conveying components. The key parameter set is obtained by combining the conveyor speed of all non-conforming products, the physical distance between the data acquisition station and the rejection station, the three-dimensional coordinates of the defects in the non-conforming products, and the movement time. By calculating the movement time from the data acquisition station to the rejection station, the problem of deviations easily occurring when using the fixed preset speed or batch average speed of the production line to calculate the movement time is solved. This leads to missed rejections, incorrect rejections, or disruption of the production line's operating rhythm. It achieves the effect of not affecting the production line's operating rhythm and not missing any defective products, thus increasing production efficiency.
[0115] Step S33: Develop a data detection method for the key parameter set to automatically reject defective products and ensure the safety of real-time detection equipment.
[0116] Data detection methods include rejection systems and self-protection systems, such as... Figure 2 The diagram shows the triggering criteria for mold protection in the self-protection system, as follows: Figure 3 The diagram shows the triggering criteria for the self-protection system to protect the equipment. The rejection system removes defective products and records and stores relevant data on them. The self-protection system makes judgments on the mold and equipment.
[0117] The rejection system's execution flow is as follows: The movement time of a single non-conforming item is extracted from the set of key parameters. When a non-conforming item is inspected and arrives at the data acquisition station, the rejection system sends a rejection trigger signal to the rejection station. This means the single non-conforming item will arrive at the rejection station after time T1. The rejection station rejects the non-conforming item through an actuator, simultaneously generating a unique defect ID for each item and uploading it to the rejection system for storage. The actuator is a mechanical or electromechanical component that receives control signals from the system, such as a pneumatic push rod. The defect ID is not only an identifier for each non-conforming item (e.g., non-conforming item 1), but it is also combined with the non-conforming item's three-dimensional defect coordinates, three-dimensional defect feature data, and abnormal pixel distribution data for easy subsequent review.
[0118] The self-protection system's execution process is as follows: When the three-dimensional coordinates of defects in E consecutive non-conforming products are concentrated within the same circumferential angle deviation range, and the absolute value of the radial displacement of the non-conforming products is greater than the allowable deviation of the bottle wall thickness, it is determined to be local wear of the mold cavity. Here, E is set based on the maintenance personnel's need to capture batch defects in the mold, aiming to distinguish between accidental random defects and systematic defects, avoiding unnecessary mold maintenance triggered by single or small accidental errors, and ensuring the accuracy of mold protection and production line stability. The circumferential angle deviation range is set based on the circumferential accuracy of the cylindrical coordinate system and the parameters of the mold cavity design, aiming to ensure accurate mold maintenance without affecting production line stability. The radial displacement of the non-conforming products represents the radial displacement of the virtual anchor point corresponding to the defect area on the bottle body. When the three-dimensional coordinates of defects in E consecutive non-conforming products are concentrated within a fixed axial range, and the absolute value of the axial displacement of the non-conforming products is greater than the allowable deviation of the bottle height, it is determined to be misalignment of the mold parting surface. The axial fixed interval is set based on the detection resolution of the axial spacing and axial virtual anchor points. Its purpose is to accurately locate the mold positions where defects are concentrated, avoiding full mold inspection during mold maintenance and improving maintenance efficiency. It also prevents random defects from being misjudged as mold failures due to excessively large intervals, ensuring the accuracy of mold failure determination. The axial displacement of defective products represents the axial displacement of the virtual anchor points corresponding to the defective areas on the bottle body. The height allowable deviation is set based on the elastic deformation limit of the bottle material and the detection accuracy. Its purpose is to ensure that the bottle height meets design standards and that the detection accuracy is stably matched with the production line cycle time.
[0119] If the absolute value of the radial displacement of E consecutive non-conforming products exceeds the allowable deviation of the bottle wall thickness, and the three-dimensional coordinates of the defects in the non-conforming products are concentrated within the circumference of the bottle, it is determined to be an abnormality in equipment pressure control. The circumference range is set based on the distribution of virtual circumferential anchor points in the virtual anchor point array and the accuracy requirements for defect concentration judgment, aiming to distinguish dispersed defects caused by accidental factors. If the absolute value of the axial displacement of E consecutive non-conforming products exceeds the allowable deviation of the bottle height, and the three-dimensional coordinates of the defects in the non-conforming products are concentrated within the axial range of the bottle, it is determined to be an equipment positioning deviation. The axial range is set based on the distribution of virtual axial anchor points in the virtual anchor point array and the accuracy settings for axial regional judgment, aiming to accurately determine positioning deviations and avoid misjudgments.
[0120] When the system determines that there is local wear in the mold cavity, misalignment of the mold parting surface, abnormal pressure control of the equipment, or positioning deviation of the equipment, the self-protection system will send information to the maintenance personnel in real time for repair.
[0121] Step S30 utilizes three-dimensional defect feature data, a multi-dimensional judgment model, the judgment results of the multi-dimensional judgment model, a set of key parameters, and data detection methods to achieve precise judgment of non-conforming products, dynamic rejection, and the linkage of mold and equipment fault self-protection. This solves the technical problems of traditional single-dimensional judgment being prone to misjudgment, large deviations in rejection time calculations based on fixed production line speeds, and the reliance on manual inspection for mold and equipment faults. In existing technologies, non-conforming product judgment often relies on a single indicator, which can easily misjudge products with slight wall thickness deviations within the allowable range as non-conforming or miss compound defects. The multi-dimensional judgment model improves the confidence of non-conforming product judgment and accurately confirms non-conforming products and defect types. In existing technologies, the rejection process often uses fixed preset speeds on the production line to calculate movement time, without considering actual speed fluctuations caused by chain wear and load changes. This can easily lead to rejection timing deviations, resulting in missed or incorrect rejection of qualified products. In addition, faults such as mold wear and abnormal equipment pressure require manual inspection. Long delays often lead to batch defects and increase production costs. However, the key parameter set replaces the traditional fixed production line speed, avoiding missed rejections, incorrect rejections, or disruption of the production line rhythm. The rejection system in the data detection method realizes the accurate rejection of non-conforming products and the associated storage of defect data. The self-protection system makes centralized judgments on the three-dimensional coordinates of defects in continuous non-conforming products, and identifies faults such as local wear of mold cavity, misalignment of mold parting surface, abnormal equipment pressure control, and equipment positioning deviation in real time. This avoids batch defects caused by the lag of manual inspection, and balances production line efficiency with timely equipment maintenance.
[0122] Example 2
[0123] This embodiment, based on Embodiment 1, provides a visual inspection system for injection molding and blow molding based on online quality monitoring, such as... Figure 4 As shown, it includes:
[0124] Mesh Defect Module: Used to construct the cylindrical coordinate system of the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set; acquire the production line real-time position image set and calculate to obtain the displacement vector set, mark the displacement vector set to obtain the mesh defect map;
[0125] 3D Defect Module: Used to select target areas in the mesh defect map for data acquisition and establish the optical transfer function matrix; calculate the abnormal pixel distribution data of the bottle reference image; calculate the phase difference set by combining the optical transfer function matrix and the abnormal pixel distribution data; and calculate the 3D feature data of the defect by combining the phase difference set.
[0126] Data detection module: used to judge the three-dimensional feature data of defects and obtain the judgment results of the multi-dimensional judgment model; combine the judgment results of the multi-dimensional judgment model with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain the key parameter set, and formulate a data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment based on the key parameter set.
[0127] In the mesh defect module, the cylindrical coordinate system for constructing the bottle is divided into a virtual anchor point array constructed with virtual anchor points; a reference image of the bottle and a 3D point cloud set of the bottle are acquired; the 3D point cloud set of the bottle is combined with the virtual anchor points in the virtual anchor point array to obtain a set of virtual anchor point reference position data; a real-time position image set of the production line is acquired and calculated to obtain a set of displacement vectors; the set of displacement vectors is marked to obtain a mesh defect map, including:
[0128] Step S11: Perform a three-dimensional scan of the bottle bottom and bottle mouth to obtain a set of three-dimensional coordinate points of the bottle bottom and bottle mouth. Construct a cylindrical coordinate system for the bottle body based on the set of three-dimensional coordinate points, and divide the cylindrical coordinate system into a virtual anchor point array composed of virtual anchor points.
[0129] Step S12: Obtain the reference image of the bottle and the three-dimensional point cloud set of the bottle. Combine the virtual anchor points of the virtual anchor point array with the three-dimensional point cloud set of the bottle to obtain the reference position data set of the virtual anchor points.
[0130] Step S13: Construct a matching template for the virtual anchor point, obtain a set of real-time position images of the production line, search for candidate matching blocks from the set of real-time position images of the production line, combine the candidate matching blocks with the matching template to obtain the final matching point, and combine the set of virtual anchor point reference position data with the final matching point to calculate and obtain a set of displacement vectors.
[0131] Step S14: Determine the set of displacement vectors, construct a virtual mesh, calculate the average mesh element deformation intensity using the set of displacement vectors, determine the average mesh element deformation intensity, and obtain the mesh defect map.
[0132] In the 3D defect module, the process involves selecting a target region in the mesh defect map for data acquisition and establishing an optical transfer function matrix; calculating the abnormal pixel distribution data from the bottle reference image; calculating the phase difference set from the optical transfer function matrix and the abnormal pixel distribution data; and calculating the phase difference set to obtain the 3D defect feature data, including:
[0133] Step S21: Select the target area in the mesh defect map, configure the light source for the target area, receive the coded light emitted by the light source, record the coded light path emission data of the light source, and establish the optical transfer function matrix.
[0134] Step S22: Obtain a reference image based on the baseline image to obtain abnormal pixel distribution data. Calculate the optical transfer function matrix in conjunction with the abnormal pixel distribution data to obtain a phase difference set.
[0135] Step S23: Calculate the phase difference set to obtain the defect depth. Based on the coded optical path emission data, convert the light source cylindrical coordinates into the defect three-dimensional coordinates. Calculate the defect depth to obtain the defect volume. Combine the defect three-dimensional coordinates, defect depth, and defect volume to obtain the defect three-dimensional feature data.
[0136] In the data detection module, the three-dimensional feature data of defects is judged to obtain the judgment result of the multi-dimensional judgment model; the judgment result of the multi-dimensional judgment model is combined with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain a set of key parameters. A data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment is formulated based on this set of key parameters, including:
[0137] Step S31: Use a multi-dimensional judgment model to detect the three-dimensional feature data of the defect and obtain the judgment result of the multi-dimensional judgment model.
[0138] Step S32: Combine the judgment results of the multi-dimensional analysis model with the three-dimensional feature data of defects and the real-time location image set of the production line to obtain a set of key parameters.
[0139] Step S33: Develop a data detection method for the key parameter set to automatically reject defective products and ensure the safety of real-time detection equipment.
[0140] The methods and systems of this application may be implemented in many ways. For example, they may be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above-described order of steps for the method is for illustrative purposes only, and the steps of the method of this application are not limited to the order specifically described above, unless otherwise specifically stated.
[0141] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.
[0142] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A visual inspection method for injection molding and blow molding based on online quality monitoring, characterized in that, The method includes: Construct a cylindrical coordinate system for the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, and combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set; acquire and calculate the real-time position image set of the production line to obtain the displacement vector set, and mark the displacement vector set to obtain the mesh defect map; In the mesh defect map, a target area is selected for data acquisition, and an optical transfer function matrix is established; the bottle reference image is calculated to obtain abnormal pixel distribution data; the optical transfer function matrix and abnormal pixel distribution data are calculated to obtain a phase difference set; the phase difference set is calculated to obtain the three-dimensional feature data of the defect. The three-dimensional feature data of defects are judged to obtain the judgment results of the multi-dimensional judgment model. The judgment results of the multi-dimensional judgment model are combined with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain the key parameter set. A data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment is formulated for the key parameter set. The method for establishing the optical transfer function matrix includes: configuring different numbers of light sources for different target areas, each light source emitting coded light to the bottle, recording the coded optical path emission data and the emitted light intensity of each light source, and the coded optical path emission data including the cylindrical coordinates of the light source, the emission angle of the light source, and the light intensity distribution; After the encoded light passes through the bottle, the actual received light intensity is received by the sensor. The light intensity transmission ratio is calculated by comparing the light intensity emitted by the light source with the actual received light intensity. Construct an optical transfer function matrix M, whose number of rows consists of the number of light sources and whose number of columns consists of the total number of sensor pixels. Any element in the matrix represents the coded light emitted by the i-th light source, and the light intensity transfer ratio formed at the j-th pixel of the sensor after passing through the bottle. The method for obtaining the key parameter set includes: extracting a defective bottle from the judgment results of the multi-dimensional analysis model; extracting the three-dimensional coordinates of the defect corresponding to the defective bottle from the three-dimensional feature data of the defect; extracting a series of consecutive multi-frame bottle images, a series of data acquisition station images, and a series of rejection station images from the real-time position image set of the production line; and calculating the series of consecutive multi-frame bottle images, the series of data acquisition station images, and the series of rejection station images to obtain the conveying speed of the conveying component and the physical distance between the data acquisition station and the rejection station under actual working conditions. The physical distance between the data acquisition station and the rejection station, as well as the conveying speed of the conveying components, are calculated to obtain the movement time of the defective bottle from the data acquisition station to the rejection station. The key parameter set is obtained by combining the conveying speed of all non-conforming products, the physical distance between the data acquisition station and the rejection station, the three-dimensional coordinates of the defects corresponding to the non-conforming products, and the movement time. The data detection method includes: extracting the movement time of a single non-conforming product from a set of key parameters, sending a rejection trigger signal to the rejection station based on the movement time, rejecting the non-conforming product according to the rejection trigger signal, generating a unique defect ID for each non-conforming product, and recording and storing each non-conforming product. When the three-dimensional coordinates of defects of E consecutive non-conforming products are concentrated within the same circumferential angle deviation range and the absolute value of the radial displacement of the non-conforming products is greater than the allowable deviation of the bottle wall thickness, it is judged as local wear of the mold cavity. When the three-dimensional coordinates of the defects of E consecutive defective products are concentrated in the fixed axial range, and the absolute value of the axial displacement of the defective products is greater than the height allowable deviation, it is determined to be a mold parting surface misalignment. If the absolute value of the radial displacement of E consecutive defective products is greater than the bottle wall thickness allowable deviation, and the three-dimensional coordinates of the defects of the defective products are concentrated in the bottle circumference range, it is determined to be an abnormal equipment pressure control. If the absolute value of the axial displacement of E consecutive defective products is greater than the allowable deviation of the bottle height and the three-dimensional coordinates of the defects of the defective products are concentrated within the axial range of the bottle, it is determined to be an equipment positioning deviation. When it is determined to be local wear of the mold cavity, misalignment of the mold parting surface, abnormal equipment pressure control, or equipment positioning deviation, information is sent to maintenance personnel in real time for repair.
2. The visual inspection method for injection molding and blow molding based on online quality monitoring according to claim 1, characterized in that, The method for constructing the cylindrical coordinate system of the bottle includes: Obtain the set of three-dimensional coordinate points of the bottle bottom and bottle mouth, calculate the set of three-dimensional coordinate points of the bottle bottom and bottle mouth to obtain the coordinates of the geometric center of the bottle bottom plane and the geometric center of the bottle mouth plane. The line connecting the geometric center coordinates of the bottom plane and the geometric center coordinates of the mouth plane is taken as the central axis of the bottle body. The straight line distance perpendicular to the central axis from any point on the cross-section of the bottle body is taken as the radial distance. The geometric center coordinates of the bottom of the bottle body are taken as the origin O, the origin O is taken as the center of rotation, the central axis of the bottle body is taken as the axis of rotation, and the angle of the circumferential orientation of any point on the cross-section of the bottle body around the axis of rotation is called the circumferential angle. A cylindrical coordinate system is constructed with the geometric center coordinates of the bottle bottom as the origin O, the central axis of the bottle body as the Z-axis, the radial distance as the r-axis, and the circumferential angle as the θ-axis.
3. The visual inspection method for injection molding and blow molding based on online quality monitoring according to claim 2, characterized in that, The method for obtaining a reference image of the bottle and a three-dimensional point cloud set of the bottle, and combining the three-dimensional point cloud set of the bottle with virtual anchor points in a virtual anchor point array to obtain a set of virtual anchor point reference positions includes: Q sampling points are set on the surface of the bottle. The Q sampling points are photographed from multiple angles and scanned in three dimensions to obtain the reference image and three-dimensional point cloud of the Q sampling points. The reference images of the Q sampling points are stitched together to form a reference image of the bottle covering the entire surface of the bottle. The three-dimensional point clouds of the Q sampling points are combined to obtain a set of three-dimensional point clouds of the bottle. Using each virtual anchor point in the virtual anchor point array as the search center, the sampling point closest to the corresponding virtual anchor point in the three-dimensional point cloud set of the bottle is searched by the search radius. The three-dimensional point cloud of the sampling point is combined with the corresponding virtual anchor point to obtain the reference position data of the corresponding virtual anchor point. The reference position data of all virtual anchor points are combined into a set of virtual anchor point reference position data.
4. The visual inspection method for injection molding and blow molding based on online quality monitoring according to claim 3, characterized in that, The method for acquiring a set of real-time position images of the production line and calculating the displacement vector set includes: Create a pixel region as a matching template for each virtual anchor point; Capture the real-time position image set of the production line in production status. The real-time position image set of the production line refers to the continuous shooting of the bottle, conveying component, data acquisition station and rejection station from a fixed camera angle. The resulting image sequence of the bottle, the conveying component, the data acquisition station and the rejection station are composed of four image sequences and the shooting timestamps of the four image sequences are consistent. Search the bottle image sequence in the real-time position image set of the production line to obtain multiple candidate matching blocks. Combine the candidate matching blocks with the matching template to calculate the correlation coefficient. Among the multiple candidate matching blocks, the candidate matching block with the largest correlation coefficient obtained by combining with the matching template is combined with the matching template to obtain the final matching point of the virtual anchor point. The radial, circumferential, and axial displacements of the virtual anchor points are calculated for the final matching points; the displacement vector magnitudes of the virtual anchor points are also calculated based on the radial, circumferential, and axial displacements of the virtual anchor points. The displacement vector magnitudes, radial displacements, circumferential displacements, and axial displacements of all virtual anchor points are combined to obtain a set of displacement vectors.
5. The visual inspection method for injection molding and blow molding based on online quality monitoring according to claim 4, characterized in that, The method for calculating the phase difference set to obtain the three-dimensional feature data of the defect includes: The optical path deviation is calculated by using the phase difference set, and the defect depth is obtained by combining the optical path deviation with the emission angle of the light source. Transform the cylindrical coordinates of the light source into three-dimensional coordinates of the light source in a rectangular coordinate system, and construct the three-dimensional coordinates of the defect using the three-dimensional coordinates of the light source. The surface area of the defect is calculated from the abnormal pixel distribution data; the defect volume is then calculated using the surface area and depth of the defect. The 3D coordinates, depth, and volume of all abnormal pixels are combined to obtain the 3D feature data of the defect.
6. The visual inspection method for injection molding and blow molding based on online quality monitoring according to claim 5, characterized in that, The method for judging the three-dimensional feature data of defects to obtain the judgment result of the multi-dimensional judgment model includes: By combining grid defect maps, 3D defect feature data, and abnormal pixel distribution data as conditions, potential defective products are screened out. Using the set of displacement vectors as a basis for judgment, we can further determine whether a potential non-conforming product is a non-conforming product or a conforming product. Potentially non-conforming products, non-conforming products, and conforming products constitute the judgment results of the multi-dimensional assessment model.
7. A visual inspection system for injection molding and blow molding based on online quality monitoring, used to implement the visual inspection method for injection molding and blow molding based on online quality monitoring as described in any one of claims 1-6, characterized in that, The system includes: Mesh Defect Module: Used to construct the cylindrical coordinate system of the bottle, and divide the cylindrical coordinate system into a virtual anchor point array constructed with virtual anchor points; acquire the bottle reference image and the bottle 3D point cloud set, combine the bottle 3D point cloud set with the virtual anchor points in the virtual anchor point array to obtain the virtual anchor point reference position data set; acquire the production line real-time position image set and calculate to obtain the displacement vector set, mark the displacement vector set to obtain the mesh defect map; 3D Defect Module: Used to select target areas in the mesh defect map for data acquisition and establish the optical transfer function matrix; calculate the abnormal pixel distribution data of the bottle reference image; calculate the phase difference set by combining the optical transfer function matrix and the abnormal pixel distribution data; and calculate the 3D feature data of the defect by combining the phase difference set. Data detection module: used to judge the three-dimensional feature data of defects and obtain the judgment results of the multi-dimensional judgment model; combine the judgment results of the multi-dimensional judgment model with the three-dimensional feature data of defects and the real-time position image set of the production line to obtain the key parameter set, and formulate a data detection method for automatically rejecting defective products and ensuring the safety of real-time detection equipment based on the key parameter set.
Citation Information
Patent Citations
A device and method for testing the quality of blown bottles
CN116558438B
Blow molding part appearance visual inspection equipment
CN222652855U
Injection product defect detection method based on machine vision
CN120726049A
Paper drum defect full-inspection method based on machine vision
CN120847129A
