Video generation method, device, equipment and readable storage medium

By identifying the area color changes in the target picture, determining the image group, and generating videos based on the second image of at least two image groups, the problem of accurate area recognition and targeted shooting in the prior art is solved, and efficient and accurate video generation and storage are achieved.

CN114972801BActive Publication Date: 2025-03-28MIGU CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210588896.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-26
Publication Date
2025-03-28
Estimated Expiration
2042-05-26

AI Technical Summary

Technical Problem

In the process of painting pictures, it is difficult to achieve accurate area recognition and targeted shooting, resulting in untargeted shooting, taking a long time, and generating a large number of images, resulting in wasting storage resources.

Method used

By identifying the area color changes in the target picture, an image group is determined, and a video is generated based on the second image of the at least two image groups, accurate shooting and video generation are achieved.

Benefits of technology

It realizes accurate shooting of images when the color of the picture area changes, and generates videos that display the painting process, reducing the waste of storage resources and improving shooting efficiency and diversity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114972801B_ABST
    Figure CN114972801B_ABST
Patent Text Reader

Abstract

The present invention provides a video generation method, device, equipment and readable storage medium, which relate to the field of video shooting technology. The method comprises: when a first area in a target picture is identified to be color filled, determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area; generating a target video according to the second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images. The embodiment of the present invention can accurately take pictures and generate videos according to the regional color of the picture.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of video shooting, and in particular relates to a video generation method, device, equipment and a readable storage medium. Background Art

[0002] When painting a gridded oil painting, the user wants to record the canvas situation of each color and the painting process from scratch, and accumulate the photos taken each time to generate a healing short video. Currently, the following three solutions can be used to achieve this: Solution 1, when shooting a picture, determine whether to shoot based on the similarity between the shooting area and the image that has been shot, but this solution can only judge the similarity of static images, and requires regular shooting of images. The shooting is not targeted and time-consuming; Solution 2, average sampling and re-detection in a specific area to determine whether to shoot. This solution cannot accurately shoot pictures in complex areas; Solution 3, compare every two adjacent frame images, and shoot when judging pixel changes, but this solution will generate a large number of images, resulting in a waste of storage resources, and cannot achieve accurate area recognition. Summary of the invention

[0003] The purpose of the embodiments of the present invention is to provide a video generation method, device, equipment and readable storage medium, so as to accurately capture images when the color of a region of a picture changes, thereby generating a video.

[0004] In a first aspect, an embodiment of the present invention provides a video generation method, including:

[0005] In the case where it is identified that the first area in the target picture is color-filled, determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area;

[0006] A target video is generated according to a second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images.

[0007] Optionally, the above method further includes:

[0008] When it is recognized that the first area in the target picture is filled with color, the color value of the first area is recorded, and the target picture is photographed to obtain the first image;

[0009] An image group to which the first image belongs is determined according to the color value of the first area.

[0010] Optionally, the image groups correspond to color value ranges one by one;

[0011] The step of determining, according to the color value of the first area, the image group to which the first image corresponding to the target picture belongs includes:

[0012] The image group to which the first image belongs is determined according to the color value range to which the color value of the first area belongs.

[0013] Optionally, generating a target video according to a second image corresponding to each of the at least two image groups includes:

[0014] synthesizing at least one of the first images in an image group onto the target picture that is not filled with color, to generate the second image corresponding to the image group;

[0015] The target video is generated based on at least two of the second images.

[0016] Optionally, synthesizing at least one of the first images in an image group onto the target picture that is not filled with color to generate the second image corresponding to the image group includes:

[0017] extracting a first area on at least one of the first images in the image group;

[0018] The extracted first area is synthesized onto the target picture that is not filled with color to generate the second image corresponding to the image group.

[0019] Optionally, generating the target video according to at least two of the second images includes:

[0020] Get the rhythm point information of the background audio;

[0021] According to the rhythm point information, at least two of the second images are associated with the rhythm points of the background audio to generate the target video.

[0022] Optionally, the associating at least two of the second images with the rhythm points of the background audio according to the rhythm point information to generate the target video includes:

[0023] Classifying the color values ​​of the color-filled area in the target picture to obtain the number of color value categories;

[0024] When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into rhythm segments equal to the number of color value categories, and one of the second images is associated with one of the rhythm segments to generate the target video; or

[0025] When the number of rhythm points of the background audio is less than the number of color value categories, at least two of the second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate the target video.

[0026] Optionally, generating the target video according to at least two of the second images includes:

[0027] A transition effect is inserted between two adjacent second images to generate the target video.

[0028] Optionally, in the case where the first area in the target picture is identified to be color-filled, before determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area, the method further includes:

[0029] A connected region detection algorithm is used to obtain region information of the target image.

[0030] In a second aspect, an embodiment of the present invention further provides a video generating device, comprising: a transceiver, a memory, a processor, and a computer program stored in the memory and executable on the processor; the processor is used to read the program in the memory to implement the steps in the video generating method described in the first aspect above.

[0031] In a third aspect, an embodiment of the present invention further provides a video generating device, including:

[0032] a determination module, configured to determine, when it is recognized that a first area in a target picture has been filled with color, the image group to which a first image corresponding to the target picture belongs according to a color value of the first area;

[0033] A generating module is used to generate a target video according to a second image corresponding to each of the at least two image groups.

[0034] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps in the video generation method described in the first aspect above are implemented.

[0035] In an embodiment of the present invention, when it is identified that the first area in the target picture has completed color filling, the image group to which the first image corresponding to the target picture belongs is determined according to the color value of the first area, and a target video is generated according to the second image corresponding to each of the at least two image groups, wherein the second image is generated based on at least one of the first images, and can identify the regional color of the target picture and take a picture accurately, thereby generating a target video to show the painting process of the target picture. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0037] Figure 1 is a flow chart of a video generation method provided by an embodiment of the present invention;

[0038] Figure 2 is a structural block diagram of a video generating device provided by an embodiment of the present invention;

[0039] Figure 3 It is a schematic diagram of the hardware structure of a video generating device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0041] See also Figure 1 , Figure 1 is a flow chart of a video generation method provided by an embodiment of the present invention. Figure 1 As shown, the following steps are included:

[0042] Step 101, when it is identified that a first area in a target picture is filled with color, determining an image group to which a first image corresponding to the target picture belongs according to a color value of the first area;

[0043] In this step, a smartphone can be used to take a photo of the target picture, and the smartphone is placed still at a position where the entire target picture can be photographed. Before the user starts to fill the target picture with color, a monitoring application in the smartphone is started to monitor the target picture. When the monitoring application recognizes that the first area in the target picture has completed color filling, the monitoring application can perform color value detection on the filling color of the first area, and determine the image group to which the first image belongs based on the color value of the first area. The target picture corresponds to at least one image group, and each image group includes at least one first image.

[0044] It should be noted that before determining the image group to which the first image belongs, the first image may be cropped and angle stretched to obtain at least one first image of a consistent size.

[0045] Step 102, generating a target video according to the second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images. In this step, the first image is first processed according to the image group to obtain the second image corresponding to the image group, thereby reducing the storage of a large number of similar images, avoiding the waste of storage space, and improving the synthesis accuracy of the subsequent target video. Then, the process of sequentially playing at least two second images corresponding to the target picture is the process of generating the target video, and the process of displaying the color filling of the target picture is the process of displaying the painting process of the target picture, thereby increasing the shooting diversity and improving the shooting pleasure.

[0046] It should be noted that one image group can generate one second image, that is, the number of second images is consistent with the number of image groups.

[0047] In this embodiment, when it is identified that the first area in the target picture has completed color filling, the image group to which the first image corresponding to the target picture belongs is determined according to the color value of the first area, and a target video is generated according to the second image corresponding to each of the at least two image groups, wherein the second image is generated based on at least one of the first images, can identify the regional color of the target picture, and take a picture accurately, thereby generating a target video to show the painting process of the target picture.

[0048] It should be pointed out that the target picture can be a grid-filled oil painting, which has multiple grids on its screen, corresponding to multiple areas on the target picture. The user fills each grid with the corresponding color, records the image of the user's color filling process, generates a video, and increases the diversity of shooting.

[0049] In a specific embodiment, step 101 includes:

[0050] When it is recognized that the first area in the target picture is filled with color, the color value of the first area is recorded, and the target picture is photographed to obtain the first image;

[0051] An image group to which the first image belongs is determined according to the color value of the first area.

[0052] It should be pointed out that the monitoring application in the smartphone controls the camera of the smartphone to take a picture of the target picture to obtain a first image, and uses the built-in color detection algorithm to detect the color value of the filling color of the first area to obtain the color value of the first area and record it.

[0053] It should be pointed out that the photo is taken only after each area of ​​the target image is filled with color. By accurately identifying the area filled with color, the generation of a large number of images can be avoided, which would waste storage resources and reduce time.

[0054] In a specific embodiment, the image groups correspond one-to-one to the color value ranges;

[0055] Step 101 includes:

[0056] The image group to which the first image belongs is determined according to the color value range to which the color value of the first area belongs.

[0057] It should be noted that the image group to which the first image belongs may be determined by using the following process:

[0058] First, the smartphone needs to be placed still in a position where the entire target picture can be photographed, and a monitoring application in the smartphone is started. The monitoring application recognizes the target picture, takes a photo of the target picture that is not filled with color, obtains an initial image, and creates a region information list. Each region information corresponds to three fields, namely, number, color value, and file name.

[0059] Then, when the monitoring application recognizes that the first area in the target picture has completed color filling, the monitoring application controls the camera of the smartphone to take a picture of the target picture to obtain a first image, and uses the built-in color detection algorithm to detect the color value of the filling color of the first area, and records the first area information in the area information list, including: the number, color value and file name of the first area; wherein the file name is determined based on the number and color value, and the file name can be used as the name of the first image for one-to-one correspondence between the color value and the image. For example, the color value of the first area is FFFE3579 and the number is 1, then the name of the first image can be FFFE3579+1.jpg.

[0060] Furthermore, when the monitoring application recognizes that the first area in the target picture has been filled with color again, the monitoring application controls the camera of the smart phone to take a picture of the target picture again to obtain a first image, and records the color value of the first area, and compares the color value of the first area with the color value of the first area information in the created area information list. If the color value difference is less than or equal to the preset threshold, that is, the color values ​​are the same or similar, then the second area information is recorded in the created area information list, including: the number, color value and file name of the first area recognized this time; if the color value difference is greater than the preset threshold, that is, the color value difference is large, then a new area information list is created, and the first area information is recorded in the area information list, including: the number, color value and file name of the first area recognized this time. Similarly, the file name is also determined based on the number and color value, and the file name is used as the name of the first image to correspond the color value to the image one by one.

[0061] That is to say, one region information list corresponds to one image group, and one image group corresponds to one color value range.

[0062] By analogy, the monitoring application can take a photo of the target picture when each area is filled with color to obtain a first image, and record the color value of the area that has completed the color filling until all areas are filled with color, and obtain at least one area information list, that is, obtain at least one image group, each image group includes at least one first image in which the first area is in the same color value range.

[0063] It should also be pointed out that the first image after taking the photo needs to be stored. When the first image is processed in the subsequent step, the first image with the corresponding name can be found according to the file name field in the area information list.

[0064] In one embodiment, step 102 includes:

[0065] synthesizing at least one of the first images in an image group onto the target picture that is not filled with color, to generate the second image corresponding to the image group;

[0066] The target video is generated based on at least two of the second images.

[0067] It should be noted that, since one image group corresponds to one color value range, at least one of the first images in one image group is synthesized onto a target picture that is not filled with color, that is, all the first images corresponding to one color value range are synthesized onto a target picture that is not filled with color, to generate a second image. The number of color value ranges determines the number of second images.

[0068] In one embodiment, the step of synthesizing at least one first image in an image group onto a target picture that is not filled with color to generate the second image corresponding to the image group includes:

[0069] extracting a first area on at least one of the first images in the image group;

[0070] The extracted first area is synthesized onto the target picture that is not filled with color to generate the second image corresponding to the image group.

[0071] It should be pointed out that the above-mentioned monitoring application can use a cutout algorithm to extract a first area on at least one of the first images in an image group, and then synthesize the first area onto a target picture that is not filled with color to generate a second image, so that each image group obtains a corresponding second image. In this way, the photographed images of the target picture are integrated according to the color value of the filled color, reducing the storage of a large number of images and avoiding waste of storage resources. Moreover, the target video generated by such a second image can show the painting process of the target picture filled with different colors, which makes the effect cooler and enhances the scene experience.

[0072] In one embodiment, step 102 includes:

[0073] Get the rhythm point information of the background audio;

[0074] According to the rhythm point information, at least two of the second images are associated with the rhythm points of the background audio to generate the target video.

[0075] First, the monitoring application of the smart phone can randomly obtain a background audio through a server, and the server stores multiple audio files, or obtains the background audio specified by the user. Then, the rhythm point information of the background audio is obtained, and the rhythm point information is the rhythm card time information of the background audio. According to the rhythm point information, at least two second images are associated with the rhythm point of the background audio to achieve music card points and synthesize a target video with music.

[0076] In one embodiment, the step of associating at least two of the second images with the rhythm points of the background audio according to the rhythm point information to generate the target video includes:

[0077] Classifying the color values ​​of the color-filled area in the target picture to obtain the number of color value categories;

[0078] When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into rhythm segments equal to the number of color value categories, and one of the second images is associated with one of the rhythm segments to generate the target video; or

[0079] When the number of rhythm points of the background audio is less than the number of color value categories, at least two of the second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate the target video.

[0080] Wherein, every two adjacent rhythm points determine a rhythm segment. When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into at least one rhythm segment equal to the number of color value categories, that is, the rhythm point information of the background audio is updated, and the rhythm points of the background audio are re-divided so that the number of rhythm points of the background audio = the number of color value categories + 1. Then, between two adjacent rhythm points, i.e., in a rhythm segment, a second image is played to realize the synthesis of music card points into video.

[0081] When the number of rhythm points of the background audio is less than the number of color value categories, at least two second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate a target video.

[0082] Specifically, the duration of each rhythm segment of the background audio is determined based on the duration between every two adjacent rhythm points, and then the rhythm segments of the background audio are grouped to obtain rhythm groups, each rhythm group may include the same number of rhythm segments, and multiple second images are grouped to obtain the same number of second image groups as the rhythm groups, and the number of second images included in each second image group may be different, and then the rhythm group is matched with the second image group. It should be noted that since the number of rhythm points of the background audio is less than the number of color value categories, that is, the number of rhythm points of the background audio is less than the number of second images, the number of rhythm groups and the number of second image groups are equal, so it can be considered that the number of rhythm segments in the rhythm group is less than the number of second images in the corresponding second image group.

[0083] Then, the duration of each rhythm segment in each rhythm group is compared, and the number of second images associated with each rhythm segment is determined according to the number of second images included in the second image group corresponding to each rhythm group. For example, if a rhythm group includes three rhythm segments, and the second image group corresponding to the rhythm group includes four second images, then the rhythm segment with the longest duration is selected from the rhythm group, and two adjacent second images in the second image group are associated with the rhythm segment with the longest duration, and the remaining two second images are associated with the remaining two rhythm segments in sequence to generate a target video.

[0084] In one embodiment, step 102 includes:

[0085] A transition effect is inserted between two adjacent second images to generate the target video.

[0086] Among them, the monitoring application of the smartphone can obtain a transition effect list through the server, then randomly select a transition effect from the transition effect list, and insert the transition effect between two adjacent second images, and then export all the transition effects to obtain a target video with cool effects.

[0087] It should be noted that step 103 may also include:

[0088] According to the rhythm point information of the background audio, at least two of the second images are associated with the rhythm points of the background audio, and a transition effect is inserted between two adjacent second images after associating the rhythm points to generate the target video.

[0089] In one embodiment, before step 101, the method further includes:

[0090] A connected region detection algorithm is used to obtain region information of the target image.

[0091] It should be pointed out that the above-mentioned monitoring application also has a built-in connected area detection algorithm, which can accurately identify each area and obtain the area information of the target picture. In this way, after obtaining the area information of the target picture, it can be determined whether the first area has completed color filling.

[0092] Below, the connected area detection algorithm is described:

[0093] The target image is divided into multiple regions of different shapes, each region is white, and each region is separated by black lines. The target image can be regarded as a binary image. The connected region detection algorithm processes binary images, so the connected region detection algorithm can be used to detect regions of the target image and obtain region information.

[0094] First, perform a complete scan of the target image, mark all pixels, and obtain and record equivalent labeled pairs. The generation of equivalent labeled pairs is due to the different scanning orders, which leads to the initial belief that they are two unconnected areas. Later, as the scan progresses, it is found that the two areas are connected. Therefore, it is necessary to record equivalent pairs to indicate that they belong to the same connected area so that corrections can be made after the first scan. Here, 8 connected areas are used to mark pixels, that is, the 8 adjacent pixels above, below, left, right, upper left, upper right, lower right and lower left of any pixel are compared. Since not every pixel has 8 adjacent pixels, special considerations are required for pixels in some special positions, including:

[0095] (1) The pixel in the upper left corner of the target image is the first pixel to be scanned, so there is no need to detect the 8-connected region or consider the problem of recording equivalent label pairs.

[0096] (2) For the pixels in the first row of the target image, we only need to consider the connectivity of the adjacent pixels on the left, without having to consider recording equivalent label pairs.

[0097] (3) For the pixels in the first column of the target image, only the connectivity of the two adjacent pixels above and to the upper right needs to be considered.

[0098] (4) For the pixels in the last column of the target image, we only need to consider the connectivity of the three adjacent pixels on the left, top left, and top.

[0099] It should also be pointed out that the above-mentioned monitoring application has a built-in artificial intelligence model, which can execute a connected area detection algorithm to obtain the area information of the target picture, and can also execute a color detection algorithm to identify the fill color of each area, and can also execute a cutout algorithm to extract the first area in an image group, thereby synthesizing the second image corresponding to each image group.

[0100] In the above scheme, the target picture is monitored, and when the photo-taking mechanism is triggered, the target picture is photographed to achieve accurate photography, obtain the first image, and avoid generating a large number of similar images. The photo-taking mechanism completes the color filling of the first area of ​​the target picture and records the color value of the first area. Similarly, the first image corresponding to each completion of the color filling of the first area of ​​the target picture is obtained, and then the first images are grouped according to the color value of the first area to obtain at least one image group, and at least one first image in an image group is synthesized into a second image to avoid wasting storage resources. Then, based on the second image, a target video is generated to show the color change of the target picture, that is, to show the painting process, to enhance the scene experience of the video, and the video effect is cooler and has a sense of technology.

[0101] like Figure 2As shown, the embodiment of the present invention further provides a video generating device, including:

[0102] A determination module 201 is used to determine, when it is recognized that a first area in a target picture has been filled with color, the image group to which the first image corresponding to the target picture belongs according to the color value of the first area;

[0103] The generating module 202 is configured to generate a target video according to a second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images.

[0104] Optionally, the determining module 201 includes:

[0105] a recording unit, configured to record the color value of the first area in the target picture when it is identified that the first area in the target picture has been filled with color, and to take a photo of the target picture to obtain the first image;

[0106] A determination unit is used to determine the image group to which the first image belongs according to the color value of the first area.

[0107] Optionally, the image groups correspond to color value ranges one by one;

[0108] The determining module 201 is specifically used for:

[0109] The image group to which the first image belongs is determined according to the color value range to which the color value of the first area belongs.

[0110] Optionally, the first generating module 202 includes:

[0111] a synthesis unit, configured to synthesize at least one of the first images in an image group onto the target picture that is not filled with color, so as to generate the second image corresponding to the image group;

[0112] The first generating unit is used to generate the target video according to at least two of the second images.

[0113] Optionally, the synthesis unit is specifically used for:

[0114] extracting a first area on at least one of the first images in the image group;

[0115] The extracted first area is synthesized onto the target picture that is not filled with color to generate the second image corresponding to the image group.

[0116] Optionally, the generating module 202 includes:

[0117] An acquisition unit, used to acquire the rhythm point information of the background audio;

[0118] The second generating unit is used to associate at least two of the second images with the rhythm points of the background audio according to the rhythm point information to generate the target video.

[0119] Optionally, the second generating unit is specifically configured to:

[0120] Classifying the color values ​​of the color-filled area in the target picture to obtain the number of color value categories;

[0121] When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into rhythm segments equal to the number of color value categories, and one of the second images is associated with one of the rhythm segments to generate the target video; or

[0122] When the number of rhythm points of the background audio is less than the number of color value categories, at least two of the second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate the target video.

[0123] Optionally, the generating module 202 is specifically configured to:

[0124] A transition effect is inserted between two adjacent second images to generate the target video.

[0125] Optionally, the above device further includes:

[0126] The acquisition module is used to acquire the region information of the target image by using a connected region detection algorithm.

[0127] The device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, so this embodiment will not be repeated here.

[0128] like Figure 3 As shown, the video processing device of an embodiment of the present invention includes: a processor 300; and a memory 320 connected to the processor 300 through a bus interface, wherein the memory 320 is used to store programs and data used by the processor 300 when performing operations, and the processor 300 calls and executes the programs and data stored in the memory 320.

[0129] The processor 300 is used to read the program in the memory 320 and execute the following process:

[0130] In the case where it is identified that the first area in the target picture is color-filled, determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area;

[0131] A target video is generated according to a second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images.

[0132] The transceiver 310 is configured to receive and send data under the control of the processor 300 .

[0133] Among them, Figure 3 In the embodiment, the bus architecture may include any number of interconnected buses and bridges, specifically one or more processors represented by processor 300 and various circuits of memory represented by memory 320 are linked together. The bus architecture may also link together various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface. The transceiver 310 may be a plurality of components, namely, a transmitter and a transceiver, providing a unit for communicating with various other devices on a transmission medium. For different user devices, the user interface 330 may also be an interface capable of externally and internally connecting required devices, and the connected devices include but are not limited to a keypad, a display, a speaker, a microphone, a joystick, and the like.

[0134] The processor 300 is responsible for managing the bus architecture and general processing, and the memory 320 can store data used by the processor 300 when performing operations.

[0135] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0136] When it is recognized that the first area in the target picture is filled with color, the color value of the first area is recorded, and the target picture is photographed to obtain the first image;

[0137] An image group to which the first image belongs is determined according to the color value of the first area.

[0138] Optionally, the image groups correspond to color value ranges one by one;

[0139] The processor 300 is further configured to read the computer program and execute the following steps:

[0140] The image group to which the first image belongs is determined according to the color value range to which the color value of the first area belongs.

[0141] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0142] synthesizing at least one of the first images in an image group onto a target picture that is not filled with color, to generate the second image corresponding to the image group;

[0143] The target video is generated based on at least two of the second images.

[0144] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0145] extracting a first area on at least one of the first images in the image group;

[0146] The extracted first area is synthesized onto the target picture that is not filled with color to generate the second image corresponding to the image group.

[0147] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0148] Get the rhythm point information of the background audio;

[0149] According to the rhythm point information, at least two of the second images are associated with the rhythm points of the background audio to generate the target video.

[0150] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0151] Classifying the color values ​​of the color-filled area in the target picture to obtain the number of color value categories;

[0152] When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into rhythm segments equal to the number of color value categories, and one of the second images is associated with one of the rhythm segments to generate the target video; or

[0153] When the number of rhythm points of the background audio is less than the number of color value categories, at least two of the second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate the target video.

[0154] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0155] A transition effect is inserted between two adjacent second images to generate the target video.

[0156] Optionally, the processor 300 is further configured to read the computer program and execute the following steps:

[0157] A connected region detection algorithm is used to obtain region information of the target image.

[0158] The device provided in the embodiment of the present invention can execute the above method embodiment, and its implementation principle and technical effect are similar, which will not be repeated in this embodiment.

[0159] Those skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware, or may be accomplished by instructing relevant hardware through a computer program, wherein the computer program includes instructions for executing part or all of the steps of the above method; and the computer program may be stored in a readable storage medium, and the storage medium may be any form of storage medium.

[0160] In addition, a specific embodiment of the present invention further provides a readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the above-mentioned video generation method are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0161] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0162] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may be physically included separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0163] The above-mentioned integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform some steps of the sending and receiving method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.

[0164] The above is a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A video generation method, characterized in that: include: In the case where it is identified that the first area in the target picture is color-filled, determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area; Generate a target video according to a second image corresponding to each of the at least two image groups, wherein the second image is generated according to at least one of the first images; The step of determining, according to the color value of the first area, the image group to which the first image corresponding to the target picture belongs includes: An image group to which the first image belongs is determined according to a color value range to which the color value of the first area belongs, wherein the image group corresponds to the color value range in a one-to-one manner.

2. The method according to claim 1, characterized in that The step of determining, when recognizing that the first area in the target picture has completed color filling, the image group to which the first image corresponding to the target picture belongs according to the color value of the first area comprises: When it is recognized that the first area in the target picture is filled with color, the color value of the first area is recorded, and the target picture is photographed to obtain the first image; An image group to which the first image belongs is determined according to the color value of the first area.

3. The method according to claim 1, characterized in that The step of generating a target video according to a second image corresponding to each of the at least two image groups comprises: synthesizing at least one of the first images in an image group onto the target picture that is not filled with color, to generate the second image corresponding to the image group; The target video is generated based on at least two of the second images.

4. The method according to claim 3, characterized in that The step of synthesizing at least one of the first images in an image group onto the target picture that is not filled with color to generate the second image corresponding to the image group includes: extracting a first area on at least one of the first images in the image group; The extracted first area is synthesized onto the target picture that is not filled with color to generate the second image corresponding to the image group.

5. The method according to claim 1, characterized in that The step of generating the target video according to at least two of the second images comprises: Get the rhythm point information of the background audio; According to the rhythm point information, at least two of the second images are associated with the rhythm points of the background audio to generate the target video.

6. The method according to claim 5, characterized in that The step of associating at least two of the second images with the rhythm points of the background audio according to the rhythm point information to generate the target video includes: Classifying the color values ​​of the color-filled area in the target picture to obtain the number of color value categories; When the number of rhythm points of the background audio is greater than or equal to the number of color value categories, the background audio is cut into rhythm segments equal to the number of color value categories, and one of the second images is associated with one of the rhythm segments to generate the target video; or When the number of rhythm points of the background audio is less than the number of color value categories, at least two of the second images are associated with the rhythm points of the background audio according to the duration between every two adjacent rhythm points to generate the target video.

7. The method according to claim 1, characterized in that The step of generating the target video according to at least two of the second images comprises: A transition effect is inserted between two adjacent second images to generate the target video.

8. The method according to claim 1, characterized in that In the case where the first area in the target picture is identified to be color filled, before determining the image group to which the first image corresponding to the target picture belongs according to the color value of the first area, the method further includes: A connected region detection algorithm is used to obtain region information of the target image.

9. A video generating device, characterized in that: include: a determination module, configured to determine, when it is recognized that a first area in a target picture has been filled with color, the image group to which a first image corresponding to the target picture belongs according to a color value of the first area; A generating module, configured to generate a target video according to a second image corresponding to each of the at least two image groups; The determination module is specifically configured to determine the image group to which the first image belongs according to the color value range to which the color value of the first area belongs, wherein the image group corresponds to the color value range in a one-to-one manner.

10. A video generating device, comprising: A transceiver, a memory, a processor and a computer program stored in the memory and executable on the processor; wherein the processor is used to read the program in the memory to implement the steps in the video generation method as described in any one of claims 1 to 8.

11. A readable storage medium, characterized in that: include: A processor, a memory, and a program stored in the memory and executable on the processor, wherein when the program is executed by the processor, the steps in the video generation method according to any one of claims 1 to 8 are implemented.

Citation Information

Patent Citations

  • Image processing method and device, server and storage medium

    CN110191324A