An industrial vision-based precision electronic mold optical detection method and system

CN122928830APending Publication Date: 2026-10-16SHENZHEN ZHONGTIANHAO ELECTRONIC TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611165699.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-16

AI Technical Summary

Technical Problem

由于亮带的灰度极值极高,其内外边缘或中心区域的灰度梯度幅值往往超过真实刃口物理边界处的灰度变化,导致常规的边缘检测算法错误地将亮带的外缘或亮带中心识别为刃口轮廓

Benefits of technology

[0052] As can be seen from the above, the precision electronic mold optical inspection method and system based on industrial vision provided in this application can accurately restore the true physical contour of the cutting edge by acquiring multiple frames of images under different imaging conditions and distinguishing between real and false boundaries based on positional stability, and then using the real boundary to perform geometric reconstruction on the occluded area caused by the false boundary. This effectively eliminates the interference of reflective bright bands and improves the accuracy of optical re-inspection of mold grinding. It has the advantages of accurately acquiring the true physical contour of the cutting edge and avoiding interference from reflective bright bands.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122928830A_ABST
    Figure CN122928830A_ABST
Patent Text Reader

Abstract

The application provides a precision electronic mold optical detection method and system based on industrial vision, relates to the technical field of industrial vision detection, and has the technical solution points that multiple images under different imaging conditions are acquired, real and false boundaries are distinguished based on position stability, the shielding area caused by the false boundary is geometrically reconstructed by using the real boundary, the real physical profile of the blade edge can be accurately restored, the interference of the bright band caused by reflection is effectively eliminated, the accuracy of mold grinding optical rechecking is improved, and the advantages that the real physical profile of the blade edge can be accurately acquired and the interference of the bright band caused by reflection is avoided are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of industrial vision inspection technology, and more specifically, to a precision electronic mold optical inspection method and system based on industrial vision. Background Technology

[0002] In the field of precision electronics manufacturing, the cutting edges and corner areas of molds are prone to wear, minor chipping, and other defects after long-term service, typically requiring localized repair through regrinding. After regrinding, an industrial vision inspection system is needed to perform optical re-inspection of the regrind area to determine if there are any defects such as chipping, incompleteness, or over-grinding, and whether the boundaries have been restored to a state that meets the re-line use standards. The conventional visual re-inspection process is as follows: the regrinding mold is placed at the inspection station, and the regrind area is imaged under preset fixed lighting conditions. An edge extraction algorithm is used to extract the cutting edge contour from the image, and this contour is compared with a historical standard contour template. Based on the deviation, the result of determining whether the mold is qualified is output.

[0003] like Figure 6 As shown, a conventional vision inspection system illuminates a precision electronic mold downwards using a fixed lighting source. The light shines on the highly reflective cutting edge area after grinding, and the reflected light enters the industrial vision imaging lens upwards, thereby producing an image output plane.

[0004] However, the re-grinding process creates fresh exposed metal surfaces or localized polishing marks near the cutting edge and corners, and the resulting edge geometry is typically sharper. The surface reflectivity of these areas increases significantly. When imaged under fixed visual illumination conditions, such as under a ring light source or a directional light source at a specific angle, the highly reflective surface and sharp edges easily form narrow and strong localized saturated bright bands along the cutting edge boundary. The grayscale value of this saturated bright band is much higher than the surrounding area, appearing in the image as a bright stripe similar in direction to the cutting edge.

[0005] like Figure 6 As shown in the image plane, the dark-filled area in the image indicates a saturated bright band formed by reflection, which is a kind of interference artifact.

[0006] In the edge extraction stage, the presence of saturated bright bands directly affects contour localization based on grayscale changes. Because the bright bands have extremely high grayscale extremes, the grayscale gradient amplitude of their inner and outer edges or central regions often exceeds the grayscale change at the actual physical boundary of the cutting edge. This causes conventional edge detection algorithms to incorrectly identify the outer edge or center of the bright band as the cutting edge contour. This results in a global or local spatial offset of the extracted current contour relative to the actual physical boundary. When compared with historical standard contour templates, this not only causes global positional mapping deviations but may also submerge actual minor edge chipping defects within the bright bands or misjudge over-grinding areas as boundary expansion, severely affecting the accuracy of defect judgment. When the actual physical cutting edge contour is submerged by the bright bands, the edge detection algorithm, guided by the bright bands, arrives at an incorrectly extracted contour. When this incorrect contour is compared with the historical standard contour template, it produces significant spatial offsets and misjudgments, ultimately leading to missed defects or misjudged states in the judgment results.

[0007] To address the aforementioned issues, existing technologies urgently need improvement. Summary of the Invention

[0008] The purpose of this application is to provide a precision electronic mold optical inspection method and system based on industrial vision, which has the advantages of accurately acquiring the true physical contour of the cutting edge, avoiding interference from reflective bright bands, and improving inspection accuracy.

[0009] This application provides a precision electronic mold optical inspection method based on industrial vision, the technical solution of which is as follows:

[0010] Acquire multiple frames of first image information reflecting the cutting edge area of ​​the mold under test after grinding under different imaging conditions;

[0011] Extract candidate boundary information to characterize local grayscale changes from the first image information of each frame;

[0012] Based on the positional stability of candidate boundary information across multiple frames of first image information, distinguish between positionally stable true boundary information and positionally drifting pseudo boundary information from the candidate boundary information;

[0013] Based on the true boundary information, the occluded area corresponding to the pseudo boundary information is geometrically reconstructed to obtain the target boundary information used to characterize the true physical contour of the cutting edge region.

[0014] Furthermore, this application also proposes extracting candidate boundary information for characterizing local grayscale changes from the first image information of each frame, including:

[0015] For the first image information of each frame, local extreme points are extracted using a unified gradient threshold to obtain candidate boundary points carrying coordinate information, gradient information and source frame identifier;

[0016] Structural features on the mold that are not affected by grinding are obtained as auxiliary positioning features, and the transformation relationship used to map the candidate boundary points of each frame to a unified coordinate system is determined based on the image position of the auxiliary positioning features in the first image information of each frame.

[0017] The candidate boundary points of each frame are transformed to a unified coordinate system using transformation relationships, forming a set of candidate boundary points in a unified coordinate system, which serves as candidate boundary information.

[0018] Furthermore, this application also proposes a step for distinguishing between positionally stable true boundary information and positionally drifting pseudo boundary information from candidate boundary information based on the positional stability of candidate boundary information across multiple frames of first image information, including:

[0019] Spatial clustering of candidate boundary points in the unified coordinate system candidate boundary point set yields multiple boundary reference regions;

[0020] For each boundary reference region, a position consistency index is determined based on the position of the candidate boundary points from the first image information of different frames within the boundary reference region to characterize the degree of cross-frame position change of the edge within the boundary reference region.

[0021] Based on the relationship between the positional consistency index and a preset stability threshold, the boundary reference region is divided into a region containing real boundary information with stable position and a region containing pseudo boundary information with positional drift.

[0022] Furthermore, this application also proposes determining a positional consistency index to characterize the degree of cross-frame positional change of edges within the boundary reference region based on the positions of candidate boundary points from first image information of different frames within the boundary reference region, including:

[0023] Based on the distribution of candidate boundary points in the extension direction perpendicular to the boundary reference region, the candidate boundary points in the boundary reference region are divided into multiple candidate edge point groups.

[0024] For each candidate edge point group, the evaluation score of the candidate edge point group is determined based on the degree of positional change of the candidate boundary points in the multi-frame first image information, the frequency of their appearance in the multi-frame first image information, and the consistency of the response intensity.

[0025] Based on the evaluation scores of each candidate edge point group, the target edge point group is determined from multiple candidate edge point groups. The evaluation score of the target edge point group is higher than that of other candidate edge point groups.

[0026] Based on the positions of candidate boundary points within the target edge point group, determine the position consistency index.

[0027] Furthermore, this application also proposes that the step of geometrically reconstructing the occlusion region corresponding to the pseudo-boundary information includes:

[0028] Determine the endpoints where the occlusion area connects to the credible boundary formed by the target edge point group, obtain the position of the endpoints and the extension direction of the credible boundary at the endpoints. When the occlusion area connects to the credible boundary on both sides along the extension direction of the cutting edge, the endpoints include the endpoints located on both sides of the occlusion area. When the occlusion area connects to the credible boundary on only one side, the endpoints include the endpoint located on that side.

[0029] Obtain the contour fragment corresponding to the position of the occluded area in the historical standard contour template;

[0030] Based on the position and extension direction of the endpoints as geometric constraints and the contour fragment as a shape reference, a transition curve corresponding to the occluded area is generated as the cutting edge boundary obtained by geometric reconstruction of the occluded area. When the endpoints exist on both sides of the occluded area, the transition curve connects the endpoints on both sides. When the endpoints exist on only one side of the occluded area, the transition curve is generated by extending the endpoint on that side along the cutting edge extension direction.

[0031] During the generation of the transition curve, the constraint strength of the contour segment on the shape of the transition curve is determined according to the distance between each position on the transition curve and the endpoint. When the endpoint exists on both sides of the shading area, the constraint strength of the middle position of the shading area located between the two endpoints and away from the two endpoints is lower than that of the position closer to either endpoint. When the endpoint exists on only one side of the shading area, the constraint strength of the position away from the endpoint along the cutting edge extension direction is lower than that of the position closer to the endpoint.

[0032] Furthermore, this application proposes that the cutting edge boundary includes a first type of segment composed of target edge point groups and a second type of segment composed of transition curves; when judging defects based on the cutting edge boundary and historical standard contour template, a first judgment condition is adopted for the first type of segment and a second judgment condition is adopted for the second type of segment, and the tolerance of the second judgment condition for deviation is higher than that of the first judgment condition.

[0033] Furthermore, this application also proposes that, before determining defects based on the cutting edge boundary and historical standard profile template, the following steps are also included:

[0034] When there is a segment to be corrected in the second type of segment, auxiliary image information is acquired to reflect the true edge of the segment to be corrected. The segment to be corrected is a segment in the second type of segment that is recovered only from a single-sided first type of segment, or a segment in which the distance between the two first type of segments along the blade direction is greater than a preset length. The imaging conditions of the auxiliary image information are different from those of the multi-frame first image information.

[0035] Based on the auxiliary image information, edge points are extracted from the section to be corrected to obtain supplementary edge points;

[0036] Based on the connection relationship between the supplementary edge points and the first type of segments adjacent to the segment to be corrected, the cutting edge boundary is updated to obtain the updated cutting edge boundary.

[0037] When determining defects based on the updated cutting edge boundary, the segment formed by the supplementary edge points in the updated cutting edge boundary is treated as the first type of segment.

[0038] Furthermore, this application also proposes acquiring multiple frames of first image information reflecting the cutting edge area of ​​the mold under different imaging conditions after grinding, including:

[0039] A preset sequence is defined, which includes at least three optical states. The optical states are at least one of the following: the angle between the incident direction of the light source illuminating the cutting edge area and the normal of the cutting edge surface; the proportion of specular reflection components entering the camera; and the exposure parameters.

[0040] According to a preset sequence, the first image information obtained by imaging the cutting edge region under each optical state is acquired sequentially to obtain multiple frames of first image information;

[0041] The switching interval between adjacent optical states in the preset sequence is less than the preset maximum switching interval. The preset maximum switching interval is determined based on the allowable positional drift of the cutting edge region in the clamping state and detection environment, so that the physical positional drift of the cutting edge region during imaging of adjacent optical states is less than the preset drift threshold.

[0042] Furthermore, this application also proposes that the method further includes:

[0043] Based on the standard contour information, the region of interest is determined from multiple frames of first image information. The standard contour information is used to characterize the physical boundary of the cutting edge region under standard conditions, and the region of interest is used to limit the extraction range of candidate boundary information.

[0044] When the spatial alignment deviation between multiple frames of first image information exceeds a preset deviation threshold, a prompt message is generated to indicate that the automatic detection process should be paused.

[0045] In addition, this application also provides a precision electronic mold optical inspection system based on industrial vision, the technical solution of which is as follows:

[0046] To perform the above method, the following are included:

[0047] The acquisition module is used to acquire multiple frames of first image information reflecting the cutting edge area of ​​the mold under test after grinding under different imaging conditions;

[0048] The extraction module is used to extract candidate boundary information to characterize local gray-level changes from the first image information of each frame;

[0049] The differentiation module is used to distinguish between real boundary information with stable position and pseudo boundary information with drifting position from the candidate boundary information based on the positional stability of the candidate boundary information across multiple frames of first image information.

[0050] The reconstruction module is used to perform geometric reconstruction on the occluded area corresponding to the pseudo-boundary information based on the real boundary information, so as to obtain the target boundary information used to characterize the real physical contour of the cutting edge region.

[0051] This solution implements the above method in a modular fashion, which can effectively eliminate interference from reflective bright bands and improve the accuracy of defect identification.

[0052] As can be seen from the above, the precision electronic mold optical inspection method and system based on industrial vision provided in this application can accurately restore the true physical contour of the cutting edge by acquiring multiple frames of images under different imaging conditions and distinguishing between real and false boundaries based on positional stability, and then using the real boundary to perform geometric reconstruction on the occluded area caused by the false boundary. This effectively eliminates the interference of reflective bright bands and improves the accuracy of optical re-inspection of mold grinding. It has the advantages of accurately acquiring the true physical contour of the cutting edge and avoiding interference from reflective bright bands. Attached Figure Description

[0053] Figure 1 This is a flowchart illustrating the optical inspection method for precision electronic molds proposed in this application.

[0054] Figure 2 This is a schematic diagram of the structure and data processing flow of a precision electronic mold optical inspection system based on industrial vision proposed in this application.

[0055] Figure 3 This is a schematic diagram illustrating spatial clustering using a sliding window along the cutting edge extension direction in this application.

[0056] Figure 4 This is a schematic diagram showing the segmentation of candidate boundary points within the boundary reference region based on the peak value of the distribution density in this application.

[0057] Figure 5 This is a schematic diagram illustrating the non-uniform distribution of constraint weights for the transition curve generation in this application and their impact on the curve shape.

[0058] Figure 6 This is a diagram illustrating the problems with existing technologies. Detailed Implementation

[0059] The following description, in conjunction with the technical solution of this application, provides a clearer and more complete explanation of the relevant content. It should be noted that the embodiments described herein are only a part of the implementation methods of this application, and not all of them. Other implementation methods obtained by those skilled in the art based on the embodiments of this application without creative effort should also fall within the protection scope of this application. Furthermore, in the description of this application, the terms "first," "second," etc., are mainly for distinction and should not be construed as indicating relative importance.

[0060] Reference Figure 1 This application proposes a precision electronic mold optical inspection method based on industrial vision, the method comprising:

[0061] S1. Acquire multiple frames of first image information reflecting the cutting edge area of ​​the mold under different imaging conditions after grinding;

[0062] S2. Extract candidate boundary information from the first image information of each frame to represent local gray-level changes;

[0063] S3. Based on the positional stability of the candidate boundary information across multiple frames of the first image information, distinguish between the positionally stable true boundary information and the positionally drifting pseudo boundary information from the candidate boundary information.

[0064] S4. Based on the real boundary information, perform geometric reconstruction on the occlusion area corresponding to the pseudo boundary information to obtain the target boundary information used to characterize the real physical contour of the cutting edge region.

[0065] This application mainly addresses the special imaging problem when precision electronic molds are sent back to the industrial vision inspection station for optical re-inspection after long-term service and refurbishment. Conventional vision re-inspection processes rely on a stable premise: the position with the most dramatic grayscale change in the image captured by the industrial camera must accurately correspond to the actual physical boundary of the mold's cutting edge.

[0066] However, this premise is often broken in the re-inspection scenario after re-grinding, because the re-grinding process leaves fresh exposed metal surfaces near the cutting edge and corners. These areas have high reflectivity, and the geometry of the re-grinded edges is often sharper than the original design.

[0067] When the fixed lighting source at the inspection station shines at the originally preset angle, the combination of the highly reflective fresh metal surface and sharp edges makes it easy for the strong reflected light to be concentrated and shot into the camera lens, forming a narrow and bright to saturated white band along the edge of the blade in the image.

[0068] The grayscale value of this saturated bright band is extremely high, completely covering the grayscale changes and transitions that originally represented the actual cutting edge. This forces the edge extraction algorithm to only lock onto the outer edge or the middle of the bright band, thus treating the boundary of the bright band as the boundary of the cutting edge.

[0069] The subsequent contour extraction and historical standard contour template comparison will cause overall or local spatial offset. The actual minor edge damage may be swallowed by the highlight and cannot be detected, while the over-polished area will be visually misjudged as outward expansion because the highlight expands outward.

[0070] In other words, the fundamental correspondence upon which the original detection process relied—the stable correspondence between the image grayscale transition position and the actual physical boundary of the mold—was destroyed by the high-reflectivity bright band introduced by the grinding process.

[0071] This problem cannot be solved simply by increasing the lighting brightness or changing the grayscale threshold, because it is essentially a change in the matching relationship between the surface reflection properties and the edge geometry on the original light path that exceeds the tolerance.

[0072] In response, this application takes a different approach. In step S1, multiple frames of first image information that can reflect changes in reflectivity are acquired around the cutting edge area. The different imaging conditions mentioned here can be achieved in practice in various ways, such as switching to light sources with different incident directions to illuminate the grinding area separately, or changing the exposure time sequentially under the same light source, or adding and removing polarizing elements in the optical path to change the proportion of specular reflection components entering the camera.

[0073] In this way, the same cutting edge will exhibit different grayscale and brightness characteristics under different lighting or exposure parameters. The position of the real physical boundary in the image remains largely unchanged under these conditions, but the position and intensity of the reflected bright band will drift significantly or even disappear due to differences in lighting angle or exposure. This is the physical basis for distinguishing between real boundary information and reflected false boundaries.

[0074] In step S2, when extracting candidate boundary information from the first image information of each acquired frame, a very high gradient threshold is not used for one-time extraction. While a high threshold can filter out some weak noise in the image, in areas where saturated bright bands exist, the grayscale change of the actual blade edge boundary itself may have become very weak or even compressed by the bright bands to only a very narrow transition band. High threshold extraction would directly miss this part of the signal.

[0075] Therefore, a relatively conservative and uniform low gradient threshold is used here to extract all local extrema. Each point is labeled with its coordinates in the image, gradient magnitude, gradient direction, the frame from which it comes, and the corresponding imaging parameter label.

[0076] The goal of this step is to first include the weak signals that the actual cutting edge may contribute, as well as the strong signals generated by the reflective bright band, to form a relatively complete set of candidate boundary points, rather than making distinctions and selections at this stage.

[0077] Next, we move to step S3, where the core task is to use the information differences between multiple frames to separate which candidate boundary points belong to the actual physical boundary of the cutting edge and which belong to false boundaries caused by reflective bright bands. This separation is based on positional stability. The actual cutting edge is a real geometric structure on the mold, and within the small range allowed by the spatial resolution of the imaging system and the repeatability error of the mold clamping, its physical position at that station remains fixed.

[0078] Regardless of the direction of the illumination source or the adjustment of the exposure parameters, the actual position of the cutting edge should remain basically unchanged in each image. False boundaries, however, are different. They are a product of the combined effects of optical path geometry and high surface reflectivity. When the illumination direction changes or the specular reflection component is suppressed, their position will visibly shift along the direction of the cutting edge normal, and may even disappear completely in some frames, only showing a strong response in other frames.

[0079] Therefore, after aligning the candidate boundary points from different frames to a unified spatial coordinate system, we can analyze the edge points of those local regions along the cutting edge direction segment by segment to see how much positional drift they exhibit between multiple frames.

[0080] Point sets with relatively stable positions that maintain a compact spatial distribution across all frames will be classified as true boundary information; while point sets whose positions drift significantly with changes in imaging conditions, or that suddenly appear and quickly disappear only in specific lighting frames, will be marked as pseudo-boundary information with positional drift.

[0081] In this way, the previous predicament of being unable to determine the boundary when the image is completely covered by a bright band in a single frame can be overcome by the positional difference information brought by multiple frames.

[0082] After obtaining the true boundary information, step S4 involves geometric reconstruction of the occluded areas covered by the false boundary information. This is because the strong grayscale changes visible in the image within these occluded areas are not caused by the true boundary. If edges are forcibly extracted from these areas, only the outer edge or internal transition of the bright band will be mistaken for the edge contour.

[0083] Therefore, a controlled recovery method is adopted here, using trusted line segments around the occluded area that have been confirmed as true boundary information as constraints. When trusted line segments exist on both sides of the occluded area, the trusted line segments on both sides can provide the endpoint positions and tangent directions respectively, thus providing bilateral geometric constraints for this small segment of the occluded cutting edge; when trusted line segments exist on only one side of the occluded area, the trusted line segments on that side can provide the endpoint positions and extension directions on one side, which are used to perform unilateral extension recovery of the occluded area.

[0084] By combining the inherent local curvature continuity of the die cutting edge in geometry, and using the curvature variation trend of the corresponding segment in the historical standard contour template as a shape prior reference, a transition curve for the corresponding occluded area can be generated. When reliable line segments exist on both sides, this transition curve connects the two endpoints; when a reliable line segment exists on only one side, the transition curve is generated by extending that endpoint along the cutting edge extension direction. This transition curve is the inferred true boundary of the occluded cutting edge.

[0085] This approach excludes information from saturated bright bands in the original image during the contour construction process, preventing false boundaries from propagating further and contaminating subsequent defect assessments. Furthermore, the output of step S4 is not a single contour line with uniform confidence; instead, it marks the origins of different segments along the entire cutting edge contour. Segments directly originating from stable edge points have higher confidence, while segments restored through geometric reconstruction have relatively lower confidence. This prepares the ground for applying differentiated judgment criteria based on different segments when comparing with historical standard contours and determining defects.

[0086] This entire processing logic re-establishes a reliable mapping between image analysis results and the actual physical contour of the mold, enabling accurate optical re-inspection of chipped edges, over-grinding, defects, and boundary restoration states even under conditions of severe reflective interference after grinding.

[0087] Furthermore, in some preferred methods, candidate boundary information for characterizing local grayscale changes is extracted from the first image information of each frame, including: extracting local extreme points for each frame of the first image information using a unified gradient threshold to obtain candidate boundary points carrying coordinate information, gradient information, and source frame identifier; obtaining structural features on the mold that are not affected by grinding as auxiliary positioning features, and determining the transformation relationship for mapping the candidate boundary points of each frame to a unified coordinate system based on the image position of the auxiliary positioning features in the first image information of each frame; and transforming the candidate boundary points of each frame to a unified coordinate system using the transformation relationship to form a set of candidate boundary points in a unified coordinate system as candidate boundary information.

[0088] When extracting candidate boundary points, a uniform gradient threshold is used to ensure that edge signals are extracted under the same judgment criteria for each frame of the image. The set value of this uniform gradient threshold is relatively low. Specifically, the threshold can be set in the low to medium range of the typical gradient amplitude range of the blade edge region in the un-sharpened state by analyzing the analysis.

[0089] This setting helps to preserve both the weak grayscale transition signal of the real cutting edge and the strong response signal of the reflective bright band and include them in the candidate set, avoiding the filtering out of some of the weak signals of the real boundary that are obscured by the bright band during the extraction stage due to the excessively high single-frame adaptive threshold.

[0090] Each extracted candidate boundary point carries its two-dimensional coordinates in the image, gradient magnitude, gradient direction angle, source frame number, and the corresponding lighting parameter label for that frame. This information collectively forms the data foundation for subsequent cross-frame analysis. When acquiring auxiliary localization features, structural features on the mold that are unaffected by grinding are selected.

[0091] Since the surface morphology and reflective properties of the cutting edge area will change after grinding, and it is easily interfered with by reflective bright bands, the auxiliary positioning features can be selected from the edge of the process hole, the positioning pin hole, or the obvious structural corner of the non-polished area on the mold base.

[0092] These structural features typically do not undergo grinding or wear throughout the entire lifespan of the mold, and their surface reflectivity remains largely diffuse, making them less susceptible to changes in lighting direction that could cause saturated bright bands.

[0093] By locating the image positions of these auxiliary positioning features in the first image information of each frame, reference points can be provided for subsequent spatial transformations. When determining the transformation relationship, the coordinate pairs of the auxiliary positioning features in each frame image can be used to fit the transformation parameters using the least squares method. The transformation relationship can employ an affine transformation model or a perspective transformation model; the specific choice can be determined based on the type and degree of clamping deviation.

[0094] The unified coordinate system can be based on the coordinate system of the historical standard contour template or the coordinate system of the first frame image. By using the calculated transformation relationship, the candidate boundary points of each frame are transformed to the unified coordinate system, thereby forming a set of candidate boundary points in the unified coordinate system.

[0095] Through the above processing, the candidate boundary points, which were originally scattered in their respective image coordinate systems and had inter-frame spatial deviations, are transformed into a set of candidate boundary points that can be compared across frames under a unified spatial reference. In this set, the spatial position of each candidate boundary point no longer includes mechanical clamping deviations, while retaining the source frame and lighting condition information it carries.

[0096] Furthermore, in some preferred methods, the step of distinguishing stable real boundary information and drifting pseudo-boundary information from candidate boundary information based on the positional stability of candidate boundary information across multiple frames of first image information includes: spatially clustering candidate boundary points in a unified coordinate system candidate boundary point set to obtain multiple boundary reference regions; for each boundary reference region, determining a positional consistency index to characterize the degree of cross-frame positional change of edges within the boundary reference region based on the positions of candidate boundary points from different frames of first image information within the boundary reference region; and classifying the boundary reference region into regions containing stable real boundary information and regions containing drifting pseudo-boundary information based on the relationship between the positional consistency index and a preset stability judgment threshold.

[0097] After obtaining the set of candidate boundary points in a unified coordinate system, these candidate points are scattered and have not yet been organized into continuous analysis units along the cutting edge direction. At this time, it is difficult to distinguish which candidate points correspond to the real physical boundary of the cutting edge and which correspond to the pseudo boundary formed by the reflective bright band. If these scattered points are directly compared across frames, it is easy to mix boundary points from different sources for analysis, which will lead to deviations in subsequent edge extraction and template comparison.

[0098] To address this, candidate boundary points in a unified coordinate system need to be clustered according to their spatial proximity, forming multiple boundary reference regions along the direction of the cutting edge. Each region corresponds to a local position interval on the cutting edge.

[0099] Specifically, refer to Figure 3 Spatial clustering can be achieved by setting a sliding window along the edge extension direction. Based on the local normal direction and tangent direction of the historical standard contour, a sliding window with a width in the normal direction consistent with the edge detection search range and a length in the tangent direction covering several pixels can be set. Candidate boundary points within the window and belonging to different frames will be grouped into the same boundary reference region.

[0100] Combination Figure 3 As shown, the sliding window uses local points on the historical standard contour as a reference, with its short side parallel to the normal direction and its long side parallel to the tangent direction. The window contains candidate boundary points from different frame images, represented by different geometric shapes.

[0101] By moving the sliding window along the sliding direction corresponding to the tangent direction, candidate boundary points in different regions can be sequentially assigned to the corresponding boundary reference regions, thereby organizing scattered candidate boundary points into local analysis units arranged along the blade direction. After forming the boundary reference regions, it is necessary to calculate the position consistency index in each boundary reference region. The position consistency index is a quantitative value that reflects the degree of spatial dispersion of boundary points in each frame within the region.

[0102] In specific calculations, candidate boundary points with the strongest gradient magnitude or most prominent positions within the boundary reference region of each frame can be extracted. The root mean square deviation of the coordinate values ​​of these points in the direction perpendicular to the blade extension can be calculated and used as a positional consistency index. In addition to the root mean square deviation, the maximum deviation of the position of the strongest edge point in each frame or the coefficient of variation of the response can also be used to characterize the degree of positional change.

[0103] After calculating the positional consistency index, it needs to be compared with a preset stability threshold. The stability threshold is a critical value used to distinguish whether the positional change is caused by real physical fluctuations or by reflective pseudo-boundary drift. This threshold can be determined based on the mold's precision level and the vision system's resolution. For example, based on the precision level requirements of the mold's cutting edge and the pixel equivalent of the vision system, the stability threshold can be set as a preset proportion of the number of pixels corresponding to the precision tolerance.

[0104] For a mold with a precision requirement of ±0.01 mm, if the pixel equivalent is 0.005 mm per pixel, the tolerance threshold can be set to about 0.8 pixels. This can tolerate normal clamping and repositioning errors, while also identifying obvious edge position drift caused by reflection.

[0105] Based on the above comparison results, boundary reference regions with position consistency indices below the stability determination threshold can be marked as stable regions, containing true boundary information indicating positional stability. Boundary reference regions with position consistency indices not below the stability determination threshold can be marked as drift regions, containing pseudo-boundary information indicating positional drift.

[0106] In actual processing, when only a single frame or a few frames within the boundary reference area have candidate boundary points, they can be temporarily not directly classified as stable or drifting, but marked as pending, and then judged in combination with the continuity of adjacent areas.

[0107] Furthermore, the positional consistency index can be combined with the response variation coefficient to assess the cross-frame stability of gradient magnitude while evaluating positional drift, serving as an auxiliary criterion. Through spatial clustering and cross-frame positional consistency analysis, the originally scattered and attribute-unclear candidate boundary point set can be transformed into multiple boundary reference regions with clear attribute labels.

[0108] This differentiation method relies on multi-frame behavioral consistency, which helps avoid misjudging the outer edge or center of reflective bright bands as the true edge boundary. Stable edge segments that do not drift with imaging conditions can be directly used as true boundaries for subsequent registration and comparison, while segments that drift with imaging conditions are isolated as masked areas requiring reconstruction. This helps avoid reflective false boundaries from being mixed into the spatial mapping offset caused when comparing the true contour baseline with historical standard contours, reducing the risk of misjudging false boundary extensions as over-grinding or swallowing genuine minor defects within the false boundary bright band.

[0109] In the re-inspection of precision electronic molds after grinding, the edge of the cutting edge often contains both the actual edge boundary and the inner and outer edges of the reflective bright band. When these edges are very close in space, the initial spatial clustering operation can easily group them into the same boundary reference region.

[0110] If we directly perform overall statistics on this region that mixes candidate points from multiple sources, the location data of the true boundary points will be contaminated by the drift of the bright band edge points. This leads to the true boundary being easily misclassified as a false boundary due to an overestimation of the drift, or the bright band edge being misclassified as a stable boundary because it has a strong response in most frames. To solve this statistical distortion problem caused by the mixing of multiple edges, more refined separation and filtering are needed within the region.

[0111] Furthermore, in some preferred methods, a positional consistency index is determined based on the positions of candidate boundary points from different frames of first image information within the boundary reference region. This index characterizes the degree of cross-frame positional change of edges within the boundary reference region. This includes: dividing the candidate boundary points within the boundary reference region into multiple candidate edge point groups based on their distribution along the extension direction perpendicular to the boundary reference region; determining an evaluation score for each candidate edge point group based on the degree of positional change of the candidate boundary points within that group in multiple frames of first image information, their frequency of appearance in multiple frames of first image information, and the consistency of their response intensity; determining a target edge point group from the multiple candidate edge point groups based on their evaluation scores, wherein the evaluation score of the target edge point group is higher than that of other candidate edge point groups; and determining the positional consistency index based on the positions of the candidate boundary points within the target edge point group.

[0112] In specific implementation, refer to Figure 4 First, it is necessary to identify whether there are multiple overlapping edges within the boundary reference region. This can be done by statistically analyzing the distribution density of candidate boundary points along the direction perpendicular to the boundary reference region, which is the normal direction of the cutting edge.

[0113] If two or more clustered peaks are detected in this direction, it indicates that multiple distinct edge trajectories are crowded within the region. Based on the location of these peaks, the candidate boundary points within the region can be divided into multiple candidate edge point groups, such that each group corresponds to a potential independent edge in space.

[0114] Combination Figure 4 As shown, Figure 4 The upper part shows the distribution density curve of candidate boundary points along the normal direction, which has two distinct peaks. Figure 4The lower half shows the boundary reference region, which contains two clusters of candidate boundary points. By setting a dividing line between the two clusters of points, the candidate boundary points are divided into candidate edge point group A and candidate edge point group B, thereby realizing the spatial separation of the aliased candidate boundary points into independent edges.

[0115] After the segmentation is complete, the behavioral characteristics of each candidate edge point group in multiple frames need to be quantitatively evaluated. The evaluation mainly revolves around three dimensions. The first dimension is the degree of positional change, which measures whether the edge group remains stable when lighting conditions change. Specifically, this can be achieved by calculating the square of the difference between the normal coordinates and the average coordinates of the candidate boundary points in each frame, taking the square root of the average of these squared values, and obtaining the root mean square deviation. The smaller the deviation value, the more stable the edge position.

[0116] The second dimension is the frequency of occurrence, which measures whether the edge persists. The proportion of candidate points appearing in all captured frames can be statistically analyzed; a higher proportion indicates that the edge is more likely to be a real physical structure, rather than a reflection that only appears at a specific angle.

[0117] The third dimension is the consistency of response intensity, which measures whether the grayscale transitions at the edges are stable. This can be calculated by comparing the standard deviation to the mean of the gradient magnitude for each set of points across frames. Response fluctuations at real physical boundaries are typically small, while the brightness of reflective bright bands changes drastically with the angle of illumination.

[0118] After obtaining the quantitative results of these three dimensions, they can be normalized to the same numerical range and then summed according to the preset weight coefficients to obtain the comprehensive evaluation score of the candidate edge point group.

[0119] For example, the evaluation score Q can be expressed by the formula The calculation is performed using the following formula: S1 represents the position stability score, S2 represents the frame coverage score, S3 represents the response consistency score, and a, b, and c are weighting coefficients, the sum of which is 1.

[0120] This fusion calculation can comprehensively reflect the degree to which each candidate edge trajectory conforms to the characteristics of the real physical boundary. Then, the most reliable target is selected by comparing the evaluation scores of each candidate edge point group.

[0121] If the highest score is significantly higher than the second-highest score, and the highest score itself exceeds a preset confidence threshold, then the group with the highest score can be identified as the target edge point group. Points within this group are most likely to correspond to the actual physical edge boundary. If the scores of each group are very close, or the overall score is low, it indicates that there is edge competition or the information is not reliable enough in the current area. In this case, it can be marked as an uncertain state, to be further judged later in conjunction with other auxiliary conditions, thereby avoiding making incorrect choices when information is insufficient.

[0122] After locking onto the target edge point group, the positional consistency index is recalculated using only the coordinates of candidate boundary points within that group. The drift calculated in this way purely reflects the cross-frame stability of this selected single edge, completely eliminating interference from adjacent bright band edges.

[0123] This mechanism of separating first and then selecting the best can effectively avoid misjudging the real boundary due to the presence of mixed false boundary points, and also helps prevent false boundaries from masquerading as stable boundaries and entering the subsequent contour construction stage, thereby significantly improving the accuracy of edge contour extraction in complex reflective scenes.

[0124] In the post-grinding inspection scenario, the fresh exposed metal surface and sharp edges of the cutting edge are prone to forming localized saturated bright bands under fixed lighting. After the preceding cross-frame stability differentiation and multi-edge separation screening, although the credible boundary segment where the real physical boundary is located can be accurately located, the grayscale transition information in the original image has been lost in the occluded area completely covered by the bright band, making it impossible to directly extract the real cutting edge boundary.

[0125] If conventional mathematical interpolation is used to connect the two reliable boundaries directly, the generated curve may deviate from the actual physical contour; if the shape of a historical standard contour template is completely copied, it may conceal the local depressions or defects actually caused by the grinding process. To address this, it is necessary to utilize existing reliable boundary endpoint information and historical shape references to perform controlled geometric reconstruction within the occluded area.

[0126] Further, in some preferred embodiments, the step of geometrically reconstructing the occlusion region corresponding to the pseudo-boundary information includes: determining the endpoints where the occlusion region connects to the credible boundary formed by the target edge point group, and obtaining the position of the endpoints and the extension direction of the credible boundary at the endpoints; wherein, when the occlusion region connects to the credible boundary on both sides along the extension direction of the cutting edge, the endpoints include the endpoints located on both sides of the occlusion region; when the occlusion region connects to the credible boundary on only one side, the endpoints include the endpoint located on that side; obtaining the contour segment corresponding to the occlusion region position in the historical standard contour template; and generating the transition curve corresponding to the occlusion region based on the position and extension direction of the endpoints as geometric constraints and using the contour segment as a shape reference. A line serves as the boundary of the cutting edge obtained from the geometric reconstruction of the occluded area. When there are endpoints on both sides of the occluded area, a transition curve connects the two endpoints. When there is an endpoint on only one side of the occluded area, the transition curve is generated by extending from that endpoint along the cutting edge extension direction. During the generation of the transition curve, the constraint strength of the contour segment on the shape of the transition curve is determined according to the distance between each position on the transition curve and the endpoint. When there are endpoints on both sides of the occluded area, the constraint strength at the middle position of the occluded area, located between and away from both endpoints, is lower than that at the position closer to either endpoint. When there is an endpoint on only one side of the occluded area, the constraint strength at the position away from that endpoint along the cutting edge extension direction is lower than that at the position closer to that endpoint.

[0127] Specifically, when determining the endpoints where the occluded region meets the trusted boundary, the adjacent positions of the occluded region and the trusted boundary segment can be located along the extension direction of the blade edge. When trusted boundary segments exist on both sides of the occluded region, the ending pixel coordinates of the trusted boundary segment on one side and the starting pixel coordinates of the trusted boundary segment on the other side are determined as the two endpoints. When a trusted boundary segment exists only on one side of the occluded region, the ending pixel coordinates or starting pixel coordinates of that trusted boundary segment closest to the occluded region are taken as the single-side endpoint.

[0128] To obtain the extension direction at the endpoint, the coordinates of the endpoint and several nearby boundary points can be extracted. The tangent vector at the endpoint can then be calculated using local line fitting or curve differentiation. This tangent vector reflects the geometric orientation of the actual cutting edge before entering the occluded region and is a rigid geometric constraint that must be satisfied in subsequent reconstruction.

[0129] The reason for using it as a hard constraint is that the credible boundary is the real physical boundary confirmed after verification and competitive screening of multiple frames of images. The position and direction of its endpoints have extremely high reliability. The reconstructed transition curve must achieve a smooth connection with the real boundary in position and direction at this point to avoid artificial bends or breaks at the splicing point, thereby preventing the introduction of additional geometric deviations during subsequent template comparison.

[0130] When obtaining the contour fragment corresponding to the occluded area position in the historical standard contour template, the contour point sequence of the corresponding arc length segment can be extracted from the historical standard contour template according to the start and end positions of the occluded area in a unified coordinate system. This contour fragment records the cutting edge shape trend of the mold in the first qualified acceptance or the last normal service state, and can be used as a shape reference in the reconstruction process.

[0131] It is important to note that the shape information provided by the historical standard contour template is not directly equivalent to the actual shape after reshaping, as the reshaping process inevitably alters the local geometry. Therefore, this contour segment is used as a reference constraint during the reconstruction process, not as an absolute standard that must be perfectly fitted.

[0132] When generating transition curves based on the position and extension direction of the endpoints as geometric constraints and contour segments as shape references, a parametric curve model can be constructed to solve the problem. Specifically, when endpoints exist on both sides of the occluded region, the position coordinates and tangent vectors of the endpoints on both sides can be substituted into the curve equation as boundary conditions to ensure that the generated transition curve maintains first-order continuity with the reliable boundary at both endpoints. When endpoints exist only on one side of the occluded region, the position coordinates and tangent vectors of the endpoint on that side can be used as boundary conditions, and combined with the curvature change trend and curve smoothing constraints of the corresponding segment in the historical standard contour template, a transition curve extending from that endpoint along the cutting edge extension direction can be generated.

[0133] Simultaneously, contour segments from historical standard contour templates are introduced as additional shape guiding terms into the objective function for curve generation. During the solution process, the optimal transition curve path is sought by minimizing the curve's bending energy and the deviation energy between the curve and historical contour segments.

[0134] This approach, while ensuring geometric continuity, utilizes historical shape information to provide reasonable guidance for the curve's trajectory within the occluded area, preventing meaningless distortion or oscillation of the curve in areas lacking image data support.

[0135] During the generation of the transition curve, the constraint strength of the contour segments on the shape of the transition curve exhibits a non-uniform distribution, and its specific value is dynamically adjusted according to the distance between each position on the transition curve and its endpoints. (Refer to...) Figure 5 , Figure 5 Taking the case where there are credible boundary endpoints on both sides of the shading region as an example, the non-uniform distribution of the constraint weights for the transition curve generation and its impact on the curve shape are shown.

[0136] Specifically, when endpoints exist on both sides of the occluded region, the arc length distance from any point on the transition curve to both endpoints can be calculated, and the constraint weight of the historical contour segment can be calculated based on this distance. For example, a Gaussian decay function or a linear decay function can be used, such that the constraint weight of the historical contour segment is higher in the region near either endpoint, while the constraint weight is significantly reduced in the middle position, which is far from both endpoints and close to the center of the occluded region. When endpoints exist on only one side of the occluded region, the arc length distance from each position on the transition curve to that side endpoint can be calculated, and the constraint weight of the historical contour segment corresponding to the position far from that side endpoint along the cutting edge extension direction can be lower than that of the position near that side endpoint.

[0137] Combination Figure 5 As shown, in the case where both ends are restored, Figure 5 The upper part shows the curve of the constraint weight as a function of the position along the cutting edge. The curve has the highest value at endpoints 1 and 2 and gradually decreases towards the middle position. Figure 5 The lower half shows the positional relationship between the transition curves generated under different constraint weights, the historical contour segments used as references, and the actual physical cutting edge. In the region near endpoints 1 and 2, the transition curves closely match the historical contour segments. However, in the middle position away from the two endpoints, due to the reduced constraint weights, the generated transition curves can deviate from the historical contour segments, thus more realistically reflecting the actual geometric trend of the physical cutting edge.

[0138] The reason for employing this distance attenuation mechanism is that in regions near the endpoints of the reliable boundary, the geometric trend of the true boundary exhibits strong continuity, and referencing historical shapes helps maintain a smooth transition of the curve. However, at the center of the shading region, due to its distance from the known true boundary and the fact that this area is where the grinding process is most concentrated and where local shape changes are most likely to occur, maintaining a high degree of historical shape constraint will forcefully fit the historical contour, thus smoothing out any minor chipping or over-grinding depressions caused by the grinding process.

[0139] By reducing the historical shape constraint strength at the center position, space can be left for the local shape deviation caused by grinding, so that the reconstructed cutting edge boundary can fill the information gaps without obscuring the real physical defects.

[0140] Furthermore, in some special cases, if the occluded region has a credible boundary endpoint on only one side, such as when the occluded region extends to the edge of the region of interest, unilateral extension recovery can be performed. In this case, the position and extension direction of that endpoint can be used as geometric constraints, and combined with the curvature change trend of the corresponding segment in the historical standard contour template, a transition curve can be gradually generated from that endpoint outward along the cutting edge extension direction until the next credible boundary endpoint is encountered or the boundary of the region of interest is reached.

[0141] The transition curve generated by this unilateral extension recovery has relatively large shape uncertainty due to the lack of endpoint constraints on the other side. It can be marked as a lower confidence level in subsequent confidence assessments so that a more conservative strategy can be adopted when determining defects.

[0142] Through the above strategy, the occluded region transforms from a state lacking boundary information to a state with limited recoverable boundary segments. When there are credible boundary endpoints on both sides of the occluded region, the final generated transition curve satisfies positional and directional continuity with the credible boundaries on both sides at the endpoints, and together they form the complete current cutting edge target boundary. When there is a credible boundary endpoint on only one side of the occluded region, the final generated transition curve satisfies positional and directional continuity with the credible boundary on that side at the endpoints, and extends along the cutting edge extension direction to the next credible boundary endpoint or the boundary of the region of interest, thus participating in the formation of the current cutting edge target boundary.

[0143] In the re-inspection scenario after mold re-grinding, the operator is most concerned about whether there is actually chipping or over-grinding in the re-grinding area. After the visual inspection interface outputs the complete cutting edge boundary, if the entire boundary is directly compared with the historical standard contour, the sections that are inferred through geometric reconstruction after being obscured by reflective bright bands will inevitably have slight shape differences from the actual physical boundary.

[0144] Under uniform and strict tolerances, such differences can easily be mistaken by the algorithm as excessive grinding or edge defects, thus bringing additional verification burden to the operators, and even causing qualified molds to be wrongly judged as scrap.

[0145] To address this, this application proposes a differential defect determination strategy based on the source of the segment. Further, in some preferred methods, the cutting edge boundary includes a first type of segment composed of target edge point groups and a second type of segment composed of transition curves. When determining defects based on the cutting edge boundary and historical standard profile templates, a first determination condition is applied to the first type of segment, and a second determination condition is applied to the second type of segment. The second determination condition has a higher tolerance for deviation than the first determination condition. When generating the cutting edge boundary, the source label of each segment can be recorded simultaneously. The source label indicates whether the segment is formed by directly connecting target edge point groups or obtained by geometric reconstruction from transition curves.

[0146] Upon entering the defect judgment stage, the segment is mapped to either a first-class segment or a second-class segment based on the source label, and the corresponding judgment threshold is applied accordingly. First-class segments are directly extracted from stable cross-frame edge points, and their positional reliability is high. The first judgment condition is applied to first-class segments, which directly uses the mold precision standard tolerance as the deviation threshold.

[0147] In practice, the normal deviation distance between each sampling point on the first type of segment and the corresponding point on the historical standard profile template is calculated, and it is determined whether the normal deviation distance is greater than the standard tolerance threshold.

[0148] The second type of segment originates from geometric reconstruction, and its position is subject to estimation errors. A second criterion is applied to this second type of segment, which involves relaxing the standard tolerance by a certain percentage as the deviation threshold.

[0149] In practice, the normal deviation distance between each sampling point on the second type of segment and the corresponding point on the historical standard contour template is calculated, and it is determined whether this normal deviation distance is greater than the relaxed tolerance threshold. The relaxed tolerance threshold can be obtained by multiplying the standard tolerance threshold by a coefficient greater than 1. For example, the calculation formula can be expressed as follows: Where T2 is the relaxed tolerance threshold, T1 is the standard tolerance threshold, and 1.3 is the penalty coefficient.

[0150] By using segmented differential chemical tolerances, speculative positional deviations introduced by geometric reconstruction in the second type of segment are only judged as defects when they exceed a more lenient threshold. This helps reduce the risk of misjudging minor deviations in the recovery curve as over-wearing or defects.

[0151] Maintaining standard tolerances for the first type of segment helps ensure the rigor of judgments for directly extracted segments. This approach allows detection conclusions to distinguish between judgments based on direct extraction and judgments based on reconstruction inference, reducing the review burden on operators. In practical applications, the second type of segment can be further subdivided into medium-confidence segments and low-confidence segments. Medium-confidence segments are recovery segments with stable segment constraints on both sides, while low-confidence segments are recovery segments with constraints on only one side or with a large distance between the two sides.

[0152] Different levels of second judgment conditions can be configured for medium-confidence and low-confidence sections. For example, the tolerance relaxation ratio for low-confidence sections can be greater than that for medium-confidence sections, thus reflecting the difference in confidence under different reconstruction conditions.

[0153] Before calculating the deviation, the spatial registration relationship between the current cutting edge boundary and the historical standard profile template can be established using the edge points in the first type of segment to determine the translation and rotation parameters. This registration relationship is then used to map the second type of segment onto the coordinate system of the historical standard profile template before calculating the deviation. This method helps avoid the inference error of the second type of segment interfering with the overall registration accuracy, making the deviation calculation results more accurate.

[0154] Furthermore, in some preferred methods, before defect determination based on the cutting edge boundary and historical standard contour template, the method further includes: when there is a segment to be corrected in the second type of segment, acquiring auxiliary image information to reflect the true edge of the segment to be corrected, wherein the segment to be corrected is a segment in the second type of segment recovered only from a single-sided first type of segment, or a segment where the distance between the two first type of segments along the cutting edge direction is greater than a preset length, and the imaging conditions of the auxiliary image information are different from those of the multi-frame first image information; based on the auxiliary image information, edge points are extracted from the segment to be corrected to obtain supplementary edge points; based on the connection relationship between the supplementary edge points and the first type of segment adjacent to the segment to be corrected, the cutting edge boundary is updated to obtain the updated cutting edge boundary; when determining defects based on the updated cutting edge boundary, the segment in the updated cutting edge boundary composed of supplementary edge points is treated as a first type of segment.

[0155] In the re-inspection scenario after mold re-grinding, the reflective bright band near the cutting edge may cover a very wide area, or only one side may have a clear true boundary. When relying solely on historical templates and a single-sided boundary to infer the shape of the middle area, the reconstructed transition curve will have significant positional uncertainty.

[0156] If we directly compare this uncertain boundary with the standard template, even if the tolerance is relaxed, it is easy to miss the real chipping or misjudge normal grinding marks as over-grinding.

[0157] In response, this application proposes a supplementary correction mechanism for such high uncertainty segments. The segment recovered solely from a single-sided first-type segment, or the segment where the distance between the two first-type segments along the cutting edge direction is greater than a preset length, is identified as the segment to be corrected. This is because bilateral constraints can provide anchor points for both position and tangential direction, while single-sided constraints can only provide the extension direction. Lacking the restraint of the opposite side, the curve is prone to divergence.

[0158] Similarly, when the distance between the two first-class segments is too far, there are too many pixels in the middle, and the constraint of the shape prior of the historical template on the long distance will be weakened, making it difficult for the recovered curve to reflect the local small deformation brought about by the grinding.

[0159] The preset length can be set according to the pixel equivalent of the vision system and the tolerance requirements of the mold, for example, it can be set to tens of pixels or hundreds of micrometers. When the gap exceeds this length, the recovery result can be considered to have a high risk of unreliability. In order to overcome this uncertainty, auxiliary image information needs to be acquired. Acquiring auxiliary image information requires imaging conditions that are different from those of the first image information in multiple frames.

[0160] Specifically, after acquiring multiple frames of first image information and identifying the section to be corrected, an additional frame with a shorter exposure time can be acquired outside the original preset sequence. In this short-exposure auxiliary image, the originally glaring saturated bright bands will fade due to the reduced amount of light, revealing the details of the dark edges that were covered by strong light.

[0161] Alternatively, the operator can be prompted via the control interface to manually adjust the illumination angle of the light source, causing the reflected light to deviate from the camera lens, and then a new auxiliary image frame can be acquired. This supplementary auxiliary image information is not used as part of the aforementioned multi-frame first image information for cross-frame positional stability differentiation; instead, it is used for local edge supplementation of the segment to be corrected.

[0162] This change in imaging conditions can directly reduce the obscuring of the real physical boundary by the bright band, allowing the real edge grayscale transitions to reappear. After acquiring auxiliary image information, for the local area corresponding to the section to be corrected, the grayscale gradient is calculated along the direction perpendicular to the blade extension, and local extreme points where the gradient magnitude exceeds a set threshold are extracted as supplementary edge points.

[0163] Because the bright band interference is reduced in the auxiliary image, these supplementary edge points can more closely approximate the actual physical location of the cutting edge. Next, these supplementary edge points are connected to the adjacent first-type segments on both sides of the section to be corrected. If endpoints of first-type segments exist on both sides, the supplementary edge points can be smoothly integrated into the known boundaries on both sides using short-segment spline interpolation or straight-line connections. If an endpoint exists only on one side, it extends naturally along the tangent direction of that endpoint until it connects with the supplementary edge point.

[0164] Through this connection, the transition curve originally generated by speculation is replaced by the supplementary edge points that are actually measured, thus obtaining the updated cutting edge boundary.

[0165] After the above corrections, the state of the cutting edge boundary has undergone a substantial change. The sections that were previously uncertain due to insufficient constraints are now supported by real image data. Therefore, in subsequent defect determination, these sections composed of supplementary edge points can be directly treated as first-class sections, subject to stricter first-class determination conditions.

[0166] This method avoids the risk of missed detection caused by forcing tolerance relaxation due to recovery errors, allowing for the precise detection of minor chipping or over-grinding. Furthermore, this local correction method eliminates the need for a full rescan of the entire mold, ensuring both the reliability of the inspection results and efficiency in re-inspection.

[0167] If clear edge points still cannot be extracted from the auxiliary image, the original restoration result can be maintained, and a manual review can be requested in the final conclusion, thus ensuring good backward compatibility of the entire process.

[0168] In the scenario of re-inspection after grinding, due to the fact that reflective bright bands under fixed lighting conditions can easily cover the real edge boundary, a single frame image is often insufficient to meet the information requirement of distinguishing between the real boundary and the false boundary.

[0169] To address this issue, this application proposes a method for acquiring multiple frames of first image information reflecting the edge region of a mold under different imaging conditions after grinding. This method includes: determining a preset sequence containing at least three optical states, where the optical state is at least one of the following: the angle between the incident direction of the light source illuminating the edge region and the normal to the edge surface; the proportion of specular reflection components entering the camera; and exposure parameters. Following the preset sequence, the first image information obtained by imaging the edge region under each optical state is acquired sequentially to obtain multiple frames of first image information.

[0170] In this preset sequence, the switching interval between adjacent optical states is less than the preset maximum switching interval. The preset maximum switching interval is determined based on the allowable positional drift of the cutting edge region in the clamping state and detection environment, so that the physical positional drift of the cutting edge region during imaging of adjacent optical states is less than the preset drift threshold.

[0171] The reason why this application constructs a preset sequence containing at least three optical states is that the fresh exposed metal surface of the blade after grinding has a high reflectivity and a relatively sharp edge geometry.

[0172] Under a single, fixed illumination angle, these highly reflective surfaces tend to form localized saturated bright bands along the edge of the cutting edge, obscuring the grayscale transition signal of the actual cutting edge. By introducing at least three different optical states, it is possible to cause changes in the imaging position and intensity of the reflective bright bands.

[0173] Specifically, in one implementation, multiple sets of angle-switchable illumination sources can be deployed at the inspection station. For example, one set of light sources illuminates in an approximately vertical direction to highlight the surface texture, while another set of light sources illuminates in an oblique grazing direction, causing the reflection direction of the highly reflective surface to deviate from the camera lens, thereby creating a difference in illumination angle in the sequence.

[0174] In another implementation, a rotatable polarizing device can be set in front of the camera lens. The polarizing device can be driven by a motor to rotate to different angles, thereby changing the proportion of specular reflection components in the light path entering the camera, which serves as a source of difference in optical state.

[0175] In another implementation, the preset sequence may include normal exposure parameters and short exposure parameters with shortened exposure times. The short exposure state can capture edge grayscale information when the bright band is not saturated. These different combinations of optical states allow the same cutting edge area to exhibit variations in reflectivity in different images.

[0176] The switching interval between adjacent optical states in the preset sequence is limited to less than the preset maximum switching interval. This timing constraint is set because subsequent processing logic relies on spatial alignment and positional stability comparisons between cross-frame images.

[0177] If the switching interval is too long, the mold may undergo physical displacement due to environmental vibration, thermal expansion, or slight creep of the clamping fixture. This physical displacement will cause the coordinates of the actual cutting edge boundary to drift in the image, which can be confused with the positional drift of the reflective bright band due to changes in optical state, thus affecting the subsequent differentiation logic based on position stability.

[0178] The preset maximum switching interval can be determined based on the allowable positional drift of the cutting edge region under clamping and detection conditions. For example, it can be determined by calibrating the inter-frame positional drift of the auxiliary positioning features under different acquisition intervals. When the inter-frame positional drift of the auxiliary positioning features is less than the preset drift threshold during imaging of adjacent optical states, the physical position of the cutting edge region can be considered to remain relatively stable within the switching interval.

[0179] In common mold visual inspection stations, the switching interval can be set in the range of tens to hundreds of milliseconds, and its positional stability requirements are confirmed by the aforementioned drift calibration method. This sequential switching ensures that the physical positional drift of the cutting edge remains within acceptable limits throughout the entire image acquisition sequence.

[0180] Through the above acquisition and control strategy, multiple frames of first image information aligned under a unified spatial reference can be obtained. In these image sequences, the actual physical boundary of the cutting edge region remains consistent in image position between frames due to its real geometric features; however, the reflective bright band formed by the high reflectivity surface produced by grinding will drift, expand, or shrink in image position depending on changes in illumination direction, polarization state, or exposure conditions.

[0181] After acquiring first image information from multiple frames, if candidate boundary information is extracted directly across the entire image, numerous irrelevant structural corners and background textures in the image will generate many false edges, increasing the computational burden of subsequent cross-frame stability differentiation and introducing interference.

[0182] Meanwhile, during the acquisition of multiple frames of images, if there is a large deviation in the mold clamping or foreign objects on the reference surface, it will cause serious misalignment of the spatial position relationship between different frames of images. If automatic detection is continued in this case, the clamping deviation will be misinterpreted as edge position drift, thus outputting unreliable judgment results.

[0183] Furthermore, in some preferred methods, the method also includes: determining a region of interest from multiple frames of first image information based on standard contour information, wherein the standard contour information is used to characterize the physical boundary of the blade region under standard conditions, and the region of interest is used to limit the extraction range of candidate boundary information; and generating a prompt message to indicate pausing the automatic detection process when the spatial alignment deviation between multiple frames of first image information is greater than a preset deviation threshold.

[0184] To address the aforementioned region limitation requirements, after acquiring multiple frames of first image information but before extracting candidate boundary information, the region of interest (ROI) can be determined based on standard contour information. When determining the ROI, the standard contour information can first be projected onto the coordinate system of the currently acquired first image information to obtain the projected position of the standard boundary.

[0185] Subsequently, based on the projection position, the set pixel width is extended to both sides to form a region of interest containing the blade edge to be inspected and its adjacent areas.

[0186] In one specific implementation, it is assumed that the pixel equivalent of the vision inspection system is 0.005 mm per pixel, the maximum allowable repeatability of the mold clamping mechanism is 0.05 mm, and the maximum physical removal amount of the grinding process is 0.02 mm.

[0187] To ensure that the actual cutting edge remains within the designated area even if its position shifts, the extended physical width must cover at least the sum of the positioning deviation and the removal amount, which is 0.07 mm. Converted to pixel width, this means extending outwards by at least 14 pixels on each side of the standard boundary's projection position, forming a 28-pixel-wide strip of interest. This precisely limits the extraction range of candidate boundary information to this area.

[0188] In this way, the extraction of candidate boundary information is constrained to the region of interest, which reduces the number of candidate edge points entering the subsequent cross-frame stability differentiation step and significantly reduces the proportion of irrelevant pseudo-edges from non-edge regions, thus helping to improve the reliability and processing efficiency of subsequent stability criteria.

[0189] During the automatic detection process, an anomaly protection mechanism can be introduced. After acquiring multiple frames of first image information, the spatial alignment deviation between each frame can be calculated. The spatial alignment deviation can be obtained by extracting auxiliary positioning features of the non-polished area on the mold base in the multiple frames and calculating the inter-frame transformation residual.

[0190] When the calculated spatial alignment deviation is greater than the preset deviation threshold, for example, when the root mean square value of the registration residual between frames exceeds the set pixel number threshold, it can be determined that the quality of the current input data does not meet the prerequisite for multi-frame alignment.

[0191] At this point, the current automatic detection process will be automatically paused, and a prompt message will be generated to indicate the paused status. The prompt message can be displayed on the operation interface to remind the operator to check the mold clamping status or clean the reference surface.

[0192] By proactively pausing the process, erroneous defect judgment results can be prevented when spatial alignment is unreliable. This avoids misjudging qualified molds as unqualified or vice versa, thus ensuring the robustness of automated inspection under complex clamping conditions in industrial settings. Once the operator has re-clamped the mold or cleaned the reference surface and confirmed the changes, the complete image sequence acquisition and processing flow can be restarted.

[0193] This application also proposes a precision electronic mold optical inspection system based on industrial vision, used to perform the method steps described above, including an acquisition module for acquiring multiple frames of first image information reflecting the cutting edge region of the mold under different imaging conditions after grinding; an extraction module for extracting candidate boundary information from each frame of first image information to characterize local grayscale changes; a differentiation module for distinguishing between positionally stable real boundary information and positionally drifting pseudo-boundary information from the candidate boundary information based on the positional stability of the candidate boundary information among multiple frames of first image information; and a reconstruction module for geometrically reconstructing the occluded area corresponding to the pseudo-boundary information based on the real boundary information to obtain target boundary information characterizing the real physical contour of the cutting edge region.

[0194] The above solution can alleviate the problem of edge boundary positioning offset caused by changes in surface reflection in the re-inspection scenario after mold grinding, and improve the reliability of optical re-inspection judgment results.

[0195] In some specific implementations, refer to Figure 2 This paper demonstrates the structure and data processing flow of a precision electronic mold optical inspection system based on industrial vision. The system specifically includes an acquisition module, an extraction module, a differentiation module, and a reconstruction module.

[0196] First, the acquisition module receives multiple frames of first image information captured under different imaging conditions on the cutting edge area of ​​the mold after grinding. The acquisition module then transmits this first image information to the extraction module.

[0197] Next, the extraction module processes the first image information of each frame, extracts candidate boundary information that can characterize local grayscale changes, and sends the candidate boundary information to the differentiation module.

[0198] Subsequently, after receiving the candidate boundary information, the differentiation module analyzes the positional stability of the candidate boundary information across multiple frames of the first image information, thereby classifying the candidate boundary information into positionally stable true boundary information and positionally drifting pseudo-boundary information. The region corresponding to the positionally drifting pseudo-boundary information is the occlusion region.

[0199] Finally, the reconstruction module performs geometric reconstruction on the occluded area corresponding to the pseudo-boundary information based on the real boundary information separated by the differentiation module, thereby calculating and outputting the target boundary information used to characterize the real physical contour of the cutting edge region.

[0200] The above description is merely an embodiment of this application and is not intended to limit the scope of protection of this application. Various modifications and variations can be made to this application by those skilled in the art. All modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A precision electronic mold optical inspection method based on industrial vision, characterized in that, The steps of this method include: Acquire multiple frames of first image information reflecting the cutting edge area of ​​the mold under test after grinding under different imaging conditions; Extract candidate boundary information to characterize local grayscale changes from the first image information in each frame; Based on the positional stability of the candidate boundary information among the multiple frames of first image information, the positionally stable true boundary information and the positionally drifting pseudo boundary information are distinguished from the candidate boundary information. Based on the true boundary information, the occlusion area corresponding to the pseudo boundary information is geometrically reconstructed to obtain target boundary information used to characterize the true physical contour of the cutting edge region.

2. The method according to claim 1, characterized in that, The step of extracting candidate boundary information for characterizing local grayscale changes from the first image information in each frame includes: For the first image information in each frame, local extreme points are extracted using a unified gradient threshold to obtain candidate boundary points carrying coordinate information, gradient information and source frame identifier; Obtain structural features on the mold that are not affected by grinding as auxiliary positioning features, and determine the transformation relationship for mapping the candidate boundary points of each frame to a unified coordinate system based on the image position of the auxiliary positioning features in the first image information of each frame. The candidate boundary points of each frame are transformed to the unified coordinate system using the transformation relationship to form a set of candidate boundary points in the unified coordinate system, which serves as the candidate boundary information.

3. The method according to claim 2, characterized in that, The step of distinguishing stable real boundary information and drifting pseudo boundary information from the candidate boundary information based on the positional stability of the candidate boundary information among the multiple frames of first image information includes: Spatial clustering is performed on the candidate boundary points in the unified coordinate system candidate boundary point set to obtain multiple boundary reference regions; For each of the boundary reference regions, a position consistency index is determined based on the positions of candidate boundary points from first image information of different frames within the boundary reference region to characterize the degree of cross-frame position change of the edge within the boundary reference region. Based on the relationship between the position consistency index and a preset stability determination threshold, the boundary reference region is divided into a region containing real boundary information of position stability and a region containing pseudo boundary information of position drift.

4. The method according to claim 3, characterized in that, The step of determining a position consistency index to characterize the degree of cross-frame position change of edges within the boundary reference region based on the positions of candidate boundary points from first image information of different frames within the boundary reference region includes: Based on the distribution of the candidate boundary points in the extension direction perpendicular to the boundary reference region, the candidate boundary points within the boundary reference region are divided into multiple candidate edge point groups. For each candidate edge point group, the evaluation score of the candidate edge point group is determined based on the degree of positional change of the candidate boundary points in the multi-frame first image information, the frequency of their appearance in the multi-frame first image information, and the consistency of their response intensity. Based on the evaluation scores of each candidate edge point group, a target edge point group is determined from the plurality of candidate edge point groups, wherein the evaluation score of the target edge point group is higher than that of the other candidate edge point groups; The position consistency index is determined based on the position of the candidate boundary points within the target edge point group.

5. The method according to claim 4, characterized in that, The step of geometrically reconstructing the occlusion region corresponding to the pseudo-boundary information includes: Determine the endpoints where the occlusion area connects to the credible boundary formed by the target edge point group, obtain the position of the endpoints and the extension direction of the credible boundary at the endpoints. When the occlusion area connects to the credible boundary on both sides along the extension direction of the cutting edge, the endpoints include the endpoints located on both sides of the occlusion area. When the occlusion area connects to the credible boundary on only one side, the endpoints include the endpoint located on that side. Obtain the contour fragment corresponding to the position of the occluded area in the historical standard contour template; Based on the position and extension direction of the endpoints as geometric constraints and the contour fragment as a shape reference, a transition curve corresponding to the occluded area is generated as the cutting edge boundary obtained by geometric reconstruction of the occluded area. When the endpoints exist on both sides of the occluded area, the transition curve connects the endpoints on both sides. When the endpoints exist on only one side of the occluded area, the transition curve is generated by extending the endpoint on that side along the cutting edge extension direction. During the generation of the transition curve, the constraint strength of the contour segment on the shape of the transition curve is determined according to the distance between each position on the transition curve and the endpoint. When the endpoint exists on both sides of the shading area, the constraint strength of the middle position of the shading area located between the two endpoints and away from the two endpoints is lower than that of the position closer to either endpoint. When the endpoint exists on only one side of the shading area, the constraint strength of the position away from the endpoint along the cutting edge extension direction is lower than that of the position closer to the endpoint.

6. The method according to claim 5, characterized in that, The cutting edge boundary includes a first type of segment composed of the target edge point group and a second type of segment composed of the transition curve; when judging defects based on the cutting edge boundary and the historical standard contour template, a first judgment condition is applied to the first type of segment and a second judgment condition is applied to the second type of segment, and the second judgment condition has a higher tolerance for deviation than the first judgment condition.

7. The method according to claim 6, characterized in that, Before determining defects based on the cutting edge boundary and historical standard contour template, the process also includes: When there is a segment to be corrected in the second type of segment, auxiliary image information reflecting the true edge of the segment to be corrected is obtained. The segment to be corrected is a segment in the second type of segment that is recovered only from a single-sided first type of segment, or a segment in which the distance between the two first type of segments along the blade direction is greater than a preset length. The imaging conditions of the auxiliary image information are different from those of the multi-frame first image information. Based on the auxiliary image information, edge points are extracted from the segment to be corrected to obtain supplementary edge points; Based on the connection relationship between the supplementary edge point and the first type of segment adjacent to the segment to be corrected, the cutting edge boundary is updated to obtain the updated cutting edge boundary. When determining the defect based on the updated cutting edge boundary, the segment formed by the supplementary edge points in the updated cutting edge boundary is treated as the first type of segment.

8. The method according to claim 1, characterized in that, The acquisition of multiple frames of first image information reflecting the cutting edge area of ​​the mold under different imaging conditions after grinding includes: A preset sequence is defined, the preset sequence including at least three optical states, the optical states being at least one of the following: the angle between the incident direction of the light source illuminating the cutting edge area and the normal of the cutting edge surface, the proportion of specular reflection components entering the camera, and exposure parameters. According to the preset sequence, the first image information obtained by imaging the blade region under each optical state is obtained sequentially to obtain the multi-frame first image information; The switching interval between adjacent optical states in the preset sequence is less than the preset maximum switching interval. The preset maximum switching interval is determined based on the allowable positional drift of the cutting edge region in the clamping state and detection environment, so that the physical positional drift of the cutting edge region during imaging of adjacent optical states is less than the preset drift threshold.

9. The method according to claim 1, characterized in that, The method further includes: Based on standard contour information, a region of interest is determined from the multi-frame first image information. The standard contour information is used to characterize the physical boundary of the cutting edge region under standard conditions, and the region of interest is used to limit the extraction range of the candidate boundary information. When the spatial alignment deviation between the multiple frames of first image information exceeds a preset deviation threshold, a prompt message is generated to indicate that the automatic detection process should be paused.

10. A precision electronic mold optical inspection system based on industrial vision, used to perform the method according to any one of claims 1 to 9, characterized in that, include: The acquisition module is used to acquire multiple frames of first image information reflecting the cutting edge area of ​​the mold under test after grinding under different imaging conditions; An extraction module is used to extract candidate boundary information for characterizing local gray-level changes from the first image information in each frame; The differentiation module is used to distinguish between real boundary information with stable position and pseudo boundary information with drifting position from the candidate boundary information based on the positional stability of the candidate boundary information among the multiple frames of first image information. The reconstruction module is used to perform geometric reconstruction on the occlusion area corresponding to the pseudo-boundary information based on the real boundary information, so as to obtain target boundary information that characterizes the real physical contour of the cutting edge region.