Method and device for generating poster fission and medium
By constructing poster fission templates and automatically identifying key areas and reserved locations using edge detection and deep learning models, the problem of manual adjustment of poster fission templates is solved, and the automation and high efficiency of poster generation is achieved.
Patent Information
- Application Number
- CN202510392845.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-03-31
AI Technical Summary
In Internet projects, poster fission templates need to be manually adjusted whenever they are replaced, resulting in low poster fission efficiency.
Build a poster fission template, automatically identify key areas and reserved locations through edge detection algorithms and deep learning models, adjust and embed user content to generate posters.
Improve the efficiency of poster fission, reduce manual adjustment time, and improve development efficiency.
Smart Images

Figure CN120374660A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of Internet technologies, and more particularly, to a method, apparatus, and medium for generating poster fission. Background Art
[0002] In Internet projects, it is often necessary to create some poster graphics and business cards according to the characteristics of the project and the publicity needs, and achieve the project marketing purpose through the dissemination and sharing among users. Therefore, the system promotes a fission poster activity every quarter to invite more users through lecturers. Due to the difference in the fission poster templates each time, developers have to manually draw the positions of the pictures each time, which consumes a lot of time. As a result, there is a technical problem of low efficiency in poster fission. Summary of the Invention
[0003] In view of the deficiencies of the prior art, the present invention provides a method, apparatus, and medium for generating poster fission.
[0004] According to one aspect of the present invention, there is provided a method for generating poster fission, including:
[0005] Constructing a poster fission template for the fission poster, where the poster fission template includes pictures, texts, and a preset element area;
[0006] Performing key feature extraction on the poster fission template to obtain key area information and reserved position information of the poster fission template;
[0007] Adjusting the content of the poster to be fissioned according to the size information in the reserved position information to obtain the adjusted content of the poster to be fissioned;
[0008] Embedding the adjusted content of the poster to be fissioned into the poster fission template based on the reserved position information and the key area information to generate a fission poster.
[0009] Optionally, performing key feature extraction on the poster fission template to obtain key area information and reserved position information of the poster fission template includes:
[0010] Performing grayscale conversion, binarization, denoising, and filtering operations on the pictures of the poster fission template to obtain the picture area in the key area;
[0011] Using an edge detection algorithm to identify the graphic boundary and line structure of the poster fission template, and determining the key area and reserved position of the poster fission template;
[0012] Calculating the coordinate information of the identified key area, reserved position, and key area to determine the key area information and reserved position information, where the coordinate information includes the upper left coordinate point, width, and height.
[0013] Optionally, an edge detection algorithm is used to identify the graphic boundaries and line structures of the poster fission template, and determine the key areas and reserved positions of the poster fission template, including:
[0014] Use the Canny algorithm to detect the edge image of the graphic boundaries and line structures of the poster fission template;
[0015] Apply contour detection on the edge image to obtain all contour information;
[0016] Based on the contour information, use a deep learning model to perform semantic segmentation on the poster fission template to identify the key areas and reserved positions.
[0017] Optionally, use the Canny algorithm to detect the edge image of the graphic boundaries and line structures of the poster fission template, including:
[0018] Perform Gaussian filtering on the poster fission template to obtain a filtered image;
[0019] Calculate the gradient information of each pixel in the filtered image, where the gradient information includes the gradient magnitude and gradient angle;
[0020] Perform non-maximum suppression on the gradient magnitude to obtain edge information;
[0021] Use a double-threshold method to process the edge information to obtain an edge image.
[0022] According to another aspect of the present invention, there is provided a generating device for poster fission, including:
[0023] A construction module for constructing a poster fission template for the fission poster, where the poster fission template includes pictures, texts, and preset element areas;
[0024] An extraction module for extracting key features of the poster fission template to obtain key area information and reserved position information of the poster fission template;
[0025] An adjustment module for adjusting the content of the poster to be fissioned according to the size information in the reserved position information to obtain the adjusted content of the poster to be fissioned;
[0026] A generating module for embedding the adjusted content of the poster to be fissioned into the poster fission template based on the reserved position information and the key area information to generate a fission poster.
[0027] According to yet another aspect of the present invention, there is provided a computer-readable storage medium storing a computer program, and the computer program is used to execute the method described in any one of the above aspects of the present invention.
[0028] According to another aspect of the present invention, there is provided an electronic device, comprising: a processor; a memory for storing executable instructions executable by the processor; the processor for reading the executable instructions from the memory and executing the instructions to implement the method according to any one of the above aspects of the present invention.
[0029] Thus, BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The exemplary embodiments of the present invention can be more fully understood by reference to the following drawings:
[0031] Figure 1 is a flowchart of a method for generating poster fission provided by an exemplary embodiment of the present invention;
[0032] Figure 2 is a schematic structural diagram of a device for generating poster fission provided by an exemplary embodiment of the present invention;
[0033] Figure 3 is the structure of an electronic device provided by an exemplary embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0034] Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments of the present invention. It should be understood that the present invention is not limited by the exemplary embodiments described herein.
[0035] It should be noted that: unless otherwise specifically stated, the relative arrangements of components and steps, numerical expressions and values set forth in these embodiments do not limit the scope of the present invention.
[0036] Those skilled in the art can understand that terms such as "first", "second", etc. in the embodiments of the present invention are only used to distinguish different steps, devices or modules, etc., and do not represent any specific technical meaning, nor do they represent an inevitable logical order between them.
[0037] It should also be understood that in the embodiments of the present invention, "a plurality" may refer to two or more, and "at least one" may refer to one, two or more.
[0038] It should also be understood that for any component, data or structure mentioned in the embodiments of the present invention, without clear definition or contrary indication in the context, it can generally be understood as one or more.
[0039] In addition, the term "and / or" in the present invention is merely a description of the association relationship between associated objects, indicating that there can be three relationships. For example, A and / or B can represent three situations: A exists alone, both A and B exist simultaneously, and B exists alone. In addition, the character " / " in the present invention generally represents an "or" relationship between the associated objects before and after.
[0040] It should also be understood that the description of each embodiment of the present invention emphasizes the differences between the embodiments, and their similarities can be referred to each other. For the sake of brevity, they will not be described in detail one by one.
[0041] Meanwhile, it should be understood that, for the sake of description convenience, the sizes of the various parts shown in the drawings are not drawn according to the actual proportional relationship.
[0042] The following description of at least one exemplary embodiment is actually merely illustrative and in no way restrictive of the present invention and its application or use.
[0043] Techniques, methods, and devices known to those of ordinary skill in the relevant art may not be discussed in detail, but where appropriate, the techniques, methods, and devices should be regarded as part of the specification.
[0044] It should be noted that like reference numerals and letters denote like items in the following figures, and thus, once an item is defined in one figure, further discussion thereof is not required in subsequent figures.
[0045] Embodiments of the present invention can be applied to electronic devices such as terminal devices, computer systems, servers, etc., which can operate together with many other general-purpose or special-purpose computing system environments or configurations. Examples of well-known terminal devices, computing systems, environments, and / or configurations suitable for use with electronic devices such as terminal devices, computer systems, servers, etc. include, but are not limited to: personal computer systems, server computer systems, thin clients, thick clients, handheld or laptop devices, microprocessor-based systems, set-top boxes, programmable consumer electronics, network personal computers, small computer systems, large computer systems, and distributed cloud computing technology environments including any of the above systems, and so on.
[0046] Electronic devices such as terminal devices, computer systems, and servers can be described in the general context of computer system-executable instructions (such as program modules) executed by a computer system. Generally, program modules may include routines, programs, target programs, components, logics, data structures, etc., which perform specific tasks or implement specific abstract data types. The computer system / server can be implemented in a distributed cloud computing environment where tasks are executed by remote processing devices linked through a communication network. In a distributed cloud computing environment, program modules can be located on local or remote computing system storage media including storage devices.
[0047] Exemplary Method
[0048] Figure 1 is a schematic flowchart of a method for generating poster fission provided by an exemplary embodiment of the present invention. This embodiment can be applied to an electronic device, such as Figure 1 As shown, the method 100 for generating poster fission includes the following steps:
[0049] Step 101, construct a poster fission template for the fission poster, where the poster fission template includes pictures, texts, and a preset element area;
[0050] Step 102, extract key features from the poster fission template to obtain the key area information and reserved position information of the poster fission template;
[0051] Step 103, adjust the content of the poster to be fissioned according to the size information in the reserved position information to obtain the adjusted content of the poster to be fissioned;
[0052] Step 104, based on the reserved position information and the key area information, embed the adjusted content of the poster to be fissioned into the poster fission template to generate a fission poster.
[0053] Specifically, the present invention detects by automatically identifying and extracting the key features in the poster fission template, locates the boundaries of the reserved positions in the poster fission template, and aligns the content uploaded by the user with the reserved positions in the poster fission template, thereby generating a poster. The specific implementation is as follows:
[0054] 1. Prepare a poster fission template for the poster fission:
[0055] Design a template for the fission poster and reserve positions for pictures, texts, and other elements in the template.
[0056] 2. Feature extraction of the poster fission template:
[0057] 1) Image preprocessing: Perform operations such as grayscale conversion, binarization, denoising, and filtering on the template image to reduce the image complexity and highlight the features of the reserved positions of the pictures.
[0058] 2) Feature detection: Use edge detection algorithms (such as Canny, Hough transform) to identify the graphic boundaries and line structures in the template, and determine the key areas of the template and the bounding boxes of the reserved positions.
[0059] Algorithm process:
[0060] 1. Use the Canny algorithm to detect edges in the image. Formula: edges = cv2.Canny(image, threshold1, threshold2);
[0061] 2. Apply contour detection (such as cv2.findContours) on the edge image to obtain all contour information. Formula: contours, hierarchy = cv2.findContours(edges, cv2.RETR_TREE, cv2.CHAIN_APPROX_SIMPLE)
[0062] Calculate the bounding box of each contour. Formula: bounding_boxes = [cv2.boundingRect(cnt) for cnt in contours if cv2.contourArea(cnt) > min_area]
[0063] 3. Use a deep learning model for semantic segmentation, such as U-Net or Mask R-CNN, to perform pixel-level classification on the template and automatically identify the key areas and reserved positions. This method can more accurately locate and identify the bounding boxes of complex structures.
[0064] The usage parameters of the Canny algorithm include:
[0065] Gaussian filter parameters;
[0066] Gaussian kernel size: \(k_{\text{size}}\);
[0067] Gaussian kernel standard deviation: \(\sigma\);
[0068] Gradient calculation parameters;
[0069] Convolution kernel size of the Sobel operator: \(k_{\text{size}}\);
[0070] Pixel difference precision used for gradient calculation: \(k_{\text{size}}\);
[0071] Non-maximum suppression parameters;
[0072] Gradient angle threshold: \(\theta\);
[0073] Double-threshold processing parameters;
[0074] Low threshold: \text{low_threshold};
[0075] High threshold: \text{high_threshold}.
[0076] According to the above parameters, the edge detection process of the Canny algorithm can be summarized as the following steps:
[0077] Apply a Gaussian filter to the image to reduce noise:
[0078] Input image: \text{input_image};
[0079] Output image: \text{blurred_image} = \text{GaussianBlur}(\text{input_image}, k_{\text{size}}, \sigma).
[0080] Calculate the gradient and angle of each pixel in the image:
[0081] The Sobel operator is used to calculate the gradients of the image in the x and y directions. The convolution kernels of the Sobel operator in the x direction and y direction are respectively:
[0082]
[0083] Gradient in the X direction: \text{gradient_x} = \text{Sobel}(\text{blurred_image}, k_{\text{size}}, k_{\text{size}}, 1, 0, k_{\text{size}});
[0084] Gradient in the Y direction: \text{gradient_y} = \text{Sobel}(\text{blurred_image}, k_{\text{size}}, k_{\text{size}}, 0, 1, k_{\text{size}});
[0085] Gradient magnitude: \text{gradient_magnitude} = \sqrt{\text{gradient_x}^2 + \text{gradient_y}^2};
[0086] Gradient angle: \(\text{gradient_angle}=\text{arctan2}(\text{gradient_y},\text{gradient_x})\).
[0087] Perform non-maximum suppression on the gradient magnitude to preserve edge details:
[0088] Input gradient magnitude image: \(\text{gradient_magnitude}\);
[0089] Input gradient angle image: \(\text{gradient_angle}\);
[0090] Output gradient magnitude image after suppression: \(\text{non_max_suppressed}=\text{NonMaxSuppression}(\text{gradient_magnitude},\text{gradient_angle},\theta)\).
[0091] Use double-threshold processing to determine true edges:
[0092] Input gradient magnitude image after suppression: \(\text{non_max_suppressed}\);
[0093] Low-threshold thresholding: \(\text{low_threshold_mask}=(\text{non_max_suppressed}>\text{low_threshold})\);
[0094] High-threshold thresholding: \(\text{high_threshold_mask}=(\text{non_max_suppressed}>\text{high_threshold})\);
[0095] Output binary edge image: \(\text{edge_image}=\text{hysteresis}(\text{low_threshold_mask},\text{high_threshold_mask})\).
[0096] The Canny algorithm is a classic edge detection algorithm with the following innovative features and technical effects:
[0097] Multi-step Edge Detection Process: The Canny algorithm extracts edges in an image through multiple processing steps. These steps include Gaussian filtering, gradient calculation, non-maximum suppression, and double-threshold processing. Through the combination of these steps, the Canny algorithm can extract detailed and accurate edges with less noise interference.
[0098] Adaptive Threshold Double-Threshold Processing: The Canny algorithm uses double-threshold processing to determine real edges. Compared with single-threshold processing, double-threshold processing can adaptively select thresholds according to the gradient intensity of pixels. This can better distinguish edges from noise and generate a more accurate edge image.
[0099] Non-Maximum Suppression: The Canny algorithm applies non-maximum suppression after gradient calculation to preserve edge details. This step suppresses non-edge pixels through interpolation in the gradient direction, thus extracting thin lines of the edges.
[0100] The Canny algorithm achieves the following technical effects through the above innovations:
[0101] High-Accuracy Edge Detection: The Canny algorithm can accurately detect edges in an image, including thin lines and curved edges. It improves the accuracy and stability of edge detection through multiple processing steps.
[0102] Strong Anti-Noise Ability: The Gaussian filtering step of the Canny algorithm can reduce noise interference in the image, thus improving the robustness and anti-noise ability of edge detection.
[0103] Strong Detail Retention Ability: The Canny algorithm preserves the detailed information of edges through non-maximum suppression and double-threshold processing. This can effectively remove noise and irrelevant details while keeping the edges clear.
[0104] 3) Coordinate Calculation: For each identified replaceable area, calculate its upper-left coordinate point, width, and height, and form a rectangular bounding box in the coordinate system as metadata for storage.
[0105] 3. Processing of User-Uploaded Content:
[0106] According to the size requirements of the reserved positions in the template, perform adaptive adjustments such as scaling, cropping, and rotating on the user content to ensure that it can be perfectly embedded in the specified area.
[0107] 4. Generating Posters: Output the completed edited personalized poster as a high-quality image file.
[0108] 5. Feedback and Optimization: Collect feedback from users during the usage process, and continuously optimize the template recognition accuracy, content embedding effect, and system performance to improve the user experience.
[0109] Thus, through the poster fission generation method proposed by the present invention, only need to upload the designed poster fission template, automatically identify and extract the coordinates of the reserved positions in the template, and embed the user-uploaded content into the template area to generate a poster, which reduces the time for developers to manually match pictures with the poster fission template, thereby improving the development efficiency.
[0110] Exemplary device
[0111] Figure 2 It is a schematic structural diagram of a poster fission generation device provided by an exemplary embodiment of the present invention. As Figure 2 shown, the device 200 includes:
[0112] A construction module 210, configured to construct a poster fission template for a fission poster, where the poster fission template includes pictures, texts, and a preset element area;
[0113] An extraction module 220, configured to extract key features of the poster fission template, and obtain key area information and reserved position information of the poster fission template;
[0114] An adjustment module 230, configured to adjust the content of the poster to be fissioned according to the size information in the reserved position information, and obtain the adjusted content of the poster to be fissioned;
[0115] A generation module 240, configured to embed the adjusted content of the poster to be fissioned into the poster fission template based on the reserved position information and the key area information, and generate a fission poster.
[0116] Optionally, the extraction module 220 includes:
[0117] A preprocessing sub-module, configured to perform grayscale conversion, binarization, denoising, and filtering operations on the pictures of the poster fission template, and obtain the picture area in the key area;
[0118] An identification sub-module, configured to use an edge detection algorithm to identify the graphic boundary and line structure of the poster fission template, and determine the key area and reserved position of the poster fission template;
[0119] A calculation sub-module, configured to calculate the coordinate information of the identified key area, reserved position, and key area, and determine the key area information and reserved position information, where the coordinate information includes the upper left corner coordinate point, width, and height.
[0120] Optionally, the identification sub-module includes:
[0121] A detection unit, configured to use the Canny algorithm to detect the edge image of the graphic boundary and line structure of the poster fission template;
[0122] An acquisition unit, configured to apply contour detection to an edge image to obtain all contour information;
[0123] An identification unit, configured to perform semantic segmentation on the poster fission template based on the contour information by using a deep learning model, and identify key regions and reserved positions.
[0124] Optionally, a detection unit includes:
[0125] A filtering subunit, configured to perform Gaussian filtering on the poster fission template to obtain a filtered image;
[0126] A calculation subunit, configured to calculate gradient information of each pixel in the filtered image, where the gradient information includes a gradient magnitude and a gradient angle;
[0127] An inhibition subunit, configured to perform non-maximum suppression on the gradient magnitude to obtain edge information;
[0128] A processing subunit, configured to process the edge information by using a double-threshold method to obtain an edge image.
[0129] Exemplary electronic device
[0130] Figure 3 This is the structure of an electronic device provided by an exemplary embodiment of the present invention. As Figure 3 shown, the electronic device 30 includes one or more processors 31 and a memory 32.
[0131] The processor 31 may be a central processing unit (CPU) or other form of processing unit having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device to perform desired functions.
[0132] The memory 32 may include one or more computer program products, and the computer program products may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage media, and the processor 31 may run the program instructions to implement the methods of the software programs of the various embodiments of the present invention described above and / or other desired functions. In one example, the electronic device may further include: an input device 33 and an output device 34, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).
[0133] In addition, the input device 33 may further include, for example, a keyboard, a mouse, and the like.
[0134] The output device 34 can output various information to the outside. The output device 34 can include, for example, a display, a speaker, a printer, a communication network, and remote output devices connected thereto, and so on.
[0135] Of course, for the sake of simplicity, Figure 3 only some of the components related to the present invention in the electronic device are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.
[0136] Exemplary computer program product and computer-readable storage medium
[0137] In addition to the above methods and devices, an embodiment of the present invention may also be a computer program product, which includes computer program instructions that, when run by a processor, cause the processor to execute the steps in the methods according to various embodiments of the present invention described in the "Exemplary Method" section above of this specification.
[0138] The computer program product can be written in any combination of one or more programming languages for programming code to perform the operations of the embodiments of the present invention. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The programming code can be executed entirely on the user's computing device, partially on the user's device, executed as an independent software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server.
[0139] Furthermore, an embodiment of the present invention may also be a computer-readable storage medium, on which computer program instructions are stored, and the computer program instructions, when run by a processor, cause the processor to execute the steps in the method of information mining on historical change records according to various embodiments of the present invention described in the "Exemplary Method" section above of this specification.
[0140] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may include, for example, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0141] The basic principles of the present invention have been described in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present invention are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present invention. In addition, the above-disclosed specific details are only for illustrative and easy-to-understand purposes and are not limitations. The above details do not limit the present invention to necessarily adopt the above specific details for implementation.
[0142] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. The same or similar parts among the embodiments can be referred to each other. For system embodiments, since they basically correspond to method embodiments, they are described relatively simply, and the relevant parts can be referred to the partial description of the method embodiments.
[0143] The block diagrams of the devices, systems, equipment, and systems involved in the present invention are only illustrative examples and do not intend to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, systems, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open-ended terms, meaning "including but not limited to", and can be used interchangeably with each other. The word "or" and "and" used herein refer to the word "and / or" and can be used interchangeably with each other, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with each other.
[0144] The methods and systems of the present invention can be implemented in many ways. For example, the methods and systems of the present invention can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the methods is for illustrative purposes only. The steps of the methods of the present invention are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, the present invention can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to the present invention. Therefore, the present invention also covers a recording medium storing a program for executing the methods according to the present invention.
[0145] It should also be noted that in the systems, devices, and methods of the present invention, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of the present invention. The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these aspects are very obvious to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the present invention. Therefore, the present invention is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.
[0146] The above description has been given for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of the present invention to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations thereof.
Claims
1. A method for generating poster fission, characterized in that, Including: Construct a poster fission template for constructing a fission poster, where the poster fission template includes pictures, text, and a preset element area; Extract key features of the poster fission template to obtain key area information and reserved position information of the poster fission template; Adjust the content of the poster to be fissioned according to the size information in the reserved position information to obtain the adjusted content of the poster to be fissioned; Based on the reserved position information and the key area information, embed the adjusted content of the poster to be fissioned into the poster fission template to generate a fission poster.
2. The method according to claim 1, wherein Extract key features of the poster fission template to obtain key area information and reserved position information of the poster fission template, including: Grayscale, binarize, denoise, and filter the picture of the poster fission template to obtain the picture area in the key area; Use an edge detection algorithm to identify the graphic boundary and line structure of the poster fission template, and determine the key area and reserved position of the poster fission template; Calculate the coordinate information of the identified key area, reserved position, and key area to determine the key area information and reserved position information, where the coordinate information includes the upper left corner coordinate point, width, and height.
3. The method according to claim 2, wherein Use an edge detection algorithm to identify the graphic boundary and line structure of the poster fission template, and determine the key area and reserved position of the poster fission template, including: Use the Canny algorithm to detect the edge image of the graphic boundary and line structure of the poster fission template; Apply contour detection on the edge image to obtain all contour information; Based on the contour information, use a deep learning model to perform semantic segmentation on the poster fission template to identify the key area and reserved position.
4. The method according to claim 3, wherein Use the Canny algorithm to detect the edge image of the graphic boundary and line structure of the poster fission template, including: Perform Gaussian filtering on the poster fission template to obtain a filtered image; Calculate the gradient information of each pixel in the filtered image, where the gradient information includes the gradient amplitude and gradient angle; Perform non-maximum suppression on the gradient amplitude to obtain edge information; Use a double-threshold method to process the edge information to obtain the edge image.
5. A generating device for poster fission, characterized in that, Including: A construction module for constructing a poster fission template for a fission poster, where the poster fission template includes pictures, text, and a preset element area; An extraction module for extracting key features of the poster fission template to obtain key area information and reserved position information of the poster fission template; An adjustment module for adjusting the content of the poster to be fissioned according to the size information in the reserved position information to obtain the adjusted content of the poster to be fissioned; A generation module for embedding the adjusted content of the poster to be fissioned into the poster fission template based on the reserved position information and the key area information to generate a fission poster.
6. The device according to claim 5, wherein, The extraction module includes: A preprocessing sub-module for grayscaling, binarizing, denoising, and filtering the picture of the poster fission template to obtain the picture area in the key area; An identification sub-module, configured to identify the graphic boundary and line structure of the poster fission template by using an edge detection algorithm, and determine the key area and reserved position of the poster fission template; A calculation sub-module, configured to calculate the coordinate information of the identified key area, reserved position and key area, and determine the key area information and reserved position information, where the coordinate information includes the upper left coordinate point, width and height.
7. The device according to claim 6, characterized in that, The identification sub-module includes: A detection unit, configured to detect the edge image of the graphic boundary and line structure of the poster fission template by using the Canny algorithm; An acquisition unit, configured to apply contour detection on the edge image to obtain all contour information; An identification unit, configured to perform semantic segmentation on the poster fission template based on the contour information by using a deep learning model, and identify the key area and reserved position.
8. The device according to claim 7, wherein The detection unit includes: A filtering sub-unit, configured to perform Gaussian filtering on the poster fission template to obtain a filtered image; A calculation sub-unit, configured to calculate the gradient information of each pixel in the filtered image, where the gradient information includes gradient amplitude and gradient angle; A suppression sub-unit, configured to perform non-maximum suppression on the gradient amplitude to obtain edge information; A processing sub-unit, configured to process the edge information by using a double-threshold method to obtain the edge image.
9. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is used to execute the method according to any one of claims 1-4 above.
10. An electronic device, characterized in that, The electronic device includes: A processor; A memory for storing executable instructions executable by the processor; The processor is configured to read the executable instructions from the memory and execute the instructions to implement the method according to any one of claims 1-4 above.
Citation Information
Patent Citations
Shared picture processing method and device, computer equipment and storage medium
CN110751500A
Poster generation method and device, and medium
CN114004918A
Method and system for generating high-quality user fission poster
CN114722317A
E-commerce poster generation system based on AI technology and generation method thereof
CN115937341A
Method and system for automatically generating poster based on house information
CN116416345A