Injection mold quality detection method and system based on industrial vision

CN122989670APending Publication Date: 2026-10-27FOSHAN ZHANYI PACKAGING PRODUCTS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611211399.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-11
Publication Date
2026-10-27

AI Technical Summary

Technical Problem

此时,系统内部逻辑会将跨越边界的飞边特征错误地与固定型腔区域进行关联,导致缺陷成因定位错误,不仅会引发频繁的误停机检查,还会掩盖滑块组件真实的间隙恶化状态,使其错失及时的维护干预,检测准确度低,影响产品质量

Benefits of technology

[0007]本申请实施例至少包括以下有益效果:本申请实施例首先获取注塑产品图像和基准分型线,提取初始分型线和稳定结构特征点,然后根据初始分型线和稳定结构特征点,计算初始分型线相对于基准分型线的边界偏移向量,再根据边界偏移向量,确定滑块组件状态,若滑块组件状态为严重磨损漂移,则生成故障警报信息;若滑块组件状态为环境扰动漂移、滑块位姿漂移或无漂移,则对基准分型线进行差异化处理,得到目标分型线,并进行注塑模具质量检测,得到质量检测结果,从而能够结合边界偏移向量和滑块组件状态确定目标分型线,并生成质量检测结果,以实现注塑模具质量检测,提高了准确度和产品质量。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122989670A_ABST
    Figure CN122989670A_ABST
Patent Text Reader

Abstract

The application discloses an injection mold quality detection method and system based on industrial vision, and relates to the technical field of industrial vision detection.The method comprises the following steps: acquiring an injection product image and a reference parting line; extracting an initial parting line and stable structure feature points; calculating a boundary offset vector of the initial parting line relative to the reference parting line according to the initial parting line and the stable structure feature points; determining a slider assembly state according to the boundary offset vector; if the slider assembly state is serious wear drift, generating a fault alarm information; if the slider assembly state is environmental disturbance drift, slider pose drift or no drift, performing differential processing on the reference parting line to obtain a target parting line, and performing injection mold quality detection to obtain a quality detection result.The application can determine the target parting line by combining the boundary offset vector and the slider assembly state, and generate the quality detection result, so as to realize the injection mold quality detection and improve the accuracy and product quality.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of industrial vision inspection technology, and in particular to a method and system for quality inspection of injection molds based on industrial vision. Background Technology

[0002] In continuous injection molding production, existing technologies typically employ industrial vision systems to acquire images of the demolded product and map defect features from different areas of the product surface to corresponding mold components based on a pre-taught fixed area division template. However, in actual production, after prolonged continuous operation, the guide rails and pressure bars of the slider assembly are prone to micron-level wear, leading to increased clearance between moving parts. This, combined with the thermal expansion effect caused by rising mold temperature, results in a slight but continuous lateral drift in the slider's actual position when the mold is closed compared to its initial taught position. Because existing vision inspection systems rely on static area division templates, when the slider's actual position drifts, the parting line flash features on the product, which should originally fall within the slider's detection area, will gradually shift to the visual detection boundary between the slider area and the fixed cavity area, or even completely enter the fixed cavity area. At this point, the system's internal logic will incorrectly associate the flash features that cross the boundary with the fixed cavity area, leading to incorrect defect location. This will not only cause frequent accidental machine shutdowns for inspection, but also mask the true state of clearance deterioration in the slider assembly, causing it to miss timely maintenance intervention, resulting in low detection accuracy and affecting product quality.

[0003] In summary, the technical problems existing in the relevant technologies need to be improved. Summary of the Invention

[0004] The main objective of this invention is to propose a method and system for quality inspection of injection molds based on industrial vision. This method can determine the target parting line by combining the boundary offset vector and the state of the slider assembly, and generate quality inspection results to achieve quality inspection of injection molds, thereby improving accuracy and product quality.

[0005] On one hand, embodiments of the present invention provide a method for quality inspection of injection molds based on industrial vision, including the following steps: Acquire images of the injection-molded product and a reference parting line, wherein the reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template; Based on the injection molded product image and the reference parting line, the initial parting line and stable structural feature points are extracted. The stable structural feature points include the positioning hole edge point, the chamfer intersection point, and the ejector pin mark center. Based on the initial parting line and stable structural feature points, calculate the boundary offset vector of the initial parting line relative to the reference parting line. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle about an axis perpendicular to the image plane. The slider assembly state is determined based on the boundary offset vector. The slider assembly state includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. If the slider assembly is in a state of severe wear and drift, a fault alarm message is generated; If the state of the slider assembly is environmental disturbance drift, slider pose drift, or no drift, then the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected according to the target parting line to obtain the quality inspection result, which includes defects in the slider area and defects in the fixed cavity area.

[0006] On the other hand, embodiments of the present invention provide an injection mold quality inspection system based on industrial vision, comprising: The information acquisition module is used to acquire images of injection molded products and reference parting lines, wherein the reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template; The feature extraction module is used to extract the initial parting line and stable structural feature points based on the injection molded product image and the reference parting line. The stable structural feature points include the positioning hole edge points, chamfer intersection points, and ejector pin imprint centers. The boundary offset vector calculation module is used to calculate the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and the stable structural feature points. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle around an axis perpendicular to the image plane. The slider component state determination module is used to determine the state of the slider component based on the boundary offset vector. The state of the slider component includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. The fault alarm information generation module is used to generate fault alarm information if the slider assembly is in a state of severe wear and drift. The injection mold quality inspection module is used to differentiate the reference parting line to obtain the target parting line if the state of the slider assembly is environmental disturbance drift, slider pose drift or no drift, and to perform injection mold quality inspection based on the target parting line to obtain the quality inspection result. The quality inspection result includes defects in the slider area and defects in the fixed cavity area.

[0007] The embodiments of this application include at least the following beneficial effects: First, the embodiments of this application acquire an image of the injection molded product and a reference parting line, extract the initial parting line and stable structural feature points, then calculate the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and stable structural feature points, and then determine the state of the slider assembly based on the boundary offset vector. If the state of the slider assembly is severe wear drift, a fault alarm message is generated; if the state of the slider assembly is environmental disturbance drift, slider pose drift, or no drift, the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected to obtain the quality inspection result. Thus, the target parting line can be determined by combining the boundary offset vector and the state of the slider assembly, and the quality inspection result can be generated to realize the injection mold quality inspection, thereby improving accuracy and product quality.

[0008] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the description and the drawings. Attached Figure Description

[0009] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below.

[0010] Figure 1 This is a flowchart of an injection mold quality inspection method based on industrial vision, according to an embodiment of the present invention. Figure 2 This is a flowchart illustrating the steps of calculating the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and stable structural feature points, according to an embodiment of the present invention. Figure 3 This is a schematic diagram of the overall architecture of an injection mold quality inspection method based on industrial vision, according to an embodiment of the present invention. Figure 4 This is a schematic diagram of the structure of an injection mold quality inspection system based on industrial vision, according to an embodiment of the present invention. Detailed Implementation

[0011] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments.

[0012] In related technologies, in the field of continuous injection molding, to achieve quality inspection of injection molds and locate the causes of defects, industrial vision systems are typically used to acquire images of the product after each demolding. Based on a pre-taught fixed area division template, defect features in different areas of the product surface are mapped and attributed to the corresponding mold components. In actual thin-walled shell part production, after prolonged continuous operation, the guide rails and pressure bars of the slider assembly are prone to micron-level wear, leading to increased clearance between moving parts. This, combined with the thermal expansion effect caused by rising mold temperature, results in a slight but continuous lateral drift in the slider's actual pose in the mold-closed state compared to the initial taught position. As the slider's actual pose drifts, the parting line flash features on the product, which should originally fall within the slider detection area, gradually shift to the visual detection boundary between the slider area and the fixed cavity area, or even completely enter the fixed cavity area. When the industrial vision system performs scanning based on the fixed area division template, its internal logic unconditionally associates the flash features crossing the boundary with the fixed cavity area, thus outputting false alarms for edge damage or foreign objects in the fixed cavity. Existing conventional visual inspection methods rely on static area division templates, making it difficult to detect the spatial position shift of features caused by the dynamic evolution of the physical state of the mold. This not only leads to frequent erroneous machine stops for inspection, but also masks the true state of clearance deterioration of the slider assembly, resulting in low detection accuracy and affecting product quality.

[0013] The embodiments of this application will be explained in detail below with reference to the accompanying drawings: Figure 1 This is an optional flowchart of an injection mold quality inspection method based on industrial vision provided in an embodiment of this application. Figure 1 The method may include, but is not limited to, steps S101 to S106.

[0014] Step S101: Obtain the injection molded product image and the reference parting line. The reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template. Step S102: Based on the injection molded product image and the reference parting line, extract the initial parting line and stable structural feature points. The stable structural feature points include the positioning hole edge points, chamfer intersection points, and ejector pin imprint centers. Step S103: Based on the initial parting line and stable structural feature points, calculate the boundary offset vector of the initial parting line relative to the reference parting line. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle around the axis perpendicular to the image plane. Step S104: Determine the state of the slider assembly based on the boundary offset vector. The state of the slider assembly includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. Step S105: If the slider assembly is in a state of severe wear and drift, a fault alarm message is generated; Step S106: If the slider assembly is in the state of environmental disturbance drift, slider pose drift or no drift, then the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected according to the target parting line to obtain the quality inspection results. The quality inspection results include defects in the slider area and defects in the fixed cavity area.

[0015] Steps S101 to S106 as shown in the embodiments of this application can determine the target parting line by combining the boundary offset vector and the state of the slider assembly, and generate quality inspection results to realize injection mold quality inspection, thereby improving accuracy and product quality.

[0016] In some embodiments, steps S101-S106 involve first acquiring an image of the injection-molded product and a reference parting line. The reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template. A pre-captured image file of the injection-molded product can be manually imported into the visual inspection software interface, and a polygonal polyline can be manually drawn on the image as the reference parting line. To ensure stable implementation of this step, the unified settings for the reference image acquisition conditions can be completed first, including fixing the camera installation position, lens focal length, exposure mode, and product gripping posture. The process of drawing the reference parting line can be performed as follows: first, magnify the area where the parting mark is located in the image, then sequentially select multiple inflection points or curvature change points along the mark from one end to the other. The software automatically connects adjacent points to form a polyline. If the local boundary is relatively straight, the spacing between adjacent points can be appropriately increased. If the local boundary has bends, rounded corners, or step transitions, the number of sampling points is increased at that location to ensure the polyline closely matches the actual boundary. After drawing, the polyline coordinates, along with the corresponding product model, mold number, camera number, and teaching time, are saved to the visual inspection template as the baseline parting line data for subsequent batch inspections. Simultaneously, on an actual thin-walled shell part injection molding production line, an industrial camera mounted on the end effector of a robotic arm can be used to capture a 4096×3000 grayscale image as the injection-molded product image at the moment the robotic arm picks up the product and demolds it.

[0017] Then, based on the injection-molded product image and the baseline parting line, the initial parting line and stable structural feature points are extracted. Stable structural feature points include the edge points of positioning holes, chamfer intersections, and the center of ejector pin imprints. A global threshold segmentation algorithm can be used to binarize the injection-molded product image, and then the inner and outer contours of the binarized image are extracted as the initial parting line. Simultaneously, a corner detection function is used to search for corner points throughout the entire image as stable structural feature points. To avoid misidentifying product surface textures, reflective edges, or background contours as the initial parting line, in practice, the search range is usually first limited based on the approximate location of the baseline parting line, and then edge segments with good continuity and consistent with the parting line direction are selected within this range. For the extraction of stable structural feature points, not all corner points in the entire image are directly used as valid features; instead, points that are located within a preset structural area, appear repeatedly, and have clear geometric meaning are retained. For example, the edge points of positioning holes should be located near the hole contour, the chamfer intersections should be located in the reinforcing rib or border transition area, and the center of ejector pin imprints should be located near the center of a circular or near-circular indentation area. By adding positional and structural constraints, the stability of subsequent matching can be significantly improved.

[0018] Next, based on the initial parting line and stable structural feature points, calculate the boundary offset vector of the initial parting line relative to the reference parting line. This boundary offset vector includes the current horizontal translation along the image X-axis, the current vertical translation along the image Y-axis, and the current rotation angle around an axis perpendicular to the image plane. The horizontal and vertical translations can be directly obtained by calculating the coordinate difference between the geometric center points of the initial and reference parting lines, and the rotation angle can be obtained by calculating the angle between the endpoints of the two line segments. To make this step more feasible, the initial and reference parting lines can be uniformly sampled, representing both lines as a set of key nodes arranged sequentially along the boundary direction. Then, the center positions and overall extension directions of the two lines are determined. If there is an overall pose difference between the current product image and the reference image, the current image is first corrected using stable structural feature points, and then the center and directional differences between the two parting lines are compared. The resulting horizontal, vertical, and rotation angles better reflect the changes in the slider boundary itself, rather than apparent deviations caused by camera shake or changes in the product's gripping posture.

[0019] Based on the boundary offset vector, the slider assembly state is determined, including environmental disturbance drift, severe wear drift, slider pose drift, and no drift. The system has multiple preset threshold conditions. When the boundary offset vector value fluctuates drastically and irregularly, it is determined to be environmental disturbance drift; when the offset continuously increases unidirectionally and exceeds the safety limit, it is determined to be severe wear drift; when the offset stabilizes within a small range and exceeds the initial state, it is determined to be slider pose drift; when the offset is extremely small and close to zero, it is determined to be no drift. These preset threshold conditions can be established using historical production data. Specifically, multiple batches of product images can be collected during the healthy stage after mold installation, the normal continuous production stage, the stage with known environmental interference, and the stage before maintenance when wear worsens, and the corresponding boundary offset vector changes are recorded. Subsequently, based on the actual equipment inspection results and mold disassembly inspection results, these historical data are labeled with their status, forming an empirical judgment rule of "offset feature - slider state". For example, in scenarios with environmental disturbances, the offset direction may change back and forth over several consecutive cycles, and the magnitude of the change does not show a continuous cumulative trend; in scenarios with severe wear, the offset direction is usually relatively consistent and continues to develop in the same direction for a long period of time; in scenarios with slider pose drift, although the offset exceeds the vicinity of the initial zero position, it remains relatively stable over several consecutive cycles; in scenarios without drift, the offset is always within the minimum fluctuation range allowed by the system. During system operation, not only the current single detection result is examined, but the offset history of several previous production cycles can also be combined for joint judgment to improve the reliability of state recognition. If an abnormally large offset occurs in the current cycle, but returns to normal in the preceding and following cycles, it is more likely to be an instantaneous environmental disturbance; if the offset in the same direction is observed for several consecutive cycles and gradually worsens, it is more likely to be wear evolution.

[0020] Finally, different processing is performed based on the different states of the slider assembly. If the slider assembly is in a state of severe wear and drift, a fault alarm message is generated. If the slider assembly is in a state of environmental disturbance drift, slider pose drift, or no drift, the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected based on the target parting line to obtain the quality inspection results.

[0021] Understandably, the reference parting line refers to the theoretical physical boundary line on the image between the slider forming area and the fixed cavity forming area, determined through teaching the vision system when the mold is initially in an ideal healthy state. This boundary line is not an arbitrarily drawn visual auxiliary line, but a reference boundary that corresponds one-to-one with the actual parting structure of the mold. Specifically, after the mold is installed and debugged, the slider guide clearance is within the design allowable range, the mold temperature is stable, and the appearance of continuously produced products is qualified, one or more reference product images are collected. In the vision inspection software, these images are taught along the actual parting marks, partition contours, or edge trajectories corresponding to the stable parting structure on the product, forming a reference parting line composed of multiple continuous coordinate points. For example, for thin-walled shell parts with a lateral core-pulling structure, a thin, elongated dividing mark on the side wall of the product usually corresponds to the junction of the slider and the fixed cavity. The position of this mark in a healthy mold state can serve as the main basis for the reference parting line.

[0022] Stable structural feature points refer to physical structural points on injection-molded products that are not easily affected by fluctuations in the molding process and have significant geometric features in the image. These typically correspond to fixed structures on the mold. "Not easily affected by molding process fluctuations" means that these positions are mainly determined by stable structures within the fixed cavity or overall mold base, and their image position changes over multiple production cycles are far less than the parting line position changes caused by slider drift. Stable structural feature points can be the center or edge of a locating hole, the chamfer intersection of a reinforcing rib, the center of an ejector pin mark, or the contour inflection point of a fixed mounting post, etc. Taking the ejector pin mark center as an example, as long as the ejector pin installation position remains unchanged and the product demolds normally, the relative position of this center in the image usually remains stable, thus serving as a reliable basis for establishing a reference coordinate system.

[0023] The boundary offset vector quantifies the spatial change of the actual parting line in the current injection-molded product image relative to the theoretical reference parting line on the two-dimensional image plane. This change reflects at least three levels of information: first, the offset along the horizontal direction of the image, indicating whether the slider has drifted left or right; second, the offset along the vertical direction of the image, indicating changes in shooting posture, product placement posture, or overall offset of local structures; and third, the change in the overall direction of the boundary line, indicating whether the slider has undergone slight angular deflection. For example, when the current parting line moves to the right of the image as a whole, and the line segment direction is slightly tilted compared to the reference parting line, the boundary offset vector can simultaneously reflect both horizontal translation and rotational changes.

[0024] This embodiment first acquires images of the injection-molded product from the current production cycle, along with a pre-defined reference parting line, as the basic data input for subsequent analysis. The current production cycle typically corresponds to a complete mold opening, part removal, photographing, and inspection process. To ensure comparability in subsequent comparisons, image acquisition is triggered when the product is stably held by a robotic arm, its posture is highly repeatable, and the background is relatively fixed. Next, the initial parting line reflecting the current actual molding boundary is extracted from the image, and stable structural feature points unaffected by slider movement are simultaneously extracted. The initial parting line does not need to coincide with the entire outer contour of the product, but rather should correspond as closely as possible to the actual boundary marks between the slider area and the fixed cavity area on the current product. By comparing the spatial position differences between the initial parting line and the reference parting line in the reference frame of these stable structural feature points, a boundary offset vector containing translational and rotational components is calculated. Subsequently, based on the numerical characteristics of this boundary offset vector and its changing trend over multiple consecutive production cycles, the current physical state of the slider assembly is classified into different drift types. For severe wear conditions, the system directly triggers an alarm to prompt manual intervention. For other tolerable or compensable drift conditions, the system dynamically adjusts the baseline parting line to generate a target parting line adapted to the current actual pose, and performs final quality inspection and defect attribution based on this dynamically updated parting line. The key to this approach is to first determine whether the drift is within the compensable range before deciding whether to continue defect attribution, thereby avoiding the use of compensated boundary lines to mask the true fault when the slider is already clearly unstable.

[0025] Through the above technical solution, this embodiment effectively solves the problem of incorrect defect location due to wear and thermal effects of the slider assembly in the prior art. Its core logic lies in breaking the limitations of traditional visual inspection relying on static region division templates and introducing a mechanism for dynamically tracking the actual pose of the slider. By extracting stable structural feature points unaffected by slider movement as an absolute reference system, the boundary offset vector of the initial parting line relative to the reference parting line can be accurately quantified. Based on this quantification result, the system can not only accurately diagnose the true physical state of the slider assembly, but also adaptively differentiate the reference parting line when the slider experiences slight pose drift. The dynamic adjustment mechanism enables the boundary line of the visual inspection template to conform to the actual parting line position on the product in real time, thereby avoiding the incorrect mapping of flash features crossing the boundary to the fixed cavity area. Therefore, this embodiment can significantly reduce the false shutdown alarm rate caused by the dynamic evolution of the mold state, improve the accuracy of defect attribution, and achieve early warning of the deterioration state of the slider assembly.

[0026] In some embodiments, step S102, extracting the initial parting line and stable structural feature points based on the injection molded product image and the reference parting line, may include, but is not limited to, the following steps: Gaussian filtering is applied to the image of the injection molded product for smoothing. The image contrast enhancement process of the injection-molded product image after Gaussian filtering and smoothing was performed using the histogram equalization algorithm to obtain the preprocessed image. The baseline parting line is widened to generate the region of interest for the parting line. Edge detection operators are used to calculate the horizontal and vertical gray-level gradients of the region of interest along the fractal lines in the preprocessed image. Based on the horizontal and vertical gray-level gradients, the edge contours on the region of interest of the fractal line are extracted as the initial fractal line; A feature point extraction algorithm is used to extract stable structural feature points on the region of interest of the fractal line.

[0027] In some embodiments, the injection-molded product image can first undergo Gaussian filtering smoothing. Introducing Gaussian filtering smoothing, using a two-dimensional Gaussian kernel function to perform a weighted average of image pixels, effectively filters out high-frequency random noise. The key function of Gaussian filtering is to weaken the interference of isolated bright spots, dark spots, and fine reflective textures on edge detection results, while preserving as much of the overall direction of continuous boundaries such as parting lines as possible.

[0028] Then, a histogram equalization algorithm is used to enhance the image contrast of the injection-molded product image after Gaussian filtering smoothing, resulting in a preprocessed image. The histogram equalization algorithm can redistribute the gray levels of the image, stretching the gray-level distribution range, thereby significantly enhancing the global contrast of the image and making previously dim edge features clearer, resulting in a preprocessed image. If there are significant local brightness differences on the product surface, a local contrast enhancement method can also be used without changing the overall technical approach, making the gray-level transition in the area near the parting line more obvious.

[0029] The baseline parting line is then widened to generate a region of interest (ROI). Centered on the theoretical baseline parting line, a fixed pixel width of morphological dilation or geometric widening is performed on both sides, generating a strip-shaped ROI. The selection principle for this width is to cover the range of slider drift that may occur during normal production, while avoiding an excessively wide strip that would reintroduce a large amount of irrelevant texture. In other words, the widening width should be comprehensively set based on product size, camera resolution, historical drift range, and installation repeatability accuracy.

[0030] An edge detection operator is used to calculate the horizontal and vertical gray-level gradients of the region of interest (ROI) for the fractal lines in the preprocessed image. Based on these gradients, the edge contours of the ROI are extracted as initial fractal lines. The edge detection operator can be used to calculate the magnitude and direction of the gray-level gradient for each pixel in both the horizontal and vertical directions. Based on this gradient information, non-maximum suppression and double thresholding are used to accurately extract continuous edge contours as initial fractal lines.

[0031] Finally, a feature point extraction algorithm is used to extract stable structural feature points on the region of interest of the fractal line. This algorithm can be used to locate stable structural feature points. If some stable structural feature points are located outside the strip region but are still closely related to the fractal line position correction, a separate local search window can be set for these feature points without changing the main search area, thus balancing efficiency and completeness.

[0032] To illustrate this technical solution more clearly, a specific example is used below. When processing images of thin-walled shell parts, the system first applies a 5×5 Gaussian kernel with a standard deviation of 1.2 to the image for convolutional smoothing. This parameter combination is suitable for grayscale image scenes with a resolution of 4096×3000, aiming to suppress minor noise without excessively blurring the edges of the parting lines. Next, histogram equalization is performed, stretching pixels concentrated in the middle grayscale range to the full grayscale range. Subsequently, the system reads the coordinates of the baseline parting line and extends it 50 pixels to each side of its normal direction, generating a strip-shaped region of interest with a width of 100 pixels. For the aforementioned resolution and the common imaging field of view of thin-walled shell parts, this width can cover a reasonable drift range near the parting line while avoiding the inclusion of large irrelevant areas in the calculation. Within this strip-shaped region, the system uses the Sobel operator to calculate the horizontal and vertical gradients, extracting the continuous pixel chain with the largest gradient magnitude as the initial parting line. To avoid mistaking local reflective edges for parting lines, the system can further enhance continuous length filtering and orientation consistency filtering, retaining only pixel chains that closely resemble the baseline parting line and cross major boundary segments. Simultaneously, near specific endpoints of this strip-shaped region, the Harris algorithm is used to extract chamfered intersection points as stable structural feature points. If a single chamfered intersection point is insufficient to support stable registration, additional points can be extracted near the positioning holes to extract circular hole edge points, or center points can be extracted in the pin imprint area to form a reference relationship with at least multiple constraints.

[0033] Through the above technical solution, this embodiment first improves image quality from a physical level by filtering and contrast enhancement when extracting initial parting lines and stable structural feature points, eliminating the negative impacts of uneven lighting in the workshop environment and sensor noise. Simultaneously, by constructing a region of interest for the parting lines, the computational scope for edge detection and feature extraction is reduced from a full image of millions of pixels to a local strip region of tens of thousands of pixels. This local search mechanism based on prior location not only significantly eliminates interference from other irrelevant textures on the product surface, ensuring the uniqueness and accuracy of the extraction results, but also greatly reduces the time complexity of the algorithm. This embodiment can achieve highly robust and real-time extraction of parting lines and feature points in complex industrial environments.

[0034] In some embodiments, such as Figure 2 As shown, in step S103, the boundary offset vector of the initial parting line relative to the reference parting line is calculated based on the initial parting line and the stable structural feature points. This may include, but is not limited to, the following steps: Step S201: Obtain the reference product image on the visual inspection template. The reference product image contains multiple reference feature points. Step S202: Match the stable structural feature points with multiple reference feature points to identify multiple feature matching pairs; Step S203: Based on multiple feature matching pairs, calculate the affine transformation matrix of the injection molded product image relative to the reference product image using the least squares method; Step S204: Calculate the boundary offset vector based on the initial parting line and the affine transformation matrix.

[0035] In some embodiments, a reference product image on a visual inspection template can be acquired first. This reference product image contains multiple reference feature points. The reference product image is acquired when the mold is in optimal health condition and is marked with multiple precisely positioned reference feature points. These markings can be obtained as follows: During the template creation stage, a clear reference product image with standard product posture and no abnormalities in appearance is selected; then, the positions of stable structures such as the edges of positioning holes, the center of ejector pin marks, and chamfer intersections are manually confirmed or semi-automatically extracted in the vision software; after confirmation, the image coordinates, point type, structural region to which these points belong, and the allowed search range are saved together, forming multiple reference feature points in the template.

[0036] Then, stable structural feature points are matched with multiple reference feature points to identify multiple feature matching pairs. The similarity between stable structural feature points in the current image and reference feature points in the reference product image can be calculated using feature descriptors. False matches are eliminated using the nearest neighbor distance ratio method, identifying multiple high-confidence feature matching pairs. To further improve matching reliability, point type consistency constraints can be added, prioritizing matching between positioning hole edge points and between pin imprint centers, avoiding cross-matching between different structural types. These matching pairs establish the correspondence between key physical structures in the two images.

[0037] Then, based on multiple feature matching pairs, the affine transformation matrix of the injection-molded product image relative to the reference product image is calculated using the least squares method. Using the coordinate data of these feature matching pairs as input, an overdetermined system of equations is constructed, and the affine transformation matrix that minimizes the reprojection error is solved using the least squares method. The affine transformation matrix can be understood as a global coordinate mapping relationship, comprehensively reflecting the translation, rotation, and slight scale and shearing changes of the current image relative to the reference image.

[0038] Finally, the boundary offset vector is calculated based on the initial parting line and the affine transformation matrix. This affine transformation matrix, combined with the currently extracted initial parting line, allows for the derivation of the precise boundary offset vector through spatial coordinate transformation. In practice, key nodes on the current initial parting line are first mapped to the coordinate system of the reference product image, and then compared segment by segment with the corresponding positions on the reference parting line to obtain the overall lateral offset, vertical offset, and directional changes.

[0039] To illustrate this technical solution more clearly, a specific example is used below. The system loads a reference product image from a local database. This image pre-labels four positioning hole edge points and two ejector pin imprint centers as reference feature points. These two types of points are chosen because they typically exhibit high repeatability stability on thin-walled shell parts and are easily identifiable in images. After extracting the corresponding feature points from the current injection-molded product image, the system generates six sets of feature matching pairs. Using the two-dimensional coordinates of these six matching pairs, the system constructs a matrix equation and iteratively solves it using the least squares method to obtain a 2×3 affine transformation matrix. This matrix accurately describes the overall spatial transformation relationship between the current image coordinate system and the reference image coordinate system. Subsequently, the system substitutes the coordinates of key nodes on the initial parting line into the inverse of this affine transformation matrix to calculate their theoretical positions in the reference coordinate system. This is then compared with the reference parting line to obtain the X-axis translation, Y-axis translation, and rotation angle.

[0040] Through the above technical solution, this embodiment uses a reference product image as an absolute reference and constructs a precise spatial mapping between the current image and the reference image through feature matching. The least squares method is used to solve the affine transformation matrix, which effectively absorbs and smooths the influence of individual feature point extraction errors, finding the globally optimal spatial transformation relationship. This computational logic based on global affine transformation transforms the relative position changes of local feature points into overall position changes in a unified coordinate system, thereby enabling high-precision separation of translation and rotation components caused by the physical drift of the slider, eliminating interference from minor camera shake or slight overall product deformation.

[0041] In some embodiments, step S204, calculating the boundary offset vector based on the initial parting line and the affine transformation matrix, may include, but is not limited to, the following steps: Perform an affine transformation on the baseline fractal based on the affine transformation matrix; Calculate the normal distance between the initial parting line and the reference parting line after affine transformation; Based on the normal distance, construct an objective optimization function, the objective of which is to minimize the normal distance; The objective optimization function is solved using an objective optimization algorithm, and the boundary offset vector is calculated.

[0042] In some embodiments, the reference parting line can be first affine transformed according to the affine transformation matrix. The normal distance between the initial parting line and the affine-transformed reference parting line is then calculated. The affine transformation matrix can be used to map the reference parting line in the visual inspection template to the coordinate system of the current injection-molded product image, obtaining the affine-transformed reference parting line. The shortest geometric distance, i.e., the normal distance, from each sampling point on the initial parting line to the affine-transformed reference parting line is then calculated. The normal distance measures the interval between two boundaries along the direction most perpendicular to the boundary direction locally along the parting line. This approach is because parting lines often contain oblique segments, arc segments, and corner segments. Comparing along a fixed coordinate axis can easily lead to misinterpreting the boundary's extension direction as drift; measuring along the local normal direction more closely approximates the physical deviation between the actual opening and closing boundaries of the mold. To obtain this normal distance, the initial parting line can be sampled at equal intervals, for example, by selecting continuous sampling points by pixel step size or arc length step size. Then, at each sampling point, the local tangent direction is obtained based on the adjacent points, and the local normal direction perpendicular to the tangent direction is determined. Along this direction, the nearest corresponding point on the affine transformation baseline parting line is searched within a preset search range. If multiple candidate points are found, the point with the most reasonable geometric position and the shortest distance is selected as the corresponding point. If no reliable corresponding point is found in areas with local occlusion, flash, or reflection, the sampling point is marked as a low-confidence point to reduce its impact in subsequent optimization.

[0043] Then, based on the normal distance, a target optimization function is constructed, with the objective of minimizing the normal distance. A target optimization algorithm is then used to solve the target optimization function, calculating the boundary offset vector. Based on these normal distances, a target optimization function is constructed. This target optimization function typically uses the sum of the squares of the normal distances of all sampling points as its objective value, and its independent variable is the boundary offset vector to be determined (including horizontal translation, vertical translation, and rotation angle). A target optimization algorithm (such as the Gauss-Newton method or the Levenberg-Marquardt algorithm) is then used to iteratively solve this target optimization function, finding a set of optimal translation and rotation parameters that minimize the overall normal distance between the initial parting line after inverse transformation with these parameters and the affine-transformed baseline parting line. To ensure solution stability, the initial value can be zero translation, zero rotation, or the boundary offset vector output from the previous production cycle can be used as the starting point for the current iteration; in scenarios with relatively stable continuous production cycles, the latter approach usually converges more quickly. During the iteration process, stopping conditions can also be set, such as the improvement of the objective function in two consecutive iterations being less than a preset convergence threshold, or the number of iterations reaching a preset upper limit, in order to balance computational accuracy and online detection cycle time.

[0044] To illustrate this technical solution more clearly, a specific example is used below. When processing complex stepped parting lines of thin-walled shell parts, the system first projects the baseline parting line containing 500 coordinate points onto the current image coordinate system using a 2×3 affine transformation matrix. Then, for each pixel on the currently extracted initial parting line, the system searches for the corresponding point on the affine-transformed baseline parting line along its local normal direction, calculating the Euclidean distance between the two as the normal distance. The system constructs an objective optimization function that minimizes the sum of squared weighted normal distances, and inputs initial guesses (such as zero translation and zero rotation). The system performs 5 to 10 iterations using the Levenberg-Marquardt algorithm. When the change in the objective function value is less than the preset convergence precision (such as 0.01 pixels), the iteration stops, and the horizontal translation, vertical translation, and rotation angle at this point are output as the final boundary offset vector.

[0045] Through the above technical solution, this embodiment transforms the calculation of boundary offset into a nonlinear optimization problem of curve matching. By first performing a global affine transformation alignment and then calculating the point-by-point normal distance, it is possible to accurately capture the minute deformations and displacements of complex parting lines in various localities. This is because the global affine transformation first removes the common errors caused by minor deviations in the overall product position, shooting posture, and viewing angle, so that the remaining differences are mainly concentrated on the relevant boundaries of the slider itself; while the point-by-point normal distance further distinguishes between "sliding in the direction of the boundary's own extension" and "structural offset that is truly perpendicular to the boundary," thus making the drift measurement more consistent with the actual mechanical displacement. The construction and solution of the objective optimization function is actually to find a rigid body transformation that makes the current actual boundary and the theoretical reference boundary achieve optimal geometric coincidence. This processing method effectively solves the error problem caused by simple coordinate subtraction under complex contours.

[0046] In some embodiments, in step S104, determining the state of the slider component based on the boundary offset vector may include, but is not limited to, the following steps: Step S301: Obtain historical offset data, which includes historical horizontal translation data along the X-axis of the image, historical vertical translation data along the Y-axis of the image, and historical rotation angle data around an axis perpendicular to the image plane. Step S302: Calculate the target mean and target variance based on historical offset data and boundary offset vector; Step S303: If the target variance is greater than the preset variance threshold, then the state of the slider component is determined to be environmental disturbance drift. Step S304: If the target variance is less than or equal to the preset variance threshold, then determine whether the target mean is greater than the boundary drift safety threshold. Step S305: If the target mean value is greater than the boundary drift safety threshold, then the slider assembly is determined to be in a state of severe wear and drift. Step S306: If the target mean is less than or equal to the boundary drift safety threshold, then determine whether the target mean is greater than the preset drift trigger threshold. The preset drift trigger threshold is less than the boundary drift safety threshold. Step S307: If the target mean is greater than the preset drift trigger threshold, then the slider component is determined to be in slider pose drift; otherwise, the slider component is determined to be in no drift.

[0047] In some embodiments, historical offset data can be acquired first. Historical offset data from several consecutive cycles prior to the current production cycle (e.g., the past 20 cycles) can be extracted from the system database. This historical data, together with the currently calculated boundary offset vector, constitutes a time-series sample set. To illustrate the acquisition method of historical offset data, the system can write the boundary offset vector output by the detection, along with the cycle number, timestamp, product number, and mold number, into the database after each injection molding, robot part removal, and image acquisition. Horizontal translation, vertical translation, and rotation angle fields can be established in the database, and the validity of the detection can be recorded. When the boundary offset vector is unreliable due to image blurring, workpiece missing corners, severe occlusion, or other reasons in a certain cycle, this data can be marked as invalid and not included in the sliding window statistics. The length of the sliding window can be preset according to the actual production cycle and mold change speed, and can be selected to cover both short-term fluctuations and medium-term trends. For example, for production lines with a faster cycle and more significant mold temperature rise, a shorter window can be selected to improve response speed; for production lines with a slower cycle but more focus on long-term wear evolution trends, the window can be appropriately enlarged.

[0048] Then, based on historical offset data and boundary offset vectors, the target mean and target variance are calculated. If the target variance is greater than the preset variance threshold, the slider component state is determined to be environmental disturbance drift. The target mean can be understood as the average degree to which the slider deviates from its normal position over a period of time, and the target variance can be understood as whether the offset fluctuates significantly or remains stable over this period. Variance is a key indicator for measuring the degree of data dispersion. When the target variance is greater than the preset variance threshold, it indicates that the slider's position is extremely unstable in recent continuous production, exhibiting random jump characteristics. This is usually caused by non-wear factors such as external environmental vibration, instantaneous fluctuations in clamping force, or unsmooth product demolding, and is therefore judged as environmental disturbance drift. To further improve the reliability of the judgment, the preset variance threshold is not arbitrarily given, but can be obtained through pre-calibration: for example, when the mold is in normal condition and the workshop environment is stable, a period of continuous production data is collected, and its natural fluctuation range is statistically analyzed; then, under conditions of intentionally introducing slight external disturbances, another period of data is collected, and the fluctuation levels of the two types of data are compared. The threshold that can better distinguish between the two states is selected as the preset variance threshold.

[0049] If the target variance is less than or equal to the preset variance threshold, it indicates that the slider's motion trajectory has good consistency and repeatability. In this case, the nature of the offset depends on the magnitude of the offset. The system further examines the target mean: if the target mean is greater than the boundary drift safety threshold, it indicates that the slider has undergone irreversible severe skew, which is very likely to cause severe flash or interference damage to mold components. This is judged as severe wear drift. If the target mean is less than or equal to the boundary drift safety threshold, but greater than the preset drift trigger threshold, it indicates that the slider has deviated from the initial taught position due to thermal expansion or initial slight wear, but is still in a controllable and stable state. This is judged as slider pose drift. If the target mean is less than or equal to the preset drift trigger threshold, it indicates that the slider remains in the ideal initial state and is judged as no drift. The preset drift trigger threshold and boundary drift safety threshold can be determined by combining mold trial molding, long-term operation statistics and manual verification results. For example, first record the correspondence between the offset and whether the product has flash, burrs, or interference marks in multiple batches of samples. Then set the range that will not cause defects but is significantly deviated from the initial position as near the preset drift trigger threshold, and set the range that has significantly affected product quality or mold safety as near the boundary drift safety threshold, thereby forming a threshold system with process basis.

[0050] To illustrate this technical solution more clearly, a specific example is used below. In the continuous production of thin-walled shell parts, the system sets the sliding window size to 30 production cycles. The preset variance threshold is set to 0.5 pixels squared, the preset drift trigger threshold is set to 2.0 pixels, and the boundary drift safety threshold is set to 8.0 pixels. These thresholds can be obtained through early production calibration: for example, continuously collecting multiple sets of data when the mold is in a stable state after new mold or maintenance, confirming that the target mean is usually lower than a certain small range during normal production; then collecting a set of slightly stable drift data when the mold temperature stabilizes, observing its mean range; finally, combining the detection data from historical maintenance records when "significantly increased flash" or "part interference risk" occurs, the safety threshold level is determined. At a certain detection moment, the system extracts the offset data from the past 29 times and combines it with the current offset vector to calculate the target variance as 1.2 pixels squared. Since 1.2 is greater than 0.5, the system determines that it is currently in an environmental disturbance drift state, possibly due to vibration caused by the operation of heavy equipment near the workshop. At another detection point, the calculated target variance was 0.1 pixels squared, and the target mean was 3.5 pixels. Since the variance was extremely small and the mean was between 2.0 and 8.0, the system determined that the slider was in a stable slider pose drift state, which typically corresponds to the state after the mold has reached thermal equilibrium. If, after several months of continuous production, a calculation showed a target variance of 0.2 pixels squared, but the target mean reached 9.5 pixels, exceeding the safety limit of 8.0, the system decisively determined it to be severe wear drift and immediately triggered a shutdown alarm.

[0051] Through the above technical solution, this embodiment utilizes the orthogonal dimensions of mean and variance in statistics to classify the dynamic behavior of the slider in two-dimensional space. Variance is used to filter high-frequency random noise and identify environmental disturbances; mean is used to quantify low-frequency trend changes and assess the severity of wear or thermal expansion. Through this time-series-based statistical analysis, the system can effectively penetrate the randomness of single-detection data and accurately observe the true physical evolution of the slider component. Its technical advantage lies in completely solving the problems of false alarms and missed alarms easily caused by traditional single-threshold judgments. When environmental disturbances cause instantaneous large deviations, the system will not blindly stop; when the slider undergoes stable and safe pose drift, the system can accurately identify it and provide a basis for subsequent dynamic compensation; and when serious wear truly endangers mold safety, the system can intercept it promptly and accurately. This hierarchical and categorized state determination mechanism greatly improves the intelligence level and on-site adaptability of the injection mold quality inspection system.

[0052] In some embodiments, step S302, calculating the target mean and target variance based on historical offset data and boundary offset vector, may include, but is not limited to, the following steps: Calculate the first mean and the first variance based on historical horizontal shift data and the current horizontal shift amount; Calculate the second mean and second variance based on historical vertical translation data and the current vertical translation amount; Calculate the third mean and third difference based on historical rotation angle data and the current rotation angle; The target mean is obtained by averaging the first mean, the second mean, and the third mean. The target variance is obtained by averaging the first, second, and third variances.

[0053] In some embodiments, the time series sample set can be split into three independent subsets according to physical dimensions. For the horizontal translation dimension, a first mean reflecting the lateral shift trend and a first variance reflecting the degree of lateral fluctuation are calculated using historical horizontal translation data and the current horizontal translation amount. Similarly, for the vertical translation dimension, a second mean and a second variance are calculated; for the rotation angle dimension, a third mean and a third variance are calculated. To avoid interference from outliers, basic cleaning can be performed before calculating the statistics for the three dimensions, such as deleting invalid records, removing outliers that clearly exceed the physical possibilities of the device, or restricting isolated spikes. After independently calculating the statistical characteristics of each dimension, in order to provide a unified scalar input for subsequent state determination, the system averages the three means to obtain a target mean and averages the three variances to obtain a target variance.

[0054] Through the above technical solution, this embodiment captures the independent motion features of the slider in the X-axis, Y-axis, and rotational directions by dimensionality reduction and decoupling, avoiding mutual interference between data from different dimensions. Subsequently, through averaging calculations, the multi-dimensional features are re-integrated into a single comprehensive evaluation index. This processing method preserves the drift details in each degree of freedom while meeting the requirement of the state determination logic for a single input variable. This is because analyzing independently first and then integrating ensures that changes in each direction are fully perceived before being incorporated into the final decision based on their engineering importance. This effectively prevents feature overload caused by mixed calculations of multi-dimensional data, further improving the sensitivity and accuracy of the slider component's state determination.

[0055] In some embodiments, differentiating the baseline parting line to obtain the target parting line may include, but is not limited to, the following steps: If the slider assembly is in the state of environmental disturbance drift or no drift, then the baseline parting line is used as the target parting line; If the slider assembly is in a state of slider pose drift, then the reference parting line is rotated according to the third mean. Based on the first mean, the baseline parting line after rotation is horizontally shifted. Based on the second mean, the baseline fractal line after horizontal translation is vertically translated to obtain the target fractal line.

[0056] In some embodiments, if the slider experiences a stable pose drift, the actual parting line on the product has deviated from the fixed reference parting line in the visual inspection template. If the original reference parting line is still used to divide the slider area and the fixed cavity area, defects that cross the boundary may be incorrectly attributed.

[0057] Therefore, a differentiated parting line update strategy can be adopted for different slider component states. When the slider component state is characterized by environmental disturbance drift, it indicates that the current offset is caused by instantaneous and random external disturbances, and does not represent a change in the slider's true long-term physical position. When the slider component state is characterized by no drift, it indicates that the slider is perfectly positioned. In both cases, blindly adjusting the parting line would introduce systematic errors. Therefore, the system maintains its stability and directly uses the original baseline parting line as the target parting line for current detection.

[0058] When the slider assembly is in a state of slider pose drift, it indicates that the slider has stabilized in a new physical position. At this point, the reference parting line must be compensated and corrected. The correction process strictly follows the sequence of spatial geometric transformations: First, using the geometric center or preset rotation center of the reference parting line as the base point, all coordinate points on the reference parting line are rotated according to the third mean value representing the rotation trend to compensate for the slight sway of the slider; next, the rotated coordinate points are horizontally translated as a whole according to the first mean value representing the lateral offset trend; finally, the entire coordinates are vertically translated according to the second mean value representing the longitudinal offset trend. After these three consecutive spatial transformations, the original reference parting line is accurately moved to the position of the actual parting line of the current product, generating a target parting line adapted to the current mold state. To more clearly illustrate the implementation details, the preset rotation center can be predetermined during the template creation stage, for example, by selecting the geometric center of the relevant parting line segment of the slider, the center of the slider area bounding box, or the theoretical rotation sensitive center of the slider determined by the mold structure drawing, and this coordinate is saved as a template parameter for a long time. The reason for prioritizing rotation processing before horizontal and vertical translation is that rotation alters the positional relationship of each sampling point relative to the center. If translation is performed first followed by rotation, the final boundary position may exhibit additional deviations from the actual physical boundary. By fixing this processing order, consistent and repeatable results in each dynamic update can be ensured. After the target parting line is generated, it can directly replace the boundary input in subsequent defect detection modules to re-divide the slider detection area and the fixed cavity detection area. Alternatively, it can be further cached as a temporary template for the current cycle, available for use by other correlation analysis steps in the current image.

[0059] To illustrate this technical solution more clearly, a specific example is used below. In the inspection of thin-walled shell parts, if the system determines that the current state is slider pose drift, and the calculated first mean is a rightward translation of 3 pixels, the second mean is a downward translation of 1 pixel, and the third mean is a clockwise rotation of 0.5 degrees, the system first retrieves the baseline parting line composed of 500 coordinate points from the visual inspection template. Taking the center point of this parting line as the origin, the 500 points are rotated clockwise by 0.5 degrees using a rotation matrix. Subsequently, the X-coordinate of all rotated points is uniformly increased by 3 pixels, and the Y-coordinate is uniformly increased by 1 pixel. To ensure that the updated target parting line remains smooth and continuous, if the spacing between local points becomes uneven after rotation and translation, the point sequence can be interpolated and resampled to restore the spacing between adjacent points to the standard density when the template was established. After the above transformation, these 500 points constitute a completely new polygonal line, namely the target parting line. In subsequent quality inspection steps, the system will completely discard the original baseline parting line and instead redefine the slider inspection area and fixed cavity inspection area based on this newly generated target parting line. If a flash appears on the product edge at this time, since the target parting line has moved synchronously to the lower right, the flash feature will accurately fall within the updated slider inspection area and thus be correctly attributed to a slider area defect. If the current state is due to environmental disturbance drift, even if the system detects a large single offset, it will not update the target parting line but will still use the baseline parting line as the inspection basis, thereby avoiding the inspection area jumping back and forth due to occasional jitter.

[0060] Through the above technical solution, this embodiment establishes a dynamic boundary compensation mechanism based on state feedback. By using the statistically obtained translation and rotation averages as rigid body transformation parameters and applying them inversely to the theoretical reference boundary, adaptive updates of the visual inspection template are achieved. This differentiated processing logic prevents overcompensation under environmental disturbances while ensuring accurate tracking under actual pose drift. Its technical effect is to completely eliminate the interference of feature space position offset caused by mold thermal expansion or initial wear on defect attribution. The dynamically generated target parting line can always closely fit the actual physical parting marks on the product, ensuring that subsequent region division and defect mapping are based on an absolutely accurate spatial reference. This not only significantly reduces the false alarm rate of fixed cavity edge damage but also enables the system to maintain extremely high detection accuracy even during long periods of operation with a faulty (slightly worn) slider, maximizing the effective production time of the injection molding equipment.

[0061] In some embodiments, in step S106, the injection mold quality is inspected according to the target parting line to obtain the quality inspection result, which may include, but is not limited to, the following steps: Step S401: Extract abnormal pixels from the injection molded product image to obtain multiple abnormal pixels. Abnormal pixels are pixels whose gray values ​​are greater than the background gray value threshold. Step S402: Connect multiple abnormal pixels to obtain a defective connected component; Step S403: Determine the slider detection area and the fixed cavity detection area based on the target parting line; Step S404: If the defective connected region is within the slider detection area, then the quality inspection result is determined to be a slider area defect; Step S405: If the defect connectivity region is within the fixed cavity detection area, then the quality inspection result is determined to be a defect in the fixed cavity area; Step S406: If the defect connectivity region is located in both the slider detection area and the fixed cavity detection area, the quality inspection result is determined based on the defect connectivity region, the slider detection area, and the fixed cavity detection area.

[0062] In some embodiments, abnormal pixels can be extracted from the injection-molded product image first. During the injection molding process, common defects such as flash, burrs, or dents often exhibit significantly different grayscale characteristics from the surface of normal products under specific industrial light sources. For example, flash, due to its extremely thin thickness, often produces high-brightness reflections, with its grayscale value significantly higher than the surrounding normal background area. Therefore, by setting a reasonable background grayscale threshold, pixels with grayscale values ​​greater than this threshold can be filtered out as abnormal pixels suspected of being defects. This background grayscale threshold can be obtained through statistical analysis of images of normal, defect-free products, or dynamically calculated using an adaptive threshold segmentation algorithm.

[0063] Then, multiple anomalous pixels are concatenated to obtain the defect connected component. Since a single anomalous pixel often cannot form a complete defect shape and is easily affected by image noise, the system employs morphological processing methods (such as dilation and closing operations) or connected component analysis algorithms to concatenate and fuse multiple spatially adjacent or nearby anomalous pixels, forming a defect connected component with clear geometric boundaries and area properties. This effectively filters out isolated noise and extracts the true macroscopic defect contour.

[0064] Next, based on the target parting line, determine the slider detection area and the fixed cavity detection area. For example, using the target parting line as a boundary, one side is designated as the slider detection area, and the other side as the fixed cavity detection area. Since the target parting line has undergone dynamic compensation, the area division accurately corresponds to the actual forming range of the slider and fixed cavity in the current mold.

[0065] After region segmentation, the extracted defect connected components can be spatially compared with the two detection regions. If the defect connected component is within the slider detection region, the defect is definitively determined to be caused by the slider assembly, and the quality inspection result is identified as a slider region defect. If the defect connected component is within the fixed cavity detection region, the quality inspection result is identified as a fixed cavity region defect. However, in actual production, especially when the slider clearance increases, leading to flash, the flash often overflows from the parting line, thus spanning between the slider region and the fixed cavity region. For this complex situation where the defect connected component is simultaneously located in both detection regions, the system does not simply perform a single attribution but triggers further comprehensive judgment logic to determine the final quality inspection result based on the specific distribution of the defect connected component in both regions.

[0066] Through the above technical solution, this embodiment combines defect image feature extraction with high-precision spatial region segmentation to establish a rigorous defect attribution mechanism. Its technical advantage lies in fully leveraging the advantages of dynamic target parting lines, so that the spatial positioning of defects is no longer limited to static visual templates. By accurately determining the positional relationship between the defect's connected domain and the actual physical boundary, it completely solves the problem of defect misjudgment caused by slider drift in traditional detection methods, achieving accurate tracing of the causes of injection mold defects and providing highly reliable guidance information for subsequent mold repair and process adjustment.

[0067] In some embodiments, in step S404, determining the quality inspection result based on the defect connectivity region, the slider detection region, and the fixed cavity detection region may include, but is not limited to, the following steps: Calculate the area of ​​the first pixel of the defect connected component in the slider detection region; Calculate the area of ​​the second pixel of the defect connected region in the fixed cavity detection area; If the area of ​​the first pixel is greater than the area of ​​the second pixel, the quality inspection result is determined to be a defect in the slider area; otherwise, the quality inspection result is determined to be a defect in the fixed cavity area.

[0068] In some embodiments, a majority voting principle based on area proportion can be introduced to handle cross-boundary defects. When the system identifies a defective connected region that simultaneously covers both the slider detection area and the fixed cavity detection area, it first calculates the total number of pixels within the slider detection area (i.e., the first pixel area) using pixel traversal or polygon intersection algorithms; simultaneously, it calculates the total number of pixels within the fixed cavity detection area (i.e., the second pixel area). These two area values ​​intuitively reflect the distribution weight of the defect on both mold assemblies. Subsequently, the system compares the first and second pixel areas. If the first pixel area is greater than the second pixel area, it indicates that the main part of the defect is located on the slider forming side, and its cause is highly likely closely related to wear, excessive gap, or incomplete movement of the slider assembly; therefore, it is attributed to a slider area defect. Conversely, if the second pixel area is greater than or equal to the first pixel area, it indicates that the main body of the defect is located on the fixed cavity side, possibly due to edge damage or poor local venting of the fixed cavity; therefore, it is attributed to a fixed cavity area defect.

[0069] Through the above technical solution, this embodiment utilizes quantified area features to replace fuzzy boundary crossing judgments, transforming the complex problem of cross-boundary defect attribution into a simple numerical comparison problem. Its technical effect lies in providing an efficient and robust cross-boundary defect handling mechanism. In actual mold operation, the shapes of defects such as flash are often highly irregular. By comparing the area ratio of the defect on both sides, the physical root cause of the defect can be restored to the greatest extent, avoiding overall misjudgment caused by minor boundary crossings of the defect edge. This not only further improves the precision of defect attribution but also makes the system's detection logic more consistent with the actual physical laws of the injection molding process.

[0070] Figure 3 This is a schematic diagram of the overall architecture of an injection mold quality inspection method based on industrial vision provided in this application embodiment. First, input information such as the injection molded product image and the reference parting line is acquired. Using this input information, the initial parting line, as well as stable structural feature points such as the edge points of positioning holes, chamfer intersections, and the center of ejector pin marks, are extracted. Then, the boundary offset vector of the initial parting line relative to the reference parting line is calculated. Next, the state of the slider assembly is determined. If the slider assembly state is severe wear and drift, a fault alarm is generated as the first output result. If the slider assembly state is environmental disturbance drift, slider pose drift, or no drift, the reference parting line is differentiated to obtain the target parting line, and injection mold quality inspection is performed to obtain the quality inspection result as the second output result. This achieves injection mold quality inspection, improving accuracy and product quality.

[0071] The beneficial effects of implementing the embodiments of the present invention include: First, the embodiments of this application acquire an image of the injection molded product and a reference parting line, extract the initial parting line and stable structural feature points, then calculate the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and stable structural feature points, and then determine the state of the slider assembly based on the boundary offset vector. If the state of the slider assembly is severe wear drift, a fault alarm message is generated; if the state of the slider assembly is environmental disturbance drift, slider pose drift, or no drift, the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected to obtain the quality inspection result. Thus, the target parting line can be determined by combining the boundary offset vector and the state of the slider assembly, and the quality inspection result can be generated to realize the injection mold quality inspection, thereby improving the accuracy and product quality.

[0072] like Figure 4 As shown, this embodiment of the invention also provides an injection mold quality inspection system based on industrial vision, including: The information acquisition module 501 is used to acquire images of injection molded products and reference parting lines. The reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template. The feature extraction module 502 is used to extract the initial parting line and stable structural feature points based on the injection molded product image and the reference parting line. The stable structural feature points include the positioning hole edge points, chamfer intersection points and ejector pin imprint centers. The boundary offset vector calculation module 503 is used to calculate the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and the stable structural feature points. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle about the axis perpendicular to the image plane. The slider component state determination module 504 is used to determine the state of the slider component based on the boundary offset vector. The state of the slider component includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. The fault alarm information generation module 505 is used to generate fault alarm information if the slider assembly is in a state of severe wear and drift. The injection mold quality inspection module 506 is used to differentiate the reference parting line to obtain the target parting line if the slider assembly is in the state of environmental disturbance drift, slider pose drift or no drift, and to perform injection mold quality inspection based on the target parting line to obtain the quality inspection results. The quality inspection results include defects in the slider area and defects in the fixed cavity area.

[0073] The content of the above method embodiments is applicable to this system embodiment. The specific functions implemented in this system embodiment are the same as those in the above method embodiments, and the beneficial effects achieved are also the same as those achieved in the above method embodiments.

[0074] The embodiments described in this application are for the purpose of more clearly illustrating the technical solutions of the embodiments of this application, and do not constitute a limitation on the technical solutions provided by the embodiments of this application. As those skilled in the art will know, with the evolution of technology and the emergence of new application scenarios, the technical solutions provided by the embodiments of this application are also applicable to similar technical problems.

Claims

1. A method for quality inspection of injection molds based on industrial vision, characterized in that, Includes the following steps: Acquire images of the injection-molded product and a reference parting line, wherein the reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template; Based on the injection molded product image and the reference parting line, the initial parting line and stable structural feature points are extracted. The stable structural feature points include the positioning hole edge point, the chamfer intersection point, and the ejector pin mark center. Based on the initial parting line and stable structural feature points, calculate the boundary offset vector of the initial parting line relative to the reference parting line. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle about an axis perpendicular to the image plane. The slider assembly state is determined based on the boundary offset vector. The slider assembly state includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. If the slider assembly is in a state of severe wear and drift, a fault alarm message is generated; If the state of the slider assembly is environmental disturbance drift, slider pose drift, or no drift, then the reference parting line is differentiated to obtain the target parting line, and the injection mold quality is inspected according to the target parting line to obtain the quality inspection result, which includes defects in the slider area and defects in the fixed cavity area.

2. The method according to claim 1, characterized in that, The step of extracting the initial parting line and stable structural feature points based on the injection molded product image and the reference parting line includes: The image of the injection-molded product is smoothed using a Gaussian filter. The image contrast enhancement process is performed on the injection molded product image after Gaussian filtering and smoothing using the histogram equalization algorithm to obtain the preprocessed image. The reference parting line is widened to generate the region of interest for the parting line; The horizontal and vertical gray-level gradients of the region of interest of the fractal lines on the preprocessed image are calculated using an edge detection operator. Based on the horizontal and vertical gray-scale gradients, the edge contours on the region of interest of the fractal line are extracted as the initial fractal line. The stable structural feature points are extracted from the region of interest of the fractal line using a feature point extraction algorithm.

3. The method according to claim 1, characterized in that, The step of calculating the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and stable structural feature points includes: Obtain a baseline product image on a visual inspection template, the baseline product image containing multiple baseline feature points; The stable structural feature points are matched with the multiple reference feature points to identify multiple feature matching pairs; Based on the multiple feature matching pairs, the affine transformation matrix of the injection molded product image relative to the reference product image is calculated using the least squares method; The boundary offset vector is calculated based on the initial parting line and the affine transformation matrix.

4. The method according to claim 3, characterized in that, The step of calculating the boundary offset vector based on the initial parting line and the affine transformation matrix includes: The reference fractal line is subjected to an affine transformation based on the affine transformation matrix. Calculate the normal distance between the initial parting line and the reference parting line after affine transformation; Based on the normal distance, a target optimization function is constructed, the optimization objective of which is to minimize the normal distance; The objective optimization function is solved using an objective optimization algorithm to calculate the boundary offset vector.

5. The method according to claim 1, characterized in that, Determining the state of the slider component based on the boundary offset vector includes: Acquire historical offset data, which includes historical horizontal translation data along the X-axis of the image, historical vertical translation data along the Y-axis of the image, and historical rotation angle data around an axis perpendicular to the image plane; Calculate the target mean and target variance based on the historical offset data and the boundary offset vector; If the target variance is greater than the preset variance threshold, then the state of the slider component is determined to be environmental disturbance drift; If the target variance is less than or equal to a preset variance threshold, then determine whether the target mean is greater than a boundary drift safety threshold. If the target mean value is greater than the boundary drift safety threshold, then the slider assembly is determined to be in a state of severe wear drift. If the target mean is less than or equal to the boundary drift safety threshold, then determine whether the target mean is greater than the preset drift trigger threshold, wherein the preset drift trigger threshold is less than the boundary drift safety threshold; If the target mean is greater than the preset drift trigger threshold, the slider component is determined to be in a state of slider pose drift; otherwise, the slider component is determined to be in a state of no drift.

6. The method according to claim 5, characterized in that, The step of calculating the target mean and target variance based on the historical offset data and the boundary offset vector includes: Calculate the first mean and the first variance based on the historical horizontal translation data and the current horizontal translation amount; Calculate the second mean and the second variance based on the historical vertical translation data and the current vertical translation amount; Calculate the third mean and the third difference based on the historical rotation angle data and the current rotation angle; The target mean is obtained by averaging the first mean, the second mean, and the third mean. The target variance is obtained by averaging the first variance, the second variance, and the third variance.

7. The method according to claim 6, characterized in that, The step of differentiating the baseline fractal line to obtain the target fractal line includes: If the slider assembly is in a state of environmental disturbance drift or no drift, then the reference parting line is used as the target parting line; If the slider assembly is in a state of slider pose drift, then the reference parting line is rotated according to the third mean value. Based on the first mean, the reference parting line after rotation is horizontally translated. Based on the second mean, the baseline parting line after horizontal translation is vertically translated to obtain the target parting line.

8. The method according to claim 1, characterized in that, The step of performing injection mold quality inspection based on the target parting line to obtain quality inspection results includes: The abnormal pixel points are extracted from the injection molded product image to obtain multiple abnormal pixel points. The abnormal pixel points are pixels whose gray values ​​are greater than the background gray value threshold. By splicing together the multiple abnormal pixels, a defective connected component is obtained; Based on the target parting line, determine the slider detection area and the fixed cavity detection area; If the defective connected region is located within the slider detection area, then the quality inspection result is determined to be a slider area defect; If the defect connectivity region is located within the fixed cavity detection area, then the quality detection result is determined to be a fixed cavity region defect; If the defect connectivity region is located in both the slider detection region and the fixed cavity detection region, the quality inspection result is determined based on the defect connectivity region, the slider detection region, and the fixed cavity detection region.

9. The method according to claim 8, characterized in that, The step of determining the quality inspection result based on the defect connectivity region, the slider detection region, and the fixed cavity detection region includes: Calculate the area of ​​the first pixel of the defect connected component in the slider detection area; Calculate the area of ​​the second pixel of the defect connectivity region in the fixed cavity detection area; If the area of ​​the first pixel is greater than the area of ​​the second pixel, then the quality inspection result is determined to be a defect in the slider area; otherwise, the quality inspection result is determined to be a defect in the fixed cavity area.

10. A quality inspection system for injection molds based on industrial vision, characterized in that, include: The information acquisition module is used to acquire images of injection molded products and reference parting lines, wherein the reference parting line is the boundary line between the slider area and the fixed cavity area on the visual inspection template; The feature extraction module is used to extract the initial parting line and stable structural feature points based on the injection molded product image and the reference parting line. The stable structural feature points include the positioning hole edge points, chamfer intersection points, and ejector pin imprint centers. The boundary offset vector calculation module is used to calculate the boundary offset vector of the initial parting line relative to the reference parting line based on the initial parting line and the stable structural feature points. The boundary offset vector includes the current horizontal translation along the X-axis of the image, the current vertical translation along the Y-axis of the image, and the current rotation angle around an axis perpendicular to the image plane. The slider component state determination module is used to determine the state of the slider component based on the boundary offset vector. The state of the slider component includes environmental disturbance drift, severe wear drift, slider pose drift, and no drift. The fault alarm information generation module is used to generate fault alarm information if the slider assembly is in a state of severe wear and drift. The injection mold quality inspection module is used to differentiate the reference parting line to obtain the target parting line if the state of the slider assembly is environmental disturbance drift, slider pose drift or no drift, and to perform injection mold quality inspection based on the target parting line to obtain the quality inspection result. The quality inspection result includes defects in the slider area and defects in the fixed cavity area.