Positioning method and device for precision machining of brittle materials
By constructing a quantitative evaluation model of corner confidence based on the geometric prior of edge breakage in brittle materials, and combining it with a hierarchical response strategy, the problem of low positioning accuracy and poor robustness caused by corner breakage and debris interference on brittle material workpieces is solved, achieving micron-level high-precision positioning.
Patent Information
- Application Number
- CN202611384225.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-08
- Publication Date
- 2026-11-27
AI Technical Summary
Existing visual positioning methods suffer from low positioning accuracy and poor robustness on brittle material workpieces due to corner breakage and debris interference, making it impossible to achieve micron-level high-precision positioning.
A corner confidence quantitative evaluation model based on the geometric prior of edge breakage in brittle materials is adopted. A confidence scoring model is constructed by integrating the verticality deviation factor and the side length balance penalty factor. The corner weights are determined by combining the hierarchical response strategy, and the target rectangle is constructed for positioning.
It achieves micron-level high-precision positioning even under extreme working conditions with a corner collapse rate as high as 40%, improves the positioning robustness and success rate in scenarios with local field of view damage, and solves the problem of false aggregation of traditional algorithms on brittle material workpieces.
Smart Images

Figure CN123181571A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image processing technology, and more specifically, to a positioning method and apparatus for precision machining of brittle materials. Background Technology
[0002] In the manufacturing processes of smartphone cover plates, automotive display modules, and precision optical components, hard and brittle materials such as glass, sapphire, and acrylic, after being precision-carved by Computer Numerical Control Engraving and Milling Machines (CNC) or laser-cut, require high-precision benchmark positioning via machine vision systems to compensate for processing offsets and guide subsequent processes. Because these workpieces are large and require extremely high alignment accuracy (typically at the micrometer level), vision systems often employ a local acquisition mode, capturing only the corner areas of the workpiece for attitude calculation.
[0003] However, under processing stress, brittle materials are prone to physical damage at their corners and edges, mainly manifested in three typical defect morphologies: (1) micron-sized debris clusters; (2) pseudo-right-angle structures formed by flaking; and (3) edge blurring and burrs caused by melting and resolidification or cooling stress. These non-ideal geometric features pose a serious challenge to visual positioning based on traditional geometric models.
[0004] Existing visual localization methods largely rely on pure geometric fitting algorithms such as the Hough Transform, Random Sampling Consensus (RANSAC), or least squares. Their core assumption is that edges are continuous and regular, and they do not differentiate the effectiveness of each edge point or corner point, incorporating all detected geometric features into the fitting calculation with equal weight. When dealing with the inherent defects of brittle materials, existing technologies have the following significant shortcomings: First, the lack of a material-specific defect identification mechanism makes it susceptible to spurious features. Existing algorithms only eliminate outliers based on geometric distance or angular residuals. When corner points are chipped, the algorithms are prone to misclassifying debris clusters as valid corner points or including pseudo-right angles formed by peeling in the geometric solution, resulting in rotation angle calculation deviations of several degrees and translation compensation errors exceeding ±5μm, directly causing production scrap. Furthermore, existing algorithms lack the ability to geometrically identify asymmetric distortions (one side normal, the other shortened) caused by edge chipping, leading to poor point selection stability under complex edge interference.
[0005] Second, global fitting fails and robustness is lacking under local field of view. Limited by the conflict between camera field of view and resolution, the system cannot acquire a complete contour. In traditional algorithms, once local corner points are severely corrupted, the number of effective feature points decreases sharply, and the algorithm often switches to a degraded mode or directly reports an error because it cannot meet the minimum sampling set requirement. Existing full-preservation or full-removal binarization processing strategies lack progressive fault tolerance and cannot achieve high-precision attitude calculation using remaining reliable features combined with material constraints when some corner points fail. Summary of the Invention
[0006] The purpose of this invention is to address the shortcomings of the prior art by providing a positioning method and equipment for precision machining of brittle materials. This will solve the problems of low positioning accuracy and poor robustness of existing visual positioning methods on brittle material workpieces due to corner breakage and debris interference, and achieve micron-level high-precision positioning.
[0007] To achieve the above objectives, the technical solutions adopted in the embodiments of this application are as follows: In a first aspect, embodiments of this application provide a positioning method for precision machining of brittle materials, comprising: acquiring an image of a workpiece to be processed; extracting candidate corner points of the workpiece from the image of the workpiece to be processed; determining a verticality deviation factor and a side length balance penalty factor of the candidate corner points, and fusing the verticality deviation factor and the side length balance penalty factor to obtain a confidence score of the candidate corner points; determining the weight of the candidate corner points based on a hierarchical response strategy according to the confidence score; determining a target corner point from the candidate corner points according to the confidence score, and constructing a target rectangle according to the target corner point and the weight of the target corner point to obtain the positioning of the workpiece.
[0008] In one embodiment, extracting candidate corner points of a workpiece from the workpiece image to be processed includes: determining a region of interest (ROI) of the workpiece from the workpiece image to be processed; enhancing the ROI to obtain an enhanced workpiece image to be processed; performing edge detection on the enhanced workpiece image to obtain multiple contour edges; filtering the multiple contour edges according to the relationship between the lengths of the multiple contour edges and a preset contour length threshold to obtain a target contour edge; and determining the candidate corner points based on the geometric intersections of the target contour edges.
[0009] In one embodiment, determining the verticality deviation factor and the side length balance penalty factor of the candidate corner point includes: determining the side length balance penalty factor based on the edge of the target contour; and determining the verticality deviation factor based on the degree of deviation of the included angle between two adjacent sides of the candidate corner point.
[0010] In one embodiment, determining the side length balance penalty factor based on the target contour edge includes: determining a reference value for the aspect ratio of the workpiece based on the target contour edge; determining a target scoring strategy based on the relationship between the reference value for the aspect ratio and a preset threshold; determining a scoring factor for the target contour edge based on the target scoring strategy; calculating the degree of asymmetry in the lengths of the two adjacent sides of the candidate corner point based on the scoring factor; and determining the side length balance penalty factor based on the degree of asymmetry in the lengths of the two adjacent sides of the candidate corner point.
[0011] In one implementation, determining the weight of the candidate corner point based on the confidence score and a tiered response strategy includes: when the confidence score is greater than the upper limit of a preset threshold range, determining the weight of the candidate corner point as the standard participation weight corresponding to a high-confidence reliable point; when the confidence score is within the preset threshold range, determining the weight of the candidate corner point as the downgrade weight corresponding to a medium-confidence suspicious point; the downgrade weight is lower than the standard participation weight; when the confidence score is lower than the lower limit of the preset threshold range, determining the weight of the candidate corner point as the zero-approaching weight corresponding to a low-confidence invalid point.
[0012] In one implementation, determining the target corner from the candidate corners based on the confidence score includes: sorting the confidence scores in descending order, and selecting the candidate corners corresponding to the top three confidence scores as the target corners.
[0013] In one embodiment, the method further includes: if at least two of the target corner points are low-confidence invalid points, determining that the workpiece damage exceeds the tolerance range, outputting a positioning failure prompt message and triggering an alarm.
[0014] In one embodiment, constructing a target rectangle based on the target corner point and its weight includes: fitting the target rectangle based on the target corner point and its weight, combined with rectangular geometric constraints; the rectangular geometric constraints include at least one of the following: adjacent sides are perpendicular, opposite sides are parallel, and the aspect ratio conforms to the nominal value.
[0015] In one embodiment, the method further includes: calculating machining offset parameters of the workpiece relative to a theoretical position based on the target rectangle, and determining the machining offset parameters as compensation parameters; the machining offset parameters include machining offset amount and rotation angle.
[0016] Secondly, embodiments of this application also provide a positioning device for precision machining of brittle materials, comprising: an acquisition module configured to acquire an image of a workpiece to be processed; a corner extraction module configured to extract candidate corners of the workpiece from the image of the workpiece to be processed; a confidence scoring module configured to determine a verticality deviation factor and a side length balance penalty factor of the candidate corners, and to fuse the verticality deviation factor and the side length balance penalty factor to obtain a confidence score of the candidate corners; a weight determination module configured to determine the weight of the candidate corners based on the confidence score and a hierarchical response strategy; and a positioning module configured to determine a target corner from the candidate corners based on the confidence score, and to construct a target rectangle based on the target corner and the weight of the target corner to obtain the positioning of the workpiece.
[0017] Thirdly, embodiments of this application also provide a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, performs any of the methods described above.
[0018] Fourthly, embodiments of this application also provide a computer device, including: a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform any of the methods described above.
[0019] The beneficial effects of this application are: (1) A quantitative evaluation model for corner confidence based on the geometric prior of edge breakage in brittle materials is proposed: Unlike the general corner determination method that relies only on a single verticality threshold or grayscale gradient in existing technologies, this application constructs a two-factor composite confidence scoring model that integrates the verticality deviation factor and the side length balance penalty factor for the unique defect morphology of "unilateral breakage leading to asymmetric distortion" after CNC precision carving of hard and brittle materials. This model transforms the physical failure mode of brittle materials into quantifiable geometric constraints, realizing a technical leap from general shape matching to material-specific defect identification. It solves the problem of false clustering caused by the lack of asymmetric distortion identification ability in traditional algorithms in edge breakage scenarios, and provides an accurate and reliable confidence data foundation for subsequent progressive fault-tolerant reconstruction.
[0020] (2) Progressive invalid point weight reduction and fault-tolerant reconstruction mechanism: This mechanism breaks through the bottleneck of binarization processing in traditional visual positioning algorithms, which involves either full retention or full removal. It innovatively introduces a three-level confidence level response strategy: high-confidence points serve as reliable benchmarks, medium-confidence points participate in the calculation with reduced weights, and low-confidence points are removed. This mechanism enables the algorithm to reconstruct an effective ideal rectangular model even under extreme conditions where the single-corner collapse rate is as high as 40%. This is achieved by automatically selecting the three corner points with the highest confidence for weighted least squares fitting, significantly improving the robustness and success rate of positioning in scenarios with impaired local field of view.
[0021] (3) Constructing an adaptive dynamic scoring strategy based on workpiece aspect ratio: To address the problem that existing fixed scoring functions cannot simultaneously meet the accuracy requirements of workpieces with multiple specifications, this application designs an adaptive scoring switching mechanism triggered by the aspect ratio reference value. When the workpiece aspect ratio is lower than a preset threshold, an adjacent-side balanced scoring strategy is automatically activated to suppress the dominant effect of side length fluctuations in a single direction on the scoring results; when it is higher than the threshold, a length-sensitive scoring strategy is adopted to prioritize strengthening the contribution weight of the complete long side as the rotation reference. This innovation solves the problem of accuracy consistency for square and rectangular workpieces under the same algorithm framework, avoids repeated calibration and parameter tuning due to changes in workpiece specifications, and enhances the versatility and engineering adaptability of the method.
[0022] (4) Achieving Visual Marking of Positioning Results and Human-Machine Collaboration Closed Loop: The corner points are directly mapped to differentiated visual identifiers (solid lines / dashed lines), allowing operators to intuitively judge the reliability of each corner point through the human-machine interface. This design not only improves debugging efficiency and anomaly detection capabilities, but also provides a traceable quality data interface for the online quality inspection system, realizing a technological upgrade of the visual positioning algorithm from "black box output" to "transparent, explainable, and collaborative". Attached Figure Description
[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0024] Figure 1 A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; Figure 2 A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; Figure 3A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; Figure 4 A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; Figure 5 A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; Figure 6 A schematic diagram of a positioning device for precision machining of brittle materials provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application.
[0025] Figure 8 This is a high-precision camera image of a glass workpiece with micro-debris aggregation defects in the lower left corner, provided in an embodiment of this application. Figure 9 A high-precision camera image of the serrated fracture edge at the lower left corner of a glass workpiece provided in this embodiment of the application. Figure 10 High-precision camera images of acrylic workpieces with corner flaking forming pseudo-right-angle structures, provided in the embodiments of this application; Figure 11 The high-precision camera image shows the highly reflective features of the edge melting and resolidification region provided in the embodiments of this application. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0027] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0028] In the description of this application, it should be noted that if the terms "upper", "lower", etc. appear to indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship that the product of this application is usually placed in, it is only for the convenience of describing this application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of this application.
[0029] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Additionally, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0030] It should be noted that, where there is no conflict, the features in the embodiments of this application can be combined with each other.
[0031] Figure 1 A schematic flowchart illustrating a positioning method for precision machining of brittle materials provided in this application embodiment; as shown. Figure 1 As shown, the method includes: Step S110: Obtain the image of the workpiece to be processed.
[0032] The images of the workpiece to be processed can be acquired by imaging devices, such as cameras, industrial cameras, and video cameras.
[0033] Step S120: Extract candidate corner points of the workpiece from the image of the workpiece to be processed.
[0034] Candidate corner points can be determined by the contour edges in the image of the workpiece to be processed. Specifically, for example... Figure 2 As shown, step S120 above may further include the following steps: Step S210: Determine the region of interest of the workpiece from the image of the workpiece to be processed.
[0035] In practice, this step can be used to define the region of interest containing theoretical corner points based on the nominal dimensions of the workpiece and the camera calibration parameters, in order to eliminate background interference and reduce the amount of calculation.
[0036] Step S220: Enhance the region of interest to obtain the enhanced image of the workpiece to be processed.
[0037] Specifically, this step involves performing adaptive Gaussian filtering to denoise the image within the region of interest, preserving micron-level edge details while suppressing high-frequency noise caused by debris; subsequently, adaptive threshold segmentation or gradient enhancement algorithms are used to enhance the low-contrast edge features of glass / acrylic materials caused by light transmission and reflection.
[0038] Step S230: Perform edge detection on the enhanced workpiece image to obtain multiple contour edges.
[0039] Step S240: Based on the relationship between the lengths of multiple contour edges and the preset contour length threshold, the multiple contour edges are filtered to obtain the target contour edge.
[0040] The above steps can obtain an edge point set through pixel-level edge detection (such as the improved Canny operator or Zero-Crossing operator). Discrete edge points are then concatenated into an ordered contour chain code through connected component analysis and contour tracking algorithms. During this process, a minimum contour length threshold and curvature continuity constraints are set to eliminate isolated short edges caused by surface scratches and dirt, retaining the long edge segments that constitute the workpiece boundary (i.e., the target contour edge).
[0041] For each valid contour chain code, an iterative endpoint fitting algorithm or a RANSAC line fitting algorithm is used to perform piecewise linearization preprocessing on the contour to obtain the geometric orientation information of the edge. It should be noted that RANSAC is only used for the segmentation of straight line segments within a single contour edge, and not directly for workpiece positioning calculation; and the straight line segments fitted in this step still need to undergo confidence evaluation in subsequent steps S130 and hierarchical weight allocation in step S140 before they can participate in the final rectangular model reconstruction. A fitting residual threshold (e.g., 0.5~1 pixel) and a minimum line segment length threshold are set to decompose curved or chipped edges into several high-precision straight line segments. For chipped edge areas common in brittle materials, a single physical edge is allowed to be fitted into multiple collinear or approximately collinear short line segments to avoid the failure of fitting the entire edge due to local defects.
[0042] Step S250: Determine candidate corner points based on the geometric intersections of the target contour edges.
[0043] This step iterates through all fitted line segments and calculates the geometric intersection of any two adjacent or intersecting line segments. Angle constraints are set (e.g., the intersection angle is within the range of 80° to 100° to accommodate the right-angle design and machining tolerances of the workpiece), and intersection points that meet the right-angle characteristics are selected as initial candidate corner points.
[0044] In addition, this step extracts an optimal candidate intersection point in the neighborhood of each workpiece's theoretical corner point, outputting a total of four candidate corner point coordinates. Due to edge chipping interference, some candidate points may correspond to pseudo-right-angle vertices or burr intersections rather than actual physical corner points. Their authenticity and reliability can be assessed and graded in subsequent material-specific criteria.
[0045] Step S130: Determine the verticality deviation factor and the side length balance penalty factor of the candidate corner points, and fuse the verticality deviation factor and the side length balance penalty factor to obtain the confidence score of the candidate corner points.
[0046] This step fuses the perpendicularity deviation factor and the side length balance penalty factor to obtain a corner confidence score; the fusion method includes at least one of weighted summation, product, or nonlinear mapping. The higher the confidence score, the closer the corner is to an ideal right angle and the less affected it is by edge collapse.
[0047] The confidence score is obtained by fusing a verticality deviation factor and a side length balance penalty factor. Specifically, for example... Figure 3 As shown, step S130 above may further include the following steps: Step S310: Determine the edge length balance penalty factor based on the target contour edge.
[0048] In one implementation, such as Figure 4 As shown, step S310 above may further include the following steps: Step S410: Determine the reference value of the aspect ratio of the workpiece based on the edge of the target contour; Step S420: Determine the target scoring strategy based on the relationship between the aspect ratio reference value and the preset threshold; Step S430: Determine the scoring factor for the target contour edge according to the target scoring strategy; Step S440: Calculate the degree of asymmetry in the lengths of the two adjacent sides of the candidate corner point based on the scoring factors; Step S450: Determine the side length balance penalty factor based on the degree of asymmetry between the lengths of the two adjacent sides of the candidate corner point.
[0049] In practice, the above steps can be implemented as follows: Obtain the aspect ratio reference value of the workpiece, which is estimated based on the previously extracted candidate edge lengths or taken from the workpiece's nominal design dimensions; based on the comparison between the aspect ratio reference value and a preset threshold, adaptively select a side length scoring strategy: when the aspect ratio reference value is greater than or equal to the preset threshold, the workpiece is determined to be a slender component, and a length-sensitive scoring strategy is adopted to ensure the scoring result has a high responsiveness to changes in unilateral side length, prioritizing the contribution weight of intact long sides unaffected by edge breakage as the rotation reference; when the aspect ratio reference value is less than the preset threshold, the workpiece is determined to be a near-square component, and an adjacent-side balanced scoring strategy is adopted to suppress the dominant role of unidirectional side length fluctuations in the scoring result, making the contributions of two adjacent sides to the confidence score more balanced. Calculate the side length scoring factor for each candidate edge based on the selected scoring strategy for subsequent corner point comprehensive confidence assessment.
[0050] Side length balance penalty factor: Based on the aforementioned candidate side length scoring factors, calculate the degree of asymmetry in the lengths of the two adjacent sides of the corner point. The greater the degree of asymmetry, the more severe the asymmetric distortion caused by unilateral collapse of the corner point is, and the lower the corresponding output side length balance penalty factor.
[0051] Step S320: Determine the perpendicularity deviation factor based on the degree of deviation of the included angle between the two adjacent sides of the candidate corner point.
[0052] Verticality deviation factor: It is determined based on the degree to which the included angle between the two adjacent sides of the corner point deviates from the ideal right angle. The greater the deviation, the more significant the pseudo-right angle feature formed by the sheet-like peeling, and the lower the corresponding verticality deviation factor.
[0053] Step S140: Determine the weights of candidate corner points based on the confidence score and the hierarchical response strategy.
[0054] In one implementation, the higher the confidence score, the greater the weight of the candidate corner point; specifically, such as... Figure 5 As shown, step S140 above may further include the following steps: Step S510: When the confidence score is greater than the upper limit of the preset threshold range, determine the weight of the candidate corner point as the standard participation weight corresponding to the high confidence reliable point; Step S520: When the confidence score is within the preset threshold range, determine the weight of the candidate corner point as the downgrade weight corresponding to the medium confidence suspicious point; the downgrade weight is lower than the standard participation weight. Step S530: When the confidence score is lower than the lower limit of the preset threshold range, the weight of the candidate corner point is determined to be the zero-approaching weight corresponding to the invalid point with low confidence.
[0055] In the above steps, when the corner point confidence score is higher than the upper limit of the preset threshold range, it is determined as a high-confidence reliable point and assigned a standard participation weight as the main benchmark for attitude calculation. When the corner point confidence score is within the preset threshold range, it is determined as a medium-confidence suspicious point and assigned a downgraded weight lower than the standard participation weight, so that it participates in geometric solution in a constrained manner to avoid excessive influence on the overall positioning result. When the corner point confidence score is lower than the lower limit of the preset threshold range, it is determined as a low-confidence invalid point and its participation weight is configured to not participate in subsequent geometric solution or assigned a weight close to zero. The upper limit of the preset threshold range is greater than the lower limit of the preset threshold range, both of which are empirical thresholds determined based on the statistical distribution of confidence scores of historical qualified workpieces.
[0056] Step S150: Determine the target corner point from the candidate corner points based on the confidence score, and construct the target rectangle based on the target corner point and its weight to obtain the workpiece positioning.
[0057] Among them, the target corner points are the three candidate corner points with the highest confidence scores; specifically, such as Figure 6 As shown, step S150 above may further include the following steps: The confidence scores are sorted from highest to lowest, and the candidate corner points corresponding to the top three confidence scores are selected as target corner points. Furthermore, if at least two of the target corner points are low-confidence invalid points, it is determined that the workpiece damage exceeds the tolerance range, a positioning failure message is output, and an alarm is triggered.
[0058] Based on the confidence scores and participation weights of each candidate corner point output above, this step uses the following strategy to reconstruct the ideal rectangle model: (1) Optimal selection of three points: From the four candidate corner points, sort them from high to low confidence scores and select the three corner points with the highest scores as the benchmark reconstruction point set; if there are cases with the same confidence scores, the combination with more uniform spatial distribution (i.e., covering more workpiece edges) is selected first.
[0059] (2) Rectangular Model Reconstruction: Based on the three selected corner points and the differentiated participation weights determined in steps S130 and S140 above, combined with the rectangular geometric constraints (adjacent sides perpendicular, opposite sides parallel, aspect ratio conforming to the nominal value or the obtained reference value), the optimal ideal rectangle parameters are fitted using the weighted least squares method. Unlike the existing technology where each feature point directly participates in the least squares fitting with equal weights, the least squares method in this step uses the graded weights determined by the material specificity confidence score as constraints to ensure that high-confidence corner points dominate the fitting results, and the influence of low-confidence corner points is suppressed to near zero; among them, if the three selected points include a point with medium confidence doubt, then that point participates in the fitting in a reduced-weighted manner to avoid excessive influence on the overall positioning results. That is, based on the target corner points and their weights, combined with the rectangular geometric constraints, the target rectangle is fitted; the rectangular geometric constraints include at least one of the following: adjacent sides perpendicular, opposite sides parallel, aspect ratio conforming to the nominal value.
[0060] (3) Abnormal fallback handling: If two or more of the three corner points with the highest confidence scores are low confidence invalid points (i.e., the number of valid points is less than two), it is determined that the current workpiece damage exceeds the tolerance range, and a positioning failure signal is output and an alarm is triggered.
[0061] (4) Parameter output: Based on the reconstructed ideal rectangular model, the machining offset (X / Y direction translation) and rotation angle of the workpiece relative to the theoretical position are calculated and output as compensation parameters for subsequent processes. That is, the machining offset parameters of the workpiece relative to the theoretical position are calculated based on the target rectangle, and the machining offset parameters are determined as compensation parameters; the machining offset parameters include machining offset and rotation angle.
[0062] Furthermore, after obtaining the workpiece's location, the location results can be visualized and output. Specifically, this can be achieved through the following process: In the human-computer interaction interface, each candidate corner point is visually differentiated based on the calculated corner point confidence score: corner points with confidence scores higher than the upper limit of the preset threshold range are marked with solid boxes, corner points with confidence scores within the preset threshold range are marked with dashed boxes, and invalid corner points with confidence scores lower than the lower limit of the preset threshold range are hidden. Simultaneously, the processing offset, rotation angle, and measured length and width dimensions of the workpiece calculated based on the aforementioned reconstructed ideal rectangular model are output, and the confidence scores, status indicators, and geometric dimension data of each corner point are encapsulated into a structured data package for use by the online quality inspection system.
[0063] In summary, this application provides a positioning method for precision machining of brittle materials, comprising: acquiring an image of a workpiece to be processed; extracting candidate corner points of the workpiece from the image; determining a confidence score for the candidate corner points based on geometric priors; obtaining the confidence score by fusing a perpendicularity deviation factor and a side length balance penalty factor; determining the weight of the candidate corner points based on a hierarchical response strategy according to the confidence score; determining a target corner point from the candidate corner points according to the confidence score, and constructing a target rectangle based on the target corner point and its weight to obtain the positioning of the workpiece. This method solves the problems of low positioning accuracy and poor robustness in existing visual positioning methods on brittle material workpieces caused by corner breakage and debris interference, achieving micron-level high-precision positioning.
[0064] Having introduced the positioning method for precision machining of brittle materials according to exemplary embodiments of this disclosure, the following will refer to... Figure 6 A positioning device 600 for precision machining of brittle materials according to an exemplary embodiment of the present disclosure will be described.
[0065] refer to Figure 6 A positioning device 600 for precision machining of brittle materials includes: The acquisition module 610 is configured to acquire an image of the workpiece to be processed. The corner extraction module 620 is configured to extract candidate corner points of the workpiece from the image of the workpiece to be processed; The confidence scoring module 630 is configured to determine the verticality deviation factor and the side length balance penalty factor of the candidate corner point, and to fuse the verticality deviation factor and the side length balance penalty factor to obtain the confidence score of the candidate corner point. The weight determination module 640 is configured to determine the weights of candidate corner points based on a graded response strategy according to the confidence score. The positioning module 650 is configured to determine the target corner point from the candidate corner points based on the confidence score, and construct a target rectangle based on the target corner point and its weight to obtain the positioning of the workpiece.
[0066] The above-described device is used to execute the method provided in the foregoing embodiments, and its implementation principle and technical effect are similar, so they will not be described again here.
[0067] These modules can be one or more integrated circuits configured to implement the above methods, such as one or more Application Specific Integrated Circuits (ASICs), one or more microprocessors, or one or more Field Programmable Gate Arrays (FPGAs). Alternatively, when a module is implemented using processing element scheduler code, the processing element can be a general-purpose processor, such as a Central Processing Unit (CPU) or other processor capable of calling program code. Furthermore, these modules can be integrated together as a system-on-a-chip (SOC).
[0068] Figure 7 This is a schematic diagram of a computer device provided in an embodiment of this application. The device can be integrated into a terminal device or a chip of a terminal device. The terminal can be a computing device with data processing capabilities.
[0069] The device includes: a processor 701, a storage medium 702, and a bus 703.
[0070] Storage medium 702 stores program instructions executable by processor 701. When computer device 700 is running, processor 701 communicates with storage medium 702 via bus 703, and processor 701 executes the program instructions to perform the above-described method embodiment. The specific implementation and technical effects are similar and will not be described in detail here.
[0071] Optionally, the present invention also provides a program product, such as a computer-readable storage medium, including a program that, when executed by a processor, is used to perform the above-described method embodiments.
[0072] In the several embodiments provided by this invention, it should be understood that the disclosed apparatus and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between apparatuses or units may be electrical, mechanical, or other forms.
[0073] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0074] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or in the form of hardware plus software functional units.
[0075] The integrated units implemented as software functional units described above can be stored in a computer-readable storage medium. These software functional units, stored in a storage medium, include several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) or processor to execute some steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0076] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A positioning method for precision machining of brittle materials, characterized in that, include: Acquire the image of the workpiece to be processed; Extract candidate corner points of the workpiece from the image of the workpiece to be processed; Determine the verticality deviation factor and the side length balance penalty factor of the candidate corner point, and fuse the verticality deviation factor and the side length balance penalty factor to obtain the confidence score of the candidate corner point; Based on the confidence score, the weights of the candidate corner points are determined using a hierarchical response strategy. The target corner is determined from the candidate corners based on the confidence score, and a target rectangle is constructed based on the target corner and its weight to obtain the workpiece positioning.
2. The method according to claim 1, characterized in that, The step of extracting candidate corner points of the workpiece from the image of the workpiece to be processed includes: Determine the region of interest of the workpiece from the image of the workpiece to be processed; The region of interest is enhanced to obtain an enhanced image of the workpiece to be processed; Edge detection is performed on the enhanced image of the workpiece to be processed to obtain multiple contour edges; Based on the relationship between the lengths of the multiple contour edges and a preset contour length threshold, the multiple contour edges are filtered to obtain the target contour edge; The candidate corner points are determined based on the geometric intersections of the edges of the target contour.
3. The method according to claim 2, characterized in that, The determination of the perpendicularity deviation factor and the side length balance penalty factor of the candidate corner points includes: Determine the side length balance penalty factor based on the target contour edge; The perpendicularity deviation factor is determined based on the degree of deviation of the included angle between the two adjacent sides of the candidate corner point.
4. The method according to claim 3, characterized in that, The step of determining the edge length balance penalty factor based on the target contour edge includes: The aspect ratio reference value of the workpiece is determined based on the edge of the target contour; The target scoring strategy is determined based on the relationship between the aspect ratio reference value and the preset threshold. The scoring factor for the target contour edge is determined according to the target scoring strategy; Based on the scoring factor, calculate the degree of asymmetry in the lengths of the two adjacent sides of the candidate corner point; The side length balance penalty factor is determined based on the degree of asymmetry in the lengths of the two adjacent sides of the candidate corner point.
5. The method according to claim 1, characterized in that, The step of determining the weights of the candidate corner points based on the confidence score and a hierarchical response strategy includes: When the confidence score is greater than the upper limit of the preset threshold range, the weight of the candidate corner point is determined to be the standard participation weight corresponding to the high-confidence reliable point; When the confidence score is within the preset threshold range, the weight of the candidate corner point is determined to be the downgrade weight corresponding to the medium confidence suspicious point; the downgrade weight is lower than the standard participation weight. When the confidence score is lower than the lower limit of the preset threshold range, the weight of the candidate corner point is determined to be the zero-approaching weight corresponding to the low-confidence invalid point.
6. The method according to claim 1, characterized in that, The step of determining the target corner point from the candidate corner points based on the confidence score includes: The confidence scores are sorted from highest to lowest, and the candidate corner points corresponding to the top three confidence scores are selected as the target corner points.
7. The method according to claim 6, characterized in that, The method further includes: If at least two of the target corner points are low-confidence invalid points, it is determined that the workpiece damage exceeds the fault tolerance range, and a positioning failure prompt message is output and an alarm is triggered.
8. The method according to claim 1, characterized in that, The step of constructing a target rectangle based on the target corner points and their weights includes: Based on the target corner point and its weight, and combined with rectangular geometric constraints, the target rectangle is fitted; the rectangular geometric constraints include at least one of the following: adjacent sides are perpendicular, opposite sides are parallel, and the aspect ratio conforms to the nominal value.
9. The method according to claim 1, characterized in that, The method further includes: Based on the target rectangle, the machining offset parameters of the workpiece relative to the theoretical position are calculated, and the machining offset parameters are determined as compensation parameters; the machining offset parameters include machining offset amount and rotation angle.
10. A computer device, comprising: The computer device includes a processor, a storage medium, and a bus, wherein the storage medium stores program instructions executable by the processor, and when the computer device is running, the processor communicates with the storage medium via the bus, and the processor executes the program instructions to perform the steps of the positioning method as described in any one of claims 1 to 9.
