Metal door frame cutting method and system based on image recognition

CN122694784APending Publication Date: 2026-09-04HUNAN TAOLU BUILDING MATERIALS TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610817075.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-08
Publication Date
2026-09-04

AI Technical Summary

Technical Problem

[0004]针对以上问题,本发明提供了基于图像识别的金属门框裁切方法及系统,解决了现有技术中存在的铝木门门框裁切的精度低、裁切质量差的问题

Benefits of technology

[0018] This invention provides a metal door frame cutting method and system based on image recognition, including benchmark prefabrication and image acquisition, benchmark positioning and theoretical line calculation, segmented cutting, secondary imaging capture, and error feedback compensation. First, by using a prefabricated crosshair as a benchmark feature, combined with a low-angle dark-field illumination source and polarization filtering, overexposure caused by the high reflectivity of aluminum alloy is effectively suppressed, enhancing the contrast between the crosshair and the background, achieving sub-pixel-level positioning of the cutting benchmark. Second, based on the center position of the first image-recognized crosshair, the first center coordinates are obtained, and the theoretical cutting line position is calculated according to preset offset parameters. Furthermore, segmented cutting process parameters are set based on the material differences between aluminum alloy and wood veneer, accommodating the cutting needs of both materials, ensuring cutting quality, and improving the cutting effect for both materials. In addition, by taking two images of the same crosshair before and after cutting and calculating the positional deviation, a closed-loop feedback compensation is formed, correcting the subsequent cutting position in real time and eliminating accumulated errors such as mechanical clearance, thermal deformation, and tool wear. In summary, this invention significantly improves the accuracy and surface quality of aluminum-wood door cutting, achieving targeted cutting control for different material areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122694784A_ABST
    Figure CN122694784A_ABST
Patent Text Reader

Abstract

The application discloses a metal door frame cutting method and system based on image recognition and relates to the field of image recognition, which comprises the following steps: preparing a cross line on the surface of an aluminum alloy base material of an aluminum-wood door metal door frame as a reference feature, irradiating the cross line with a low-angle dark-field illumination light source, and collecting a first image; identifying the center position of the cross line, obtaining a first center coordinate, and calculating the position of a theoretical cutting line; setting segmented cutting process parameters according to the material physical property differences between the aluminum alloy base material and the wood veneer layer, controlling a cutting device to perform cutting at the position of the theoretical cutting line; after cutting, collecting a second image containing the cross line again, identifying a second center coordinate based on the second image; calculating the actual error value of this cutting according to the coordinate difference value as a feedback compensation amount, and correcting the position of the theoretical cutting line for the next cutting. The application solves the problems of low precision and poor cutting quality of aluminum-wood door frame cutting in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of image recognition technology, specifically relating to a method and system for cutting metal door frames based on image recognition. Background Technology

[0002] In the cutting method of aluminum-wood doors, because the surface of aluminum alloy profiles reflects light strongly while the wood veneer layer absorbs light strongly, conventional visible light imaging cannot clearly present both materials at the same time.

[0003] Existing methods cannot accurately determine the boundary between the aluminum alloy profile and the wood veneer in aluminum-wood doors, and cannot set targeted cutting strategies based on the properties of the two materials, resulting in poor precision and quality in the cutting of aluminum-wood door frames. Summary of the Invention

[0004] To address the above problems, this invention provides a metal door frame cutting method and system based on image recognition, which solves the problems of low cutting accuracy and poor cutting quality in the prior art for aluminum-wood door frames.

[0005] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0006] In a first aspect, the present invention provides a method for cutting metal door frames based on image recognition, the method comprising:

[0007] A cross-shaped line is pre-fabricated on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature. The cross-shaped line is illuminated by a low-angle dark field lighting source, and a first image containing the cross-shaped line is acquired.

[0008] Based on the first image, the center position of the cross line is identified, the first center coordinates are obtained, and the theoretical cutting line position is calculated based on the first center coordinates and the preset offset parameters.

[0009] Based on the difference in physical properties between the aluminum alloy substrate and the wood veneer layer, segmented cutting process parameters are set, and the cutting equipment is controlled to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters.

[0010] After the cropping is completed, a second image containing the cross lines is acquired again, and the second center coordinates are obtained based on the recognition of the second image;

[0011] The actual error value of this cut is calculated based on the difference between the first center coordinate and the second center coordinate. The actual error value is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0012] Secondly, the present invention provides a metal door frame cutting system based on image recognition, the system comprising:

[0013] An image acquisition module is used to pre-fabricate cross lines on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature, illuminate the cross lines with a low-angle dark field illumination source, and acquire a first image containing the cross lines.

[0014] The cutting position determination module is used to identify the center position of the cross line based on the first image, obtain the first center coordinates, and calculate the theoretical cutting line position based on the first center coordinates and the preset offset parameter.

[0015] The cutting process parameter setting module is used to set segmented cutting process parameters according to the differences in material physical properties between the aluminum alloy substrate and the wood veneer layer, and to control the cutting equipment to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters.

[0016] The image acquisition and center coordinate acquisition module is used to acquire a second image containing the cross lines after cropping, and to obtain the second center coordinates based on the recognition of the second image.

[0017] The compensation and correction module is used to calculate the actual error value of this cut based on the difference between the first center coordinate and the second center coordinate, and use the actual error value as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0018] This invention provides a metal door frame cutting method and system based on image recognition, including benchmark prefabrication and image acquisition, benchmark positioning and theoretical line calculation, segmented cutting, secondary imaging capture, and error feedback compensation. First, by using a prefabricated crosshair as a benchmark feature, combined with a low-angle dark-field illumination source and polarization filtering, overexposure caused by the high reflectivity of aluminum alloy is effectively suppressed, enhancing the contrast between the crosshair and the background, achieving sub-pixel-level positioning of the cutting benchmark. Second, based on the center position of the first image-recognized crosshair, the first center coordinates are obtained, and the theoretical cutting line position is calculated according to preset offset parameters. Furthermore, segmented cutting process parameters are set based on the material differences between aluminum alloy and wood veneer, accommodating the cutting needs of both materials, ensuring cutting quality, and improving the cutting effect for both materials. In addition, by taking two images of the same crosshair before and after cutting and calculating the positional deviation, a closed-loop feedback compensation is formed, correcting the subsequent cutting position in real time and eliminating accumulated errors such as mechanical clearance, thermal deformation, and tool wear. In summary, this invention significantly improves the accuracy and surface quality of aluminum-wood door cutting, achieving targeted cutting control for different material areas. Attached Figure Description

[0019] Figure 1 This is a flowchart illustrating the metal door frame cutting method based on image recognition provided by the present invention.

[0020] Figure 2 This is a logical schematic diagram of the metal door frame cutting method based on image recognition provided by the present invention;

[0021] Figure 3 This is a schematic diagram of the metal door frame cutting system based on image recognition provided by the present invention.

[0022] In the diagram: 11. Image acquisition module; 12. Cutting position determination module; 13. Cutting process parameter setting module; 14. Image acquisition and center coordinate acquisition module; 15. Compensation and correction module. Detailed Implementation

[0023] This invention provides a metal door frame cutting method and system based on image recognition, which specifically solves the problems of low precision and poor cutting quality in the cutting of aluminum-wood door frames in the prior art.

[0024] The present invention will now be described in detail with reference to the accompanying drawings.

[0025] Example 1, as Figure 1 As shown, this invention provides a metal door frame cutting method based on image recognition, the method comprising:

[0026] S10: A cross-shaped line is pre-fabricated on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature. The cross-shaped line is illuminated by a low-angle dark field lighting source, and a first image containing the cross-shaped line is acquired.

[0027] In this embodiment of the invention, a laser device is used to pre-form cross lines on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame that needs to be cut, and the pre-formed cross lines are used as reference features; the cross lines are illuminated by a low-angle dark field illumination source to ensure that the cross lines are clearly visible, and the surface of the aluminum alloy substrate containing the cross lines is captured as the first image.

[0028] In step S10 of the method provided in this embodiment of the invention, the cross lines are located on the non-decorative surface of the aluminum alloy substrate, the line width is 0.3 mm to 0.5 mm, the line length of each arm is 2 mm to 4 mm, the spacing between two adjacent cross lines is 20 mm to 50 mm, and the etching depth is 0.02 mm to 0.05 mm.

[0029] Specifically, the crosshairs are located on the non-decorative surface of the aluminum alloy substrate. Laser engraving on the non-decorative surface facilitates subsequent image recognition and avoids interference with the recognized image. Each crosshair has a line width of 0.3 mm to 0.5 mm, each arm has a line length of 2 mm to 4 mm, the spacing between adjacent crosshairs is 20 mm to 50 mm, and the etching depth is 0.02 mm to 0.05 mm.

[0030] In this embodiment of the invention, the low-angle dark field illumination source is a blue light-emitting diode ring light source or a blue light-emitting diode linear focusing light source; the incident angle of the low-angle dark field illumination source is 15 degrees to 30 degrees relative to the surface of the aluminum alloy substrate; the luminous intensity of the low-angle dark field illumination source is set to be no less than 80% of the maximum luminous intensity.

[0031] The image acquisition device has a polarizing filter installed at the front end of its lens. The polarization direction of the polarizing filter is orthogonal to the polarization direction of the low-angle dark field illumination source.

[0032] Specifically, during image acquisition, the low-angle dark-field illumination source used is a blue LED ring light source or a blue LED linear focused light source; the light emitted by the low-angle dark-field illumination source illuminates the crosshair area at a grazing angle of 15° to 30° relative to the surface normal direction. Due to the smooth surface of the aluminum alloy substrate, most of the light is regularly reflected away from the camera lens, forming a dark field background.

[0033] Meanwhile, the luminous intensity of the low-angle dark field illumination source is set to no less than 80% of the maximum luminous intensity, and the luminous intensity must be kept consistent throughout the continuous image acquisition process to avoid inconsistent light source intensity interfering with the acquired image and affecting the subsequent cropping process. The tiny depressions or raised edges formed by etching at the crosshairs cause diffuse reflection, reflecting light to the camera, making the crosshairs appear as bright patterns in the image.

[0034] Because aluminum alloy has strong reflectivity, directly capturing images may cause overexposure, affecting image recognition and resulting in poor cropping. Therefore, a polarizing filter is installed at the front of the lens of the image acquisition device, with the polarization direction of the filter orthogonal to the polarization direction of the low-angle dark-field illumination source. The polarizing filter eliminates specular reflection glare from the aluminum alloy substrate surface, allowing diffuse reflection light from the crosshairs to pass through and enter the image acquisition device, thereby improving the image contrast between the crosshairs and the aluminum alloy substrate background. The acquired images are then integrated to obtain a first image containing the crosshairs.

[0035] In this embodiment of the invention, by limiting the type of light source, the angle of the light source placement, and the width, length, and depth of the crosshair lines during the image acquisition process, the environment in which the first image is acquired is consistent, and the set reference features are consistent, so as to eliminate the interference of irrelevant factors and ensure the accuracy of subsequent image recognition. At the same time, by installing a polarizing filter, the acquired image is not affected by the reflection of the aluminum alloy material, ensuring that the acquired image is recognizable and providing a highly recognizable and stable effective image for subsequent processing.

[0036] S20: Based on the first image, identify the center position of the cross line, obtain the first center coordinates, and calculate the theoretical cutting line position according to the first center coordinates and the preset offset parameter.

[0037] In this embodiment of the invention, the identification center position is determined by the pixel coordinates of the geometric center point of the cross line through an image processing algorithm; the first center coordinates are the position of the center of the cross line in the image coordinate system obtained from the first image; the preset offset parameter is a fixed spatial vector between the center of the cross line and the actual required cutting line; the theoretical cutting line position is the trajectory position of the cutting device to be cut based on the offset calculated by superimposing the reference point coordinates.

[0038] Specifically, the first image is identified, and the center position of the cross lines of the first image is obtained through methods such as image contour extraction. Then, the first center coordinates are obtained based on the center position of the cross lines. Based on the first center coordinates and the preset offset parameters, the theoretical cutting line position is calculated.

[0039] Step S20 in the method provided in this embodiment of the invention includes:

[0040] The first image is subjected to grayscale processing and noise removal to obtain a grayscale image, wherein the noise removal method is Gaussian filtering.

[0041] An adaptive threshold segmentation algorithm is used to extract the high-brightness regions in the grayscale image to obtain a binarized image. Then, a morphological closing operation is performed on the binarized image to fill the tiny holes and breaks inside the cross lines.

[0042] In the binarized image after the morphological closing operation, all contours are searched, and target contours belonging to the cross line are selected according to the area, aspect ratio and convexity features of each contour. The image moments of the target contours are calculated, and the subpixel-level center coordinates of the cross line are determined according to the image moments.

[0043] In this embodiment of the invention, firstly, a grayscale conversion is performed on the first image to convert it into a single-channel grayscale image. After grayscale conversion, the crosshair area in the image has a high grayscale value, while the background aluminum alloy area has a very low grayscale value. Subsequently, the converted first image is subjected to Gaussian filtering for noise reduction, resulting in a grayscale image. The noise reduction method is Gaussian filtering, a linear smoothing filter that specifically uses a Gaussian kernel function to convolve the image. For example, a Gaussian kernel with a size of 5×5 pixels and a standard deviation σ=1.0 is selected for convolution of the grayscale image. This suppresses high-frequency random fluctuations caused by thermal noise and photon shot noise, resulting in a smooth grayscale image after filtering.

[0044] Secondly, an adaptive thresholding segmentation algorithm is used to extract high-brightness regions from the grayscale image to obtain a binarized image. Morphological closing operations are then performed on the binarized image to fill in tiny holes and breaks within the crosshairs. The adaptive thresholding segmentation algorithm is a binarization-based segmentation algorithm. It dynamically calculates the threshold for each pixel based on the statistical characteristics of its local neighborhood, ensuring that each pixel in the binarized image has a value of only 0 (black) or 255 (white), with the crosshairs set to white and the background set to black. The morphological closing operation is used to eliminate small holes and narrow gaps within foreground objects.

[0045] Specifically, the grayscale image is divided into multiple local windows, each with a size 3 to 5 times the width of the crosshair. The mean grayscale value and standard deviation of all pixels within each local window are calculated, and the segmentation threshold for each local window is dynamically calculated based on the mean grayscale value and the standard deviation. The segmentation threshold is equal to the mean grayscale value plus the standard deviation multiplied by a preset coefficient, which ranges from 0.5 to 1.5.

[0046] Subsequently, based on the segmentation threshold, pixels with gray values ​​greater than or equal to the segmentation threshold within each local window are set to white pixels, and pixels with gray values ​​less than the segmentation threshold are set to black pixels, thus obtaining a binarized image.

[0047] Because the etching of the crosshairs may be uneven or there may be tiny dust particles obscuring the image, sporadic voids or small breaks may appear inside the binarized crosshair region. Therefore, a morphological closing operation is performed. Specifically, a dilation operation is performed on the binarized image. This involves using a structuring element to traverse every white pixel in the binarized image and setting all pixels within the coverage area of ​​the structuring element to white. This expands the white area of ​​the crosshairs in the binarized image, connecting breaks smaller than the diameter of the structuring element and filling small voids. The structuring element is then used to traverse every white pixel in the binarized image after the dilation operation. Only white pixels that fall completely within the white area are retained; otherwise, they are set to black. This process eliminates noise from the dilation operation and restores the original outline of the crosshairs.

[0048] The combination of dilation and erosion operations constitutes a morphological closing operation, which is used to fill the tiny voids and breaks inside the cross lines caused by uneven laser etching or slight surface contamination, so that the cross lines appear as a connected and complete region in the binarized image.

[0049] Finally, all crosshair contours are located in the binarized image after morphological closing operations. Target contours belonging to the crosshairs are selected based on the area, aspect ratio, and convexity features of each contour. Image moments of the target contours are calculated, and sub-pixel-level center coordinates of the crosshairs are determined based on these image moments. Here, the graphic feature is the ratio of the contour area to its convex hull area, while the image moment is the pixel intensity distribution of the image. The calculated sub-pixel-level center coordinates are positional coordinates obtained through grayscale interpolation or image moment calculation, achieving an accuracy of one or two decimal places, higher than integer pixel resolution.

[0050] Specifically, in the binarized image after morphological closing operation, all contours are searched, and target contours belonging to the cross lines are selected based on the area, aspect ratio, and convexity features of each contour. The image moments of the target contours are calculated, and the sub-pixel-level center coordinates of the cross lines are determined based on the image moments.

[0051] The method provided in this embodiment of the invention involves searching for all contours in the binarized image after the morphological closing operation, filtering out target contours belonging to the crosshair based on the area, aspect ratio, and convexity features of each contour, calculating the image moments of the target contours, and determining the sub-pixel-level center coordinates of the crosshair based on the image moments, including:

[0052] In the binarized image after the morphological closing operation, a contour finding algorithm based on topological structure analysis is used to extract the set of boundary points of all connected regions, and the set of boundary points of each connected region constitutes a contour.

[0053] Calculate the total number of pixels contained within each contour as the area, and discard contours whose area is less than a first area threshold and greater than a second area threshold;

[0054] Calculate the minimum bounding rectangle for each remaining contour, obtain the width and height of the minimum bounding rectangle, and calculate the ratio of the width to the height as the aspect ratio feature, retaining contours with aspect ratios in the range of 0.8 to 1.2;

[0055] For each contour retained after aspect ratio filtering, the convex hull of the contour is calculated, and the ratio of the area of ​​the convex hull to the original area of ​​the contour is calculated as a convexity feature, wherein the convex hull is the smallest convex polygon containing all points of the contour.

[0056] The number of convex defects for each contour is calculated. The convex defects are the concave areas between the convex hull and the contour. The cross-shaped contour has four convex defects, which are located at the four quadrant angles of the cross-shaped contour. Based on the geometric characteristics of the cross-shaped contour, contours with a convex feature in the range of 0.6 to 0.9 and a number of four convex defects are selected as target contours.

[0057] When multiple target contours are selected, the roundness feature of each target contour is calculated, and the target contour with the roundness closest to 1 is selected as the final cross line contour. The roundness is equal to 4 times the contour area divided by the square of the contour perimeter and then multiplied by pi.

[0058] Calculate the image moments of the final crosshair contour, the image moments including the zeroth moment and the first moment, wherein the zeroth moment represents the area of ​​the contour and the first moment represents the centroid position of the contour, and obtain the coarse positioning center coordinates of the crosshair based on the ratio of the first moment to the zeroth moment.

[0059] The principal axis direction of the crosshair contour is calculated based on the second moment of the image moment, and the coarse positioning center coordinates are corrected at the sub-pixel level in the direction perpendicular to the principal axis direction to obtain the sub-pixel level center coordinates of the crosshair.

[0060] Specifically, firstly, in the binarized image after morphological closing operation, a contour search algorithm based on topological structure analysis is used to extract the set of boundary points of all connected regions, distinguishing the outer boundary and hole boundary in the image. The set of boundary points of each connected region constitutes a cross-shaped contour.

[0061] Next, the total number of pixels contained within each contour is calculated, and this total number of pixels is used as the area of ​​the contour. Contours with areas smaller than a first area threshold and larger than a second area threshold are discarded. The first area threshold is the minimum pixel area that the crosshair can possibly present in the image; the second area threshold is the maximum pixel area that the crosshair can possibly present in the image. These thresholds can be set based on filtering minimum and maximum values ​​from crosshair contour data in historically acquired images. The first area threshold and the threshold for exceeding the second area threshold are then determined based on the minimum and maximum values ​​of the crosshair, respectively. For example, the minimum and maximum values ​​filtered could be 12 pixels and 30 pixels, respectively.

[0062] Next, calculate the minimum bounding rectangle for each remaining contour, where the minimum bounding rectangle is the smallest rectangle that can encompass the contour area. Obtain the width and height of the minimum bounding rectangle, and calculate the ratio of width to height as the aspect ratio feature. For the width w and height h of the rectangle (where w ≤ h), calculate the aspect ratio r = w / h. Simultaneously, retain contours with aspect ratios in the range of 0.8 to 1.2, and exclude elongated interference objects and non-cross-shaped noise features.

[0063] Furthermore, for each contour retained after aspect ratio filtering, the convex hull of the contour is calculated. For example, using the Andrew monotonic chain algorithm, for all 2D coordinate points of the convex hull, the x-coordinates are sorted in ascending order. If the x-coordinates are the same, the y-coordinates are sorted in ascending order. The convex hull is constructed clockwise or counterclockwise. Connecting the upper and lower parts of the convex hull yields a set of convex hull points. Then, the absolute value of the sum of the directed areas of the triangles formed by each adjacent side and the origin is taken from the convex hull point set, and these sums are accumulated to obtain the convex hull area. Subsequently, the ratio of the convex hull area to the original contour area is used as the convexity feature. Due to the significant concavity at the four quadrant angles of the crosshairs, its convexity feature is between 0.6 and 0.9. The convex hull is the smallest convex polygon containing all points of the contour.

[0064] Furthermore, each edge of the convex hull boundary is traversed, and the gap between the contour boundary and the convex hull boundary is detected. Each gap is counted as a convex defect, and the number of convex defects for each contour is obtained. A convex defect is a concave area between the convex hull and the contour. The target contour is then selected based on the number of convex defects.

[0065] Since the cross-shaped profile has four convex defects located at the four quadrant angles of the cross-shaped profile, the profiles with convex features in the range of 0.6 to 0.9 and with four convex defects are selected as the target profiles based on the geometric characteristics of the cross-shaped profile.

[0066] Furthermore, when multiple target contours are selected, the roundness feature of each target contour is calculated. The roundness is equal to 4 times the contour area divided by the square of the contour perimeter and then multiplied by pi, that is, the roundness C of each candidate contour is C = (4π × area) / perimeter². Then, the target contour with the roundness closest to 1 is selected as the final cross-shaped contour.

[0067] Further, the image moments of the final crosshair contour are calculated. These image moments include the zeroth-order moment and the first-order moment, where the zeroth-order moment represents the area of ​​the contour, and the first-order moment represents the centroid position of the contour. The coarse positioning center coordinates of the crosshair are obtained based on the ratio of the first-order moment to the zeroth-order moment. The coarse positioning center coordinates are (x... c y c ), x c = x-coordinate of first moment / y-coordinate of zeroth moment c = y-coordinate of first moment / zeroth moment.

[0068] Finally, the principal axis direction of the crosshair profile is calculated based on the second moment of the image moments. Here, the second moment of the image moments represents the range of the principal axis direction of the crosshair profile, and is the expected value of the square of the deviation of the random variable from its expected value, representing the degree of dispersion of the random variable. Assume the second moments are m... 20 m 02 m11 Principal axis direction angle of the profile: ,in, , , The range of θ is [-90°, 90°]. Then, in the direction perpendicular to the main axis, i.e., θ plus 90°, the coarse positioning center coordinates are corrected at the sub-pixel level. Within a range of ±5 pixels around the coarse positioning center, the original gray value sequence is extracted, the position of the gray value peak is found, and the coarse positioning center is shifted to the peak to obtain the final sub-pixel level center coordinates of the cross line, with an accuracy of up to 0.05 pixels.

[0069] In this embodiment of the invention, the first image is subjected to grayscale processing and noise reduction to reduce noise interference and improve the accuracy of subsequent recognition. Then, an adaptive threshold segmentation algorithm is used to obtain a binarized image, and morphological closing operations are performed to fill in the tiny holes and breaks inside the crosshairs, obtaining a complete binarized image and improving the accuracy of subsequent center coordinate calculation. Next, contours are found based on the binarized image, and the target contours of the crosshairs are selected based on their area, aspect ratio, and convexity features to reduce computational load, avoid invalid calculations, and ensure high efficiency in recognition. Finally, the image moments of the target contours are calculated to determine the sub-pixel-level center coordinates of the crosshairs, providing a basis for subsequent cropping and improving cropping accuracy.

[0070] S30: Set segmented cutting process parameters according to the difference in physical properties between the aluminum alloy substrate and the wood veneer layer, and control the cutting equipment to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters;

[0071] In this embodiment of the invention, the segmented cutting process parameters decompose a single cutting action into multiple continuous stages according to the different properties of the material being processed. Each stage independently sets the saw blade linear speed, feed speed, and cutting depth, and executes them sequentially during the processing.

[0072] Specifically, the materials being cut include both aluminum alloy substrate and wood veneer. The cutting effects of these two materials are drastically different. Therefore, segmented cutting process parameters need to be set separately for the aluminum alloy substrate and the wood veneer layer, based on their different physical properties, to ensure optimal cutting results. Subsequently, the cutting equipment is controlled to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters.

[0073] Step S30 in the method provided in this embodiment of the invention includes:

[0074] The segmented cutting process parameters include first cutting stage parameters and second cutting stage parameters executed sequentially along the cutting feed direction, wherein the first cutting stage is used to cut the wood veneer layer and the second cutting stage is used to cut the aluminum alloy substrate.

[0075] The first cutting stage parameters include a first saw blade linear speed parameter, a first saw blade feed speed parameter, and a first cutting depth parameter, wherein the first saw blade linear speed parameter is 4000 meters per minute to 5000 meters per minute; the first saw blade feed speed parameter is 0.5 millimeters per second to 1.0 millimeters per second; and the first cutting depth parameter is 0.2 millimeters to 0.5 millimeters, and the first cutting depth parameter is configured to cut only through the wood veneer layer without reaching the aluminum alloy substrate;

[0076] The second cutting stage parameters include a second saw blade linear speed parameter, a second saw blade feed speed parameter, and a second cutting depth parameter, wherein the second saw blade linear speed parameter is 2500 meters per minute to 3500 meters per minute; the second saw blade feed speed parameter is 1.5 millimeters per second to 2.5 millimeters per second; and the second cutting depth parameter is configured to cut through the remaining thickness of the aluminum alloy substrate.

[0077] In this embodiment of the invention, one way to implement the segmented cutting process parameters is as follows:

[0078] The segmented cutting process parameters include parameters for the first cutting stage and parameters for the second cutting stage, which are executed sequentially along the cutting feed direction. The cutting feed direction is the direction in which the saw blade moves relative to the workpiece. The first cutting stage is used to cut the wood veneer layer, and the second cutting stage is used to cut the aluminum alloy substrate.

[0079] The actual thickness of the veneer layer and the total thickness of the aluminum alloy substrate are then obtained, which can be pre-measured, for example, a total thickness of 40 mm. The veneer layer is then cut through in the first cutting stage. The parameters of the first cutting stage include the first saw blade linear speed parameter, the first saw blade feed speed parameter, and the first cutting depth parameter. Due to the extremely short contact time generated by high-speed cutting, the conduction of frictional heat to the wood fibers is reduced, preventing the veneer edges from carbonizing and turning black. Therefore, the first saw blade linear speed parameter is set to 4000 m / min to 5000 m / min, for example, 4500 m / min. Because the lower feed speed allows for a very small cutting thickness per tooth, the first saw blade feed speed parameter is set to 0.5 mm / s to 1.0 mm / s, producing a smooth cut edge and reducing fraying or tearing. The first cutting depth parameter is 0.2 mm to 0.5 mm, configured to cut only through the veneer layer without reaching the aluminum alloy substrate, ensuring that the saw blade stops feeding immediately after just cutting through the veneer to avoid cutting into the aluminum alloy.

[0080] After the first cutting stage is completed, the process switches to the second cutting stage. The parameters for the second cutting stage include the second saw blade linear speed, the second saw blade feed rate, and the second depth of cut. Considering the characteristics of aluminum alloy—high thermal conductivity, low melting point, and susceptibility to burrs—the second saw blade linear speed is set to 2500 m / min to 3500 m / min to reduce heat conduction. Because the faster feed rate results in thicker chips, it can carry away more cutting heat and reduce the contact time between the chips and the tool rake face; therefore, the second saw blade feed rate is set to 1.5 mm / s to 2.5 mm / s. The second depth of cut is configured to cut through the remaining thickness of the aluminum alloy substrate; its cutting depth is set to the remaining thickness of the aluminum alloy substrate, i.e., the total thickness minus the cutting depth of the first stage.

[0081] Specifically, segmented cutting process parameters can be implemented in other ways. Another way to implement segmented cutting process parameters is as follows:

[0082] The segmented cutting process parameters include parameters for the first cutting stage and parameters for the second cutting stage, which are executed sequentially along the cutting feed direction. Since the fibrous layer of the wood veneer is prone to burrs and tears, the first cutting stage prioritizes cutting the fibrous structure of the wood veneer to reduce tearing. The second cutting stage is the metal cutting stage that completes the cutting of the aluminum alloy substrate, used to reduce aluminum alloy melting and burr generation.

[0083] The first cutting stage uses laser pre-cutting; a carbon dioxide laser is used to pre-cut a slit on the veneer layer along the theoretical cutting line; the depth of the slit is 0.1 mm to 0.3 mm; the output power of the carbon dioxide laser is 50 watts to 80 watts;

[0084] The second cutting stage uses mechanical sawing; the aluminum alloy substrate is cut by using a carbide saw blade along the kerf formed by laser pre-cutting; the width of the kerf formed by laser pre-cutting is greater than the width of the saw teeth of the carbide saw blade, so that the carbide saw blade does not come into contact with the edge of the kerf of the wood veneer during the cutting process.

[0085] In this embodiment of the invention, based on the difference in physical properties between the aluminum alloy substrate and the wood veneer layer, a staged cutting process is performed. The process parameters are set for the segmented cutting, including linear speed, feed rate, and cutting depth for two stages. The cutting equipment is controlled to perform cutting at the theoretical cutting line position according to these parameters. The first cutting stage uses a low-speed feed and high-speed cutting method to ensure extremely thin chips per tooth, avoiding veneer chipping due to compression. The second cutting stage uses a medium-low speed, relatively fast feed, and large cutting depth to control the cutting temperature, prevent melting, and reduce burrs. This fundamentally solves the processing defects caused by the incompatible material properties of aluminum alloy and wood veneer.

[0086] S40: After the cropping is completed, a second image containing the cross lines is acquired again, and the second center coordinates are obtained based on the recognition of the second image;

[0087] In this embodiment of the invention, after cropping is completed, a second image containing cross lines is acquired in the same manner, and image recognition is performed based on the second image to calculate and obtain the second center coordinates.

[0088] Specifically, after the cutting mechanism completes the cutting action, the aluminum-wood door frame is moved forward a preset distance along the conveying direction, bringing the crosshairs into the field of view of the image acquisition device. The crosshairs are illuminated using the same low-angle dark-field illumination source as when acquiring the first image. The image acquisition device is then triggered to capture a second image containing the crosshairs.

[0089] The second image undergoes the same image processing steps as the first image, including grayscale conversion, Gaussian filtering, adaptive thresholding, morphological closing, contour finding, area feature filtering, aspect ratio feature filtering, convexity feature filtering, circularity feature filtering, and image moment calculation. Finally, the sub-pixel-level center coordinates of the crosshair in the second image are obtained, serving as the second center coordinates. These second center coordinates are also highly accurate sub-pixel-level center coordinates.

[0090] In this embodiment of the invention, a second image is acquired after cropping to capture the impact of the cropping process on the position of the reference mark. Since the crosshairs are not cropped, their positional changes directly reflect the overall displacement of the workpiece under the action of factors such as cutting force, which facilitates subsequent compensation and correction. At the same time, the reuse of the same lighting and algorithm ensures the comparability of the coordinates before and after cropping and avoids the introduction of systematic errors.

[0091] S50: Calculate the actual error value of this cut based on the difference between the first center coordinate and the second center coordinate, and use the actual error value as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0092] In this embodiment of the invention, after obtaining the first center coordinates and the second center coordinates, the difference between the two coordinates is calculated. The difference reflects the amount of movement of the same point on the workpiece in the image coordinate system from before the start of cutting to after the end of cutting. Since the cutting device has already performed cutting according to the theoretical position, the workpiece may be offset. Therefore, the actual error value of this cutting is calculated, and the theoretical cutting position is subsequently compensated and corrected based on the actual error value.

[0093] Step S50 in the method provided in this embodiment of the invention includes:

[0094] The first center coordinates are converted into first physical coordinates, which are calculated based on a pre-calibrated pixel-to-millimeter conversion factor.

[0095] The second center coordinates are converted into second physical coordinates, which are calculated based on the pre-calibrated pixel-to-millimeter conversion coefficients.

[0096] Calculate the difference between the second physical coordinate and the first physical coordinate, and use it as the actual error value;

[0097] The step of obtaining the pre-calibrated pixel-to-millimeter conversion coefficient includes:

[0098] Select a standard calibration profile, on which at least two cross-shaped reference features with known physical spacing are pre-made;

[0099] Two calibration images containing the two crosshair reference features are acquired sequentially using an image acquisition device, and the two pixel coordinates of the two crosshair reference features in their respective calibration images are identified respectively;

[0100] Calculate the pixel distance between the two pixel coordinates, divide the known physical distance by the pixel distance, and obtain the pixel-to-millimeter conversion coefficient.

[0101] In this embodiment of the invention, firstly, based on a pre-calibrated pixel-to-millimeter conversion factor, the first center coordinates are calculated and converted into first physical coordinates. The second center coordinates are then converted into second physical coordinates using the same method. Here, physical coordinates are spatial position coordinates expressed in millimeters (the actual length unit), corresponding to the actual position of the workpiece in the machine coordinate system; the pixel-to-millimeter conversion factor is a scaling factor representing the actual physical length corresponding to one pixel in the image, and can be set according to the proportional relationship between image pixels and actual dimensions.

[0102] After calibration, during normal cutting, the first and second center pixel coordinates obtained each time are multiplied by the millimeter conversion factor to obtain the first and second physical coordinates, respectively.

[0103] Furthermore, the difference between the second physical coordinate and the first physical coordinate is taken as the actual error value.

[0104] The steps for obtaining the pre-calibrated pixel-to-millimeter conversion coefficients include:

[0105] First, a standard calibration profile is selected, which is made of the same aluminum alloy as the door frame to be processed and has a similar surface condition. The standard calibration profile has at least two crosshair reference features with known physical spacing pre-fabricated on it, and the physical spacing between adjacent crosshairs is measured using a coordinate measuring machine.

[0106] Furthermore, the calibration profile is placed on the worktable of the cutting equipment so that it is within the clear imaging range of the camera's field of view, and its position and posture are consistent with the workpiece during normal processing. Using an image acquisition device, two calibration images containing two cross-shaped reference features are acquired sequentially. For each calibration image, the two pixel coordinates of the two cross-shaped reference features in their respective calibration images are identified.

[0107] Finally, the pixel distance between two pixel coordinates is calculated by summing the squares of the differences between the coordinate values ​​on the horizontal and vertical axes of the two pixel coordinates, and then taking the square root. Dividing the physical distance by the pixel distance yields the pixel-to-millimeter conversion factor.

[0108] In this embodiment of the invention, the actual error value is used as a feedback compensation amount to correct the theoretical cutting line position in the next cutting step, including:

[0109] Multiple actual error values ​​obtained from consecutive cropping calculations are sequentially stored in a sliding window buffer. The arithmetic mean of all actual error values ​​in the sliding window buffer is calculated, and it is determined whether the absolute value of the arithmetic mean is less than a preset dead zone threshold.

[0110] When the absolute value of the arithmetic mean is less than the dead zone threshold, no compensation is made for the theoretical cut line position in the next cut step;

[0111] When the absolute value of the arithmetic mean is greater than or equal to the dead zone threshold, the arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0112] In this embodiment of the invention, a sliding window buffer is set in the controller, with a preset window length of N. Each time a complete cut is completed, the actual error value is stored at the end of the buffer. Multiple cuts are performed consecutively, and the arithmetic mean of all actual error values ​​within the sliding window buffer is calculated. The absolute value of the arithmetic mean is then checked to see if it is less than a preset dead zone threshold. The sliding window buffer is a finite-length data storage structure used to store the actual error values ​​calculated from the most recent N cuts. Each time a new error value enters, the oldest error value in the window is removed, ensuring that the buffer always contains the latest N data points. The window length N is typically an integer between 3 and 10. The dead zone threshold is a preset positive real number representing the upper limit of the allowable positioning deviation. It can be set according to the device's repeatability and cutting tolerance requirements, and its value ranges from 0.005 mm to 0.030 mm.

[0113] When the absolute value of the arithmetic mean is less than the dead zone threshold, the error is considered to be within an acceptable range and no compensation is required. Therefore, no compensation is made for the theoretical cutting line position in the next cutting step.

[0114] When the absolute value of the arithmetic mean is greater than or equal to the dead zone threshold, it indicates that the error is large. The arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0115] In this embodiment of the invention, the arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position in the next cutting step, including:

[0116] The feedback compensation is superimposed on the theoretical cutting line position to obtain the corrected cutting line position, and the cutting equipment is controlled to perform cutting according to the corrected cutting line position.

[0117] Specifically, the feedback compensation amount is vector-added with the theoretical cutting line position to obtain the corrected cutting line position. Then, based on the corrected cutting line position, the corrected position coordinates are converted into motion commands for the servo motor, driving the saw blade to move along a predetermined trajectory while cutting according to segmented process parameters.

[0118] In this embodiment of the invention, the pixel-to-millimeter conversion coefficient calibration method and the physical coordinate transformation process are explained in detail. This conversion provides an accurate measurement benchmark for the quantitative calculation of actual error values. Subsequently, the arithmetic mean of multiple errors is calculated through a sliding window buffer, and a dead zone threshold is used for judgment, which improves the system's stability and response efficiency while ensuring accuracy. This improves the cutting accuracy and surface quality of aluminum-wood doors, enabling targeted cutting control for different material areas and robust closed-loop error compensation.

[0119] Through the above specific implementation methods, the embodiments of the present invention achieve the following technical effects:

[0120] In this embodiment of the invention, by first limiting the type of light source, the angle of the light source placement, and the width, length, and depth of the crosshair lines during the image acquisition process, the environment in which the first image is acquired is consistent, the set reference features are consistent, interference from irrelevant factors is eliminated, and the accuracy of subsequent image recognition is guaranteed. At the same time, by installing a polarizing filter, the acquired image is protected from reflections from the aluminum alloy material, ensuring that the acquired image is recognizable and providing a highly recognizable and stable effective image for subsequent processing.

[0121] Secondly, the first image is processed to grayscale and noise is eliminated to reduce noise interference and improve the accuracy of subsequent recognition. Then, an adaptive threshold segmentation algorithm is used to obtain a binary image, and morphological closing operations are performed to fill in the tiny holes and breaks inside the crosshairs, obtaining a complete binary image and improving the accuracy of subsequent center coordinate calculation. Next, contours are found based on the binary image, and the target contours of the crosshairs are selected based on their area, aspect ratio, and convexity features to reduce computational load, avoid invalid calculations, and ensure high efficiency in recognition. Finally, the image moments of the target contours are calculated to determine the sub-pixel-level center coordinates of the crosshairs, providing a basis for subsequent cropping and improving cropping accuracy.

[0122] Furthermore, based on the differences in the physical properties of the aluminum alloy substrate and the wood veneer layer, the aluminum alloy substrate and the wood veneer layer are cut in stages. A segmented cutting process parameter is set, including two stages of linear speed, feed rate, and cutting depth. The cutting equipment is controlled to perform cutting at the theoretical cutting line position according to the segmented cutting process parameter. The first cutting stage uses a low-speed feed and high-speed cutting method to ensure that each tooth cuts extremely thin chips, avoiding wood veneer edge chipping caused by extrusion. The second cutting stage uses a medium-low speed, relatively fast feed, and large cutting depth method to control the cutting temperature, prevent melting, and reduce burrs, fundamentally solving the processing defects caused by the incompatible material properties of aluminum alloy and wood veneer.

[0123] Furthermore, a second image is obtained after cropping to capture the impact of the cropping process on the position of the reference mark. Since the crosshairs are not cropped, their positional changes directly reflect the overall displacement of the workpiece under the action of factors such as cutting force, which facilitates subsequent compensation and correction. At the same time, the reuse of the same lighting and algorithm ensures the comparability of the coordinates before and after cropping and avoids the introduction of systematic errors.

[0124] Finally, the pixel-to-millimeter conversion coefficient calibration method and physical coordinate transformation process were explained in detail, providing a precise measurement benchmark for the quantitative calculation of actual error values. Subsequently, the arithmetic mean of multiple errors was calculated using a sliding window buffer, and a dead zone threshold was used for judgment, improving system stability and response efficiency while ensuring accuracy. This improved the cutting precision and surface quality of aluminum-wood doors, enabling targeted cutting control for different material areas and robust closed-loop error compensation.

[0125] Figure 2 This is a schematic diagram of the solution logic based on the technical solution of the present invention.

[0126] Example 2, as Figure 3 As shown, based on the same inventive concept as the image recognition-based metal door frame cutting method provided in Embodiment 1, this embodiment of the invention also provides an image recognition-based metal door frame cutting system, the system comprising:

[0127] Image acquisition module 11 is used to pre-fabricate cross lines on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature, illuminate the cross lines with a low-angle dark field illumination source, and acquire a first image containing the cross lines.

[0128] The cutting position determination module 12 is used to identify the center position of the cross line based on the first image, obtain the first center coordinates, and calculate the theoretical cutting line position based on the first center coordinates and the preset offset parameters.

[0129] The cutting process parameter setting module 13 is used to set segmented cutting process parameters according to the difference in material physical properties between the aluminum alloy substrate and the wood veneer layer, and to control the cutting equipment to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters.

[0130] The image acquisition and center coordinate acquisition module 14 is used to acquire a second image containing the cross lines again after cropping, and to obtain the second center coordinates based on the recognition of the second image;

[0131] The compensation and correction module 15 is used to calculate the actual error value of this cutting based on the difference between the first center coordinate and the second center coordinate, and use the actual error value as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0132] In one embodiment, the image acquisition module 11 is used for:

[0133] The cross lines are located on the non-decorative surface of the aluminum alloy substrate, with a line width of 0.3 mm to 0.5 mm, a line length of 2 mm to 4 mm for each arm, a spacing of 20 mm to 50 mm between two adjacent cross lines, and an etching depth of 0.02 mm to 0.05 mm.

[0134] In one embodiment, the low-angle dark field illumination source is a blue LED ring light source or a blue LED linear focusing light source; the incident angle of the low-angle dark field illumination source is 15 to 30 degrees relative to the surface of the aluminum alloy substrate; and the luminous intensity of the low-angle dark field illumination source is set to be no less than 80% of the maximum luminous intensity.

[0135] The image acquisition device has a polarizing filter installed at the front end of its lens. The polarization direction of the polarizing filter is orthogonal to the polarization direction of the low-angle dark field illumination source.

[0136] In one embodiment, the cutting position determination module 12 is used for:

[0137] The first image is subjected to grayscale processing and noise removal to obtain a grayscale image, wherein the noise removal method is Gaussian filtering.

[0138] An adaptive threshold segmentation algorithm is used to extract the high-brightness regions in the grayscale image to obtain a binarized image. Then, a morphological closing operation is performed on the binarized image to fill the tiny holes and breaks inside the cross lines.

[0139] In the binarized image after the morphological closing operation, all contours are searched, and target contours belonging to the cross line are selected according to the area, aspect ratio and convexity features of each contour. The image moments of the target contours are calculated, and the subpixel-level center coordinates of the cross line are determined according to the image moments.

[0140] In one embodiment, finding all contours in the binarized image after the morphological closing operation, and filtering out target contours belonging to the crosshair based on the area, aspect ratio, and convexity features of each contour, calculating the image moments of the target contours, and determining the subpixel-level center coordinates of the crosshair based on the image moments, includes:

[0141] In the binarized image after the morphological closing operation, a contour finding algorithm based on topological structure analysis is used to extract the set of boundary points of all connected regions, and the set of boundary points of each connected region constitutes a contour.

[0142] Calculate the total number of pixels contained within each contour as the area, and discard contours whose area is less than a first area threshold and greater than a second area threshold;

[0143] Calculate the minimum bounding rectangle for each remaining contour, obtain the width and height of the minimum bounding rectangle, and calculate the ratio of the width to the height as the aspect ratio feature, retaining contours with aspect ratios in the range of 0.8 to 1.2;

[0144] For each contour retained after aspect ratio filtering, the convex hull of the contour is calculated, and the ratio of the area of ​​the convex hull to the original area of ​​the contour is calculated as a convexity feature, wherein the convex hull is the smallest convex polygon containing all points of the contour.

[0145] The number of convex defects for each contour is calculated. The convex defects are the concave areas between the convex hull and the contour. The cross-shaped contour has four convex defects, which are located at the four quadrant angles of the cross-shaped contour. Based on the geometric characteristics of the cross-shaped contour, contours with a convex feature in the range of 0.6 to 0.9 and a number of four convex defects are selected as target contours.

[0146] When multiple target contours are selected, the roundness feature of each target contour is calculated, and the target contour with the roundness closest to 1 is selected as the final cross line contour. The roundness is equal to 4 times the contour area divided by the square of the contour perimeter and then multiplied by pi.

[0147] Calculate the image moments of the final crosshair contour, the image moments including the zeroth moment and the first moment, wherein the zeroth moment represents the area of ​​the contour and the first moment represents the centroid position of the contour, and obtain the coarse positioning center coordinates of the crosshair based on the ratio of the first moment to the zeroth moment.

[0148] The principal axis direction of the crosshair contour is calculated based on the second moment of the image moment, and the coarse positioning center coordinates are corrected at the sub-pixel level in the direction perpendicular to the principal axis direction to obtain the sub-pixel level center coordinates of the crosshair.

[0149] In one embodiment, the cutting process parameter setting module 13 is used for:

[0150] The segmented cutting process parameters include first cutting stage parameters and second cutting stage parameters executed sequentially along the cutting feed direction, wherein the first cutting stage is used to cut the wood veneer layer and the second cutting stage is used to cut the aluminum alloy substrate.

[0151] The first cutting stage parameters include a first saw blade linear speed parameter, a first saw blade feed speed parameter, and a first cutting depth parameter, wherein the first saw blade linear speed parameter is 4000 meters per minute to 5000 meters per minute; the first saw blade feed speed parameter is 0.5 millimeters per second to 1.0 millimeters per second; and the first cutting depth parameter is 0.2 millimeters to 0.5 millimeters, and the first cutting depth parameter is configured to cut only through the wood veneer layer without reaching the aluminum alloy substrate;

[0152] The second cutting stage parameters include a second saw blade linear speed parameter, a second saw blade feed speed parameter, and a second cutting depth parameter, wherein the second saw blade linear speed parameter is 2500 meters per minute to 3500 meters per minute; the second saw blade feed speed parameter is 1.5 millimeters per second to 2.5 millimeters per second; and the second cutting depth parameter is configured to cut through the remaining thickness of the aluminum alloy substrate.

[0153] In one embodiment, the compensation correction module 15 is used for:

[0154] The first center coordinates are converted into first physical coordinates, which are calculated based on a pre-calibrated pixel-to-millimeter conversion factor.

[0155] The second center coordinates are converted into second physical coordinates, which are calculated based on the pre-calibrated pixel-to-millimeter conversion coefficients.

[0156] Calculate the difference between the second physical coordinate and the first physical coordinate, and use it as the actual error value;

[0157] The step of obtaining the pre-calibrated pixel-to-millimeter conversion coefficient includes:

[0158] Select a standard calibration profile, on which at least two cross-shaped reference features with known physical spacing are pre-made;

[0159] Two calibration images containing the two crosshair reference features are acquired sequentially using an image acquisition device, and the two pixel coordinates of the two crosshair reference features in their respective calibration images are identified respectively;

[0160] Calculate the pixel distance between the two pixel coordinates, divide the known physical distance by the pixel distance, and obtain the pixel-to-millimeter conversion coefficient.

[0161] In one embodiment, the actual error value is used as a feedback compensation amount to correct the theoretical cutting line position in the next cutting step, including:

[0162] Multiple actual error values ​​obtained from consecutive cropping calculations are sequentially stored in a sliding window buffer. The arithmetic mean of all actual error values ​​in the sliding window buffer is calculated, and it is determined whether the absolute value of the arithmetic mean is less than a preset dead zone threshold.

[0163] When the absolute value of the arithmetic mean is less than the dead zone threshold, no compensation is made for the theoretical cut line position in the next cut step;

[0164] When the absolute value of the arithmetic mean is greater than or equal to the dead zone threshold, the arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

[0165] In one embodiment, the arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position for the next cutting step, including:

[0166] The feedback compensation is superimposed on the theoretical cutting line position to obtain the corrected cutting line position, and the cutting equipment is controlled to perform cutting according to the corrected cutting line position.

[0167] Compared to existing technologies, this invention provides a metal door frame cutting method and system based on image recognition. By using a pre-fabricated crosshair as a reference feature, combined with a low-angle dark-field illumination source and polarization filtering, it effectively suppresses overexposure caused by the high reflectivity of aluminum alloy, enhances the contrast between the crosshair and the background, and achieves sub-pixel-level positioning of the cutting reference. Furthermore, this invention sets segmented cutting process parameters based on the material differences between aluminum alloy and wood veneer. First, it uses high speed and low feed to quickly cut the wood veneer layer to avoid scorching, and then uses low speed and high feed to cut the aluminum alloy to reduce burrs, accommodating the cutting needs of both materials. Furthermore, by taking two images of the same crosshair before and after cutting and calculating the positional deviation, a closed-loop feedback compensation is formed, which can correct the subsequent cutting position in real time, eliminating accumulated errors such as mechanical clearance, thermal deformation, and tool wear. Simultaneously, in the feedback compensation stage, a sliding window filter is used to calculate the arithmetic mean of multiple errors, and a dead zone threshold is used to suppress random noise and instantaneous disturbances, avoiding frequent system oscillations, thus improving system stability and response efficiency while ensuring accuracy. In summary, this significantly improves the cutting precision and surface quality of aluminum-wood doors, achieving targeted cutting control for different material areas and robust closed-loop error compensation.

Claims

1. A metal door frame cutting method based on image recognition, characterized in that, The methods include: A cross-shaped line is pre-fabricated on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature. The cross-shaped line is illuminated by a low-angle dark field lighting source, and a first image containing the cross-shaped line is acquired. Based on the first image, the center position of the cross line is identified, the first center coordinates are obtained, and the theoretical cutting line position is calculated based on the first center coordinates and the preset offset parameters. Based on the difference in physical properties between the aluminum alloy substrate and the wood veneer layer, segmented cutting process parameters are set, and the cutting equipment is controlled to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters. After the cropping is completed, a second image containing the cross lines is acquired again, and the second center coordinates are obtained based on the recognition of the second image; The actual error value of this cut is calculated based on the difference between the first center coordinate and the second center coordinate. The actual error value is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

2. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, The cross lines are located on the non-decorative surface of the aluminum alloy substrate, with a line width of 0.3 mm to 0.5 mm, a line length of 2 mm to 4 mm for each arm, a spacing of 20 mm to 50 mm between two adjacent cross lines, and an etching depth of 0.02 mm to 0.05 mm.

3. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, The low-angle dark field illumination source is a blue LED ring light source or a blue LED linear focusing light source; the incident angle of the low-angle dark field illumination source is 15 to 30 degrees relative to the surface of the aluminum alloy substrate; the luminous intensity of the low-angle dark field illumination source is set to be no less than 80% of the maximum luminous intensity. The image acquisition device has a polarizing filter installed at the front end of its lens. The polarization direction of the polarizing filter is orthogonal to the polarization direction of the low-angle dark field illumination source.

4. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, Based on the first image, the center position of the crosshair is identified, and the first center coordinates are obtained, including: The first image is subjected to grayscale processing and noise removal to obtain a grayscale image, wherein the noise removal method is Gaussian filtering. An adaptive threshold segmentation algorithm is used to extract the high-brightness regions in the grayscale image to obtain a binarized image. Then, a morphological closing operation is performed on the binarized image to fill the tiny holes and breaks inside the cross lines. In the binarized image after the morphological closing operation, all contours are searched, and target contours belonging to the cross line are selected according to the area, aspect ratio and convexity features of each contour. The image moments of the target contours are calculated, and the subpixel-level center coordinates of the cross line are determined according to the image moments.

5. The metal door frame cutting method based on image recognition according to claim 4, characterized in that, In the binarized image after the morphological closing operation, all contours are searched, and target contours belonging to the crosshair are selected based on the area, aspect ratio, and convexity features of each contour. The image moments of the target contours are calculated, and the sub-pixel-level center coordinates of the crosshair are determined based on the image moments, including: In the binarized image after the morphological closing operation, a contour finding algorithm based on topological structure analysis is used to extract the set of boundary points of all connected regions, and the set of boundary points of each connected region constitutes a contour. Calculate the total number of pixels contained within each contour as the area, and discard contours whose area is less than a first area threshold and greater than a second area threshold; Calculate the minimum bounding rectangle for each remaining contour, obtain the width and height of the minimum bounding rectangle, and calculate the ratio of the width to the height as the aspect ratio feature, retaining contours with aspect ratios in the range of 0.8 to 1.2; For each contour retained after aspect ratio filtering, the convex hull of the contour is calculated, and the ratio of the area of ​​the convex hull to the original area of ​​the contour is calculated as a convexity feature, wherein the convex hull is the smallest convex polygon containing all points of the contour. The number of convex defects for each contour is calculated. The convex defects are the concave areas between the convex hull and the contour. The cross-shaped contour has four convex defects, which are located at the four quadrant angles of the cross-shaped contour. Based on the geometric characteristics of the cross-shaped contour, contours with a convex feature in the range of 0.6 to 0.9 and a number of four convex defects are selected as target contours. When multiple target contours are selected, the roundness feature of each target contour is calculated, and the target contour with the roundness closest to 1 is selected as the final cross line contour. The roundness is equal to 4 times the contour area divided by the square of the contour perimeter and then multiplied by pi. Calculate the image moments of the final crosshair contour, the image moments including the zeroth moment and the first moment, wherein the zeroth moment represents the area of ​​the contour and the first moment represents the centroid position of the contour, and obtain the coarse positioning center coordinates of the crosshair based on the ratio of the first moment to the zeroth moment. The principal axis direction of the crosshair contour is calculated based on the second moment of the image moment, and the coarse positioning center coordinates are corrected at the sub-pixel level in the direction perpendicular to the principal axis direction to obtain the sub-pixel level center coordinates of the crosshair.

6. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, The segmented cutting process parameters are set based on the differences in the physical properties of the aluminum alloy substrate and the wood veneer layer, including: The segmented cutting process parameters include first cutting stage parameters and second cutting stage parameters executed sequentially along the cutting feed direction, wherein the first cutting stage is used to cut the wood veneer layer and the second cutting stage is used to cut the aluminum alloy substrate. The first cutting stage parameters include a first saw blade linear speed parameter, a first saw blade feed speed parameter, and a first cutting depth parameter, wherein the first saw blade linear speed parameter is 4000 meters per minute to 5000 meters per minute; the first saw blade feed speed parameter is 0.5 millimeters per second to 1.0 millimeters per second; and the first cutting depth parameter is 0.2 millimeters to 0.5 millimeters, and the first cutting depth parameter is configured to cut only through the wood veneer layer without reaching the aluminum alloy substrate; The second cutting stage parameters include a second saw blade linear speed parameter, a second saw blade feed speed parameter, and a second cutting depth parameter, wherein the second saw blade linear speed parameter is 2500 meters per minute to 3500 meters per minute; the second saw blade feed speed parameter is 1.5 millimeters per second to 2.5 millimeters per second; and the second cutting depth parameter is configured to cut through the remaining thickness of the aluminum alloy substrate.

7. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, The actual error value of this cutting is calculated based on the difference between the first center coordinate and the second center coordinate, including: The first center coordinates are converted into first physical coordinates, which are calculated based on a pre-calibrated pixel-to-millimeter conversion factor. The second center coordinates are converted into second physical coordinates, which are calculated based on the pre-calibrated pixel-to-millimeter conversion coefficients. Calculate the difference between the second physical coordinate and the first physical coordinate, and use it as the actual error value; The step of obtaining the pre-calibrated pixel-to-millimeter conversion coefficient includes: Select a standard calibration profile, on which at least two cross-shaped reference features with known physical spacing are pre-made; Two calibration images containing the two crosshair reference features are acquired sequentially using an image acquisition device, and the two pixel coordinates of the two crosshair reference features in their respective calibration images are identified respectively; Calculate the pixel distance between the two pixel coordinates, divide the known physical distance by the pixel distance, and obtain the pixel-to-millimeter conversion coefficient.

8. The metal door frame cutting method based on image recognition according to claim 1, characterized in that, The actual error value is used as a feedback compensation amount to correct the theoretical cutting line position in the next cutting step, including: Multiple actual error values ​​obtained from consecutive cropping calculations are sequentially stored in a sliding window buffer. The arithmetic mean of all actual error values ​​in the sliding window buffer is calculated, and it is determined whether the absolute value of the arithmetic mean is less than a preset dead zone threshold. When the absolute value of the arithmetic mean is less than the dead zone threshold, no compensation is made for the theoretical cut line position in the next cut step; When the absolute value of the arithmetic mean is greater than or equal to the dead zone threshold, the arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.

9. The metal door frame cutting method based on image recognition according to claim 8, characterized in that, The arithmetic mean is used as a feedback compensation amount to correct the theoretical cutting line position for the next cutting step, including: The feedback compensation is superimposed on the theoretical cutting line position to obtain the corrected cutting line position, and the cutting equipment is controlled to perform cutting according to the corrected cutting line position.

10. A metal door frame cutting system based on image recognition, characterized in that, The system is used to implement the image recognition-based metal door frame cutting method according to any one of claims 1-9, the system comprising: An image acquisition module is used to pre-fabricate cross lines on the surface of the aluminum alloy substrate of the aluminum-wood door metal frame as a reference feature, illuminate the cross lines with a low-angle dark field illumination source, and acquire a first image containing the cross lines. The cutting position determination module is used to identify the center position of the cross line based on the first image, obtain the first center coordinates, and calculate the theoretical cutting line position based on the first center coordinates and the preset offset parameter. The cutting process parameter setting module is used to set segmented cutting process parameters according to the differences in material physical properties between the aluminum alloy substrate and the wood veneer layer, and to control the cutting equipment to perform cutting at the theoretical cutting line position according to the segmented cutting process parameters. The image acquisition and center coordinate acquisition module is used to acquire a second image containing the cross lines after cropping, and to obtain the second center coordinates based on the recognition of the second image. The compensation and correction module is used to calculate the actual error value of this cut based on the difference between the first center coordinate and the second center coordinate, and use the actual error value as a feedback compensation amount to correct the theoretical cutting line position of the next cutting step.