Method and device for automatically generating film and television poster

Through preset poster templates and automatic cropping technology, film and television posters are automatically generated, which solves the problem of low poster generation efficiency in the existing technology, and realizes an efficient and unified poster generation process.

CN119648857APending Publication Date: 2025-03-18WUXI YSTEN TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411708652.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-27
Publication Date
2025-03-18

AI Technical Summary

Technical Problem

The efficiency of forming posters in the prior art is low, especially when film and television works are updated quickly, using picture modification/synthesis software to make posters one by one, which is extremely low.

Method used

Provide a method and device for automatically generating film and television posters. By presetting poster templates, the base map is obtained based on frame images in film and television works, the available base map is filtered out, invalid areas are removed, and the target poster is automatically cut and generated based on the poster template.

Benefits of technology

It improves the efficiency of poster generation, meets the requirements of poster elements, and reduces the threshold and personnel cost of poster production, and improves the consistency of poster generation efficiency and quality.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119648857A_ABST
    Figure CN119648857A_ABST
Patent Text Reader

Abstract

The invention relates to a movie and television poster automatic generation method and device, and belongs to the technical field of movie and television poster generation, and the automatic generation method comprises the steps: presetting a poster template to determine a poster demand, obtaining a base map according to a frame map in a movie and television work, screening out an available base map from the base map according to the poster template, performing invalid region removal on the available base map to obtain an effective base map, and generating a target poster according to the effective base map and the poster template; according to the method, the frame image suitable for being used as the poster in the film and television work is used as the effective base image, the effective base image is automatically cut according to the poster size, the face position and the face size of the preset poster to obtain the target poster, and the poster generation efficiency can be effectively improved while poster element requirements are met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of film and television poster generation, and in particular to a method and device for automatically generating film and television posters. Background Art

[0002] As a fast means of publicity, online posters are becoming more and more popular among businesses. Businesses can choose to make posters related to their products to promote and advertise the movie or TV series. A poster with a sense of design is the most important link, and the display volume of the poster represents the number and quality of the delivery channels. That is, the more channels a poster is delivered through and the better the quality, the greater the display volume and the higher the conversion rate in the later stage. The current poster production method generally uses image modification / synthesis software to modify and combine multiple poster materials to form a poster. For some video websites, since film and television works are updated very quickly, it is too inefficient to use image software to make them one by one. Summary of the invention

[0003] To this end, the present invention provides a method and device for automatically generating a film and television poster to solve the problem of low efficiency in forming posters in the prior art.

[0004] In a first aspect, a method for automatically generating a film and television poster is provided, the method comprising:

[0005] At least one poster template is preset; the poster template at least includes poster size, face position and face size;

[0006] Obtain at least one base image based on the frame images in the film and television work;

[0007] Filtering available base maps from the base maps according to the poster template;

[0008] Removing invalid areas from the available base map to obtain a valid base map;

[0009] A target poster is obtained according to the effective base map and the poster template.

[0010] Furthermore, removing invalid areas from the available base map to obtain a valid base map includes:

[0011] Removing the upper invalid area and the lower invalid area of ​​the available base map by using an upper and lower invalid area removal algorithm;

[0012] Removing the left invalid area and the right invalid area of ​​the available base map by using a left and right invalid area removal algorithm;

[0013] The valid base map is obtained by removing the upper invalid area, the lower invalid area, the left invalid area and the right invalid area of ​​the available base map.

[0014] Furthermore, the upper and lower invalid area removal algorithm includes:

[0015] Divide the image into n evenly divided pieces by first vertical bisectors, where the number of first bisectors is n-1;

[0016] Sequentially acquiring pixel points in the image along the first bisector from top to bottom; performing color comparison on n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of n-1 pixel points to obtain a horizontal line as an upper invalid boundary line;

[0017] Sequentially acquiring pixel points in the image along the first bisector from bottom to top; performing color comparison on n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of n-1 pixel points to obtain a horizontal line as a lower invalid boundary line;

[0018] The image above the upper invalid boundary line is removed, and the image below the lower invalid boundary line is removed.

[0019] Furthermore, the left and right invalid area removal algorithm includes:

[0020] Divide the image evenly into k parts by the second horizontal dividing lines, where the number of the second dividing lines is k-1;

[0021] sequentially acquiring pixel points in the image from left to right along the second bisector; performing color comparison on k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as a left invalid boundary line;

[0022] Sequentially acquiring pixel points in the image along the second bisector from right to left; performing color comparison on k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as the right invalid boundary line;

[0023] The image to the left of the left invalid boundary line is removed, and the image to the right of the right invalid boundary line is removed.

[0024] Furthermore, obtaining at least one base image based on the frame images in the film and television work includes:

[0025] Specify at least one image as the base image.

[0026] or,

[0027] At least one picture is captured from the video using video frame technology as the base picture.

[0028] Furthermore, the automated testing tool adapted to the vehicle model is obtained according to the environmental configuration, including:

[0029] Obtaining a target car model in the environment configuration;

[0030] An automated testing tool is obtained from an automated testing tool library according to the target automobile model; the automated testing tool library includes a plurality of automated testing tools and corresponding automobile models.

[0031] Furthermore, the step of selecting a usable base map from the base map according to the poster template includes:

[0032] Recognize the face area in the base image by using face recognition technology;

[0033] The face area is quality checked according to preset conditions, and if the quality check passes, the base map is used as the available base map; the preset conditions at least include face angle, face position, face size and face brightness.

[0034] Furthermore, the method further comprises:

[0035] Analyze the effective base map through WD14-Tagger to obtain corresponding base map keywords;

[0036] If the background image keyword is a preset illegal keyword, the valid background image will be removed.

[0037] Further, obtaining the target poster according to the effective base map and the poster template includes:

[0038] If there is a subtitle area in the poster to be inspected, the image below the upper edge of the subtitle area is removed, and the effective base image is intercepted according to the poster size, face position and face size of the poster template to obtain the target poster;

[0039] If there are no subtitles in the effective base image, the target poster is obtained by intercepting the effective base image according to the poster size, face position and face size of the poster template.

[0040] Furthermore, the poster template also includes a logo position and a logo size; the method further includes: scaling the given logo proportionally to the logo size and adding it to the logo position of the target poster.

[0041] In a second aspect, a device for automatically generating a film and television poster is provided, the device comprising:

[0042] A preset template module, used to preset at least one poster template; the poster template at least includes poster size, face position and face size;

[0043] An effective base map screening module is used to obtain at least one base map based on the frame images in the film and television works;

[0044] It is also used to filter out available base maps from the base maps according to the poster template;

[0045] It is also used to remove invalid areas from the available base map to obtain a valid base map;

[0046] The poster generation module is used to obtain a target poster according to the effective base map and the poster template.

[0047] The present invention adopts the above technical solution and has at least the following beneficial effects:

[0048] Provided are a method and device for automatically generating film and television posters. A poster template is preset to determine poster requirements, a base map is obtained based on frame images in the film and television work, available base maps are screened out from the base maps based on the poster template, invalid areas of the available base maps are removed to obtain a valid base map, and a target poster is generated based on the valid base map and the poster template; a frame image in the film and television work that is suitable for being used as a poster is used as a valid base map, and the valid base map is automatically cropped based on the poster size, face position and face size of the preset poster to obtain a target poster, which can effectively improve the poster generation efficiency while meeting the poster element requirements.

[0049] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0051] Figure 1 is a flow chart of a method for automatically generating a film and television poster according to an exemplary embodiment of the present invention;

[0052] Figure 2 It is a schematic block diagram of a device for automatically generating film and television posters shown in an exemplary embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0054] The existing poster generation method requires image processing professionals to design and produce it, which has the problems of low poster production efficiency, high personnel costs and high technical barriers.

[0055] The embodiments of the present application provide a method and device for automatically generating film and television posters, which improves the efficiency of poster production, improves the consistency of poster quality, and lowers the threshold for poster production.

[0056] The method and device for poster synthesis in this application are described below through specific embodiments.

[0057] See also Figure 1 , Figure 1 is a flowchart of a method for automatically generating a film and television poster according to an exemplary embodiment of the present invention. Figure 1 , the method comprising:

[0058] Step S11, presetting at least one poster template; the poster template at least includes poster size, face position and face size;

[0059] Step S12, obtaining at least one base image according to the frame images in the film and television work;

[0060] Step S13, selecting available base maps from the base maps according to the poster template;

[0061] Step S14, removing invalid areas from the available base map to obtain a valid base map;

[0062] Step S15: Obtain the target poster according to the effective base map and the poster template.

[0063] It should be noted that the technical solution provided in this embodiment can be loaded into an existing system in the form of a small program in specific practice, or can be used to implement the poster generation function in the form of an independent application. Applicable scenarios include but are not limited to: automatic generation of video posters, automatic generation of product posters, and other scenarios that require automatic synthesis of posters based on picture elements.

[0064] Specifically, the preset poster template is set according to the specific business and usage scenario. For example, when used as a dynamic promotional image for a video website, the poster size should be appropriately reduced, the face position should be as close to the center as possible, and the face size should be appropriately increased to achieve the best display effect.

[0065] It can be understood that the synthesis method provided in this embodiment presets a poster template to determine the poster requirements, obtains a base map based on the frame images in the film and television works, screens out available base maps from the base maps based on the poster template, removes invalid areas of the available base maps to obtain a valid base map, and generates a target poster based on the valid base map and the poster template; uses the frame images in the film and television works that are suitable for posters as valid base maps, and automatically crops the valid base map according to the poster size, face position and face size of the preset poster to obtain the target poster, which can effectively improve the poster generation efficiency while meeting the poster element requirements.

[0066] In specific practice, step S11 "presetting at least one poster template" includes: presetting the poster size, face position and face size according to requirements.

[0067] It is understandable that the technical solution provided in this embodiment can complete the customization of posters by presetting poster templates so that the posters are output in uniform specifications.

[0068] In specific practice, in step S12, "obtaining at least one base map based on the frame images in the film and television work" specifically means: at least one picture can be designated as the base map, or at least one picture can be captured from the video as the base map using video frame technology, or the two can be mixed, that is, specifying pictures and using video frame images.

[0069] It should be noted that when using the video frame technology to capture at least one picture from the video as a base image, the ffmpeg technology can be used to capture the frame image of the video.

[0070] In specific practice, step S13 "selecting available base maps from base maps based on poster templates" includes: identifying the face area in the base map through face recognition technology; performing quality verification on the face area according to preset conditions, and if the quality verification passes, the base map is used as an available base map; the preset conditions include at least face angle, face position, face size and face brightness.

[0071] It should be noted that during the base map screening stage, a variety of technologies are used to assess whether the base map can be used as the basic image of the poster. First, face recognition technology is used to locate the face position. If there are multiple faces, multiple positions are located. Next, the face area is quality-verified in the following ways: the dimensions of quality verification can be face angle, face position, face size and face brightness, and those that fail the quality verification will be eliminated.

[0072] In specific practice, step S14 "removing invalid areas of the available base map to obtain a valid base map" includes: removing the upper invalid area and the lower invalid area of ​​the available base map by using an upper and lower invalid area removal algorithm, and removing the left invalid area and the right invalid area of ​​the available base map by using a left and right invalid area removal algorithm, and obtaining a valid base map after removing the upper invalid area, the lower invalid area, the left invalid area and the right invalid area of ​​the available base map.

[0073] Specifically, the algorithm for removing upper and lower invalid areas includes: evenly dividing the image into n numbers through a vertical first bisector, where the number of first bisectors is n-1; acquiring pixel points in the image in sequence from top to bottom along the first bisector; performing color comparison on the n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and connecting a group of n-1 pixel points to obtain a horizontal line as an upper invalid boundary line; acquiring pixel points in the image in sequence from bottom to top along the first bisector; performing color comparison on the n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and connecting a group of n-1 pixel points to obtain a horizontal line as a lower invalid boundary line; removing the image above the upper invalid boundary line, and removing the image below the lower invalid boundary line.

[0074] Specifically, the left and right invalid area removal algorithm includes: dividing the image into k parts evenly by a horizontal second bisector, and the number of the second bisectors is k-1; acquiring pixel points in the image in sequence from left to right along the second bisector; performing color comparison on the k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as the left invalid boundary line; acquiring pixel points in the image in sequence from right to left along the second bisector; performing color comparison on the k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as the right invalid boundary line; removing the image to the left of the left invalid boundary line, and removing the image to the right of the right invalid boundary line.

[0075] It should be noted that n and k are set according to the resolution of the image. The higher the resolution, the larger the values ​​of n and k.

[0076] It can be understood that the technical solution provided in this embodiment can efficiently and quickly remove the pure color area around the image through the upper and lower invalid area removal algorithm and the left and right invalid area removal algorithm.

[0077] In specific practice, step S145 "obtaining a target poster based on a valid background image and a poster template" includes: if there is a subtitle area in the poster to be inspected, the image below the upper edge of the subtitle area is removed, and the target poster is obtained by intercepting the valid background image based on the poster size, face position and face size of the poster template; if there are no subtitles in the valid background image, the target poster is obtained by intercepting the valid background image based on the poster size, face position and face size of the poster template.

[0078] Specifically, the invalid area and subtitle area of ​​the valid background map are recorded, and the background map is cropped using a preset poster template. If it is found that the cropped area exceeds the image area during cropping, the background map is discarded; the position of the invalid area and the subtitle area are compared with the position captured by the template. If there is an overlap, the background map is discarded; the image is captured, and the image is analyzed using WD14-Tagger to obtain the keywords of the image. If the keywords of the image do not meet the specifications, the image is discarded.

[0079] In specific practice, the method also includes: analyzing the effective image through WD14-Tagger to obtain the corresponding background map keyword; if the background map keyword is a preset violation keyword, the effective image will be eliminated; the preset violation keywords at least include closed eyes, sadness and illegal and violation keywords.

[0080] In specific practice, the poster template also includes a logo position and a logo size; the method also includes: scaling the given logo proportionally to the logo size and adding it to the logo position of the target poster.

[0081] See also Figure 2 , Figure 2 is a schematic block diagram of a device for automatically generating a film and television poster according to an exemplary embodiment of the present invention, see Figure 2 The device 100 for automatically generating a film and television poster includes:

[0082] The preset template module 101 is used to preset at least one poster template; the poster template at least includes the poster size, face position and face size;

[0083] An effective base image screening module 102 is used to obtain at least one base image based on the frame images in the film and television work;

[0084] It is also used to filter out available base maps from base maps based on poster templates;

[0085] It is also used to remove invalid areas from the available base map to obtain a valid base map;

[0086] The poster generation module 103 is used to obtain a target poster according to the effective base map and the poster template.

[0087] It should be noted that the technical solution provided in this embodiment can be applied in specific practice to scenarios including but not limited to: automatic generation of video posters, automatic generation of product posters, and other scenarios that require automatic synthesis of posters based on picture elements.

[0088] Specifically, the preset poster template is set according to the specific business and usage scenario. For example, when used as a dynamic promotional image for a video website, the poster size should be appropriately reduced, the face position should be as close to the center as possible, and the face size should be appropriately increased to achieve the best display effect.

[0089] It can be understood that the device provided in this embodiment presets a poster template to determine the poster requirements, obtains a base map based on the frame images in the film and television works, screens out available base maps from the base maps based on the poster template, removes invalid areas of the available base maps to obtain a valid base map, and generates a target poster based on the valid base map and the poster template; uses the frame images in the film and television works that are suitable for posters as valid base maps, and automatically crops the valid base map according to the poster size, face position and face size of the preset poster to obtain the target poster, which can effectively improve the poster generation efficiency while meeting the poster element requirements.

[0090] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

[0091] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0092] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0093] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for automatically generating film and television posters, characterized in that: The method comprises: At least one poster template is preset; the poster template at least includes poster size, face position and face size; Obtain at least one base image based on the frame images in the film and television work; Filtering available base maps from the base maps according to the poster template; Removing invalid areas from the available base map to obtain a valid base map; A target poster is obtained according to the effective base map and the poster template.

2. The method for automatically generating film and television posters according to claim 1, characterized in that: The step of removing invalid areas from the available base map to obtain a valid base map includes: Removing the upper invalid area and the lower invalid area of ​​the available base map by using an upper and lower invalid area removal algorithm; Removing the left invalid area and the right invalid area of ​​the available base map by using a left and right invalid area removal algorithm; The valid base map is obtained by removing the upper invalid area, the lower invalid area, the left invalid area and the right invalid area of ​​the available base map.

3. The method for automatically generating film and television posters according to claim 2, characterized in that: The upper and lower invalid area removal algorithm includes: Divide the image into n evenly divided pieces by first vertical bisectors, where the number of first bisectors is n-1; Sequentially acquiring pixel points in the image along the first bisector from top to bottom; performing color comparison on n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of n-1 pixel points to obtain a horizontal line as an upper invalid boundary line; Sequentially acquiring pixel points in the image along the first bisector from bottom to top; performing color comparison on n-1 pixel points acquired each time until the colors of the n-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of n-1 pixel points to obtain a horizontal line as a lower invalid boundary line; The image above the upper invalid boundary line is removed, and the image below the lower invalid boundary line is removed.

4. The method for automatically generating film and television posters according to claim 2, characterized in that: The left and right invalid area removal algorithm includes: Divide the image evenly into k parts by the second horizontal dividing lines, where the number of the second dividing lines is k-1; sequentially acquiring pixel points in the image from left to right along the second bisector; performing color comparison on k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as a left invalid boundary line; Sequentially acquiring pixel points in the image along the second bisector from right to left; performing color comparison on k-1 pixel points acquired each time until the colors of the k-1 pixel points are all different, then stopping acquiring pixel points, and finally connecting a group of k-1 pixel points to obtain a vertical line as the right invalid boundary line; The image to the left of the left invalid boundary line is removed, and the image to the right of the right invalid boundary line is removed.

5. The method for automatically generating film and television posters according to claim 1, characterized in that: The step of obtaining at least one base image based on the frame images in the film and television work includes: Specify at least one image as the base image. or, At least one picture is captured from the video using video frame technology as the base picture.

6. The method for automatically generating film and television posters according to claim 1, characterized in that: The step of selecting a usable base map from the base map according to the poster template includes: Recognize the face area in the base image by using face recognition technology; The face area is quality checked according to preset conditions, and if the quality check passes, the base map is used as the available base map; the preset conditions at least include face angle, face position, face size and face brightness.

7. The method for automatically generating film and television posters according to claim 1, characterized in that: The method further comprises: Analyze the effective base map through WD14-Tagger to obtain corresponding base map keywords; If the background image keyword is a preset illegal keyword, the valid background image will be removed.

8. The method for automatically generating movie posters according to claim 1, characterized in that: The step of obtaining a target poster according to the effective base map and the poster template includes: If there is a subtitle area in the poster to be inspected, the image below the upper edge of the subtitle area is removed, and the effective base image is intercepted according to the poster size, face position and face size of the poster template to obtain the target poster; If there are no subtitles in the effective base image, the target poster is obtained by intercepting the effective base image according to the poster size, face position and face size of the poster template.

9. The method for automatically generating movie posters according to claim 8, characterized in that: The poster template also includes a logo position and a logo size; the method further includes: scaling the given logo proportionally to the logo size and adding it to the logo position of the target poster.

10. A device for automatically generating film and television posters, characterized in that: The device comprises: A preset template module, used to preset at least one poster template; the poster template at least includes poster size, face position and face size; An effective base map screening module is used to obtain at least one base map based on the frame images in the film and television works; It is also used to filter out available base maps from the base maps according to the poster template; It is also used to remove invalid areas from the available base map to obtain a valid base map; The poster generation module is used to obtain a target poster according to the effective base map and the poster template.