Image generation method and system and electronic equipment
Through automatic determination and application image processing method, the problem of manual operation of video processing in the existing technology requires manual manual operation, realize the automatic processing of the image, reduce time and energy consumption, and improve the user experience.
Patent Information
- Application Number
- CN202411497581.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-24
- Publication Date
- 2025-01-28
AI Technical Summary
In the prior art, video processing such as video material splicing and special effects increase require manual operation, resulting in huge time and energy consumption.
By obtaining the information and image characteristics of the image processing method, the target image processing method is automatically determined and processed to achieve automatic processing of the image.
No need to manually operate the user, reducing the processing time and energy consumption, and increasing the user experience.
Smart Images

Figure CN119379863A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing, and in particular to an image generation method, system and electronic device. Background Art
[0002] Video processing, such as splicing video materials and adding video special effects, usually needs to be done manually, which requires users to learn a variety of video processing methods before completing it, which consumes a lot of time and energy. Summary of the invention
[0003] In view of this, the present application provides an image generation method, system and electronic device, and the specific solutions are as follows:
[0004] A method for generating an image, comprising:
[0005] Obtaining first information, wherein the first information includes at least one image processing method;
[0006] obtaining at least one first image;
[0007] Determining a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image;
[0008] Using the target image processing method corresponding to each first image to be processed in the at least one first image, each first image to be processed is processed to obtain a corresponding second image.
[0009] Further, the obtaining of the first information includes:
[0010] Obtaining first information output by a first model including at least one image processing method, wherein the first information is output by the first model based on second information of a third image;
[0011] or,
[0012] First information including at least one image processing method input by a user is obtained.
[0013] Further, the first information is output by the first model based on the second information of the third image, and includes:
[0014] Obtaining second information of the third image obtained by the first model, processing the second information, and determining and outputting the first information;
[0015] Among them, the second information includes information obtained by identifying the scene and / or content of the third image, and the first information includes at least one image processing method used for the third image; the order of the at least one image processing method included in the first information is the same as the order of the image processing method used for the third image.
[0016] Furthermore, the determining, from the first description information based on the feature of the at least one first image, a target image processing method corresponding to each first image in the at least one first image includes:
[0017] Determine at least one of the image content and duration of each first image to be processed in the at least one first image;
[0018] Based on the image content of each first image to be processed in the at least one first image, the target image processing mode for each first image to be processed is determined from the first information, and / or based on the duration of each first image to be processed, the duration of the target image processing mode for each first image to be processed is determined.
[0019] Furthermore, the process of processing each first image to be processed by using the target image processing method corresponding to each first image to be processed in the at least one first image to obtain the corresponding second image further includes:
[0020] Displaying a target image processing method corresponding to each first image to be processed in the at least one first image;
[0021] Obtaining adjustment information input by a user based on a target image processing method corresponding to each of the displayed first images to be processed;
[0022] The target image processing method is adjusted based on the adjustment information, so as to process each of the first images to be processed by using the adjusted target image processing method to obtain a corresponding second image.
[0023] Further, the adjusting the target image processing method based on the adjustment information so as to process each of the first images to be processed using the adjusted target image processing method to obtain a corresponding second image includes:
[0024] Determine a target image and a target adjustment method in the at least one first image corresponding to the adjustment information;
[0025] The target image processing method corresponding to the target image is adjusted according to the target adjustment method, the target image is processed according to the adjusted target image processing method, and the first image other than the target image in the at least one first image is processed according to the corresponding target image processing method to obtain the second images corresponding to the at least one first image.
[0026] Furthermore,
[0027] The target adjustment method includes at least one of the following: changing the order of target image processing methods corresponding to at least one target image, changing the target image processing method corresponding to the target image, and deleting the target image processing method corresponding to the target image.
[0028] Furthermore,
[0029] The image processing method includes at least one of the following: a splicing processing method, a special effect processing method, a screen switching processing method, and a screen parameter adjustment method.
[0030] An image generation system, comprising:
[0031] A first obtaining unit, configured to obtain first information, wherein the first information includes at least one image processing method;
[0032] A second obtaining unit, configured to obtain at least one first image;
[0033] a determining unit, configured to determine, from the first information, a target image processing mode corresponding to each first image to be processed in the at least one first image based on a feature of the at least one first image;
[0034] The processing unit is used to process each first image to be processed in the at least one first image by using the target image processing method corresponding to each first image to be processed to obtain a corresponding second image.
[0035] An electronic device, comprising:
[0036] A processor is used to obtain first information, wherein the first information includes at least one image processing method; obtain at least one first image; determine a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the at least one first image; and process each first image to be processed using the target image processing method corresponding to each first image to be processed in the at least one first image to obtain a corresponding second image;
[0037] The memory is used to store the program required by the processor to execute the above processing process. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0039] Figure 1 A flowchart of an image generation method disclosed in an embodiment of the present application;
[0040] Figure 2 A flowchart of an image generation method disclosed in an embodiment of the present application;
[0041] Figure 3 A flowchart of an image generation method disclosed in an embodiment of the present application;
[0042] Figure 4 A flowchart of an image generation method disclosed in an embodiment of the present application;
[0043] Figure 5 A schematic diagram of the structure of an image generation system disclosed in an embodiment of the present application;
[0044] Figure 6 A schematic diagram of the structure of an electronic device disclosed in an embodiment of the present application. DETAILED DESCRIPTION
[0045] The following describes the embodiments of the present application in conjunction with the drawings in the embodiments of the present application. The terms used in the implementation method section of the present application are only used to explain the specific embodiments of the present application, and are not intended to limit the present application.
[0046] The embodiments of the present application are described below in conjunction with the accompanying drawings. Those skilled in the art will appreciate that, with the development of technology and the emergence of new scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0047] The terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and need not be used to describe a specific order or sequential order. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, which is only to describe the distinction mode adopted by the objects of the same attributes when describing in the embodiments of the present application. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, so that the process, method, system, product or equipment comprising a series of units need not be limited to those units, but may include other units that are not clearly listed or inherent to these processes, methods, products or equipment.
[0048] The present application discloses an image generation method, and its flow chart is as follows: Figure 1 As shown, including:
[0049] Step S11, obtaining first information, where the first information includes at least one image processing method;
[0050] Step S12, obtaining at least one first image;
[0051] Step S13, determining a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image;
[0052] Step S14: using the target image processing method corresponding to each first image to be processed in at least one first image, process each first image to be processed to obtain a corresponding second image.
[0053] The processing of video images usually needs to be done manually, such as splicing video materials, adding video special effects, etc., which all require manual processing by users. This requires users to actively learn a variety of video image processing methods before they can be completed, which consumes a lot of time and energy.
[0054] Based on this, in this solution, when it is determined that there is at least one first image, first information including at least one image processing method is obtained, and at least one first image is processed based on the first information to obtain a second image, thereby realizing automatic processing of the first image without the need for manual operation by the user, avoiding the consumption of time and energy, and improving the user experience.
[0055] The image generation method disclosed in this embodiment can be implemented by a software process, or by a model or a large model.
[0056] The first information and the at least one first image may be obtained simultaneously or sequentially.
[0057] The at least one first image obtained may be at least one single frame image or a continuous frame image, that is, a video image.
[0058] The first information includes at least one image processing method, and the at least one image processing method included in the first information is used to perform image processing on at least one first image.
[0059] Among them, at least one first image can be: each first image needs to be processed by the image processing method included in the first information, or it can be: only part of the at least one first image needs to be processed by the image processing method included in the first information; for the first images that need to be processed by the image processing method included in the first information, each first image that needs to be processed can be processed by only one image processing method included in the first information, or it can be: each first image that needs to be processed is processed by multiple image processing methods included in the first information; in addition, multiple first images that need to be processed can be processed simultaneously using the same image processing method included in the first information.
[0060] Among them, the image processing method may include: splicing processing method, special effect processing method, screen switching processing method, screen parameter adjustment method, etc. Among them, the splicing processing method is a method of splicing different video clips or frame images together, the special effect processing method may be: background blur special effect, text special effect, particle special effect, etc., the screen switching processing method is a method of processing the image when the screen switches, and the screen parameter adjustment method is a method of adjusting the parameters in the screen, such as: adjusting the picture clarity, etc.
[0061] After obtaining the first information and at least one first image, it is necessary to determine which one or more image processing methods in the first information correspond to the first image to be processed in the at least one first image, so as to perform image processing on the first image using the corresponding image processing method.
[0062] First, the features of each first image in at least one first image can be analyzed to determine the first image that needs to be processed. For example, if a video image including multiple continuous frames is obtained, it can be analyzed to determine that one or several frames of the video image need to be processed, or it can be determined that one or several images within a certain time period of the video image need to be processed.
[0063] After determining a first image to be processed in at least one first image, the first image to be processed is matched with at least one image processing method included in the first information using the characteristics of the first image to be processed to determine a target image processing method to be performed on the first image to be processed, and after determining the target image processing method, the target image processing method is performed on the first image to be processed to achieve processing of the first image to be processed.
[0064] The first information includes one or more image processing methods. Each first image to be processed in at least one first image can select one or more image processing methods from the first information based on its characteristics. The one or more image processing methods selected correspond to the characteristics of the first image. For example, the first image A to be processed includes feature a. Among the multiple image processing methods included in the first information, the one corresponding to feature a is the first image processing method. Then, the first image processing method is determined to be the target image processing method corresponding to the first image A.
[0065] For example: the first information is: use the background blur effect for 1-2 seconds, switch the lens for 2 seconds, and reduce the illumination for 3-4 seconds; at this time, determine the target image processing method corresponding to each first image to be processed in at least one first image: determine the characteristics of each first image to be processed, and determine that the 1-3 frames are suitable for an image processing method for reducing the illumination based on the characteristics of the 1-3 frames, the 4th frame is suitable for an image processing method for lens switching, and the 5-6 frames are suitable for an image processing method for the background blur effect.
[0066] The first information may contain image processing methods that do not correspond to the first image to be processed, such as: the first information includes 4 different image processing methods, but all the first images to be processed in at least one first image will not use the 4th image processing method, but can only be applied to 3 of the image processing methods.
[0067] It should be noted that there is a situation where a certain image processing method included in the first information is used simultaneously by multiple first images; of course, there is also a situation where at least part of at least one first image does not use any image processing method in the first image, which will not be elaborated here.
[0068] Among them, the corresponding second image obtained by processing each first image to be processed is: the second image corresponding to each first image to be processed. When there are k first images to be processed in at least one first image, the k first images to be processed are processed to obtain the second image corresponding to each of the k first images to be processed, that is, k second images are obtained.
[0069] When at least one first image is a continuous image frame, that is, when at least one first image is actually a video image, after processing each first image to be processed in the at least one first image to obtain a second image corresponding to each first image to be processed, the obtained second image needs to be combined with the unprocessed first image in the at least one first image in the order of each first image to obtain a processed video image corresponding to the video image, such as: the at least one first image initially obtained is a video image including 10 frames of continuous images, wherein the 3rd to 4th frames and the 7th to 9th frames are images to be processed, then after processing the 3rd to 4th frames and the 7th to 9th frames, the second images corresponding to the 3rd to 4th frames and the 7th to 9th frames are obtained, then the first images of the 1st to 2nd frames, the 5th to 6th frames and the 10th frames are extracted from the initially obtained video image, and combined with the second images corresponding to the 3rd to 4th frames and the 7th to 9th frames, to obtain: a video image of the 1st to 2nd frames first images + the 3rd to 4th frames second images + the 5th to 6th frames first images + the 7th to 9th frames second images + the 10th frame first image.
[0070] The image generation method disclosed in this embodiment obtains first information, the first information includes at least one image processing method; obtains at least one first image; determines the target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image; uses the target image processing method corresponding to each first image to be processed in the at least one first image to be processed to process each first image to obtain a corresponding second image. When there is at least one first image to be processed, this scheme obtains first information including at least one image processing method, and corresponds each first image to be processed in the at least one first image to the image processing method included in the first information, determines the target image processing method corresponding to each first image to be processed, and uses the target image processing method to process the first image corresponding thereto to obtain a processed second image, thereby realizing automatic processing of the first image without the need for the user to complete it manually, thus avoiding the consumption of the user's energy, and at the same time, reducing the time consumed in the processing of the first image, thereby improving the user experience.
[0071] This embodiment discloses an image generation method, and its flow chart is as follows: Figure 2 As shown, including:
[0072] Step S21, obtaining first information output by the first model including at least one image processing method, wherein the first information is output by the first model based on second information of the third image;
[0073] Step S22, obtaining at least one first image;
[0074] Step S23, determining a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image;
[0075] Step S24: using the target image processing method corresponding to each first image to be processed in at least one first image, process each first image to be processed to obtain a corresponding second image.
[0076] At least one first image is obtained, first information including at least one image processing method is obtained, and a target image processing method corresponding to each first image to be processed in the at least one first image is determined from the first information, so that the corresponding first image is processed according to the target image processing method, so as to realize automatic processing of at least one first image without manual operation, simplify the processing flow and improve processing efficiency.
[0077] The obtaining of the first information including at least one image processing method may be: obtaining the first information from the first model, that is, obtaining the first information output by the first model, where the first information is output by the first model based on the second information of the third image.
[0078] The first model can receive the second information of the third image and output the first information, that is, output at least one image processing method. The at least one image processing method output by the first model is the image processing method used in the third image.
[0079] The third image is a template image, that is, the user wants to make at least one first image achieve an effect corresponding to the image processing method used for the third image after processing. Therefore, it is necessary to first determine the third image and determine the second information of the third image, and then send the second information of the third image to the first model so that the first model can convert the second information of the third image into the first information.
[0080] The third image may be at least one image uploaded by a user, for example, the user uploads several images or video data.
[0081] The second information of the third image is information obtained by identifying the scene and / or content of the third image, that is, information describing the scene and / or content in the third image, such as: the second information of the third image is: the third image includes a white kitten, the kitten lies on the table, and there are fireworks effects in the blank space above the kitten, etc. The scene and / or content in the third image includes a description of each frame, changes in objects per second, changes in content between different frames, and the theme contained in the entire video.
[0082] The second information of the third image is input into the first model, and the first model processes the second information of the third image to obtain information describing the image processing method used for the third image, that is, the first information, and the order of at least one image processing method included in the obtained first information is consistent with the order of the image processing methods used for the third image. For example, if the order of the image processing methods used in the third image is: the first image processing method, the third image processing method, and the fourth image processing method, then the image processing methods included in the first information also have the same order, which is: the first image processing method, the third image processing method, and the fourth image processing method.
[0083] The third image may be at least one separate frame image, or may be continuous frame images, that is, a video image.
[0084] If the third image is at least one separate frame image, the second information of the third image is information describing each separate frame image in the third image, such as: the picture content in the third image 1, the picture content in the third image 2, etc.; the second information of the third image is input into the first model to obtain the output of the first model, that is, the first information, and the first information can be: which image processing methods are used in at least one separate frame image included in the third image, and the order of the image processing methods included in the first information is consistent with the order of the image processing methods used by at least one separate frame image included in the third image; then, using the image processing method included in at least one separate frame image included in the third image and at least one first image, determine the target image processing method corresponding to each first image to be processed in at least one first image, that is, correspond each first image to be processed in at least one first image with the image processing method used by the third image, so as to determine the target image processing method corresponding to each first image to be processed, and based on this, process each first image to be processed to obtain the second image corresponding to each first image to be processed, so as to realize automatic processing of the first image without manual operation by the user.
[0085] Correspondingly, if the third image is a continuous frame image, the second information of the third image is information describing each frame image in the continuous frame images included in the third image, and the second information of the third image is input into the first model to obtain the output of the first model, that is, the first information. The first information may be: which image processing methods are used for each frame image in the continuous frame images included in the third image, and the order of the image processing methods included in the first information is arranged according to the order of use of the image processing methods in the third image. After the first information of the third image is obtained using the first model, the first information of the third image is used to perform image processing on at least one first image to obtain the corresponding second image.
[0086] That is, the processing of the first image is actually performed according to the image processing method used by the third image. After determining the image processing method used by the third image, the image processing method used by the third image is matched with the first image to be processed to determine the target image processing method to be used for each first image to be processed. Then, image processing is performed on each first image to be processed according to the determined target image processing method to be used for each first image to be processed, so as to obtain the corresponding second image. The image processing methods used in the second images are all derived from the image processing methods used by the third images.
[0087] The first model can convert the second information of the third image into at least one image processing method used for the third image. The first model needs to be trained first using training data, wherein the training data includes: the second information of the training image and at least one image processing method used for the training image. The first model obtained after training with the training data can output at least one image processing method used for the third image, i.e., the first information, after inputting the second information of the third image.
[0088] Furthermore, the second information of the third image may be obtained by: obtaining the third image, inputting the third image into an image description model so that the image description model can obtain the second information of the third image, that is, describing the scene and / or content of the third image through the image description model. The image description model is a model for describing the scene or content of an image;
[0089] If the image generation method disclosed in this embodiment is implemented by a specific program in an electronic device, that is, the specific program in the electronic device receives the first information and at least one first image, determines the target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image, and uses the target image processing method corresponding to each first image to be processed in the at least one first image to process each first image to obtain the corresponding second image. Wherein, the first information obtained by the specific program is output by the first model, the second information of the third image is input into the first model, the output of the first model is obtained, and the output of the first model is the first information, and then the first information and at least one first image are input into the specific program in the electronic device so as to process the at least one first image to obtain the second image.
[0090] If the image generation method disclosed in this embodiment is implemented by a second model, that is, the first information and at least one first image are input into the second model, and the second model determines the target image processing method corresponding to each first image to be processed in at least one first image from the first information based on the characteristics of the at least one first image, and uses the target image processing method corresponding to each first image to be processed in at least one first image to process each first image to be processed to obtain the corresponding second image, and then the second model outputs the second image. Among them, the first information input into the second model is output by the first model, the second information of the third image is input into the first model, and the output of the first model is obtained, and the output of the first model is the first information, and then the first information and at least one first image are input into the second model to obtain the second image.
[0091] The first model and the second model may be the same model or different models.
[0092] If the first model and the second model are the same model, the first model first obtains the second information of the third image, and can output the first information based on the second information of the third image. Thereafter, the first information is re-input into the first model. At this time, at least one first image is also input into the first model at the same time, so that the first model can process the first image to be processed in at least one first image based on the first information to obtain the corresponding second image.
[0093] Among them, for the second model, it can be obtained by fine-tuning the basic model, and the determination of the basic model can be: obtaining the second information of the first training sample image, the first information of the first training sample image and the second training sample image using the corresponding image processing method as the first training sample image, performing model training to obtain the basic model; after obtaining the basic model, obtaining the generated image type input by the user, the generated image type is the type input by the user that meets the user's image generation needs, and the basic model is fine-tuned based on the generated image type to obtain a second model that better meets the user's needs, and the second image obtained using the second model is in line with the user's generated image type.
[0094] If the first model and the second model are different models, the first model first obtains the second information of the third image, the first model processes the second information of the third image, and can output the first information, the first information output by the first model is input into the second model, and at least one first image is also input into the second model, so that the second model can process the first image to be processed in at least one first image based on the first information to obtain the corresponding second image.
[0095] In addition, the obtaining of the first information disclosed in this embodiment can not only obtain the first model output by the first model including at least one image processing method, but also directly obtain the first information input by the user including at least one image processing method.
[0096] If the first information is directly input by the user, and the first information input by the user is the image processing method that the user hopes to use for the first image, then based on the characteristics of each first image in at least one first image, the target image processing method corresponding to each first image to be processed is extracted from the first information, and image processing is performed on each first image to be processed based on the target image processing method corresponding to each first image to be processed, so as to obtain the corresponding second image.
[0097] The image generation method disclosed in the present embodiment obtains first information output by a first model including at least one image processing method, wherein the first information is output by the first model based on the second information of a third image; obtains at least one first image; determines from the first information a target image processing method corresponding to each first image to be processed in at least one first image based on the at least one first image; processes each first image to be processed using the target image processing method corresponding to each first image to be processed in at least one first image to obtain a corresponding second image. The first information for processing at least one first image obtained by this scheme is output by the first model based on the second information of the third image. By outputting the first information through the model, the first information for processing at least one first image can be made more accurate and more in line with the requirements, thereby improving the accuracy of processing the first image, reducing the time and energy consumed in the processing of the first image, and improving the user experience.
[0098] This embodiment discloses an image generation method, and its flow chart is as follows: Figure 3 As shown, including:
[0099] Step S31, obtaining first information, where the first information includes at least one image processing method;
[0100] Step S32, obtaining at least one first image;
[0101] Step S33, determining at least one of the image content and duration of each first image to be processed in at least one first image;
[0102] Step S34, determining a target image processing mode for each first image to be processed from the first information based on the image content of each first image to be processed in at least one first image, and / or determining a duration of the target image processing mode for each first image to be processed based on the duration of each first image to be processed;
[0103] Step S35 , using the target image processing method corresponding to each first image to be processed in at least one first image, process each first image to be processed to obtain a corresponding second image.
[0104] After obtaining the first information and at least one first image, it is necessary to process the first image to be processed in the at least one first image based on the first information to obtain the corresponding second image. It may be necessary to analyze the characteristics of the first image to be processed to determine the target image processing method in the first information corresponding to the characteristics of the first image, so as to ensure that the processing of the first image can meet the characteristics of the first image and avoid the situation where the image processing method used in the second image obtained after processing the first image does not meet the characteristics of the image itself.
[0105] Specifically, feature extraction is performed on each first image in at least one first image to determine the features of each first image, wherein the features of each first image may include: image content, duration, style, scene, etc. of the first image, or may also include changes between adjacent images, etc.
[0106] Different image processing methods can be used for first images with different characteristics. Therefore, after determining the characteristics of each first image, a corresponding image processing method can be selected from the first information based on the characteristics of each first image. The image processing methods included in the first information are limited, and the characteristics of one or more first images in at least one first image may not be able to find a corresponding image processing method from the first information. At this time, for the first image for which the corresponding image processing method cannot be found, it can be directly not processed, and the first image is determined as a first image that does not need to be processed. If the corresponding image processing method can be found from the first information, the first image is determined as the first image to be processed, and only the target image processing method is determined for the first image to be processed, and it is processed based on the target image processing method to obtain the corresponding second image.
[0107] Specifically, feature extraction can be performed on each image frame included in a video clip (a video clip may include multiple continuous image frames or multiple discontinuous image frames), the features of each image frame can be determined, and the features of each image frame can be corresponded to the corresponding image processing method in the first information to determine the target image processing method corresponding to each image frame to be processed, wherein the features included in an image frame can correspond to one image processing method in the first information or to multiple image processing methods in the first information.
[0108] Since the features of the first image may include the image content, duration, style, scene, etc. of the first image, or may also include changes between adjacent images, etc., when determining the corresponding target image processing method based on the features of the first image, it may be specifically as follows: based on the image content of the first image, the target image processing method may be selected from the first information, such as: if the first image includes a certain person, it may correspond to the background blur special effect included in the first information; for example, if the style of the first image is minimalist, it may correspond to the color adjustment special effect in the first information; for example, if the first image has a large change in picture content from the previous frame, the transition special effect included in the first information may be selected as the corresponding image processing method, etc.;
[0109] In addition, the duration of the target image processing method for each first image to be processed can also be determined based on the duration of each first image to be processed. If the first image is a video clip composed of multiple continuous image frames, then when determining the target image processing method corresponding to the first image, the duration of the target image processing method can be determined based on the duration of the first image, such as: based on the characteristics of the first image, it is determined to use dynamic special effects, such as: fireworks special effects, then the duration of the fireworks special effects can be determined based on the duration of the first image; or, if the first image is a single-frame image, based on the characteristics of the first image, it can be determined that multiple consecutive first images have the same characteristics, then after determining the target image processing method based on the characteristics of the first image, the duration of the target image processing method can be determined based on the duration of multiple first images with the same characteristics when they are output.
[0110] The image processing method disclosed in this embodiment can determine to perform different image processing on the first image according to the different features of the first image, so that the final obtained second image meets the features of the first image, thereby improving the accuracy of image processing.
[0111] The image processing method disclosed in this embodiment obtains first information, the first information includes at least one image processing method; obtains at least one first image; determines at least one of the image content and duration of each first image to be processed in the at least one first image; determines the target image processing method of each first image to be processed from the first information based on the image content of each first image to be processed in the at least one first image, and / or determines the duration of the target image processing method of each first image to be processed based on the duration of each first image to be processed; uses the target image processing method corresponding to each first image to be processed in the at least one first image to process each first image to obtain a corresponding second image. After obtaining the first information and at least one first image, the scheme analyzes each first image in the at least one first image, determines at least one of the image content and duration of each first image, and determines the corresponding target image processing method from the first information according to the image content and duration of each first image, so as to process each first image to be processed, so that the processing of each first image is in accordance with the image content and / or duration of the first image, thereby ensuring the accuracy of processing the first image and improving the efficiency of image processing.
[0112] This embodiment discloses an image generation method, and its flow chart is as follows: Figure 4 As shown, including:
[0113] Step S41, obtaining first information, where the first information includes at least one image processing method;
[0114] Step S42, obtaining at least one first image;
[0115] Step S43, determining a target image processing mode corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image;
[0116] Step S44, displaying the target image processing method corresponding to each first image to be processed in at least one first image;
[0117] Step S45, obtaining adjustment information input by the user based on the target image processing method corresponding to each displayed first image to be processed;
[0118] Step S46: adjusting the target image processing method based on the adjustment information, so as to process each first image to be processed by using the adjusted target image processing method to obtain a corresponding second image.
[0119] At least one first image and first information including at least one image processing method are obtained, and a target image processing method corresponding to each first image to be processed in the at least one first image is determined from the first information based on the characteristics of the at least one first image. Afterwards, the target image processing method is not directly used to perform image processing on the first image to be processed, but the target image processing method is output and displayed to obtain adjustment information input by the user, and then the first image to be processed is processed using the target image processing method after processing the target image processing method based on the adjustment information to obtain a second image.
[0120] After obtaining the target image processing method corresponding to each first image to be processed, each first image to be processed can be associated with its corresponding target image processing method and output for display, so that the user can see the target image processing method determined by the system on which the image generation method disclosed in this embodiment is based. After seeing the target image processing method corresponding to each first image to be processed determined by the system, the user can determine whether it is necessary to adjust the target image processing method corresponding to one or more displayed first images.
[0121] If the user determines that the target image processing method corresponding to one or more displayed first images needs to be adjusted, the user can input adjustment information into the system so that the system can obtain the adjustment information and adjust the target image processing method based on the adjustment information.
[0122] After obtaining the adjustment information, it is necessary to first determine the target image and the target adjustment method in at least one first image corresponding to the adjustment information; adjust the target image processing method corresponding to the target image according to the target adjustment method, process the target image according to the adjusted target image processing method, and process the first image other than the target image in at least one first image according to the corresponding target image processing method to obtain a second image corresponding to the at least one first image.
[0123] The adjustment information input by the user may be information for adjusting the target image processing method for one first image, or may be information for adjusting the target image processing methods for multiple first images.
[0124] After the adjustment information is obtained, the adjustment information is analyzed to determine the target image and the target adjustment method in at least one first image corresponding to the adjustment information, wherein the target image is one or several first images corresponding to the target image processing method adjusted by the adjustment information, and these first images are determined as target images, and the adjustment made to the target image processing method corresponding to the target image is the target adjustment method.
[0125] The target image processing method corresponding to the target image is adjusted according to the target method to obtain the adjusted target image processing method, and then the target image in at least one first image is processed according to the adjusted target image processing method, and the first image other than the target image in at least one first image is processed according to its corresponding target image processing method to obtain the second image corresponding to each first image.
[0126] For example, at least one first image includes four first images, wherein the target image processing method corresponding to each first image to be processed is determined from the first information based on the characteristics of the at least one first image, as follows: first image 1 corresponds to image processing method 1, first image 2 corresponds to image processing method 2, first image 3 corresponds to image processing method 3, and first image 4 corresponds to image processing method 4; based on the adjustment information, the target images are determined to be first image 2 and first image 4, and the target adjustment method is: image processing method 2 corresponding to first image 2 is adjusted to image processing method 3, and image processing method corresponding to first image 4 is adjusted to image processing method 5. After the image processing methods of the target images are adjusted according to the target adjustment method, it is obtained that first image 2 corresponds to image processing method 3, and first image 4 corresponds to image processing method 5. Then, each first image to be processed in the at least one first image is processed, and it is obtained that second image 1 corresponding to first image 1 uses image processing method 1, second image 2 corresponding to first image 2 uses image processing method 3, second image 3 corresponding to first image 3 uses image processing method 3, and second image 4 corresponding to first image 4 uses image processing method 5.
[0127] Furthermore, the target adjustment method includes at least one of the following: changing the order of target image processing methods corresponding to at least one target image, changing the target image processing method corresponding to the target image, and deleting the target image processing method corresponding to the target image.
[0128] For example, the order of target image processing methods corresponding to each first image to be processed determined based on the feature of at least one first image is: image processing method 1, image processing method 2 and image processing method 3, and the image processing methods of the target images are adjusted based on the target adjustment method, so that the order of target image processing methods is: image processing method 1, image processing method 3 and image processing method 2, that is, the order of image processing methods is adjusted;
[0129] For another example, the target image processing method corresponding to each first image to be processed determined based on the feature of at least one first image is: first image 1 corresponds to image processing method 1, and the image processing method of the target image is adjusted based on the target adjustment method to obtain image processing method 2 corresponding to first image 1, that is, the adjustment of the target image processing method is achieved;
[0130] For another example: the target image processing method corresponding to each first image to be processed determined based on the characteristics of at least one first image is: the first image 1 corresponds to image processing method 1, the first image 2 corresponds to image processing method 2, and the first image 3 corresponds to image processing method 3; the image processing method of the target image is adjusted based on the target adjustment method, and the target image processing method is obtained as: the first image 1 corresponds to image processing method 1, the first image 2 does not correspond to the image processing method, and the first image 3 corresponds to image processing method 3, thereby achieving deletion of the target image processing method.
[0131] Of course, the target adjustment method may also include other forms, which are not specifically limited here.
[0132] The image generation method disclosed in this embodiment obtains first information, the first information includes at least one image processing method; obtains at least one first image; determines the target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image; displays the target image processing method corresponding to each first image to be processed in the at least one first image; obtains adjustment information input by the user based on the displayed target image processing method corresponding to each first image to be processed; adjusts the target image processing method based on the adjustment information, so as to use the adjusted target image processing method to process each first image to be processed, and obtain the corresponding second image. After determining the target image processing method corresponding to each first image to be processed, this solution can display it to obtain the adjustment information input by the user, so that the final adjustment of the first image is not only related to the characteristics of the first image and the first information, but also related to the adjustment information input by the user, so as to ensure that after accurately determining the target image processing method corresponding to the first image, it can also better meet the needs of the user, thereby ensuring more accurate processing of the image.
[0133] This embodiment discloses an image generation system, and its structural diagram is shown in FIG. Figure 5 As shown, including:
[0134] A first obtaining unit 51 , a second obtaining unit 52 , a determining unit 53 and a processing unit 54 .
[0135] The first obtaining unit 51 is used to obtain first information, and the first information includes at least one image processing method;
[0136] The second obtaining unit 52 is used to obtain at least one first image;
[0137] The determination unit 53 is used to determine, from the first information, a target image processing method corresponding to each first image to be processed in the at least one first image based on the feature of the at least one first image;
[0138] The processing unit 54 is used to process each first image to be processed by using the target image processing method corresponding to each first image to be processed in at least one first image to obtain a corresponding second image.
[0139] Furthermore, the first obtaining unit is used for:
[0140] The first information output by the first model and including at least one image processing method is obtained, wherein the first information is output by the first model based on the second information of the third image; or, the first information input by the user and including at least one image processing method is obtained.
[0141] Furthermore, the first obtaining unit is used for:
[0142] The first model obtains second information of the third image based on the obtained second information, processes the second information, and determines and outputs first information; wherein the second information includes information obtained by identifying the scene and / or content of the third image, and the first information includes at least one image processing method used for the third image; the order of the at least one image processing method included in the first information is the same as the order of the image processing method used for the third image.
[0143] Furthermore, the determination unit is used to:
[0144] Determine at least one of the image content and duration of each first image to be processed in at least one first image; determine the target image processing method for each first image to be processed from the first information based on the image content of each first image to be processed in at least one first image, and / or determine the duration of the target image processing method for each first image to be processed based on the duration of each first image to be processed.
[0145] Furthermore, the processing unit is used to:
[0146] Display a target image processing method corresponding to each first image to be processed in at least one first image; obtain adjustment information input by a user based on the displayed target image processing method corresponding to each first image to be processed; adjust the target image processing method based on the adjustment information, so as to process each first image to be processed using the adjusted target image processing method to obtain a corresponding second image.
[0147] Furthermore, the processing unit is used to:
[0148] Determine a target image and a target adjustment method in at least one first image corresponding to the adjustment information; adjust the target image processing method corresponding to the target image according to the target adjustment method, process the target image according to the adjusted target image processing method, process the first image other than the target image in at least one first image according to the corresponding target image processing method, and obtain a second image corresponding to the at least one first image.
[0149] Furthermore,
[0150] The target adjustment method includes at least one of the following: changing the order of target image processing methods corresponding to at least one target image, changing the target image processing method corresponding to the target image, and deleting the target image processing method corresponding to the target image.
[0151] Furthermore,
[0152] The image processing method includes at least one of the following: a splicing processing method, a special effect processing method, a screen switching processing method, and a screen parameter adjustment method.
[0153] The image generation system disclosed in this embodiment is implemented based on the image generation method disclosed in the above embodiment, which will not be described in detail here.
[0154] The image generation system disclosed in this embodiment obtains first information, the first information includes at least one image processing method; obtains at least one first image; determines the target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image; uses the target image processing method corresponding to each first image to be processed in the at least one first image to be processed to process each first image to obtain a corresponding second image. When there is at least one first image to be processed, this scheme obtains first information including at least one image processing method, and corresponds each first image to be processed in the at least one first image to the image processing method included in the first information, determines the target image processing method corresponding to each first image to be processed, and uses the target image processing method to process the first image corresponding thereto to obtain a processed second image, thereby realizing automatic processing of the first image without the need for the user to complete it manually, thus avoiding the consumption of the user's energy, and at the same time, reducing the time consumed in the processing of the first image, thereby improving the user experience.
[0155] This embodiment discloses an electronic device, and its structural diagram is as follows: Figure 6 As shown, including:
[0156] Processor 61 and memory 62.
[0157] The processor 61 is used to obtain first information, the first information including at least one image processing method; obtain at least one first image; determine a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the at least one first image; use the target image processing method corresponding to each first image to be processed in the at least one first image to be processed to process each first image to obtain a corresponding second image;
[0158] The memory 62 is used to store the programs required by the processor to execute the above processing procedures.
[0159] The electronic device disclosed in this embodiment is implemented based on the image generation method disclosed in the above embodiments, which will not be described in detail here.
[0160] The electronic device disclosed in this embodiment obtains first information, the first information includes at least one image processing method; obtains at least one first image; determines the target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image; uses the target image processing method corresponding to each first image to be processed in the at least one first image to be processed to process each first image to obtain a corresponding second image. When there is at least one first image to be processed, this scheme obtains first information including at least one image processing method, and corresponds each first image to be processed in the at least one first image to the image processing method included in the first information, determines the target image processing method corresponding to each first image to be processed, and uses the target image processing method to process the first image corresponding thereto to obtain a processed second image, thereby realizing automatic processing of the first image without the need for the user to complete it manually, thus avoiding the consumption of the user's energy, and at the same time, reducing the time consumed in the processing of the first image, thus improving the user experience.
[0161] The embodiment of the present application also provides a readable storage medium on which a computer program is stored. The computer program is loaded and executed by a processor to implement the steps of the above-mentioned image generation method. The specific implementation process can refer to the description of the corresponding part of the above-mentioned embodiment, which will not be repeated in this embodiment.
[0162] The present application also proposes a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. The processor of the electronic device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the electronic device executes the method provided in various optional implementations of the above-mentioned image generation method or image generation system. The specific implementation process can refer to the description of the above-mentioned corresponding embodiment, and will not be repeated.
[0163] It should also be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed over multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the drawings of the device embodiments provided by the present application, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines.
[0164] Through the description of the above implementation mode, the technicians in the field can clearly understand that the present application can be implemented by means of software plus necessary general hardware, and of course, it can also be implemented by special hardware including special integrated circuits, special CPUs, special memories, special components, etc. In general, all functions completed by computer programs can be easily implemented by corresponding hardware, and the specific hardware structure used to implement the same function can also be various, such as analog circuits, digital circuits or special circuits. However, for the present application, software program implementation is a better implementation mode in more cases. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a readable storage medium, such as a computer floppy disk, a U disk, a mobile hard disk, a ROM, a RAM, a disk or an optical disk, etc., including a number of instructions to enable a computer device (which can be a personal computer, a training device, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0165] In the above embodiments, all or part of the embodiments may be implemented by software, hardware, firmware or any combination thereof. When implemented by software, all or part of the embodiments may be implemented in the form of a computer program product.
[0166] The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, a computer, a training device, or a data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, training device, or data center. The computer-readable storage medium may be any available medium that a computer can store or a data storage device such as a training device, a data center, etc. that includes one or more available media integrations. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive (SSD)), etc.
Claims
1. A method for generating an image, comprising: Obtaining first information, wherein the first information includes at least one image processing method; obtaining at least one first image; Determining a target image processing method corresponding to each first image to be processed in the at least one first image from the first information based on the characteristics of the at least one first image; Using the target image processing method corresponding to each first image to be processed in the at least one first image, each first image to be processed is processed to obtain a corresponding second image.
2. The method according to claim 1, wherein obtaining the first information comprises: Obtaining first information output by a first model including at least one image processing method, wherein the first information is output by the first model based on second information of a third image; or, First information including at least one image processing method input by a user is obtained.
3. The method according to claim 2, wherein the first information is output by the first model based on the second information of the third image, comprising: Obtaining second information of the third image obtained by the first model, processing the second information, and determining and outputting the first information; Among them, the second information includes information obtained by identifying the scene and / or content of the third image, and the first information includes at least one image processing method used for the third image; the order of the at least one image processing method included in the first information is the same as the order of the image processing method used for the third image.
4. The method according to claim 1, wherein determining the target image processing method corresponding to each first image in the at least one first image from the first description information based on the feature of the at least one first image comprises: Determine at least one of the image content and duration of each first image to be processed in the at least one first image; Based on the image content of each first image to be processed in the at least one first image, the target image processing mode for each first image to be processed is determined from the first information, and / or based on the duration of each first image to be processed, the duration of the target image processing mode for each first image to be processed is determined.
5. The method according to claim 1, wherein the processing of each first image to be processed by using the target image processing method corresponding to each first image to be processed in the at least one first image to obtain the corresponding second image further comprises: Displaying a target image processing method corresponding to each first image to be processed in the at least one first image; Obtaining adjustment information input by a user based on a target image processing method corresponding to each of the displayed first images to be processed; The target image processing method is adjusted based on the adjustment information, so as to process each of the first images to be processed by using the adjusted target image processing method to obtain a corresponding second image.
6. The method according to claim 5, wherein the step of adjusting the target image processing method based on the adjustment information so as to process each of the first images to be processed using the adjusted target image processing method to obtain a corresponding second image comprises: Determine a target image and a target adjustment method in the at least one first image corresponding to the adjustment information; The target image processing method corresponding to the target image is adjusted according to the target adjustment method, the target image is processed according to the adjusted target image processing method, and the first image other than the target image in the at least one first image is processed according to the corresponding target image processing method to obtain the second images corresponding to the at least one first image.
7. The method according to claim 6, wherein: The target adjustment method includes at least one of the following: changing the order of target image processing methods corresponding to at least one target image, changing the target image processing method corresponding to the target image, and deleting the target image processing method corresponding to the target image.
8. The method according to any one of claims 1 to 7, wherein: The image processing method includes at least one of the following: a splicing processing method, a special effect processing method, a screen switching processing method, and a screen parameter adjustment method.
9. An image generation system, comprising: A first obtaining unit, configured to obtain first information, wherein the first information includes at least one image processing method; A second obtaining unit, configured to obtain at least one first image; a determining unit, configured to determine, from the first information, a target image processing mode corresponding to each first image to be processed in the at least one first image based on a feature of the at least one first image; The processing unit is used to process each first image to be processed in the at least one first image by using the target image processing method corresponding to each first image to be processed to obtain a corresponding second image.
10. An electronic device, comprising: A processor, configured to obtain first information, wherein the first information includes at least one image processing method; obtaining at least one first image; Determining, from the first information, a target image processing method corresponding to each first image to be processed in the at least one first image based on the at least one first image; Using a target image processing method corresponding to each first image to be processed in the at least one first image, processing each first image to be processed to obtain a corresponding second image; The memory is used to store the program required by the processor to execute the above processing process.