Image processing method and related equipment

By generating a second image with a consistent style and dynamically scaling it, the problem of content inconsistency in image expansion is solved, improving visual effects and user experience.

CN121661173APending Publication Date: 2026-03-13BEIJING ZITIAO NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-04
Publication Date
2026-03-13

AI Technical Summary

Technical Problem

Existing image enlargement methods result in poor image processing effects, with the enlarged area content being inconsistent with the original image, lacking detail, and being complex to operate, thus affecting the visual experience.

Method used

By generating a second image containing more details and dynamically scaling the first and second images based on a preset speed, the target video is generated, ensuring that the expanded content is consistent with the style of the original image and logically sound.

Benefits of technology

It improves the quality and visual effects of image processing, achieves seamless integration of the expanded area with the original image, simplifies the operation process, and enhances the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121661173A_ABST
    Figure CN121661173A_ABST
Patent Text Reader

Abstract

The invention provides an image processing method and related equipment. The method comprises the steps of obtaining a first image; generating a second image based on the first image, wherein the second image comprises the image content of the first image; and performing dynamic zoom conversion between the first image and the second image based on a preset speed to generate a target video.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to an image processing method and related equipment. Background Technology

[0002] Currently, image processing can automatically enlarge the content of an image to make it appear more complete or have a wider field of view. However, existing image enlargement methods are limited in scope and often result in inconsistent effects with the original image, leading to unsatisfactory processing results. Summary of the Invention

[0003] This disclosure proposes an image processing method and related equipment to solve, to a certain extent, the technical problems of poor image processing results caused by the limited content of the enlarged image and the disharmony between the enlarged image and the original image.

[0004] In a first aspect, this disclosure provides an image processing method, comprising:

[0005] Get the first image;

[0006] A second image is generated based on the first image, and the second image includes the image content of the first image;

[0007] The target video is generated by dynamically scaling and converting the first and second images based on a preset speed.

[0008] A second aspect of this disclosure provides an image processing apparatus, comprising:

[0009] The image acquisition module is used to acquire the first image;

[0010] An image generation module is used to generate a second image based on the first image, wherein the second image includes the image content of the first image;

[0011] The image scaling module is used to dynamically scale and convert between the first image and the second image based on a preset speed to generate the target video.

[0012] A third aspect of this disclosure provides an electronic device including one or more processors, a memory, and one or more programs, wherein the one or more programs are stored in the memory and executed by the one or more processors, the programs including instructions for performing the method according to the first aspect.

[0013] A fourth aspect of this disclosure provides a non-volatile computer-readable storage medium containing a computer program that, when executed by one or more processors, causes the processors to perform the method described in the first aspect.

[0014] A fifth aspect of this disclosure provides a computer program product including computer program instructions that, when executed on a computer, cause the computer to perform the method described in the first aspect.

[0015] As can be seen from the above, the image processing method and related device provided in this disclosure generate a second image containing more details based on a first image. The content of the second image is reasonable and more consistent with the style of the first image. The method and device also dynamically scale and convert the first image and the second image to generate a target video. This achieves a dynamic scaling effect between the original first image and the expanded second image, thereby improving the quality and visual effect of image processing. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in this disclosure or related technologies, the accompanying drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the accompanying drawings described below are only embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0017] Figure 1 This is a schematic diagram of the image processing architecture according to an embodiment of the present disclosure.

[0018] Figure 2 This is a schematic diagram of the hardware structure of an exemplary electronic device according to an embodiment of the present disclosure.

[0019] Figure 3 This is a schematic flowchart of an image processing method according to an embodiment of the present disclosure.

[0020] Figures 4A-4F This is a schematic diagram illustrating the generation of a second image based on a first image according to an embodiment of this disclosure.

[0021] Figures 5A-5C This is a schematic diagram of the target video in an embodiment of this disclosure.

[0022] Figure 6 This is a schematic diagram of an image processing apparatus according to an embodiment of the present disclosure. Detailed Implementation

[0023] To make the objectives, technical solutions, and advantages of this disclosure clearer, the following detailed description is provided in conjunction with specific embodiments and the accompanying drawings.

[0024] It should be noted that, unless otherwise defined, the technical or scientific terms used in the embodiments of this disclosure should have the ordinary meaning understood by one of ordinary skill in the art to which this disclosure pertains. The terms "first," "second," and similar terms used in the embodiments of this disclosure do not indicate any order, quantity, or importance, but are merely used to distinguish different components. Terms such as "comprising" or "including" mean that the element or object preceding the word encompasses the elements or objects listed following the word and their equivalents, without excluding other elements or objects. Terms such as "connected" or "linked" are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. Terms such as "upper," "lower," "left," and "right" are used only to indicate relative positional relationships; when the absolute position of the described object changes, the relative positional relationship may also change accordingly.

[0025] It is understood that before using the technical solutions disclosed in the various embodiments of this disclosure, users should be informed of the types, scope of use, and usage scenarios of the personal information involved in this disclosure in an appropriate manner in accordance with relevant laws and regulations, and user authorization should be obtained.

[0026] For example, upon receiving a user's active request, a prompt message is sent to the user to explicitly inform them that the requested operation will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the software or hardware, such as the electronic device, application, server, or storage medium performing the operations of this disclosed technical solution, based on the prompt message.

[0027] As an optional but non-limiting implementation, in response to a user's active request, sending a prompt message to the user can be done via a pop-up window, where the prompt message can be presented in text format. Furthermore, the pop-up window can also include a selection control allowing the user to choose "agree" or "disagree" to provide personal information to the electronic device.

[0028] It is understood that the above notification and user authorization process are merely illustrative and do not constitute a limitation on the implementation of this disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of this disclosure.

[0029] Figure 1 A schematic diagram of an image processing architecture according to an embodiment of this disclosure is shown. (Reference) Figure 1The image processing architecture 100 may include a server 110, a terminal 120, and a network 130 providing a communication link. The server 110 and the terminal 120 can be connected via a wired or wireless network 130. The server 110 can be a standalone physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server providing basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, security services, and CDN.

[0030] Terminal 120 can be implemented in hardware or software. For example, when terminal 120 is implemented in hardware, it can be various electronic devices with a display screen and support page display, including but not limited to smartphones, tablets, e-book readers, laptops, and desktop computers. When terminal 120 is implemented in software, it can be installed in the electronic devices listed above; it can be implemented as multiple software programs or software modules (e.g., software programs or software modules used to provide distributed services) or as a single software program or software module, without specific limitations.

[0031] It should be noted that the image processing method provided in this application embodiment can be executed by the terminal 120 or by the server 110. It should be understood that... Figure 1 The number of terminals, networks, and servers shown is for illustrative purposes only and is not intended to be a limitation. Any number of terminals, networks, and servers can be used depending on implementation needs.

[0032] Figure 2 A schematic diagram of the hardware structure of an exemplary electronic device 200 provided in an embodiment of this disclosure is shown. For example... Figure 2 As shown, the electronic device 200 may include: a processor 202, a memory 204, a network module 206, a peripheral interface 208, and a bus 210. The processor 202, memory 204, network module 206, and peripheral interface 208 are interconnected within the electronic device 200 via the bus 210.

[0033] Processor 202 may be a central processing unit (CPU), image processor, neural network processor (NPU), microcontroller (MCU), programmable logic device, digital signal processor (DSP), application-specific integrated circuit (ASIC), or one or more integrated circuits. Processor 202 can be used to perform functions related to the techniques described in this disclosure. In some embodiments, processor 202 may also include multiple processors integrated as a single logic component. For example, such as... Figure 2 As shown, processor 202 may include multiple processors 202a, 202b and 202c.

[0034] Memory 204 can be configured to store data (e.g., instructions, computer code, etc.). Figure 2 As shown, the data stored in memory 204 may include program instructions (e.g., program instructions for implementing the image processing method of embodiments of this disclosure) and data to be processed (e.g., the memory may store configuration files of other modules, etc.). Processor 202 may also access the program instructions and data stored in memory 204 and execute the program instructions to operate on the data to be processed. Memory 204 may include volatile or non-volatile storage devices. In some embodiments, memory 204 may include random access memory (RAM), read-only memory (ROM), optical disk, magnetic disk, hard disk, solid-state drive (SSD), flash memory, memory stick, etc.

[0035] Network module 206 can be configured to provide communication with other external devices to electronic device 200 via a network. This network can be any wired or wireless network capable of transmitting and receiving data. For example, the network can be a wired network, a local wireless network (e.g., Bluetooth, WiFi, Near Field Communication (NFC), etc.), a cellular network, the Internet, or a combination thereof. It is understood that the type of network is not limited to the specific examples described above. In some embodiments, network module 206 may include any combination of any number of network interface controllers (NICs), radio frequency modules, transceivers, modems, routers, gateways, adapters, cellular network chips, etc.

[0036] The peripheral interface 208 can be configured to connect the electronic device 200 to one or more peripheral devices to enable information input and output. For example, peripheral devices may include input devices such as keyboards, mice, touchpads, touch screens, microphones, and various sensors, as well as output devices such as displays, speakers, vibrators, and indicator lights.

[0037] Bus 210 can be configured to transfer information between various components of electronic device 200 (e.g., processor 202, memory 204, network module 206, and peripheral interface 208), such as internal buses (e.g., processor-memory bus), external buses (USB port, PCI-E bus), etc.

[0038] It should be noted that although the architecture of the above-described electronic device 200 only shows the processor 202, memory 204, network module 206, peripheral interface 208, and bus 210, in specific implementations, the architecture of the electronic device 200 may also include other components necessary for normal operation. Furthermore, those skilled in the art will understand that the architecture of the above-described electronic device 200 may only include the components necessary for implementing the embodiments of this disclosure, and does not necessarily include all the components shown in the figures.

[0039] Image augmentation techniques often incorporate Generative Adversarial Networks (GANs), leading to several shortcomings in the augmentation results. For example, because the content generated by GANs sometimes has low relevance to the original image, the augmented area often appears empty and lacks detail, resulting in an unnatural transition between the generated content and the original image. It primarily focuses on simply increasing the spatial sense of the image without effectively enriching the content of the augmented area, resulting in a visually unappealing and unnatural augmented effect. Furthermore, inconsistencies in the content generated by GANs, such as discontinuities in texture or object shape, further impact the overall quality and visual experience of the augmented image. Additionally, users often need to manually augment the image multiple times, frequently operating on multiple different tools before stitching, increasing complexity and reducing efficiency. Manual augmentation is time-consuming and laborious, and subtle differences between each augmentation can lead to inconsistencies in the final synthesized video, further affecting its quality. Moreover, cross-tool operations increase the risk of data transmission and compatibility issues, making the entire augmentation process cumbersome and unstable, failing to meet the demands for efficient and convenient use. Therefore, improving the visual effects and quality of image extensions has become an urgent technical problem to be solved.

[0040] In view of this, embodiments of this disclosure provide an image processing method and related apparatus. By generating a second image containing more details based on a first image, the second image has reasonable content and is more consistent with the style of the first image; and by dynamically scaling and converting the first and second images to generate a target video, a dynamic scaling effect between the original first image and the expanded second image is visually achieved, improving the quality and visual effect of image processing.

[0041] See Figure 3 , Figure 3 A schematic flowchart of an image processing method according to an embodiment of the present disclosure is shown. The image processing method according to an embodiment of the present disclosure can be deployed on a terminal or a server. Figure 3 In the image processing method 300, the following steps may be further included.

[0042] In step S310, the first image is acquired.

[0043] The first image can refer to the image to be processed, which can be any image uploaded or provided by the user in various ways, or it can be an intermediate image in the image processing method according to the embodiments of this disclosure. Specifically, the user can trigger corresponding controls in the corresponding interface to select the image to be processed. For example, in image editing software, the user can select a photo from the photo library of a computer or mobile phone, and submit it to the system by clicking the "upload" button or dragging and dropping the file to the designated area for editing. The first image can also be an image captured in real time by the user using an image acquisition device, such as a camera. The first image can also be an image downloaded from the network, such as an image shared on a social media platform.

[0044] In step S320, a second image is generated based on the first image, and the second image includes the image content of the first image.

[0045] The second image can refer to the image obtained after the first image has undergone content expansion processing. It can contain all the content of the first image and add corresponding image content, such as adding new elements to the image.

[0046] In some embodiments, generating a second image based on the first image includes:

[0047] Based on the first image, descriptive information is extracted and expanded to obtain the corresponding target descriptive information;

[0048] The second image is generated based on the target description information.

[0049] The process involves extracting descriptive information and style information from the first image, followed by information expansion. Descriptive information refers to information describing the specific content of the image, such as objects, scenes, and actions, and their interrelationships. For example, an image might show a little girl in a red dress feeding pigeons in a park; the descriptive information for this image needs to identify and understand the various components and their relationships. The first descriptive information refers to the descriptive information of the first image. The target descriptive information is a new descriptive information generated by combining style information, style weights, and style hints with the original descriptive information. This target descriptive information not only retains the content description of the first image but also adds information conforming to a specified style, making the description more specific. Style information refers to the artistic expression of the image, including but not limited to the use of color, line processing, compositional features, and the overall feeling. Specifically, style information can refer to style type, such as ordinary style, humorous style, abstract style, classical style, etc., and the style type can be preset.

[0050] In some embodiments, descriptive information extraction and information expansion are performed based on the first image to obtain corresponding target descriptive information, including:

[0051] First descriptive information is obtained by extracting descriptive information from the first image;

[0052] The first descriptive information is expanded once or multiple times;

[0053] The target description information is obtained based on the results generated from each information expansion.

[0054] The process involves image expansion of the first image, specifically expanding the first descriptive information to obtain target descriptive information, and then generating a second image based on this target descriptive information. Specifically, a style transfer model can be used to transfer the style of the first image to the second image, and image expansion can be performed based on a diffusion model and the target descriptive information to generate the second image. The style transfer model can be trained using a neural network and a corresponding large-scale dataset. During training, content loss and style loss can be constructed. The content loss ensures that the output image is structurally similar to the content image; the style loss ensures that the output image captures the artistic style of the style image. Minimizing the weighted sum of these two loss functions until convergence yields the style transfer model. The diffusion model can gradually add noise to the image during training until the image is completely covered by noise. Then, starting from pure noise, the diffusion model gradually removes the noise and recovers a clear image, thereby learning how to gradually build image details from small to large to generate images based on text descriptions or other conditional information.

[0055] In some embodiments, a second image is generated based on the first image, the second image including the image content of the first image, including:

[0056] A third image is generated based on the first image, and the third image includes the image content of the first image;

[0057] The second image is generated based on the third image, and the second image includes the image content of the third image.

[0058] Alternatively, the first image can be expanded multiple times, that is, the first descriptive information can be expanded multiple times to obtain target descriptive information, and then the second image can be generated based on the target descriptive information. Specifically, such as... Figures 4A-4F As shown, Figures 4A-4F A schematic diagram is shown illustrating the generation of a second image based on a first image according to an embodiment of the present disclosure. Figure 4A In this process, information can be extracted from the first image P0 to obtain first descriptive information text0, and then the first descriptive information text0 can be expanded to obtain second descriptive information text1. Based on the second descriptive information text1, a third image P1 is generated, as follows: Figure 4B As shown. The second descriptive information text1 can be further expanded to obtain a third descriptive information text2. Based on this third descriptive information text2, a second image P2 is generated, as shown. Figure 4C As shown. Furthermore, the third descriptive information text2 can be expanded to obtain a fourth descriptive information text3. Based on this fourth descriptive information text2, an intermediate image P3 is generated, as shown. Figure 4D As shown. Similarly, new extended images can be continuously generated based on the image obtained from the previous extension. For example, an intermediate image P4 can be generated based on the intermediate image P3, such as... Figure 4E As shown. A second image P5 is generated based on the intermediate image P4, as follows. Figure 4F As shown.

[0059] In some embodiments, expanding the first descriptive information one or more times may further include:

[0060] The corresponding style information is obtained by extracting information from the first image;

[0061] Based on the style weights and styles corresponding to the style information, the first description information is expanded once or multiple times to generate the target description information; wherein, each information expansion is based on the style weights and the style prompt text, and is performed on the information expansion result obtained from the previous information expansion.

[0062] Style weights are numerical values ​​used to adjust the degree of style influence. When generating target description information, style weights control the strength of newly added style-related descriptions. Higher style weights mean the target description information can contain more style elements, and vice versa. Style cue text is the prompt text used to guide the model on how to generate the target description based on the original description information and style information. It can include keywords, phrases, sentences, or paragraphs to help the model better generate the target description information that the user expects, making the target description information more narrative, scenario-rich, or plot-rich while maintaining logical coherence. For example, the first image P0 could be a sunset scene on a beach. The corresponding original description text0 could be "A golden sun is setting above the horizon, and the sky is filled with orange and purple clouds." The style information style_0 could be "Impressionism," the style weight (range [0,1]) could be s0, and the style prompt text prompt0 could be "emphasizing the changes in light and shadow" or "describing the flow of colors." Then, based on the language model, the original description text0 of the first image P0 can be expanded according to the style information style_0, the style weight s0, and the style prompt text prompt0 to generate the target description text1, which could be "The golden sun is slowly setting above the horizon, and the orange and purple hues in the sky are mixed together, creating a blurry and dreamlike effect."

[0063] Specifically, the target description information can be expanded multiple times sequentially, with each expansion result serving as the target description information. For example, based on the language model, the original description information text0 of the first image P0 can be expanded according to style information style_0, style weights s0, and style prompt text prompt0 to generate target description information text1. Then, the target description information text1 can be expanded again according to style information style_0, style weights s0, and style prompt text prompt0 to generate target description information text2. This process continues, with each expansion building upon the result of the previous expansion. In this way, target description information with high relevance, consistent style, and logical content can be generated based on the style information of the first image and the corresponding style prompt text, building upon the original description information.

[0064] In some embodiments, different style information corresponds to different style weights and different style cue texts; the style weights are used to determine the degree of stylization of the target description information generated based on the style cue texts.

[0065] The style information and style prompt text can have a corresponding mapping relationship. For example, style information 1 can correspond to preset style prompt text 1, and style information 2 can correspond to preset style prompt text 2. Once the style information of the first image is determined, the corresponding style prompt text can be determined. The style weight can be set according to user needs.

[0066] In some embodiments, the target description information is obtained based on the result generated by each information expansion; then, generating a second image based on the target description information includes: generating a plurality of corresponding second images based on a plurality of target description information.

[0067] In this context, when the first descriptive information is expanded multiple times, the second image can refer to the image generated corresponding to the result of each expansion during the continuous expansion process. For example, based on a language model, the original descriptive information text0 of the first image P0 can be expanded according to style information style_0, style weights s0, and style prompt text prompt0 to generate target descriptive information text1, and the second image P1 is generated based on this target descriptive information text1. Next, the target descriptive information text1 can be expanded according to style information style_0, style weights s0, and style prompt text prompt0 to generate target descriptive information text2, and the second image P2 is generated based on this target descriptive information text2. Then, the target descriptive information text2 can be expanded according to style information style_0, style weights s0, and style prompt text prompt0 to generate target descriptive information text3, and the second image P3 is generated based on this target descriptive information text3. This process continues, and each expansion of the target descriptive information can generate a corresponding second image.

[0068] Compared with existing technologies, the image processing method of this disclosure ensures that the second image after one or more expansions has a high degree of thematic relevance to the first image, avoiding inconsistencies; the content logic is more reasonable and conforms to the rules of the real world; the depiction of people or other creatures ensures that all parts of their bodies are complete and intact, without missing limbs or disproportionate features; creative elements are added to enhance interest without affecting overall harmony; the expanded content is not limited to simple background filling, but enriches the storytelling of the entire scene by adding more details, allowing users to experience a deeper level of plot development; whether in color matching, line drawing, or overall atmosphere, the expanded content maintains consistency with the original... Figure 1 A consistent style ensures the unity and integrity of the entire work.

[0069] In step S330, dynamic scaling conversion between the first image and the second image is performed based on a preset speed to generate the target video.

[0070] By controlling the scaling speed of the second image, a dynamic scaling transition between the first and second images can be achieved visually, ensuring a smooth transition and guaranteeing the generation of a coherent and visually appealing target video.

[0071] In some embodiments, dynamic scaling and conversion between the first image and the second image are performed based on a preset speed to generate a target video, including:

[0072] The first and last frames of the target video are determined based on the first and second images;

[0073] The second image is dynamically reduced in size based on the preset speed, and / or dynamically enlarged in size based on the preset speed, to obtain the target video.

[0074] In this approach, the first image can be used as the first frame (first frame) of the target video, and the second image as the last frame (last frame). That is, the first image is displayed at the beginning of the target video, and the second image is displayed at the end. Alternatively, the second image can be used as the first frame (first frame) of the target video, and the first image as the last frame (last frame). In this case, the size of the second image is dynamically changed based on a preset speed, either shrinking or enlarging, to smoothly transition between these two states in time and space (i.e., the shrinking or enlarging display between the first image and second images of different sizes), resulting in a smooth animation effect and ensuring the quality and viewing experience of the target video.

[0075] Specifically, see Figures 5A-5C As shown, Figures 5A-5C A schematic diagram of a target video according to an embodiment of the present disclosure is shown. Figure 5A The first image P0 shown is used as the first frame of the target video. Figure 5B Taking the second image P5 as the last frame of the target video as an example, the second image P5 can be gradually reduced in size based on a preset speed. Since the second image P5 is obtained by one or more image expansions on the first image P0, a visual effect of the image content of the first image P0 continuously expanding can be formed, such as... Figure 5C As shown. It is also possible to gradually zoom in on the second image P5 at a preset speed, creating a visual effect where the content of the second image P5 continuously enlarges, such as... Figure 5C As shown.

[0076] In some embodiments, the preset speed includes a first preset speed and a second preset speed;

[0077] Dynamic scaling and transformation between the first image and the second image are performed based on a preset speed to generate a target video, including:

[0078] Based on the first preset speed, a dynamic scaling conversion is performed between the first image and the third image to generate a first intermediate video;

[0079] Based on the second preset speed, a dynamic scaling conversion is performed between the third image and the second image to generate a second intermediate video;

[0080] The target video is obtained by stitching together the first intermediate video and the second intermediate video.

[0081] The transition from the first image to the second image can include two stages: from the first image to the third image, and from the third image to the second image, each with a different speed setting. A first preset speed can be used to control the dynamic scaling transition between the first and third images, starting with the first image and gradually scaling the third image at the first preset speed. A second preset speed can be used to control the dynamic scaling transition between the third and second images. Similar to the previous stage, it starts with the third image and gradually scales the second image at the second preset speed. Connecting the first and second intermediate videos of these two stages sequentially forms the target video stream, which contains the complete transition effect from the first image through the third image to the second image. It should be understood that the above target video is only an example; scaling transitions of more images can be included between the first and second images, which is not limited here.

[0082] In some embodiments, the first preset speed and the second preset speed may be the same or different.

[0083] This is because the scaling and conversion rate between images can be controlled by adjusting different speeds, thus producing a more natural or dramatic visual effect.

[0084] In some embodiments, dynamic scaling and conversion between the first image and the third image are performed based on the first preset speed to generate a first intermediate video, including:

[0085] The first image is determined to be the first frame of the first intermediate video, and the third image is determined to be the last frame of the first intermediate video.

[0086] The third image is dynamically reduced in size based on the first preset speed, and / or dynamically enlarged in size based on the first preset speed, to obtain the first intermediate video.

[0087] Since the third image is generated based on the first image and is used to generate the second image, it serves as the last frame of the first intermediate video and the first frame of the second intermediate time, thus ensuring a smooth and logically sound scaling transition between the first and second images. In the first intermediate video, the first image serves as the first frame, and the third image serves as the last frame, dynamically scaling down and / or up the third image.

[0088] In some embodiments, a second intermediate video is generated by dynamically scaling the third image and the second image based on the second preset speed, including:

[0089] The third image is determined to be the first frame of the second intermediate video, and the second image is determined to be the last frame of the second intermediate video;

[0090] The second image is dynamically reduced in size based on the second preset speed, and / or dynamically enlarged in size based on the second preset speed, to obtain the second intermediate video.

[0091] In the second intermediate video, the third image serves as the first frame, and the second image serves as the last frame, dynamically scaling down and / or up the second image. Specifically, as follows: Figure 5C As shown, the first image can be P0, the third image can be one or more of P2-P4, and the second image can be P5. Images P2, P3, P4, and P5 can be scaled down or enlarged sequentially at their respective preset speeds, and then stitched together to form a scaled-down or enlarged effect from image P0 to P5.

[0092] As can be seen, the image processing according to the embodiments of this disclosure, scaling the first and second images, can create specific visual effects, such as zooming in or out in a movie, or emphasizing certain details in a video. By controlling the zoom speed, these visual effects can be made more natural and appealing.

[0093] In some embodiments, method 300 further includes: determining the preset speed based on a preset playback duration of the target video.

[0094] To ensure the target video completes its transition from its initial state to its final state within the preset playback duration, the zoom-in or zoom-out speed needs to be determined based on the playback duration. This is because the rate of change of each frame in the video directly affects the total video duration. Specifically, based on the target video duration, the time that adjacent frames should occupy in each stage (zoom-out stage, zoom-in stage) can be calculated. The required zoom-out and zoom-out speeds are then calculated based on the duration of each stage. For example, if the total duration is fixed, and the time for the zoom-out and zoom-in stages is also fixed, the zoom-out or zoom-out speed can be calculated accordingly. Adjusting the scaling speed of the second image in this way allows for a smooth transition from one state to another. This means that whether zooming in or out, the changes in the video will not appear abrupt, but rather occur gradually. Simultaneously, ensuring that the total playback duration of the video matches the preset time further enhances the audio-visual matching effect, which is particularly beneficial for creating target videos with a specific rhythm or synchronized with external factors such as music.

[0095] In summary, the image processing technology provided in this disclosure aims to intelligently ensure seamless integration of newly added elements with existing content in all aspects when expanding images or other media content, thereby enhancing the overall visual effect and user experience. Furthermore, it can be used to create target videos, making the entire video appear as a continuous dynamic effect, enhancing its visual appeal and attractiveness. By precisely controlling the rate of change, smooth and engaging visual effects can be created while maintaining the video's duration.

[0096] It should be noted that the method of this disclosure embodiment can be executed by a single device, such as a computer or server. The method of this embodiment can also be applied to a distributed scenario, where multiple devices cooperate to complete the task. In such a distributed scenario, one of these devices may execute only one or more steps of the method of this disclosure embodiment, and the multiple devices will interact with each other to complete the method described.

[0097] It should be noted that the above description describes some embodiments of this disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in a different order than that shown in the above embodiments and still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require a specific or sequential order to achieve the desired result. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0098] Based on the same technical concept, corresponding to any of the above embodiments, this disclosure also provides an image processing apparatus, see [link to relevant documentation]. Figure 6The image processing apparatus includes:

[0099] The image acquisition module is used to acquire the first image;

[0100] An image generation module is used to generate a second image based on the first image, wherein the second image includes the image content of the first image;

[0101] The image scaling module is used to dynamically scale and convert between the first image and the second image based on a preset speed to generate the target video.

[0102] For ease of description, the above apparatus is described in terms of its functions, divided into various modules. Of course, in implementing this disclosure, the functions of each module can be implemented in one or more software and / or hardware.

[0103] The apparatus of the above embodiments is used to implement the corresponding image processing method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0104] Based on the same technical concept, corresponding to the methods of any of the above embodiments, this disclosure also provides a non-transitory computer-readable storage medium that stores computer instructions for causing the computer to perform the image processing method as described in any of the above embodiments.

[0105] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. Information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transfer medium that can be used to store information accessible by a computing device.

[0106] The computer instructions stored in the storage medium of the above embodiments are used to cause the computer to execute the image processing method as described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.

[0107] Those skilled in the art should understand that the discussion of any of the above embodiments is merely exemplary and is not intended to imply that the scope of this disclosure (including the claims) is limited to these examples; within the framework of this disclosure, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the embodiments of this disclosure as described above, which are not provided in detail for the sake of brevity.

[0108] Additionally, to simplify the description and discussion, and to avoid obscuring the embodiments of this disclosure, the provided drawings may or may not show well-known power / ground connections to integrated circuit (IC) chips and other components. Furthermore, the apparatus may be shown in block diagram form to avoid obscuring the embodiments of this disclosure, and this also takes into account the fact that the details of implementation of these block diagram apparatuses are highly dependent on the platform on which the embodiments of this disclosure will be implemented (i.e., these details should be fully understood by those skilled in the art). While specific details (e.g., circuitry) have been set forth to describe exemplary embodiments of this disclosure, it will be apparent to those skilled in the art that the embodiments of this disclosure may be implemented without these specific details or with variations thereof. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0109] Although this disclosure has been described in conjunction with specific embodiments thereof, many substitutions, modifications, and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0110] This disclosure is intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this disclosure should be included within the scope of protection of this disclosure.

Claims

1. An image processing method, comprising: Get the first image; A second image is generated based on the first image, and the second image includes the image content of the first image; The target video is generated by dynamically scaling and converting the first and second images based on a preset speed.

2. The method according to claim 1, wherein, Dynamic scaling and transformation between the first image and the second image are performed based on a preset speed to generate a target video, including: The first and last frames of the target video are determined based on the first and second images; The second image is dynamically reduced in size based on the preset speed, and / or dynamically enlarged in size based on the preset speed, to obtain the target video.

3. The method according to claim 1, wherein, A second image is generated based on the first image, the second image including the image content of the first image, including: A third image is generated based on the first image, and the third image includes the image content of the first image; The second image is generated based on the third image, and the second image includes the image content of the third image.

4. The method according to claim 3, wherein, The preset speed includes a first preset speed and a second preset speed; Dynamic scaling and transformation between the first image and the second image are performed based on a preset speed to generate a target video, including: Based on the first preset speed, a dynamic scaling conversion is performed between the first image and the third image to generate a first intermediate video; Based on the second preset speed, a dynamic scaling conversion is performed between the third image and the second image to generate a second intermediate video; The target video is obtained by stitching together the first intermediate video and the second intermediate video.

5. The method according to claim 4, wherein, Based on the first preset speed, dynamic scaling and conversion between the first image and the third image are performed to generate a first intermediate video, including: The first image is determined to be the first frame of the first intermediate video, and the third image is determined to be the last frame of the first intermediate video. The third image is dynamically reduced in size based on the first preset speed, and / or dynamically enlarged in size based on the first preset speed, to obtain the first intermediate video.

6. The method according to claim 5, wherein, Based on the second preset speed, a dynamic scaling transformation is performed between the third image and the second image to generate a second intermediate video, including: The third image is determined to be the first frame of the second intermediate video, and the second image is determined to be the last frame of the second intermediate video; The second image is dynamically reduced in size based on the second preset speed, and / or dynamically enlarged in size based on the second preset speed, to obtain the second intermediate video.

7. The method according to claim 1, wherein, Generating a second image based on the first image includes: Based on the first image, descriptive information is extracted and expanded to obtain the corresponding target descriptive information; The second image is generated based on the target description information.

8. The method according to claim 7, wherein, Based on the first image, descriptive information is extracted and expanded to obtain corresponding target descriptive information, including: First descriptive information is obtained by extracting descriptive information from the first image; The first descriptive information is expanded once or multiple times; The target description information is obtained based on the results generated from each information expansion.

9. The method according to claim 1, further comprising: The preset speed is determined based on the preset playback duration of the target video.

10. An image processing apparatus, comprising: The image acquisition module is used to acquire the first image; An image generation module is used to generate a second image based on the first image, wherein the second image includes the image content of the first image; The image scaling module is used to dynamically scale and convert between the first image and the second image based on a preset speed to generate the target video.

11. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the program, implements the method as claimed in any one of claims 1 to 9.

12. A non-transitory computer-readable storage medium storing computer instructions for causing a computer to perform the method of any one of claims 1 to 9.