Search

CN-121482286-B - Preparation method and device of three-dimensional layered jigsaw, electronic equipment and storage medium

CN121482286BCN 121482286 BCN121482286 BCN 121482286BCN-121482286-B

Abstract

The invention provides a preparation method, a device, electronic equipment and a storage medium of a three-dimensional layered jigsaw, which comprise the following steps of obtaining a two-dimensional design image, preprocessing the two-dimensional design image, performing three-dimensional enhancement processing on the preprocessed two-dimensional design image to generate a preliminary three-dimensional image, processing the preliminary three-dimensional image to generate a three-dimensional model, layering the three-dimensional model to form a plurality of required target layers, arranging and laying out the target layers, outputting a drawing of the target layers comprising the optimal arrangement and layout, generating a layered cutting file according to the drawing, receiving the layered cutting file by manufacturing equipment, and preparing a jigsaw layer module. The invention has the advantages that the whole process of the preparation process of the jigsaw type toy is automatic, no manual intervention is needed from two-dimensional drawing to hierarchical jigsaw design, the limitation of the traditional dependence designer is broken through, the output file is directly connected with the production equipment, the industrial practicability is realized, and the manufacturing cost is reduced.

Inventors

  • LIU YU
  • ZHANG WANCHUN

Assignees

  • 天津灵角创意科技有限公司
  • 天津灵蛋智能科技有限公司

Dates

Publication Date
20260508
Application Date
20251231

Claims (9)

  1. 1. The preparation method of the three-dimensional layered jigsaw is characterized by comprising the following steps of: acquiring a two-dimensional design image, and preprocessing the two-dimensional design image; performing stereoscopic enhancement processing on the preprocessed two-dimensional design image to generate a preliminary three-dimensional image; processing the preliminary three-dimensional image to generate a three-dimensional model; layering the three-dimensional model to form a plurality of required target layers; in the step of layering the three-dimensional model to form a plurality of required target layers, determining layering quantity and cutting outline through a dynamic programming algorithm according to the geometric characteristics of the three-dimensional model to form a plurality of target layers, wherein the step comprises the following steps: Analyzing a three-dimensional model, namely reading the three-dimensional model information, and cutting the three-dimensional model into a series of parallel two-dimensional candidate layers along the height direction of the three-dimensional model; slicing, namely intersecting each candidate layer with a grid, extracting an intersecting line set, converting the intersecting line into a closed polygon, and generating a contour path; Determining a target layer number, namely discretizing the three-dimensional model into N candidate layer positions along the height direction, and determining the target layer number according to the volume of the three-dimensional model and the thickness of the selected material; Determining each target layer, namely determining each initial selection layer which is finally required according to the number of target layers and the total number of candidate layers, carrying out edge recognition on each candidate layer in the search field of each initial selection layer, calculating the significant contour characteristic value of each candidate layer, obtaining candidate layers containing or approximating the significant contour line of the model with the initial selection layer, and adjusting the candidate layers containing or approximating the significant contour line of the model to be the target layer corresponding to the initial selection layer; Arranging and laying out a plurality of target layers, and outputting drawings of the plurality of target layers comprising the optimal arrangement and layout; Generating a layered cutting file according to the drawing, and receiving the layered cutting file by manufacturing equipment to prepare a jigsaw layer module; In the step of arranging and laying out the plurality of target layers and outputting the drawing of the plurality of target layers comprising the optimal arrangement and layout, a genetic algorithm is applied to optimize the arrangement and layout of the plurality of target layers on a plane drawing with the aim of minimizing material waste, and a visual drawing comprising layering numbers is output, and the method comprises the following steps: preprocessing the cutting contour of each target layer, and recording the position and the rotation angle of the cutting contour of each target layer; Calculating a material utilization rate and an overlap penalty, and calculating a score according to the material utilization rate and the overlap penalty; and calculating and arranging the optimal solution by adopting a genetic algorithm and combining the scores, and outputting a visual drawing.
  2. 2. The method for preparing a three-dimensional hierarchical puzzle according to claim 1, wherein the preprocessing of the two-dimensional design image comprises the steps of: denoising the two-dimensional design image, namely removing noise points in the two-dimensional design image by adopting a Gaussian filtering algorithm, and reserving edge contour information; Extracting the edge contour of the two-dimensional design image after denoising treatment, and filling the fracture in the edge contour; Carrying out format standardization treatment on the two-dimensional design image with the optimized edge profile, and converting the two-dimensional design image into a unified format; And performing color simplification processing on the two-dimensional design image subjected to format standardization processing.
  3. 3. The method for preparing a three-dimensional hierarchical jigsaw according to claim 1 or 2, wherein in the step of generating a preliminary three-dimensional image by performing a three-dimensional enhancement process on the preprocessed two-dimensional design image, the preprocessed two-dimensional design image is processed by using an AI picture generation tool based on a diffusion model to generate the preliminary three-dimensional image.
  4. 4. The method for preparing a stereoscopic layered jigsaw according to claim 3, wherein the step of generating a preliminary three-dimensional image by performing a stereoscopic enhancement process on the preprocessed two-dimensional design image comprises: Loading a pre-trained Diffusion model, and inputting a preprocessed two-dimensional design image into the pre-trained Diffusion model, wherein the pre-trained Diffusion model adopts a Stable Diffusion open source frame and is based on a U-Net structure; carrying out image coding, namely carrying out normalization processing on the preprocessed two-dimensional design image, sequentially superposing noise conforming to normal distribution, and coding the noise into a latent space vector; Setting condition control, namely setting edge contour information and prompt word information; and (3) performing image decoding, namely removing noise in a back diffusion mode according to the set edge contour information and the cue word information, fusing shallow detail features and deep semantic features in a U-Net decoder, and adjusting the three-dimensional effect of the two-dimensional design image by controlling the cue word and control Net weight distribution.
  5. 5. The method for preparing a three-dimensional hierarchical jigsaw according to claim 1,2 or 4, wherein the step of processing the preliminary three-dimensional image to generate a three-dimensional model, generating a large model based on the 3D model, and converting the three-dimensional image into a three-dimensional grid model comprises: generating a geometric model through a conditional image by using the shape generation model; And synthesizing the texture map for the geometric model through a large-scale diffusion model by utilizing the texture synthesis model.
  6. 6. The method of claim 1, wherein the genetic algorithm is used to calculate the optimal solution by combining the scores, the population is initialized, and a plurality of different arrangements are randomly generated, and the following operations are performed: selecting the part with the highest score from the population, and directly reserving the part to the next generation; the cross, randomly selecting two arrangement modes, exchanging part of target layers; randomly modifying the coordinate or angle of a certain target layer; repeating the steps of selection, crossing and mutation, iterating for a plurality of times until the score is not lifted any more, and obtaining the optimal solution of the arrangement.
  7. 7. The preparation device of the three-dimensional layered jigsaw is characterized by comprising: a two-dimensional design image preprocessing unit for acquiring a two-dimensional design image, preprocessing the two-dimensional design image; The preliminary three-dimensional image generation unit is used for carrying out stereoscopic enhancement processing on the preprocessed two-dimensional design image to generate a preliminary three-dimensional image; the three-dimensional model generating unit is used for processing the preliminary three-dimensional image to generate a three-dimensional model; the layering unit is used for layering the three-dimensional model to form a plurality of required target layers, determining layering quantity and cutting outline through a dynamic programming algorithm according to the geometric characteristics of the three-dimensional model to form a plurality of target layers, and comprises the following steps: Analyzing a three-dimensional model, namely reading the three-dimensional model information, and cutting the three-dimensional model into a series of parallel two-dimensional candidate layers along the height direction of the three-dimensional model; slicing, namely intersecting each candidate layer with a grid, extracting an intersecting line set, converting the intersecting line into a closed polygon, and generating a contour path; Determining a target layer number, namely discretizing the three-dimensional model into N candidate layer positions along the height direction, and determining the target layer number according to the volume of the three-dimensional model and the thickness of the selected material; Determining each target layer, namely determining each initial selection layer which is finally required according to the number of target layers and the total number of candidate layers, carrying out edge recognition on each candidate layer in the search field of each initial selection layer, calculating the significant contour characteristic value of each candidate layer, obtaining candidate layers containing or approximating the significant contour line of the model with the initial selection layer, and adjusting the candidate layers containing or approximating the significant contour line of the model to be the target layer corresponding to the initial selection layer; The drawing generation output unit is used for arranging and laying out a plurality of target layers, outputting a drawing of the target layers comprising the optimal arrangement and layout, generating a layered cutting file according to the drawing, applying a genetic algorithm with the aim of minimizing material waste, optimizing the arrangement and layout of the target layers on a plane drawing, and outputting a visual drawing comprising layered numbers, and comprises the following steps: preprocessing the cutting contour of each target layer, and recording the position and the rotation angle of the cutting contour of each target layer; Calculating a material utilization rate and an overlap penalty, and calculating a score according to the material utilization rate and the overlap penalty; and calculating and arranging the optimal solution by adopting a genetic algorithm and combining the scores, and outputting a visual drawing.
  8. 8. An electronic device comprising a memory and a processor, the processor being configured to couple to the memory, read and execute instructions in the memory, and cause the electronic device to implement the method for preparing a stereoscopic layered puzzle according to any one of claims 1-6.
  9. 9. A readable storage medium, characterized in that the readable storage medium has stored thereon a computer program which, when executed, implements the method for preparing a stereoscopic layered puzzle according to any one of claims 1 to 6.

Description

Preparation method and device of three-dimensional layered jigsaw, electronic equipment and storage medium Technical Field The invention belongs to the technical field of children toys, and particularly relates to a preparation method and device of a three-dimensional layered jigsaw, electronic equipment and a storage medium. Background The existing three-dimensional children toys generally need to be manufactured into a mold and then are prepared in batches by adopting mechanical preparation, but for three-dimensional jigsaw toys in the fields of text-created products and teaching toys, particularly three-dimensional layered stacking jigsaw and the like, design of designers is relied on during design, each product needs to be designed and designed independently, the preparation steps are complex, the research and development working time of new products is long, and the production cost is high. Disclosure of Invention In view of the above, the present invention provides a method, an apparatus, an electronic device, and a storage medium for preparing a stereo hierarchical jigsaw, so as to solve the above or other problems in the prior art. In order to solve the technical problems, the technical scheme adopted by the invention is that the preparation method of the three-dimensional layered jigsaw comprises the following steps: acquiring a two-dimensional design image, and preprocessing the two-dimensional design image; Performing stereoscopic enhancement processing on the preprocessed two-dimensional design image to generate a preliminary three-dimensional image; processing the preliminary three-dimensional image to generate a three-dimensional model; layering the three-dimensional model to form a plurality of required target layers; arranging and laying out a plurality of target layers, and outputting drawings of the plurality of target layers comprising the optimal arrangement and layout; and generating a layered cutting file according to the drawing, and receiving the layered cutting file by manufacturing equipment to prepare the jigsaw layer module. Further, preprocessing the two-dimensional design image includes the steps of: denoising the two-dimensional design image, namely removing noise points in the two-dimensional design image by adopting a Gaussian filtering algorithm, and reserving edge contour information; the edge contour is optimized, namely, the edge contour of the two-dimensional design image after denoising treatment is extracted, and the fracture in the edge contour is filled; Carrying out format standardization treatment on the two-dimensional design image with the optimized edge profile, and converting the two-dimensional design image into a unified format; And performing color simplification processing on the two-dimensional design image subjected to format standardization processing. Further, in the step of generating the preliminary three-dimensional image, the preprocessed two-dimensional design image is processed by adopting an AI picture generating tool based on a diffusion model to generate the preliminary three-dimensional image. Further, the step of performing stereoscopic enhancement processing on the preprocessed two-dimensional design image to generate a preliminary three-dimensional image includes: loading a pre-trained Diffusion model, and inputting the preprocessed two-dimensional design image into the pre-trained Diffusion model, wherein the pre-trained Diffusion model adopts a Stable Diffusion open source frame and is based on a U-Net structure; carrying out image coding, namely carrying out normalization processing on the preprocessed two-dimensional design image, sequentially superposing noise conforming to normal distribution, and coding the noise into a latent space vector; Setting condition control, namely setting edge contour information and prompt word information; and (3) performing image decoding, namely removing noise in a back diffusion mode according to the set edge contour information and the cue word information, fusing shallow detail features and deep semantic features in a U-Net decoder, and adjusting the three-dimensional effect of the two-dimensional design image by controlling the cue word and control Net weight distribution. Further, the step of processing the preliminary three-dimensional image to generate a three-dimensional model, generating a large model based on the 3D model, and converting the three-dimensional image into a three-dimensional grid model, includes: generating a geometric model through a conditional image by using the shape generation model; And synthesizing the texture map for the geometric model through a large-scale diffusion model by utilizing the texture synthesis model. Further, layering processing is carried out on the three-dimensional model, and in the step of forming a plurality of required target layers, the layering quantity and the cutting outline are determined through a dynamic programming algorithm according to the