Polygonal plate splicing method, system and equipment based on machine vision and medium
By acquiring the outline of the board material through machine vision and calculating the priority score, and using algorithms to arrange it multiple times, the efficient splicing of leftover materials was finally achieved, solving the problems of low efficiency and low utilization rate of secondary splicing of leftover materials and improving the utilization rate of leftover materials.
Patent Information
- Application Number
- CN202511125199.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-12
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-08-12
AI Technical Summary
In existing technologies, the irregular shape of leftover materials leads to low efficiency in secondary assembly, warehouse backlog and low utilization rate, and manual calculation 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 the initial arrangement is performed using Bottom-Left and Next-Fit Decreasing Height algorithms. Gaps are identified and panels are placed one by one to finally form an efficient spliced image.
This improved the utilization rate of leftover materials, reduced the error rate and backlog risk of manual assembly, and achieved efficient and maximized utilization of leftover materials.
Smart Images

Figure CN120894338A_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 clean templates 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, resulting in 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: In a first aspect, the present application provides a polygonal plate splicing method based on machine vision, comprising the following specific steps: 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; Convert the plate contour into each vector graph, and calculate the priority score of each vector graph; 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; Identify and obtain the vector graph of the gap in the target layout, and obtain the vector graph of the un-laid plate to be spliced; Put the vector graph of the un-laid plate to be spliced 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.
[0005] On the basis of the above technical scheme, the present application can also be improved as follows.
[0006] Further, the above-mentioned putting the vector graph of the un-laid plate to be spliced into each gap vector graph one by one until it cannot be put into each gap vector graph; specifically: Obtain the area of each gap vector graph and the area of the vector graph of the un-laid plate to be spliced; Screening un-laid-out to-be-spliced boards not exceeding the area of the vector diagram according to the size of the area of the vector diagram of each gap in order, judging whether each to-be-spliced board can be put into the vector diagram through the radial length, and putting the to-be-spliced boards that can be put into according to the order of the priority score of the to-be-spliced boards from high to low in the order of the longest side abutting; Repeating the above steps until the to-be-spliced boards cannot be put into the vector diagram of the gap; Processing the vector diagrams of each gap in order according to the size of the area from large to small until all the vector diagrams of the gaps are processed or there is no un-laid-out to-be-spliced board.
[0007] Further, the method for determining the target layout further comprises: Obtaining the number of to-be-spliced boards in each layout result formed by multiple initial arrangements; Calculating the layout score of each layout result according to the number of to-be-spliced boards of each time and the corresponding hole rate of each time, and determining the layout result with the highest layout score as the target layout.
[0008] Further, the layout score is specifically:
[0009] In the formula, represents the layout score, represents the preset weight, and ; represents the number of to-be-spliced boards after normalization processing, represents the hole rate after normalization processing.
[0010] Further, the loss function of the graph convolution network is specifically:
[0011] In the formula, represents the loss function of the graph convolution network, represents the continuity constraint term, represents the curvature constraint term, represents the closure constraint term, respectively represent the non-negative weight coefficients corresponding to each term.
[0012] Further, the continuity constraint term is specifically:
[0013] In the formula, respectively represent the feature vectors of the node i and the node j . a set of edges of the board in the board image, is a connection node i and an edge of the node j ; a curvature constraint term, specifically:
[0014] wherein:
[0015] in the formula, denotes the local tangent angle change rate of the vertex , denotes the two-dimensional coordinates of the vertex , denotes a regularization coefficient, is a power parameter for adjusting the sensitivity of the curvature constraint term, is the total number of vertices in the board image participating in the calculation; a closure constraint term, specifically:
[0016] in the formula, denotes a decay coefficient, is a distance function between the point s and the point t in the metric space, denotes an action radius threshold.
[0017] Further, the priority score is specifically:
[0018] in the formula, denotes the priority score, is the area of the vector graph, is the fit degree based on the nesting boundary, denotes a penalty index of the elongated graph, respectively denote the corresponding weight index.
[0019] In a second aspect, the application provides a polygonal board splicing system based on machine vision, which is applied to the machine vision-based polygonal board splicing method of any one of the first aspect, and comprises: a contour acquisition module, configured to acquire each board image containing a board image to be spliced, and acquire a board contour of each board to be spliced through a vector path extraction algorithm of a graph convolution network; a priority score calculation module, configured to convert the board contour into each vector graph, and calculate a priority score of each vector graph; The target layout determination module is configured to determine the target layout based on the priority score, and utilize a Bottom-Left algorithm and a Next-Fit Decreasing Height algorithm to perform multiple initial layouts of each vector graphic to form the preset splicing graph, and determine the layout with the lowest hole rate in the layout results of the multiple initial layouts as the target layout. The gap determination module is configured to identify and acquire the vector graphic of the gap in the target layout, and acquire the vector graphic of the un-laid-out splicing board. The final layout determination module is configured to sequentially place the vector graphic of the un-laid-out splicing board into each vector graphic of the gap until the vector graphic of each gap cannot be placed, and obtain the final layout of the preset splicing graph.
[0020] In a third aspect, the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method of any one of the first aspect.
[0021] In a fourth aspect, the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions cause a computer to execute the method of any one of the first aspect.
[0022] Compared with the prior art, the present application has at least the following beneficial effects: In the present application, first, the board contour is acquired through the board image, and the board contour is converted into a vector graphic, and the priority score of each vector graphic is calculated; second, based on the calculated priority score of each vector graphic and using a splicing algorithm, each vector graphic is laid out initially to form a preset splicing graph, and the corresponding hole rate is calculated after each layout, the hole rate being the ratio of the residual blank area to the area of the preset splicing graph, the larger the hole rate, the lower the board utilization efficiency and the more the gaps, so the layout with the lowest hole rate is determined as the target layout; finally, after the vector graphic of the gap and the vector graphic of the un-laid-out splicing board are acquired, the vector graphic of the un-laid-out splicing board is sequentially placed into each vector graphic of the gap, thereby obtaining the final layout of the preset splicing graph; the problems of low efficiency, warehouse backlog, and easy errors in manual calculation of secondary layout of the excess material are solved, and the utilization rate of the excess material is improved.
[0023] In the present application, based on the area of the vector graphic of the gap and the area of the vector graphic of the un-laid-out splicing board, the multiple excess material filling of each gap is completed, the efficient utilization of the remaining space is realized, the final material utilization rate is greatly improved, the layout fragment index is reduced, and the overall robustness and practicality of the method are improved. BRIEF DESCRIPTION OF DRAWINGS
[0024] 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: Figure 1 This is a flowchart of the splicing method in an embodiment of the present invention; Figure 2 This is a connection diagram of the splicing system in an embodiment of the present invention; Figure 3 This is a schematic diagram of the connection of an electronic device in an embodiment of the present invention. Detailed Implementation
[0025] 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.
[0026] 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.
[0027] 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.
[0028] In the description of the embodiments of the present invention, "multiple" means at least two.
[0029] 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: 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.
[0030] Wherein, when the plate image of the to-be-spliced plate is acquired, due to problems such as dust, light change and shielding on site, the plate image can be processed through image enhancement and preprocessing; for example, adaptive histogram equalization (such as CLAHE) is applied to enhance the contrast of low-light areas; denoising filtering, non-uniform light correction, color adaptive algorithm processing are used to process image attenuation caused by dust and shadows; methods such as multi-frame image fusion and motion object filtering are used to reduce dynamic dust interference; infrared, ultraviolet or polarization imaging technology is used to reduce strong light and reflection interference. The processing strategy can also be automatically switched according to the light intensity and dust concentration detected on site through an environment perception type enhancement mechanism; for example, when low light or backlight is detected, an HDR synthesis or image stretching algorithm is enabled; a specially trained denoising / fog removal network is introduced for scenes with high floating dust concentration; a generative adversarial network (GAN) or super-resolution technology is used to repair blurred areas caused by shielding; the enhancement and detection algorithms are jointly optimized to realize a perception-enhancement-detection collaborative workflow, significantly improving the recognition accuracy under complex conditions.
[0031] Further, in the image acquisition link, a data acquisition module, an algorithm processing module, a result feedback module and a user interface can be included; modular design is used, and each functional unit can be independently upgraded or replaced; edge computing or industrial PC is combined to realize real-time analysis on site; a network interface is used to connect with a database or a cloud platform to store detection data, support remote monitoring and management; a friendly human-computer interaction interface and an alarm mechanism are provided to timely feedback detection abnormalities. A closed-loop optimization strategy is adopted to improve the intelligence of the system, such as using detection results for manual review to train models to form a continuous learning mechanism; the system can automatically adjust detection parameters (such as threshold or exposure) according to on-site feedback to adapt to site changes; a complete application scenario is designed, such as connecting with a construction management system (BIM) to realize automatic updating and early warning of the template library; containerization or micro-service architecture is adopted to make the entire process flexible and scalable, easy to deploy and maintain. Through the integration of hardware cooperation, intelligent algorithms and data-driven optimization, an innovative comprehensive detection solution is created.
[0032] The image processing can be summarized as the following steps: The structure-preserving image binarization algorithm reads the image: using an image processing library (such as OpenCV) to read the input image, which can be a color image or a grayscale image. Usually when performing contour extraction, it is necessary to convert the color image to a grayscale image, which can simplify the calculation, because contour extraction mainly focuses on the brightness information of the image, not the color information, and a structure-aware local adaptive threshold algorithm is designed, which combines gradient direction, edge density information, and maintains image structure continuity; can embed deep learning-based image enhancement preprocessing module, such as through lightweight U-Net network to strengthen the structure of image texture. Solve the problem of contour breakage and misjudgment caused by traditional global / local threshold method in images with large gray scale variation or complex background.
[0033] Among them, the above noise reduction is to reduce the influence of noise in the image on contour extraction, usually some filtering methods such as Gaussian filtering are used. Gaussian filtering can effectively smooth the image, remove random noise, and at the same time preserve the edge information of the image.
[0034] Further, the above 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, the pixels greater than the threshold are set to white (usually representing the foreground), and the pixels 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.
[0035] When finding the contour: specific algorithms can be used to find the contour in the image, such as vector path extraction algorithm based on graph convolution network (GCN), search for contours in the binary image, and return them in the form of a list, represent the edge map as a graph structure node, design a graph convolution network GCN to fit the contour path and reconstruct the topology; Introduce "continuity constraint + curvature constraint + closure judgment" as the loss function in the graph convolution network to improve the geometric consistency; Each contour is an array of points representing the boundary of an object.
[0036] Morphological operations can also be performed, depending on the characteristics and needs of the image, some morphological operations such as erosion, dilation, opening operation and closing operation can be selected. These operations can further refine or smooth the object boundaries in the image, remove some small noise points or fill in the internal cavities of the object, so as to better extract the contour.
[0037] In the contour screening and processing, according to the specific application requirements, the extracted contour may need to be screened and processed; such as, the contour of interest can be selected according to the area, perimeter, shape and other characteristics of the contour, and some small contours or noise contours that do not meet the requirements can be removed, and the contour can be fitted, approximated, etc. operation to simplify the representation of the contour or extract its features.
[0038] In the process of contour drawing, the extracted contour is 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 the contour, and by setting different color, line width and other parameters, the contour can be clearly displayed in the image.
[0039] Optionally, the loss function of the graph convolution network is specifically:
[0040] In the formula, the loss function of the graph convolution network, the continuity constraint term, the curvature constraint term, the closure constraint term, respectively represent the non-negative weight coefficients of each term.
[0041] The continuity constraint term is specifically:
[0042] In the formula, respectively represent the feature vectors of the node i and the node j , respectively, the set of plate edges in the plate image, an edge connecting the node i and the node j .
[0043] Further, the curvature constraint term is specifically:
[0044] In the formula:
[0045] In the formula, the local tangent angle change rate of the vertex , respectively, the two-dimensional coordinates of the vertex , respectively, the regularization coefficient, the power parameter for adjusting the sensitivity of the curvature constraint term, the total number of vertices participating in the calculation in the plate image; Further, the closure constraint term is specifically:
[0046] In the formula, the attenuation coefficient, the distance between the points and the distance function of the point t represents the action radius threshold.
[0047] S2, converting the plate profile into each vector graphics and calculating the priority score of each vector graphics.
[0048] Among them, the selection of the plate which can be arranged in priority through the priority score of each vector graphics, for the calculation of the priority score, the area can be dominated but other attributes (shape complexity, aspect ratio, boundary condition) are also considered; Dynamic weight adjustment and combination priority can also be supported to improve the space utilization and layout efficiency of nesting or layout.
[0049] Specifically, for the calculation of the priority score, the area of each vector graphics needs to be calculated first. The graphic area first reads the graphic profile data (which can be a closed path in DXF, SVG vector graphics, or a polygon array); for each graphic, calculate its effective geometric area: polygon uses vector cross product method; composite graphics use Boolean combination method (such as outer contour - inner hole).
[0050] Additional attributes of the graphics can also be extracted, such as extracting auxiliary sorting parameters and aspect ratio of each graphic to determine whether the graphic is "slim"; convexity ratio / complexity factor: square of perimeter / area, to evaluate whether it is an irregular graphic; and boundary fitting degree: the ability of the graphic to fit the edge of the substrate; priority weight: can be customized, such as special graphic priority.
[0051] Specifically, all graphics are sorted according to the priority score to generate a high-to-low arrangement list, and the weight mechanism can be adjusted adaptively according to the arrangement result of the score, and the weight distribution strategy is dynamically optimized based on the nesting result of the previous rounds.
[0052] Optionally, the above priority score is specifically:
[0053] In the formula, represents the priority score, is the area of the vector graphics, is the fitting degree based on the nesting boundary, represents the penalty index of the slender graphic, respectively represents the corresponding weight index.
[0054] S3, based on the priority score, using the Bottom-Left algorithm and the Next-Fit Decreasing Height algorithm to perform multiple initial arrangements of each vector graphics to form a preset splicing graph, and determining the layout result with the lowest hole rate among the multiple initial arrangements as the target layout.
[0055] Specifically, the number of initial arrangement times can be 10-50 times, or can be dynamically adjusted according to the number of plates, such as the number of plates being N, the number of initial arrangement times can be set to 2N times.
[0056] The arrangement strategy of the above-mentioned Bottom-Left (BL) algorithm can be described as follows: first, the parts are sorted in non-decreasing width, and then placed one by one. Each time a part is placed, it is moved as far down as possible (close to the bottom edge of the plate), and then moved as far left as possible (close to the left edge), until it cannot be moved any more, thereby ensuring that there is no space available. The BL algorithm is simple and efficient, and can obtain a relatively compact layout for regular or highly regular part arrangement.
[0057] The arrangement strategy of the above-mentioned Next-Fit Decreasing Height (NFDH) algorithm can be described as follows: first, sort the parts in non-decreasing height order, and then place the next part in a position where the remaining width of the current layer (horizontal) is sufficient; if it cannot be placed, a new layer is opened to continue placing csc.liv.ac.uk. NFDH is easy to implement and has good effect on regular rectangular arrangement, but may produce high gaps for irregular or parts with large height differences.
[0058] Specifically, in the arrangement of vector graphics based on priority score using Bottom-Left algorithm and Next-Fit Decreasing Height algorithm, the priority score determines the arrangement order of the plates, i.e. the plate with the highest priority score is arranged first, and the arrangement is performed in descending order of priority score; and the two algorithms are mainly aimed at the regularity of the plates, which can be determined by manual judgment, such as the regularity of each scrap being determined by the staff according to experience, and the regularity algorithm is used for high regularity, and the algorithm is used for relatively low regularity; after multiple (which can be pre-set) arrangements, the optimal one is selected as the target layout.
[0059] Further, in addition to the above-mentioned method, the initial arrangement can also be adjusted by an iterative dynamic nesting method, which supports self-adaptive backtracking adjustment after layout failure; supports multiple rounds of evaluation and "local optimal fine-tuning"; finally improves material utilization, arrangement stability and time efficiency, which is described as follows: 1. Initial layout calculation: sort by area priority, and place the graphics on the substrate in turn; use heuristic nesting algorithms (such as Nesting, Bottom-Left, Genetic Layout, etc.); record the placement position, angle, and occupied space state of each placed graphic.
[0060] 2. Collision detection and boundary check: check if the new graphic conflicts with the placed graphics / substrate boundary; if failed: record the failure reason (insufficient space, shape stuck, misaligned overlap); enter the "dynamic adjustment phase".
[0061] 3. Dynamic adjustment strategy: fine-tuning mechanism, try to adjust the position and angle of the last N graphics; release local space, use "space cavity filling degree" function to determine whether it is worth backtracking and rearranging; rotation and mirror transformation, try 90° / 180° rotation, horizontal / vertical mirror image to improve the fitting degree; priority adjustment mechanism, if continuous failure, reduce the priority of the current graphic, delay processing, continue to arrange the next one; and reprocess in the "last round of supplementary arrangement" stage.
[0062] 4. Local optimal update: after each adjustment, record the nesting efficiency index, current layout area utilization rate, and remaining space fragment index; if the new scheme is better than the original scheme, keep and promote it; if not, back up.
[0063] Optionally, the method for determining the target layout further comprises: S31, obtaining the number of to-be-spliced boards in each layout result formed by multiple initial arrangements.
[0064] S32, calculating the layout score of each layout result according to the number of to-be-spliced boards in each time and the corresponding cavity rate, and determining the layout result with the highest layout score as the target layout.
[0065] Wherein, the layout score is specifically:
[0066] In the formula, represents the layout score, represents the preset weight (which can be adaptively adjusted), and ; represents the number of to-be-spliced boards after normalization processing, represents the cavity rate after normalization processing; the normalization processing converts the number of to-be-spliced boards and the cavity rate into a unified range, and the normalization method used can be minimum-maximum normalization processing or standard deviation normalization processing.
[0067] S4, identifying and obtaining the vector graph of the gap in the target layout, and obtaining the vector graphic of the to-be-spliced board that has not been laid out; wherein the edge detection algorithm (such as Canny algorithm) can be used to identify the gap contour in the target layout, and the polygon approximation algorithm (such as Douglas-Peucker) can be used to generate the vector graph of the gap.
[0068] The above cavity ratio is the ratio of the residual blank area to the total area of the substrate (preset splicing map), and the area acquisition method can adopt the method described above, which will not be described here.
[0069] S5, the vector graphics of the un-laid-out to-be-spliced board are put into each gap vector graph one by one until the vector graphics cannot be put into each gap vector graph, and the final layout of the preset splicing map is obtained.
[0070] Specifically, when putting the vector graphics of the un-laid-out to-be-spliced board into each gap vector graph, a fragment space supplement layout algorithm can be used, which can re-arrange the residual, irregular or local cavity area after the main layout is completed, so as to improve the overall material utilization rate; unlike the initial nesting, the target of the supplement layout is more inclined to "maximum utilization of excess material", and the strategy can be described as the following steps: 1. Algorithm triggering condition After the initial layout of all high-priority graphics is completed, there are many remaining space regions, and the space utilization rate does not reach the set threshold (such as <90%); the remaining un-laid-out graphics contain graphics with small size and high regularity.
[0071] 2. Arrangement logic and steps Extract all un-laid-out graphics and reorder them according to "area from small to large"; identify the remaining gaps by using the boundary tracking algorithm, rasterization method or triangulation technology; try to put each graphic into the gap region, and use the principle of local minimum displacement; update the gap data structure after successful embedding, continue to iterate and try, until all graphics are processed or the space cannot be placed.
[0072] 3. Objective function Maximize the material utilization rate after supplement layout; minimize the fragmentation index (number of gaps x average irregularity); improve the graphic filling density (the number of actual filling graphics in a unit gap).
[0073] 4. Difference from the main nesting The main layout focuses on the priority of graphics and the stability of the overall structure; the supplement layout pays more attention to "resource recycling" and "corner gap utilization", and does not require continuity and geometric order; the supplement layout limits the rotation angle to avoid precision loss or increase in processing complexity.
[0074] Further, when using the above-mentioned fragment space supplement layout algorithm, partition nesting, small graphic filling, random attempt strategy, etc. can be used to improve the matching efficiency and flexibility: (1) Partition nesting strategy The remaining space is divided into several sub-regions (for example, approximated by convex polygons, divided by grid blocks, or cut by KD-tree regions): each region independently calls a local nesting algorithm (such as Bottom-Left or local greedy); it can be processed in parallel to improve the calculation efficiency; avoid repeated attempts in large areas to enhance local adaptability.
[0075] (2) Small pattern filling strategy Sort the unplaced patterns by area, and only keep the "filling candidate patterns" with an area below a certain threshold (such as 5% of the base material area): try to insert them one by one with "void fitting degree" as the indicator; prefer small patterns with regular geometric shapes (rectangles, circles); and combine the pre-labeled "filling preference level" to control the order of attempts.
[0076] (3) Random disturbance and attempt mechanism To get out of the local optimal state, introduce a certain probability disturbance operation when each attempt fails: randomly shuffle the current pattern arrangement order; randomly rotate by an angle (such as 90° / 180°) and try again; use the Monte Carlo strategy to perform multiple exploratory matching on the void + pattern combination.
[0077] In the embodiment, the above-mentioned vector graphics of the unplaced to-be-spliced board are put into the vector graph of each gap one by one until the vector graph of each gap cannot be put in; specifically: S51, the area of each gap vector graph and the area of the unplaced to-be-spliced board vector graphics are obtained.
[0078] S52, according to the size order of the area of each gap vector graph, the unplaced to-be-spliced board not exceeding the area of the vector graph is screened out, and the to-be-spliced board that can be put in is put in according to the high-low order of the priority score of the to-be-spliced board, and the longest side (i.e. the two vector graphics are spliced by the longest side).
[0079] Among them, the above-mentioned radial length judgment can be realized by the following way: a. Calculate the length L-g and width W-g of the minimum enclosing rectangle of the gap vector graph; b. Calculate the length L-p and width W-p of the minimum enclosing rectangle of the vector graphics with spliced board; c. If L-p≤L-g and W-p≤W-g, or L-p≤W-g and W-p≤L-p, it is determined that the board can be put into the gap.
[0080] S53, repeat steps S51-S52 until the vector graph of the gap cannot put in the unplaced to-be-spliced board.
[0081] S54, each gap vector graph is processed in order according to the area from large to small, until all gap vector graphs are processed or there is no unplaced to-be-spliced board.
[0082] Embodiment 2: The present application provides a polygonal board splicing system based on machine vision, which is applied to the polygonal board splicing method based on machine vision of embodiment 1, as shown in Figure 2 , which includes: The contour acquisition module is configured to acquire each board image containing a board image to be spliced, and acquire a board contour of each board to be spliced through a vector path extraction algorithm of the graph convolution network. The priority score calculation module is configured to convert the board contour into each vector graph, and calculate a priority score of each vector graph. The target layout determination module is configured to perform multiple initial arrangements of each vector graph to form a preset splicing graph based on the priority score, by using a Bottom-Left algorithm and a Next-Fit Decreasing Height algorithm, and determine a target layout with the lowest void ratio in layout results of the multiple initial arrangements as the target layout. The gap determination module is configured to identify and acquire a vector graph of a gap in the target layout, and acquire a vector graph of a board to be spliced that is not arranged. The final layout determination module is configured to sequentially place the vector graph of the board to be spliced that is not arranged into each vector graph of the gap until the vector graph of the board to be spliced that is not arranged cannot be placed in each vector graph of the gap, to obtain a final layout of the preset splicing graph.
[0083] Embodiment 3: The embodiment of the present application provides an electronic device, as shown in the figure, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the method of embodiment 1. Figure 3
[0084] Embodiment 4: The embodiment of the present application provides a non-transitory computer readable storage medium, which stores computer instructions, and the computer instructions make the computer execute the method of embodiment 1.
[0085] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can be in the form of a computer program product implemented 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.
[0086] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0087] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0088] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. Figure 1 The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0089] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks. The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
[0090] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart block or blocks.
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 vector graphics can be placed into each gap, thus obtaining the final layout of the preset splicing image.
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 claim 1, characterized in that, 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, the layout score for each layout result is calculated, and the layout result with the highest layout score is determined as the target layout.
4. The machine vision-based polygonal panel splicing method according to claim 3, characterized in that, 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.
5. The machine vision-based polygonal panel splicing method according to any one of claims 1-4, characterized in that, The loss function for graph convolutional networks 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.
6. The machine vision-based polygonal panel splicing method according to any one of claims 5, characterized in that, The continuity constraint term is specifically: 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; 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. For the midpoint of the measurement space s and points t The distance function, This represents the threshold of the effective radius.
7. The machine vision-based polygonal panel splicing method according to any one of claims 1-4, characterized in that, 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.
8. A machine vision-based polygonal panel splicing system, applied to the machine vision-based polygonal panel splicing method of any one of claims 1-7, 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.
9. 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, wherein the processor executes the computer program to implement the method of any one of claims 1-7.
10. 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 perform the method of any one of claims 1-7.
Citation Information
Patent Citations
Automobile plate laser cutting automatic typesetting and drawing method and system
CN112489166A
Plate processing control method and device, computer equipment and storage medium
CN115170580A
Plate stock layout method and device and storage medium
CN115631347A
Graph layout method and device, electronic equipment and storage medium
CN115859509A
Two-dimensional irregular layout method and application based on network migration and hybrid positioning
CN117151277A