Two-Dimensional Code Generation with Style Transfer and Structured Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for generating two-dimensional code images fused with background patterns and artistic styles require re-encoding and style transfer, which can lead to inconsistent pixel distribution and low identification rates.
Innovation Solution
A method that involves obtaining an initial two-dimensional code image and a background image, performing structured processing to match pixel distribution, and then applying style transfer only to the background image using a neural network model, followed by fusion to generate a target two-dimensional code image with consistent aesthetic integration.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Ease of manufacture
If style transfer is performed on the fused two-dimensional code image, then the artistic style is achieved, but the pixel distribution consistency deteriorates and identification rate decreases
Solution Approach 1:
The patent segments the processing into two independent stages: first fusing the background pattern with the two-dimensional code image, then applying style transfer only to the background portion. This segmentation prevents style transfer from disrupting the pixel distribution of the code image, thereby maintaining identification rate while achieving artistic style.
Solution Approach 2:
The patent applies different processing qualities to different regions: the two-dimensional code image region maintains its original pixel distribution and structural integrity, while the background region undergoes style transfer. This local differentiation ensures that the code remains machine-readable while the background achieves artistic aesthetic.
2Ease of manufacture
If re-encoding is performed to fuse background pattern, then the aesthetic integration is improved, but the processing complexity increases
Solution Approach 1:
The patent performs preliminary fusion of the background pattern with the two-dimensional code image before applying style transfer. This preliminary action establishes the aesthetic integration early in the process, avoiding the need for complex re-encoding operations later while maintaining visual harmony.
Data Source
Figure 1a~1b
Figure 1c~3
Figure 2
AI summary
At least one embodiment of the disclosure discloses a two-dimensional code generation method and apparatus, a storage medium and an electronic device, and is related to the field of two-dimensional code technology. The method of the at least one embodiment of the disclosure includes: obtaining an initial two-dimensional code and a preset background image, and performing structured processing on the initial two-dimensional code according to the preset background image to obtain a structured two-dimensional code; performing style transfer processing on the preset background image to obtain a style transferred image by a style transfer model; and performing a fusion operation on the structured two-dimensional code and the style transferred image to obtain a target two-dimensional code.