Polygonal plate splicing method, system, device and medium based on machine vision
By using machine vision technology to obtain the outline of the board material and optimize the layout, the problem of low assembly efficiency and low utilization rate caused by the irregular shape of the leftover material is solved, and efficient utilization of leftover material and warehouse management are achieved.
Patent Information
- Application Number
- CN202511125199.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2026-06-23
- Estimated Expiration
- 2045-08-12
AI Technical Summary
In existing technologies, the irregular shape of leftover materials leads to low efficiency in secondary layout, warehouse backlog and low utilization, and traditional manual layout makes it difficult to maximize utilization.
A machine vision-based polygonal panel splicing method is adopted. The panel outline is obtained through graph convolutional network, priority scores are calculated, and multiple initial layouts are performed using the Bottom-Left algorithm and the Next-Fit Decreasing Height algorithm to identify and fill gaps and optimize the final layout.
It improved the utilization rate of surplus materials, reduced warehouse backlog, and enhanced assembly efficiency and overall material utilization.
Smart Images

Figure CN120894338B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of plate splicing, more particularly, it relates to a polygonal plate splicing method, system, device and medium based on machine vision. BACKGROUND
[0002] At present, 1220x2440mm formwork can be cut into various products, including regular shapes and special-shaped parts. The excess material generated during the cutting process can also be used twice. Since the shape of the excess material is mostly irregular rectangle, the current excess material needs to be manually calculated for secondary layout, which leads to low efficiency, warehouse backlog and easy errors, and the traditional manual layout is difficult to maximize utilization. SUMMARY
[0003] The purpose of the present application is to provide a polygonal plate splicing method, system, device and medium based on machine vision to solve the problems of low efficiency of secondary layout of excess material, serious warehouse backlog and low utilization rate of excess material in the background art.
[0004] The above technical purpose of the present application is achieved by the following technical scheme:
[0005] In a first aspect, the present application provides a polygonal plate splicing method based on machine vision, comprising the following specific steps:
[0006] Obtain each plate image containing the image of the plate to be spliced, and obtain the plate contour of each plate to be spliced through the vector path extraction algorithm of the graph convolution network;
[0007] Convert the plate contour into each vector graph, and calculate the priority score of each vector graph;
[0008] Based on the priority score, use the Bottom-Left algorithm and the Next-Fit Decreasing Height algorithm to perform multiple initial arrangements of each vector graph to form a preset splicing graph, and determine the target layout with the lowest hole rate among the layout results formed by the multiple initial arrangements as the target layout;
[0009] Identify and obtain the vector graph of the gap in the target layout, and obtain the vector graph of the plate to be spliced that has not been laid out;
[0010] Put the vector graph of the plate to be spliced that has not been laid out into each gap vector graph one by one until it cannot be put into each gap vector graph, and obtain the final layout of the preset splicing graph.
[0011] On the basis of the above technical scheme, the present application can also be improved as follows.
[0012] Further, the above-mentioned vector graphics of the unformatted to-be-spliced board is put into each gap vector diagram one by one until it cannot be put into the gap vector diagram; Specifically:
[0013] The area of each gap vector diagram and the area of the unformatted to-be-spliced board vector graphics are obtained;
[0014] According to the size order of the area of each gap vector diagram, the unformatted to-be-spliced board not exceeding the area of the vector graphics is screened out, and the to-be-spliced board that can be put into the vector graphics is put in according to the high-low order of the priority score of the to-be-spliced board and the longest side abutting;
[0015] The above steps are repeatedly executed until the unformatted to-be-spliced board cannot be put into the gap vector diagram;
[0016] Each gap vector diagram is processed in order from large to small according to the area until all gap vector diagrams are processed or there is no unformatted to-be-spliced board.
[0017] Further, the above-mentioned in determining the target layout, the method further comprises:
[0018] The number of to-be-spliced boards in each layout result is obtained through the layout result formed by multiple initial arrangements;
[0019] According to the number of to-be-spliced boards and the corresponding hole rate of each time, the layout score of each layout result is calculated, and the layout result with the highest layout score is determined as the target layout.
[0020] Further, the above-mentioned layout score is specifically:
[0021]
[0022] In the formula, The layout score is represented by, The preset weight is represented by, and ; The number of to-be-spliced boards after normalization processing is represented by, The hole rate after normalization processing is represented by.
[0023] Further, the loss function of the above-mentioned graph convolution network is specifically:
[0024]
[0025] In the formula, The loss function of the graph convolution network is represented by, The continuity constraint term is represented by, The curvature constraint term is represented by, Represents a closure constraint term. These represent the non-negative weight coefficients for each item.
[0026] Furthermore, the aforementioned continuity constraint term is specifically as follows:
[0027]
[0028] In the formula, Representing nodes respectively i and nodes j eigenvectors, This represents the set of edges of the board in the board image. For connecting nodes i and nodes j One of the edges;
[0029] The curvature constraint term is as follows:
[0030]
[0031] in:
[0032]
[0033] In the formula, Represents vertices The rate of change of the local tangent angle, Represents vertices Two-dimensional coordinates, Represents the regularization coefficient. To adjust the power parameter of the curvature constraint term sensitivity, This represents the total number of vertices involved in the calculation in the plate image;
[0034] The closure constraint term is as follows:
[0035]
[0036] In the formula, Indicates the attenuation coefficient. For the midpoint of the measurement space s and points t The distance function, This represents the threshold of the effective radius.
[0037] Furthermore, the aforementioned priority scores are as follows:
[0038]
[0039] In the formula, Indicates priority score, This represents the area of the vector graphic. For the fit based on the material boundary, The penalty indicator for elongated, thin shapes. These represent the corresponding weighting indicators.
[0040] Secondly, this application provides a machine vision-based polygonal panel splicing system, applied to the machine vision-based polygonal panel splicing method of any one of the first aspects, including:
[0041] The contour acquisition module is used to acquire images of each board containing images of the boards to be spliced, and to acquire the contours of each board through a vector path extraction algorithm of a graph convolutional network.
[0042] The priority score calculation module is used to convert the board outline into various vector graphics and calculate the priority score of each vector graphic.
[0043] The target layout determination module is used to perform multiple initial layouts of each vector graphic based on priority scores, using the Bottom-Left algorithm and the Next-FitDecreasing Height algorithm to form a preset splicing image, and to determine the layout with the lowest hole rate among the multiple initial layouts as the target layout.
[0044] The gap determination module is used to identify and obtain vector graphics of gaps in the target layout, as well as vector graphics of unlaid boards to be spliced.
[0045] The final layout determination module is used to place the vector graphics of the un-layout boards to be spliced one by one into the vector graphics of each gap until no more vector graphics can be placed into each gap, thus obtaining the final layout of the preset splicing image.
[0046] Thirdly, this application provides an electronic device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the method of any one of the first aspects.
[0047] Fourthly, this application provides a non-transitory computer-readable storage medium that stores computer instructions that cause a computer to perform any of the methods in the first aspect.
[0048] Compared with the prior art, the present invention has at least the following beneficial effects:
[0049] In this application, firstly, the outline of the board is obtained through the board image and converted into vector graphics, and the priority score of each vector graphics is calculated. Secondly, based on the calculated priority scores of each vector graphics, a splicing algorithm is used to initially arrange the vector graphics to form a preset splicing image. After each arrangement, the corresponding void ratio is calculated. The void ratio is the ratio of the remaining blank area to the area of the preset splicing image. The larger the void ratio, the lower the board utilization efficiency and the more gaps there are. Thus, the layout with the lowest void ratio is determined as the target layout. Finally, after obtaining the vector graphics of the gaps and the vector graphics of the un-spliced boards to be spliced, the vector graphics of the un-spliced boards to be spliced are placed one by one into the vector graphics of each gap, thereby obtaining the final layout of the preset splicing image. This solves the problems of low efficiency, warehouse backlog and easy error in the current practice of manually calculating and splicing leftover materials, and improves the utilization rate of leftover materials.
[0050] In this application, based on the area of the vector graphic of the gap and the area of the vector graphic of the unlaid board to be spliced, the gaps are filled with excess material multiple times, so as to achieve efficient use of the remaining space, which can greatly improve the final material utilization rate, reduce the layout fragmentation index, and improve the overall robustness and practicality of the method. Attached Figure Description
[0051] The accompanying drawings, which are included to provide a further understanding of embodiments of the invention and form part of this application, do not constitute a limitation thereof. In the drawings:
[0052] Figure 1 This is a flowchart of the splicing method in an embodiment of the present invention;
[0053] Figure 2 This is a connection diagram of the splicing system in an embodiment of the present invention;
[0054] Figure 3 This is a schematic diagram of the connection of an electronic device in an embodiment of the present invention. Detailed Implementation
[0055] 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 only some embodiments of the present invention, and not all embodiments. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0056] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0057] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0058] In the description of the embodiments of the present invention, "multiple" means at least two.
[0059] Example 1: To address the problems of low efficiency, warehouse backlog, and high error rates caused by the need for manual calculation and secondary layout of leftover materials (mostly irregular rectangles), and the difficulty in maximizing utilization of traditional manual layout, this example utilizes algorithms such as reinforcement learning and strategy optimization, as well as deep learning-based neural networks, multi-layer neural networks, convolutional neural networks, or recurrent neural networks to process images and data. The machine vision-based polygonal sheet splicing method provided in this example... Figure 1 As shown, the specific steps include the following:
[0060] S1. Obtain images of each board containing images of the boards to be spliced, and obtain the board outline of each board through a vector path extraction algorithm of a graph convolutional network.
[0061] When acquiring images of the boards to be spliced, issues such as dust, lighting variations, and occlusion exist on-site. These issues can be addressed through image enhancement and preprocessing. For example, adaptive histogram equalization (such as CLAHE) can be applied to enhance the contrast in low-light areas; noise reduction filtering, non-uniform light correction, and color adaptive algorithms can be used to address image attenuation caused by dust and shadows; dynamic dust interference can be reduced through multi-frame image fusion and moving object filtering; and strong light and reflection interference can be reduced using infrared, ultraviolet, or polarization imaging techniques.
[0062] Furthermore, an environment-aware enhancement mechanism can be used to automatically switch processing strategies based on the light intensity and dust concentration detected in the environment. For example, HDR synthesis or image stretching algorithms can be enabled when low light or backlight is detected; a specially trained denoising / dehazing network can be introduced for scenes with high concentrations of floating dust; generative adversarial networks (GANs) or super-resolution techniques can be used to repair blurred areas caused by occlusion; and enhancement and detection algorithms can be jointly optimized to achieve a collaborative workflow of perception-enhancement-detection, which can significantly improve the recognition accuracy under complex conditions.
[0063] Furthermore, the image acquisition process can include a data acquisition module, an algorithm processing module, a result feedback module, and a user interface. Utilizing modular design, each functional unit can be independently upgraded or replaced. Real-time on-site analysis is achieved by integrating edge computing or industrial PCs. The system connects to databases or cloud platforms via network interfaces to store inspection data, supporting remote monitoring and management. A user-friendly human-machine interface and alarm mechanism are provided for timely feedback on inspection anomalies. A closed-loop optimization strategy enhances system intelligence; for example, inspection results can be manually reviewed and used to train models, forming a continuous learning mechanism. The system can automatically adjust inspection parameters (such as thresholds or exposure) based on on-site feedback to adapt to changes in the construction site. Complete application scenarios are designed, such as integration with a construction management system (BIM) to achieve automatic updates and early warnings for template inventory. A containerized or microservice architecture is adopted, making the entire process flexible, scalable, easy to deploy, and maintain. By integrating hardware collaboration, intelligent algorithms, and data-driven optimization, an innovative comprehensive inspection solution is created.
[0064] Image processing can be summarized into the following steps:
[0065] Structure-preserving image binarization algorithms read images: Image processing libraries (such as OpenCV) are used to read input images, which can be color or grayscale. Typically, when extracting contours, color images need to be converted to grayscale to simplify computation, as contour extraction primarily focuses on brightness information rather than color information. A structure-aware, locally adaptive thresholding algorithm is designed, combining gradient direction and edge density information to maintain the continuity of image structure. A deep learning-based image enhancement preprocessing module can be embedded, such as using a lightweight U-Net network to enhance image texture structure. This addresses the problem of contour breakage and misjudgment caused by traditional global / local thresholding methods in images with large grayscale variations or complex backgrounds.
[0066] In order to reduce the impact of noise in the image on contour extraction, the above-mentioned noise reduction typically uses filtering methods, such as Gaussian filtering. Gaussian filtering can effectively smooth the image, remove random noise, and preserve the edge information of the image.
[0067] Furthermore, the aforementioned binarization can convert a grayscale image into a binary image. By setting a threshold, the pixel values in the image are divided into two categories: pixels with values greater than the threshold are set to white (usually representing the foreground), and pixels with values less than the threshold are set to black (usually representing the background). This can highlight the target object in the image, making it easier for subsequent contour extraction.
[0068] When searching for contours: specific algorithms can be used to find contours in an image, such as vector path extraction algorithms based on graph convolutional networks (GCNs). These algorithms search for contours in binary images and return them as a list. The edge map is represented as graph structure nodes. A graph convolutional network (GCN) is designed to fit contour paths and reconstruct the topology. "Continuity constraints + curvature constraints + closure judgment" are introduced into the graph convolutional network as loss functions to improve geometric consistency. Each contour is an array of points that represents the boundary of an object.
[0069] Morphological operations can also be performed. Depending on the characteristics and needs of the image, various morphological operations can be selected, such as erosion, dilation, opening, and closing operations. These operations can further refine or smooth the boundaries of objects in the image, remove small noise points, or fill in holes inside objects, thereby improving contour extraction.
[0070] When filtering and processing contours, depending on the specific application requirements, it may be necessary to filter and process the extracted contours. For example, contours of interest can be filtered based on features such as area, perimeter, and shape, while removing some small or noisy contours that do not meet the requirements. Contours can also be fitted or approximated to simplify their representation or extract their features.
[0071] When drawing contours, the extracted contours are drawn on the original image or a new blank image for visualization and further analysis. When using OpenCV, the drawContours function can be used to draw contours. By setting different parameters such as color and line width, the contours can be clearly displayed in the image.
[0072] Optionally, the loss function for the above graph convolutional network is as follows:
[0073]
[0074] In the formula, This represents the loss function of a graph convolutional network. Represents the continuity constraint term. Represents the curvature constraint term. Represents a closure constraint term. These represent the non-negative weight coefficients for each item.
[0075] Specifically, the aforementioned continuity constraint term is as follows:
[0076]
[0077] In the formula, Representing nodes respectively i and nodes j eigenvectors, This represents the set of edges of the board in the board image. For connecting nodes i and nodes j One of the edges.
[0078] Furthermore, the curvature constraint term is specifically as follows:
[0079]
[0080] in:
[0081]
[0082] In the formula, Represents vertices The rate of change of the local tangent angle, Represents vertices Two-dimensional coordinates, Represents the regularization coefficient. To adjust the power parameter of the curvature constraint term sensitivity, This represents the total number of vertices involved in the calculation in the plate image;
[0083] Furthermore, the closure constraint term is specifically:
[0084]
[0085] In the formula, Indicates the attenuation coefficient. For the midpoint of the measurement space s and points t The distance function, This represents the threshold of the effective radius.
[0086] S2 converts the board outline into various vector graphics and calculates the priority score of each vector graphic.
[0087] Among them, priority scores of various vector graphics can be used to select priority arrangement of boards. For the calculation of priority scores, area can be the main factor, but other attributes (shape complexity, aspect ratio, boundary conditions) can also be taken into account. Dynamic weight adjustment and combination of priorities can also be supported to improve the space utilization and layout efficiency of nesting or layout.
[0088] Specifically, for the calculation of priority scores, the area of each vector graphic needs to be calculated first. The graphic area is first read from the graphic outline data (which can be a closed path in DXF, an SVG vector graphic, or a polygon array). For each graphic, its effective geometric area is calculated: polygons use the vector cross product method; composite graphics use Boolean combination (such as outer contour - inner hole).
[0089] Additional attributes of the graphics can also be extracted, such as auxiliary sorting parameters and aspect ratio for each graphic to determine whether the graphic is "slender"; convexity ratio / complexity factor: the square of the perimeter / area, to assess whether it is an irregular graphic; and boundary fit: the ability of the graphic to fit the edge of the substrate; priority weight: can be customized, such as giving priority to special graphics.
[0090] Specifically, all graphics are sorted according to priority scores to generate a list of arrangements from high to low. The weighting mechanism can be adaptively adjusted based on the arrangement of scores, and the weighting allocation strategy can be dynamically optimized based on the results of previous rounds of nesting.
[0091] Optionally, the priority scores mentioned above are as follows:
[0092]
[0093] In the formula, Indicates priority score, This represents the area of the vector graphic. For the fit based on the material boundary, The penalty indicator for elongated, thin shapes. These represent the corresponding weighting indicators.
[0094] S3, based on priority scores, uses the Bottom-Left algorithm and the Next-Fit Decreasing Height algorithm to perform multiple initial layouts of each vector graphic to form a preset splicing image, and determines the layout with the lowest hole rate among the multiple initial layouts as the target layout.
[0095] Specifically, the number of initial layout iterations can be 10-50 times, or dynamically adjusted according to the number of boards. For example, if the number of boards is N, the number of initial layout iterations can be set to 2N times.
[0096] The layout strategy of the Bottom-Left (BL) algorithm can be described as follows: First, sort the parts according to their non-incremental widths, and then place them one by one. When placing a part, try to move it down (close to the bottom edge of the board) and then to the left (close to the left side) until it can no longer be moved, thus ensuring that there is no space available. This BL algorithm is simple and efficient, and can achieve a compact layout for regular or highly regular parts.
[0097] The arrangement strategy of the Next-Fit Decreasing Height (NFDH) algorithm described above can be described as follows: First, sort the parts in non-increasing order of height, and then place the next part in a position where there is sufficient remaining width in the current layer (horizontal); if there is not enough space, open a new layer to continue placing the parts. NFDH is easy to implement and works well for regular rectangular arrangements, but it may produce significant gaps for irregular parts or parts with large height differences.
[0098] Specifically, when arranging vector graphics based on priority scores using the Bottom-Left algorithm and the Next-Fit DecreasingHeight algorithm, the priority score determines the arrangement order of the boards. That is, the board with the highest priority score enters the arrangement first, and the boards are arranged in descending order of priority score. The two algorithms mainly target the regularity of the boards. This process can be judged manually. For example, the staff can judge the regularity of each piece of material based on experience. If the regularity is high, the regularity algorithm is used, and if the regularity is relatively low, the algorithm is used. After multiple (which can be preset) arrangements, the optimal one is selected as the target layout.
[0099] Furthermore, in addition to the methods mentioned above, the initial layout can also be achieved through an iterative dynamic nesting adjustment method, which supports adaptive backtracking adjustments after layout failures; supports multiple rounds of evaluation and "local optimal fine-tuning"; ultimately improving material utilization, layout stability, and time efficiency, which can be described as follows:
[0100] 1. Initial layout calculation: Sort by area first and place the graphics on the substrate in sequence; use heuristic nesting algorithms (such as Nesting, Bottom-Left, GeneticLayout, etc.); record the placement position, angle and space occupied by each graphic.
[0101] 2. Collision detection and boundary verification: Check whether the new graphic conflicts with the boundary of the existing graphic / substrate; if it fails: record the reason for the failure (insufficient space, shape misalignment, misalignment and overlap); enter the "dynamic adjustment stage".
[0102] 3. Dynamic adjustment strategy: Fine-tuning mechanism, attempts to adjust the position and angle of the most recent N graphics; release local space, uses the "space hole fill degree" function to determine whether it is worthwhile to backtrack and rearrange; rotation and mirror transformation, attempts 90° / 180° rotation and horizontal / vertical mirroring to improve fit; priority adjustment mechanism, if there are consecutive failures, lower the priority of the current graphics, postpone processing, and continue to arrange the next one; and reprocess in the "final round of re-arrangement" stage.
[0103] 4. Local Optimal Update: After each adjustment, record the material nesting efficiency index; the current layout area utilization rate; and the remaining space fragmentation index. If the new scheme is better than the original scheme, retain and promote it; if it is not better, roll back.
[0104] Optionally, the methods described above for determining the target layout also include:
[0105] S31, obtain the number of boards to be spliced in each layout result through the layout results formed by multiple initial layouts.
[0106] S32. Based on the number of boards to be spliced each time and the corresponding void rate each time, calculate the layout score of each layout result, and determine the layout result with the highest layout score as the target layout.
[0107] The above-mentioned layout score is as follows:
[0108]
[0109] In the formula, This indicates the layout score. This indicates preset weights (which can be adaptively adjusted), and ; This indicates the number of boards to be spliced after normalization. This represents the void ratio after normalization. The normalization here converts the number of boards to be spliced and the void ratio to a uniform range. The normalization method can be minimum-maximum normalization or standard deviation normalization.
[0110] S4, identify and obtain vector graphics of gaps in the target layout, and obtain vector graphics of un-layout boards to be spliced; wherein, the outline of gaps in the target layout can be identified by edge detection algorithms (such as the Canny algorithm), and vector graphics of gaps can be generated by polygon approximation algorithms (such as Douglas-Peucker).
[0111] The void ratio mentioned above is the ratio of the remaining blank area to the total area of the substrate (preset splicing pattern). The area can be obtained in the manner described above, and will not be repeated here.
[0112] S5, insert the vector graphics of the unlaid-out panels into the vector graphics of each gap one by one, until no more can be inserted into the vector graphics of each gap, and obtain the final layout of the preset splicing image.
[0113] Specifically, when placing the vector graphics of the unlaid-out panels to be spliced into the vector graphics of each gap, a fragment space replenishment algorithm can be used. This fragment space replenishment algorithm can rearrange the remaining, irregular, or locally empty areas after the main layout is completed, so as to improve the overall material utilization rate. Unlike the initial nesting, the goal of replenishment is more inclined to "maximize the utilization of leftover materials", and its strategy can be described as follows:
[0114] 1. Algorithm triggering conditions: After all high-priority graphics have been initially sorted; there is a large amount of remaining space, and the space utilization rate has not reached the set threshold (e.g., <90%); the remaining unsorted graphics include graphics with small size and high shape regularity.
[0115] 2. Arrangement Logic and Steps: Extract all unarranged graphics and reorder them according to "area from smallest to largest"; use boundary tracing algorithms, rasterization methods, or triangulation techniques to identify remaining gaps; attempt to place each graphic into the gap area one by one, adopting the principle of local minimum misalignment; after successful embedding, update the gap data structure and continue iterative attempts until all graphics have been processed or the space can no longer accommodate any more graphics.
[0116] 3. The objective function is to maximize the material utilization rate after the replacement; minimize the fragmentation index (number of gaps × average irregularity); and increase the graphic filling density (the actual number of filled graphics per unit gap).
[0117] 4. Differences between main nesting and supplementary nesting: Main nesting emphasizes graphic priority and overall structural stability; supplementary nesting focuses more on "resource recycling" and "utilization of corners and gaps", and does not require continuity and geometric order; supplementary nesting restricts rotation angle to avoid loss of accuracy or increased processing complexity.
[0118] Furthermore, when employing the fragmented space filling algorithm described above, additional strategies such as partitioned nesting, small graphic filling, and random trial can be used to improve matching efficiency and flexibility.
[0119] (1) The partition nesting strategy divides the remaining space into several sub-regions (e.g., approximation with convex polygons, grid block division, KD-tree region cutting): each region independently calls the local nesting algorithm (e.g., Bottom-Left or local greedy); it can be processed in parallel to improve computational efficiency; it avoids repeated attempts in large areas and enhances local adaptability.
[0120] (2) Small graphic filling strategy: sort the unsorted graphics by area and retain only the "fill candidate graphics" with an area below a certain threshold (such as less than 5% of the base material area): try to insert them one by one with "gap fit degree" as the index; give priority to small graphics with more regular geometric shapes (rectangle, circle); the order of attempts can be controlled by combining the pre-labeled "fill preference level".
[0121] (3) The random perturbation and trial mechanism is to break out of the local optimal state. When each attempt fails, a certain probability perturbation operation is introduced: randomly shuffle the current graphic arrangement order; randomly rotate the angle (such as 90° / 180°) and try again; use the Monte Carlo strategy to perform multiple trial matching of the gap + graphic combination.
[0122] In this embodiment, the vector graphics of the unarranged panels to be spliced are placed one by one into the vector graphics of each gap until no more vector graphics can be placed into the vector graphics of each gap; specifically:
[0123] S51, obtain the area of the vector graphic of each gap, and the area of the vector graphic of the unlaid-out board to be spliced.
[0124] S52, according to the area of each gap's vector graphic, filter out the unlaid panels to be spliced that do not exceed the area of the vector graphic. Determine whether each panel to be spliced can be placed in the vector graphic by the radial length. Place the panels that can be placed in order of priority score of the panels to be spliced, and then place them by the longest side (i.e., splicing the two vector graphics with the longest side).
[0125] The radial length determination mentioned above can be achieved in the following way:
[0126] a. Calculate the length Lg and width Wg of the minimum bounding rectangle of the gap vector diagram;
[0127] b. Calculate the length Lp and width Wp of the minimum bounding rectangle of the vector graphic with spliced panels;
[0128] c. If Lp≤Lg and Wp≤Wg, or Lp≤Wg and Wp≤Lp, then the board material can be placed in the gap.
[0129] S53, Repeat steps S51-S52 until no unlaid-out panels to be spliced can be placed in the vector diagram of the gap.
[0130] S54, process the vector graphics of each gap in descending order of area until the vector graphics of all gaps are processed, or there are no unarranged boards to be spliced.
[0131] Example 2: This application provides a machine vision-based polygonal panel splicing system, applied to the machine vision-based polygonal panel splicing method of Example 1, such as... Figure 2 As shown, it includes:
[0132] The contour acquisition module is used to acquire images of each board containing images of the boards to be spliced, and to acquire the contours of each board through a vector path extraction algorithm of a graph convolutional network.
[0133] The priority score calculation module is used to convert the board outline into various vector graphics and calculate the priority score of each vector graphic.
[0134] The target layout determination module is used to perform multiple initial layouts of each vector graphic based on priority scores, using the Bottom-Left algorithm and the Next-FitDecreasing Height algorithm to form a preset splicing image, and to determine the layout with the lowest hole rate among the multiple initial layouts as the target layout.
[0135] The gap determination module is used to identify and obtain vector graphics of gaps in the target layout, as well as vector graphics of unlaid boards to be spliced.
[0136] The final layout determination module is used to place the vector graphics of the un-layout boards to be spliced one by one into the vector graphics of each gap until no more vector graphics can be placed into each gap, thus obtaining the final layout of the preset splicing image.
[0137] Example 3: This application provides an electronic device, such as... Figure 3 As shown, it includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the method of Embodiment 1.
[0138] Example 4: This application provides a non-transitory computer-readable storage medium that stores computer instructions, which cause a computer to execute the method of Example 1.
[0139] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0140] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0141] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0142] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0143] Those skilled in the art will understand that all or part of the steps in the above facts and methods can be implemented by a program instructing related hardware. The program or the program described therein can be stored in a computer-readable storage medium. When the program is executed, it includes the following steps: at this time, the corresponding method steps are introduced. The storage medium can be ROM / RAM, magnetic disk, optical disk, etc.
[0144] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A machine vision-based method for splicing polygonal panels, characterized in that, The specific steps include the following: The system acquires images of each board containing images of the boards to be spliced, and obtains the board outlines of each board using a vector path extraction algorithm of a graph convolutional network. The outline of the board material is converted into various vector graphics, and the priority score of each vector graphic is calculated. Based on the priority score, the Bottom-Left algorithm and the Next-Fit Decreasing Height algorithm are used to perform multiple initial layouts of each vector graphic to form a preset splicing image, and the layout with the lowest hole rate among the multiple initial layouts is determined as the target layout. Identify and obtain vector graphics of the gaps in the target layout, and obtain the vector graphics of the un-layout panels to be spliced; The vector graphics of the unarranged panels to be spliced are placed one by one into the vector graphics of each gap until no more can be placed into the vector graphics of each gap, thus obtaining the final layout of the preset splicing image. When determining the target layout, the method further includes: By using the layout results formed by the initial arrangement multiple times, the number of boards to be spliced in each layout result is obtained; Based on the number of boards to be spliced each time and the corresponding void rate each time, the layout score of each layout result is calculated, and the layout result with the highest layout score is determined as the target layout. The layout score is as follows: ; In the formula, This indicates the layout score. Indicates the preset weight, and ; This indicates the number of boards to be spliced after normalization. This represents the void ratio after normalization. The priority score is specifically: ; In the formula, Indicates priority score, This represents the area of the vector graphic. For the fit based on the boundary of the nesting material, The penalty indicator for elongated, thin shapes. These represent the corresponding weighting indicators.
2. The machine vision-based polygonal panel splicing method according to claim 1, characterized in that, The process involves placing the vector graphics of the unarranged panels to be spliced one by one into the vector graphics of each gap, until no more can be placed into the vector graphics of any gap; specifically: Obtain the area of the vector graphic of each gap, and the area of the vector graphic of the unarranged panels to be spliced; Based on the area size of the vector diagrams of each gap, filter out the unarranged panels to be spliced that do not exceed the area of the vector diagram. Determine whether each panel to be spliced can be placed in the vector diagram by the radial length. Place the panels that can be placed in order of priority score and the longest side of the panel to be spliced. Repeat the above steps until no unarranged panels to be spliced can be placed in the vector diagram of the gap; The vector graphics of each gap are processed sequentially in descending order of area until the vector graphics of all gaps are processed, or there are no more unlaid-out panels to be spliced.
3. The machine vision-based polygonal panel splicing method according to any one of claims 1-2, characterized in that, The loss function of a graph convolutional network is as follows: ; In the formula, This represents the loss function of a graph convolutional network. Represents the continuity constraint term. Represents the curvature constraint term. Represents a closure constraint term. These represent the non-negative weight coefficients for each item.
4. The machine vision-based polygonal panel splicing method according to claim 3, characterized in that, The continuity constraint term is specifically: ; In the formula, Let i and j represent the feature vectors of node i and node j, respectively. This represents the set of edges of the board in the board image. Let be an edge connecting node i and node j; The curvature constraint term is specifically: ; in: ; In the formula, Represents vertices The rate of change of the local tangent angle, Represents vertices Two-dimensional coordinates, Represents the regularization coefficient. To adjust the power parameter of the curvature constraint term sensitivity, This represents the total number of vertices involved in the calculation in the plate image; The closure constraint term is specifically: ; In the formula, Indicates the attenuation coefficient. This is a function that measures the distance between points s and t in space. This represents the threshold of the effective radius.
5. A machine vision-based polygonal panel splicing system, applied to the machine vision-based polygonal panel splicing method according to any one of claims 1-4, characterized in that, include: The contour acquisition module is used to acquire images of each board containing images of the boards to be spliced, and to acquire the contours of each board through a vector path extraction algorithm of a graph convolutional network. The priority score calculation module is used to convert the outline of the board into various vector graphics and calculate the priority score of each vector graphic. The target layout determination module is used to perform multiple initial layouts of each vector graphic to form a preset splicing image based on the priority score using the Bottom-Left algorithm and the Next-FitDecreasing Height algorithm, and determine the layout with the lowest hole rate among the multiple initial layouts as the target layout. The gap determination module is used to identify and obtain vector graphics of gaps in the target layout, and to obtain vector graphics of un-layout boards to be spliced. The final layout determination module is used to place the vector graphics of the un-layout boards to be spliced into the vector graphics of each gap one by one until no more vector graphics can be placed into each gap, thus obtaining the final layout of the preset splicing image.
6. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the machine vision-based polygonal panel splicing method according to any one of claims 1-4.
7. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions that cause the computer to execute the machine vision-based polygonal panel splicing method according to any one of claims 1-4.
Citation Information
Patent Citations
Plate stock layout method and device and storage medium
CN115631347A
Two-dimensional irregular layout method and application based on network migration and hybrid positioning
CN117151277A