Image processing method and device, electronic equipment, computer storage medium and product
Patent Information
- Application Number
- CN202510446441.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2026-10-16
AI Technical Summary
[0004]然而,传统的终端拍摄的动态图像存在不清晰的问题
[0017] The aforementioned image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product acquire a static image and an initial video of the dynamic image to be processed, and magnify each initial video frame in the effective area of the initial video to a preset area, thereby generating a corresponding target video frame. Based on the static image and each target video frame, a target dynamic image is obtained. Since the preset area in the target video frame is obtained by magnifying the effective area in the initial video frame, it is equivalent to removing the blurred area in the initial video frame while retaining the effective area. Therefore, the blurred area of the initial video frame is cropped, thus achieving optimized processing of the dynamic image. This fills the gap in dynamic image optimization methods, improves the quality of the dynamic image, and enhances the display effect of the dynamic image, helping to improve the user viewing experience. Furthermore, when users share the dynamic image to third-party platforms, they can share a better-looking dynamic image, thereby enhancing the user's social attributes.
Smart Images

Figure CN122933843A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image processing technology, and in particular to an image processing method, apparatus, electronic device, computer storage medium, and product. Background Technology
[0002] With the hardware upgrades of terminal imaging systems and breakthroughs in photography technology, dynamic images such as Live Photos have redefined the expression paradigm of digital images by integrating still images and dynamic videos.
[0003] The principle behind acquiring moving images is to simultaneously record a short video stream while capturing a still image, and then integrate the still image and video frames into a composite media file using spatiotemporal information encapsulation technology. When playing back moving images, users can seamlessly switch between still images and moving video frames through interactive triggers.
[0004] However, traditionally captured images from mobile devices suffer from blurriness. Summary of the Invention
[0005] This application provides an image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product that can improve the quality of moving images.
[0006] This application provides an image processing method, the method comprising:
[0007] Acquire a static image and an initial video of the dynamic image to be processed; each initial video frame of the initial video includes at least a valid region and a blurred region, wherein the blurred region is located on at least one side of the valid region, and the image sharpness of the valid region is higher than that of the blurred region;
[0008] Each initial video frame of the effective region is magnified to a preset region to generate a corresponding target video frame; the position of the total region of the blurred region and the effective region in the initial video frame is the same as the position of the preset region in the target video frame;
[0009] Based on the static image and each of the target video frames, obtain the target dynamic image.
[0010] This application provides an image processing apparatus, the apparatus comprising:
[0011] The parsing module is used to acquire the static image and initial video of the dynamic image to be processed; each initial video frame in the initial video includes at least a valid region and a blurred region, the blurred region is located on at least one side of the valid region, and the image clarity of the valid region is higher than that of the blurred region;
[0012] The magnification module is used to magnify each of the initial video frames of the effective region to a preset region, and generate a corresponding target video frame; the position of the blurred region and the total region of the effective region in the initial video frame is the same as the position of the preset region in the target video frame;
[0013] The encapsulation module is used to obtain the target dynamic image based on the static image and each of the target video frames.
[0014] This application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the method described above.
[0015] This application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method described above.
[0016] This application provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the method described above.
[0017] The aforementioned image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product acquire a static image and an initial video of the dynamic image to be processed, and magnify each initial video frame in the effective area of the initial video to a preset area, thereby generating a corresponding target video frame. Based on the static image and each target video frame, a target dynamic image is obtained. Since the preset area in the target video frame is obtained by magnifying the effective area in the initial video frame, it is equivalent to removing the blurred area in the initial video frame while retaining the effective area. Therefore, the blurred area of the initial video frame is cropped, thus achieving optimized processing of the dynamic image. This fills the gap in dynamic image optimization methods, improves the quality of the dynamic image, and enhances the display effect of the dynamic image, helping to improve the user viewing experience. Furthermore, when users share the dynamic image to third-party platforms, they can share a better-looking dynamic image, thereby enhancing the user's social attributes. Attached Figure Description
[0018] Figure 1 This is a schematic diagram of the process of performing electronic image stabilization on an image in one embodiment;
[0019] Figure 2 This is one of the flowcharts illustrating an image processing method in one embodiment;
[0020] Figure 3 This is a second schematic flowchart of an image processing method in one embodiment;
[0021] Figure 4This is the third flowchart of an image processing method in one embodiment;
[0022] Figure 5 This is a flowchart of an image processing method in one embodiment, number four.
[0023] Figure 6 This is the fifth flowchart of an image processing method in one embodiment;
[0024] Figure 7 This is a flowchart of an image processing method in one embodiment, number six.
[0025] Figure 8 This is a schematic diagram of an initial video frame with a framed watermark in one embodiment;
[0026] Figure 9 This is the seventh flowchart of an image processing method in one embodiment;
[0027] Figure 10 This is the eighth flowchart of an image processing method in one embodiment;
[0028] Figure 11 This is a flowchart of an image processing method in one embodiment, number nine.
[0029] Figure 12 This is a flowchart of an image processing method in one embodiment, number ten.
[0030] Figure 13 This is eleventh of a flowchart illustrating an image processing method in one embodiment;
[0031] Figure 14 This is a structural block diagram of an image processing device in one embodiment;
[0032] Figure 15 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0033] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0034] As mentioned in the background section, the moving images captured by the terminal in the related technology suffer from blurriness. Research has found that, for example... Figure 1As shown, when the terminal is capturing dynamic images such as Live Photos, it will perform EIS (Electronic Image Stabilization) processing, which will generate transformations such as rotation, displacement, and stretching. The edges will be blurred and filled, resulting in blurry edges in the final video frame, thus causing the dynamic image to be unclear.
[0035] In response, this application provides an image processing method, apparatus, electronic device, computer-readable storage medium, and computer program product that improves the quality of dynamic images by enlarging the effective area in a video frame to remove blurred edges, thereby enhancing the display effect of dynamic images.
[0036] In some embodiments, such as Figures 2 to 4 As shown, an image processing method is provided. This embodiment illustrates the application of this method to a terminal. It is understood that this method can also be applied to a server, or to a system including both a terminal and a server, and implemented through interaction between the terminal and the server. The terminal can be a device with a shooting function, such as an electronic device with a camera, a camera, etc., without further limitation. In this embodiment, the image processing method includes the following steps S202 to S206.
[0037] S202: Obtain the static image and initial video of the dynamic image to be processed.
[0038] The dynamic images to be processed include still images and initial videos. Still images can be images captured instantaneously when the shutter is pressed. Initial videos can be videos captured before and after the shutter is pressed. In this application, initial video refers to video captured by the terminal and processed by EIS but without FOV (Field of View) optimization; it can be understood as video directly captured by the terminal.
[0039] The initial video consists of several initial video frames. Initial video frames can be understood as video frames captured by the terminal and processed by EIS, but without FOV optimization. The number of initial video frames can be any suitable value, specifically determined based on the actual scenario. For example, it can be determined based on the video length and frame rate of the initial video; no further limitations are imposed here.
[0040] Each initial video frame includes at least a valid region 10 and a blurred region 20. The blurred region 20 can be understood as an unclear area in the initial video frame due to technical reasons or physical phenomena, including low-information or interfering information. For example, the blurred region 20 can be understood as the blurred edges in the initial video frame caused by EIS processing after the terminal captures the initial video, resulting in transformations such as rotation, displacement, and stretching for blur filling. The valid region 10 can be understood as the area in the initial video frame that contains key information or target content.
[0041] In applications, when the terminal captures dynamic images, EIS processing can be performed. During FOV optimization, the blurred region 20 can be directly determined based on EIS parameters, and this blurred region 20 can be fixed. Correspondingly, the effective region 10 can be determined based on the initial video frame and the blurred region 20; that is, the effective region is the area in the initial video frame excluding the blurred region 20. It should be noted that when the initial video frame includes the frame watermark region 40, the effective region is the area in the initial video frame excluding both the blurred region 20 and the frame watermark region 40.
[0042] Among them, the image sharpness of the effective region 10 is higher than that of the blurred region 20. From the perspective of sharpness, the effective region 10 can be understood as the region whose image sharpness meets the image sharpness requirements, and the blurred region 20 can be understood as the region whose image sharpness does not meet the image sharpness requirements.
[0043] The blurred region 20 is located on at least one side of the effective region 10, that is, the blurred region 20 and the effective region 10 are adjacent in at least one direction. For example, the blurred region 20 is located around the effective region 10, that is, the blurred region 20 completely surrounds the effective region 10. Yet another example is that the blurred region 20 does not completely surround the effective region 10.
[0044] It is understood that a still image can include an image region, which can be understood as the area in the still image that contains key information or target content. The position of the image region in the still image is the same as the position of the total area of blurred region 20 and effective region 10 in the initial video frame. The area of the still image is the same as the area of the total region.
[0045] For example, such as Figure 3As shown, each initial video frame also includes a frame watermark area 40; correspondingly, the still image also includes a frame watermark area 40. The frame watermark area 40 can be understood as the area used to display the frame watermark. The frame watermark can be preset or default, and it can be used to display relevant information about the dynamic image to be processed, such as camera hardware, optical settings, exposure control, focus mode, color adjustment, etc. Specific settings can be made according to requirements, and will not be limited further here. The frame watermark area 40 can be set around the initial video frame and the image area.
[0046] In the application, the terminal can capture images of the target scene to obtain dynamic images to be processed, and extract static images and initial video frames of the initial video from the dynamic images to be processed.
[0047] S204: Zoom in on each initial video frame in the effective area to the preset area and generate the corresponding target video frame.
[0048] Combination Figure 3 and Figure 4 As shown, the position of the total area of the blurred region 20 and the effective region 10 in the initial video frame is the same as the position of the preset region 30 in the target video frame. Furthermore, the area of the total area of the blurred region 20 and the effective region 10 is the same as the area of the preset region 30. For example, the preset region 30 is the same in each initial video frame, and the position of the preset region 30 in the initial video frame is the same as the position of the image region in the still image, and the area of the preset region 30 is the same as the area of the image region.
[0049] Enlarging each initial video frame of the effective region 10 to the preset region 30 can be understood as enlarging the effective region 10 of each initial video frame to the preset region 30. The preset region 30 is equivalent to the total area of the blurred region 20 and the effective region 10 in the initial video frame, but the preset region 30 does not have blurred edges. This is equivalent to cropping the blurred region 20 in the initial video frame and enlarging the effective region 10 in the initial video frame. The image clarity of the preset region 30 in the target video frame is higher than the image clarity of the blurred region 20 in the initial video frame.
[0050] It should be noted that in practical applications, directly enlarging the effective area 10 of the initial video frame to the preset area 30 and generating the corresponding target video frame achieves the effect of cropping the blurred area 20 without cropping the initial video frame. This process can be called FOV (Field of View) optimization processing.
[0051] S206: Obtain the target dynamic image based on the static image and each target video frame.
[0052] The target dynamic image includes still images and target video, and the target video includes several target video frames. The number of target video frames is the same as the number of initial video frames. The target video frames can be arranged sequentially according to the order of their corresponding initial video frames.
[0053] In applications, target video frames can be arranged in the order of the initial video frames to obtain the target video, and target motion images can be generated based on static images and the target video. Based on this, such as... Figure 5 As shown, when displaying a target dynamic image, the static image and the target video will produce a FOV jump effect.
[0054] The image processing method provided in the above embodiments acquires a static image and an initial video of the dynamic image to be processed, and magnifies each initial video frame in the effective area of the initial video to a preset area, thereby generating a target video frame. Based on the static image and each target video frame, a target dynamic image is obtained. Since the preset area in the target video frame is obtained by magnifying the effective area in the initial video frame, it is equivalent to removing the blurred area in the initial video frame and retaining the effective area in the initial video frame. Therefore, the blurred area of the initial video frame is cropped, thereby achieving the optimization processing of the dynamic image, filling the gap in dynamic image optimization methods, improving the quality of the dynamic image, and thus improving the display effect of the dynamic image. This helps to improve the user's viewing experience, and when the user shares it to a third-party platform, a better dynamic image can be shared, thereby enhancing the user's social attributes.
[0055] In some embodiments, such as Figure 6 As shown, step S204, which enlarges each initial video frame of the effective area to a preset area and generates a corresponding target video frame, may include the following steps S602 and S604.
[0056] S602: Obtain adjustment parameters for enlarging the effective area.
[0057] S604: Based on the adjustment parameters, enlarge each initial video frame in the effective area to the preset area, and generate the corresponding target video frame.
[0058] Adjustment parameters refer to the parameters related to magnifying the effective area. The adjustment parameters can be determined based on the actual situation of the initial video frames, and no further restrictions are imposed here.
[0059] The parameters can be obtained from the relevant fields in the file of the dynamic image to be processed. When the terminal captures the dynamic image to be processed, it can generate and store a corresponding file of the dynamic image to be processed, which can be used to display the dynamic image.
[0060] In the application, the terminal can obtain the file of the dynamic image to be processed and extract the adjustment parameters for magnifying the effective area from the file. Then, according to the adjustment parameters, the effective area of each initial video frame is magnified to the preset area, and the corresponding target video frame is generated. Then, the target dynamic image can be generated based on the static image and each target video frame. In this way, by magnifying the effective area, the blurred area is cropped, the dynamic image is optimized, the quality of the dynamic image is improved, and the user experience is enhanced.
[0061] In some embodiments, the adjustment parameters include electronic image stabilization (EIS) coefficients. The EIS coefficients represent the magnification factor that increases the effective area to a preset area. The EIS coefficients can be obtained from relevant fields in the file of the moving image to be processed.
[0062] In the application, electronic image stabilization is performed when the terminal captures the dynamic image to be processed. Correspondingly, the relevant fields in the file of the dynamic image to be processed will record the electronic image stabilization coefficient. Based on this, the electronic image stabilization coefficient can be obtained from the file of the dynamic image to be processed.
[0063] It is understandable that, such as Figure 4 As shown, when the initial video frame includes both an effective region and a blurred region, and does not include the frame watermark region, each initial video frame in the effective region can be magnified to a preset area based on the electronic image stabilization coefficient, thus obtaining the corresponding target video frame. In this way, the effective region can be magnified according to the electronic image stabilization coefficient, and the blurred region can be cropped, thereby optimizing the processing of dynamic images, improving the quality of dynamic images, and contributing to a better user experience.
[0064] In some embodiments, the adjustment parameters include the electronic image stabilization coefficient; based on this, step S604, which enlarges each initial video frame of the effective area to a preset area according to the adjustment parameters and generates a target video frame accordingly, may include the following steps: obtaining the initial texture coordinates of the initial video frame, mapping the target texture coordinates to the initial texture coordinates of the initial video frame according to the electronic image stabilization coefficient, determining the texture color of the mapped initial texture coordinates as the texture color of the target texture coordinates, and generating the target video frame.
[0065] Combination Figure 4 As shown, texture coordinates (UV coordinates) are two-dimensional coordinates used to locate on the texture image, ranging from 0 to 1. The UV coordinates correspond to specific locations in the texture image, and the texture color is the pixel color at that location.
[0066] The initial texture coordinates can be understood as two-dimensional coordinates located within the initial video frame. The texture color of each initial texture coordinate in the initial video frame is used to characterize the initial video frame. When the initial video frame includes both a valid region and a blurred region, the initial texture coordinates include the texture coordinates of the valid region and the blurred region. When the initial video frame includes a valid region, a blurred region, and a frame watermark region, the initial texture coordinates include the texture coordinates of the valid region, the blurred region, and the frame watermark region.
[0067] Target texture coordinates can be understood as two-dimensional coordinates located within the target video frame, or the coordinates of the target video frame obtained after magnification. The texture color of each target texture coordinate in the target video frame is used to characterize the target video frame. If the initial video frame includes a preset region, the initial texture coordinates include the texture coordinates of the preset region. If the initial video frame includes both the preset region and the frame watermark region, the initial texture coordinates include the texture coordinates of both the preset region and the frame watermark region.
[0068] The target texture coordinates and the initial texture coordinates can be used together to map the initial video frame to the target video frame. The target texture coordinates and the initial texture coordinates use the same coordinate system.
[0069] Understandably, if the initial video frame includes both a valid region and a blurred region, and does not include the frame watermark region, the valid region can be directly magnified based on the electronic image stabilization coefficient, and then magnified to a preset area. Specifically, the target texture coordinates are mapped to the initial texture coordinates of the initial video frame based on the electronic image stabilization coefficient, and the texture color of the mapped initial texture coordinates is determined as the texture color of the target texture coordinates, thereby generating the target video frame. Here, the mapped initial texture coordinates are the texture coordinates of the valid region in the initial video frame, excluding the texture coordinates of the blurred region.
[0070] In this way, the texture color of the effective area is preserved by the electronic image stabilization coefficient, while the texture color of the blurred area is discarded. This achieves the magnification of the effective area and the cropping of the blurred area, thus optimizing the blurred edges of dynamic images and improving the quality and display effect of dynamic images.
[0071] In some embodiments, such as Figure 3 As shown, the dynamic image to be processed can be a dynamic image with a framed watermark. Furthermore, the framed watermark in the initial video frame is the same as the framed watermark in the static image.
[0072] For a dynamic image to be processed with a framed watermark, both the static image and each initial video frame include a framed watermark region, where the watermark is located within the framed watermark region. In each initial video frame, the framed watermark region is positioned around a blurred area. In the static image, the framed watermark region is positioned around the image area. Furthermore, the position of the framed watermark region in each initial video frame is the same as its position in the static image.
[0073] The style of the watermark area in the picture frame can be set according to actual needs. For example, the outer border of the watermark area can be a rectangle, a circle, a polygon, or any other suitable shape. There are no restrictions here.
[0074] Based on the above, the adjustable parameters can include the electronic image stabilization coefficient and the watermark border parameter. The watermark border parameter represents the watermark area corresponding to the frame watermark. The watermark border parameter can be understood as a parameter that defines the frame watermark area; its specific determination depends on the frame watermark and its corresponding area, and will not be further specified here.
[0075] Understandably, given that the initial video frame includes a blurred area, a valid area, and a frame watermark area, it's necessary to enlarge the valid area while preserving the frame watermark area. Therefore, during FOV optimization, it's not only necessary to enlarge the valid area based on the electronic image stabilization coefficient, but also to preserve the frame watermark area based on the watermark border parameters. This ensures that the target video frame includes both the preset area and the frame watermark area. The frame watermark area in the target video frame is identical to that in the initial video frame.
[0076] In the application, the electronic image stabilization coefficient and watermark border coefficient can be obtained from the file of the dynamic image to be processed. Based on the electronic image stabilization coefficient and watermark border parameters, each initial video frame in the effective area is magnified to the preset area, and the corresponding target video frame is generated. In this way, the blurred area is cropped by magnifying the effective area, while the initial frame watermark area is preserved. This reduces the computational complexity of the magnification process, expands the optimization processing scenarios of dynamic images, and improves the flexibility and practicality of image processing.
[0077] In some embodiments, such as Figure 7 As shown, the watermark border parameters include a first border parameter, a second border parameter, a third border parameter, and a fourth border parameter. The first and second border parameters represent the minimum distance between the outer border of the blurred area and the outer border of the watermark area in the first direction, respectively. The third and fourth border parameters represent the minimum distance between the outer border of the blurred area and the outer border of the watermark area in the second direction, respectively.
[0078] The first direction and the second direction intersect. For example, the first direction is perpendicular to the second direction. Figure 7 For example, the first direction is the X-axis direction, and the second direction is the Y-axis direction.
[0079] Continue reading Figure 7 In this context, the outer borders of the effective area, blurred area, and frame watermark area of the initial video frame are rectangles. Correspondingly, the first border parameter is the left border parameter (leftBorder, abbreviated as L), the second border parameter is the right border parameter (rightBorder, abbreviated as R), the third border parameter is the top border parameter (topBorder, abbreviated as T), and the fourth border parameter is the bottom border parameter (bottomBorder, abbreviated as B). Based on this, the first border parameter leftBorder and the second border parameter rightBorder can be used to represent the frame watermark areas on both sides of the blurred area along the X-axis, and the third border parameter topBorder and the fourth border parameter bottomBorder can be used to represent the frame watermark areas on both sides of the blurred area along the Y-axis.
[0080] Among them, such as Figure 7 and Figure 8 As shown, the first, second, third, and fourth border parameters are all greater than or equal to 0. For example, the first, second, third, and fourth border parameters are all equal to 0; in this case, the frame watermark is a regular layer watermark. In another example, the first, third, and fourth border parameters are all equal to 0, and the second border parameter is greater than 0. Yet another example, the first, second, and third border parameters are all equal to 0, and the fourth border parameter is greater than 0. These are merely illustrative examples; in applications, the specific values of the watermark border parameters can be set according to requirements, and no further limitations are imposed here.
[0081] It should be noted that the above example only uses rectangles as the outer borders of the effective area, blurred area, and watermark area of the initial video frame. When the effective area, blurred area, and watermark area have other styles, the watermark border parameters can be adjusted adaptively, and no further restrictions are imposed here.
[0082] In the application, watermark border parameters, namely the first border parameter, the second border parameter, the third border parameter, and the fourth border parameter, can be obtained from the file of the image to be processed. In this way, the frame watermark area corresponding to the frame watermark can be determined based on the watermark border parameters, thus providing data support for subsequent FOV optimization, so that the optimized target video frame can retain the frame watermark area.
[0083] In some embodiments, the still image and each video frame have a frame watermark; that is, the still image and each initial video frame include a frame watermark area. For example, Figure 9 As shown, step S604, which enlarges each initial video frame of the effective area to a preset area according to the adjustment parameters, and generates the corresponding target video frame, may include the following steps S902 to S906.
[0084] S902: Obtain the initial texture coordinates of the initial video frame.
[0085] S904: Determine whether the target texture coordinates of each target video frame are within the watermark area based on the watermark border parameters.
[0086] The initial texture coordinates and target texture coordinates can be found in the previous introduction, and will not be repeated here.
[0087] It is understandable that the watermark border parameter represents the watermark area of the frame. Therefore, it is possible to determine whether the target texture coordinates in each target video frame are within the watermark area of the frame based on the watermark border parameter. If not, the following step S906 is executed.
[0088] S906: When the target texture coordinates of each target video frame are not in the frame watermark area, the target texture coordinates are mapped to the initial texture coordinates of the initial video frame according to the electronic image stabilization coefficient, and the texture color of the mapped initial texture coordinates is determined as the texture color of the target texture coordinates.
[0089] If the target texture coordinates of each target video frame are not within the frame watermark area, it indicates that the target texture coordinates represent the location of a preset region. Therefore, it is necessary to enlarge the effective region in the initial video frame to obtain the preset region. Specifically, the target texture coordinates can be mapped to the initial texture coordinates of the initial video frame based on the electronic image stabilization coefficient, and the texture color of the mapped initial texture coordinates can be determined as the texture color of the target texture coordinates. This achieves the enlargement of each video frame within the effective region to the preset region. The mapped initial texture coordinates are the texture coordinates of the effective region in the initial video frame, excluding the texture coordinates of blurred areas in the initial video frame.
[0090] In this way, effective processing of non-frame watermark areas is achieved. That is, by inheriting the texture color of the effective area in the initial video frame through the electronic image stabilization coefficient, the effective area is magnified and the blurred area is cropped, thereby achieving directional magnification of dynamic images, reducing computational costs, optimizing blurred edges in dynamic images, and improving the quality of dynamic images.
[0091] Please continue reading. Figure 9In some embodiments, the image processing method further includes step S908: when the target texture coordinates of each target video frame are in the frame watermark area, the texture color of the initial texture coordinates that are the same as the target texture coordinates is determined as the texture color of the target texture coordinates.
[0092] Wherein, when the target texture coordinates of each target video frame are within the frame watermark area, the texture color of the initial texture coordinates that are the same as the target texture coordinates refers to the texture color of the frame watermark area in the initial video frame.
[0093] When the target texture coordinates in each target video frame fall within the frame watermark area, it indicates that the target texture coordinates represent the position of the frame watermark area. Therefore, it's necessary to preserve the frame watermark area from the initial video frame. That is, the texture color of the initial texture coordinates that are identical to the target texture coordinates is determined as the texture color of the target texture coordinates, thus preserving the frame watermark area from the initial video frame. In this way, the frame watermark area is identified through the watermark border parameters, and the texture color of the frame watermark area from the initial video frame is inherited. This ensures that the clarity and position of the frame watermark area in the initial video frame remain unchanged, preserving the initial frame watermark area and reducing computational costs.
[0094] In applications, the terminal can implement the above FOV optimization process by calling shader code such as OpenGL shaders to achieve blurred edge optimization processing of dynamic images.
[0095] In some embodiments, such as Figure 10 As shown, step S202, obtaining the static image and initial video of the dynamic image to be processed, includes the following steps: obtaining the initial offset information and initial video length of the initial video according to the packaging protocol of the dynamic image to be processed; parsing the dynamic image to be processed according to the initial offset information and initial video length; and obtaining the static image and initial video.
[0096] The packaging protocol is pre-defined and can be understood as the protocol followed to encapsulate static images and initial videos into dynamic images to be processed.
[0097] Initial offset information refers to the spatial position or timeline offset data of the initial video, used to achieve the dynamic effects of the moving image to be processed. Initial video length refers to the total duration of the initial video, representing the duration from the start to the end of playback.
[0098] In the application, the metadata of the dynamic image to be processed can be obtained from the file according to the packaging protocol. The initial offset information and initial video length of the initial video of the dynamic image to be processed can then be obtained from the metadata. Based on the initial offset information and initial video length, the dynamic image to be processed can be parsed to obtain static images and several initial video frames, which are used for subsequent FOV optimization processing. The metadata of the dynamic image to be processed can be data based on the XMP (Extensible Metadata Platform) format.
[0099] The image processing method provided in the above embodiments obtains the initial offset information and initial video length of several initial video frames according to the packaging protocol of the dynamic image to be processed. Based on the initial offset information and initial video length, the dynamic image to be processed is parsed to obtain a static image and several initial video frames. In this way, the static image and each initial video frame are extracted from the dynamic image to be processed, providing data support for subsequent FOV optimization of each initial video frame.
[0100] In some embodiments, such as Figure 11 As shown, S206, obtaining the target dynamic image based on the static image and each target video frame includes the following steps: merging the static image and each target video frame, encapsulating the merged static image and each target video frame according to the packaging protocol of the dynamic image to be processed, the target offset information of the target dynamic image, and the target video length, and obtaining the target dynamic image.
[0101] In the application, the magnified target video can be obtained according to the order of the initial video frames corresponding to each target video frame, and the target video can be inserted at the end of the static image to form the metadata of the target dynamic image. The metadata of the target dynamic image can be based on XMP format.
[0102] The packaging protocol used in the encapsulation process is the same as the packaging protocol used to obtain still images and initial video frames. The encapsulation process can be understood as the reverse process of extracting images and video frames.
[0103] Target offset information refers to the spatial location or timeline offset data of the target video, used to achieve dynamic effects. Target video length refers to the total duration of the target video, representing the duration from the start to the end of playback. The target video length is the same as the initial video length.
[0104] In the application, static images and target videos can be encapsulated according to the packaging protocol to obtain target dynamic images. Target offset information and target video length are written into the metadata of the target dynamic image. This makes it easier to accurately locate the target video using the target offset information and target video length when parsing the target dynamic image, thus enabling the playback of the target dynamic image.
[0105] The image processing method provided in the above embodiments merges static images and each target video frame, encapsulates the merged static images and each target video frame according to the packaging protocol of the dynamic image to be processed, the target offset information of the target dynamic image, and the target video length, and obtains the target dynamic image. In this way, the encapsulation of static images and target videos is realized to generate optimized target dynamic images, and data support is provided for subsequent playback of target dynamic images.
[0106] In some embodiments, such as Figure 12 As shown, the image processing method further includes steps S1202 to S1208.
[0107] S1202: Obtain user-defined parameters for preprocessing the target dynamic image; preprocessing includes zooming in or zooming out.
[0108] User-defined parameters are used to represent parameters related to the preprocessing of the target dynamic image. These user-defined parameters can be generated during the user's editing of the target dynamic image.
[0109] For example, user-defined parameters may include target region parameters and a custom magnification factor. Yet another example shows user-defined parameters including target region parameters and a custom reduction factor.
[0110] The target region parameter represents the target area for custom zooming in or out. The target region is located within the image area of the static image, and is smaller than the image area. Alternatively, the target region is located within a preset area of the target video frame, and is smaller than the preset area. The position of the target region in the static image is the same as its position in the target video frame.
[0111] The custom magnification factor represents the factor used to magnify the target area. The custom reduction factor represents the factor used to reduce the target area. It should be noted that whether to magnify or reduce the target area can be determined according to the user's editing needs, and no further restrictions are imposed here.
[0112] In the application, the terminal can display the target dynamic image and obtain user-defined parameters generated by the user editing the target dynamic image.
[0113] S1204: Acquire the static image of the target dynamic image and each target video frame.
[0114] In the application, the metadata of the target dynamic image can be obtained from the file of the target dynamic image according to the packaging protocol of the target dynamic image. The target offset information and target video length of the target dynamic image can be obtained from the metadata of the target dynamic image. The target dynamic image can be parsed using the target offset information and target video length to obtain a static image and a target video, which includes several target video frames.
[0115] S1206: Preprocess the static images and each target video frame in the target area according to user-defined parameters.
[0116] When user-defined parameters include target area parameters and a custom magnification factor, taking a target video frame with a frame watermark as an example, the target texture coordinates in the target video frame are obtained. Based on the watermark border parameters, it is determined whether the current texture coordinates of each target video frame are within the frame watermark area. If the target texture coordinates of each target video frame are not within the frame watermark area, the current texture coordinates are mapped to the target texture coordinates of the target video frame based on the target area parameters and the custom magnification factor in the user-defined parameters. The texture color of the mapped target texture coordinates is then determined as the texture color of the current texture coordinates to magnify the target area. If the target texture coordinates of each target video frame are within the frame watermark area, the texture color of the target texture coordinates that are identical to the current texture coordinates is determined as the texture color of the current texture coordinates, thus generating a custom video frame. Here, the current texture coordinates refer to the texture coordinates after magnification or reduction.
[0117] It is understandable that the process of preprocessing the static images and each target video frame in the target area according to the user-defined parameters is similar to the aforementioned FOV optimization process for the initial video frame, as detailed in the previous introduction.
[0118] It should be noted that the above explanation uses a target dynamic image with a frame watermark as an example. When the target dynamic image does not have a frame watermark, the static image of the target area and each target video frame can be magnified according to user-defined parameters. This process is similar to the aforementioned FOV optimization process for the initial video frame without a frame watermark. For details, please refer to the relevant introduction above.
[0119] When user-defined parameters include target area parameters and a custom magnification factor, taking a target video frame with a frame watermark as an example, the target texture coordinates in the target video frame are obtained. Based on the watermark border parameters, it is determined whether the current texture coordinates of each target video frame are within the frame watermark area. If the target texture coordinates of each target video frame are not within the frame watermark area, the current texture coordinates are mapped to the target texture coordinates of the target video frame based on the target area parameters and the custom reduction factor in the user-defined parameters. The texture color of the mapped target texture coordinates is then determined as the texture color of the current texture coordinates to reduce the target area. The empty area after reduction can be filled with content using a preset artificial intelligence (AI) completion algorithm. If the target texture coordinates of each target video frame are within the frame watermark area, the texture color of the target texture coordinates that are identical to the current texture coordinates is determined as the texture color of the current texture coordinates, thus generating a custom video frame. Here, the current texture coordinates refer to the texture coordinates after magnification or reduction.
[0120] Similarly, when user-defined parameters include target region parameters and custom scaling factors, taking the absence of these parameters in each target video frame as an example, the target texture coordinates in the target video frame are obtained. Based on the target region parameters and custom scaling factors in the user-defined parameters, the current texture coordinates are mapped to the target texture coordinates of the target video frame. The texture color of the mapped target texture coordinates is then determined as the texture color of the current texture coordinates to scale down the target region. The empty area after scaling down can be filled with content using a preset artificial intelligence (AI) completion algorithm, thereby generating a custom video frame. Here, the current texture coordinates refer to the texture coordinates after scaling up or down.
[0121] It is understandable that the preprocessing process for static images is the same as the preprocessing process for target video frames, so it will not be described again here.
[0122] S1208: Generate a custom dynamic image based on the preprocessed static image and each preprocessed target video frame.
[0123] In the application, the preprocessed target video frames can be arranged in the order of the target video frames to obtain the preprocessed custom video. This custom video is then inserted at the end of the preprocessed static image, forming the metadata of the custom animated image. Next, the preprocessed static image and the custom video are encapsulated according to a packaging protocol to obtain the custom animated image. The offset information and video length of the custom video are written into the metadata of the custom animated image. This allows for accurate location of the custom video using its offset information and length during subsequent parsing, enabling the playback of the custom animated image.
[0124] The image processing method provided in the above embodiments, based on obtaining a target dynamic image after FOV optimization processing of the dynamic image to be processed, acquires user-defined parameters for preprocessing the target dynamic image, and acquires the static image and each target video frame of the target dynamic image. It then preprocesses the static image and each target video frame in the target area according to the user-defined parameters, and generates a custom dynamic image based on the preprocessed static image and each preprocessed target video frame. In other words, it reuses the FOV optimization processing mechanism for the dynamic image to be processed, enabling user-defined editing of the target dynamic image, realizing interaction between the user and the dynamic image, further expanding the image processing scenarios, meeting the image processing needs of different scenarios, and further improving the user experience. Since the preprocessed target area is a local area of the target dynamic image, it can not only achieve local magnification of the dynamic image, thereby emphasizing the display of local content in the frame and achieving FOV reduction optimization for local areas; it can also achieve local reduction of the dynamic image, thereby emphasizing the display of local content in the frame and achieving FOV magnification optimization for local areas.
[0125] In some embodiments, the target area includes a human figure area. This allows for FOV (Field of View) optimization of the human figure area, improving its display in dynamic images.
[0126] In applications, in scenarios where moving portrait images are captured, the focal length is relatively short, resulting in small portraits. FOV (Field of View) optimization can be used to enlarge specific areas of the portrait. This allows for focused magnification of the portrait area within the frame, achieving FOV optimization specifically for that region.
[0127] In other scenarios involving shooting group portraits, people standing closer to the camera appear larger than those further away. FOV (Field of View) optimization can reduce the size of those closer to the camera. This allows for a more focused display of the person's area within the frame, achieving FOV optimization specifically for that area.
[0128] In some embodiments, the image processing method further includes: obtaining user-defined watermark border parameters and updating the frame watermark of the target dynamic image according to the user-defined watermark border parameters, or adding a new frame watermark to the target dynamic image.
[0129] The user-defined watermark border parameter represents the parameters related to editing the frame watermark on the target dynamic image. The user-defined watermark border parameter can be a parameter related to the frame watermark generated during the user's editing process of the target dynamic image.
[0130] If the target dynamic image does not have a frame watermark, user-defined watermark border parameters can be used to add a frame watermark to the target dynamic image. The specific content, position, and corresponding frame watermark area of the newly added frame watermark can be determined according to the user-defined watermark border parameters.
[0131] When the target animated image has a frame watermark, user-defined watermark border parameters can be used to update the frame watermark of the target animated image to meet the user's customized frame watermark requirements. The specific content, position, and corresponding frame watermark area of the updated frame watermark can be determined based on the user-defined watermark border parameters.
[0132] The image processing method provided in the above embodiments, by obtaining user-defined watermark border parameters and updating the frame watermark of the target dynamic image according to the user-defined watermark border parameters, or by adding a new frame watermark to the target dynamic image, realizes the user's custom editing of the frame watermark of the dynamic image, realizes the interaction between the user and the dynamic image, further expands the processing scenarios of dynamic images, improves the flexibility and practicality of processing dynamic images, and helps to further improve the user experience.
[0133] In some embodiments, such as Figure 13 As shown, an image processing method is provided. Taking the application of this method to a dynamic image with a framed watermark as an example, the image processing method includes the following steps S1302 to S1306.
[0134] S1302: Obtain the initial offset information and initial video length of the initial video according to the packaging protocol of the dynamic image to be processed.
[0135] S1304: Based on the initial offset information and initial video length, parse the dynamic image to be processed and obtain the static image and initial video.
[0136] S1306: Obtain adjustment parameters for magnifying the effective area. These adjustment parameters include watermark border parameters and electronic image stabilization parameters.
[0137] S1308: Obtain the initial texture coordinates of the initial video frame.
[0138] S1310: Determine whether the target texture coordinates of each target video frame are within the frame watermark area based on the watermark border parameters.
[0139] S1312: When the target texture coordinates of each target video frame are not in the frame watermark area, the target texture coordinates are mapped to the initial texture coordinates of the initial video frame according to the electronic image stabilization coefficient, and the texture color of the mapped initial texture coordinates is determined as the texture color of the target texture coordinates; when the target texture coordinates of each target video frame are in the frame watermark area, the texture color of the initial texture coordinates that are the same as the target texture coordinates is determined as the texture color of the target texture coordinates.
[0140] S1314: Merge still images and target video frames.
[0141] S1316: Based on the packaging protocol of the dynamic image to be processed, the target offset information of the target dynamic image, and the target video length, encapsulate the merged static image and each target video frame, and obtain the target dynamic image.
[0142] The image processing method provided in the above embodiments optimizes and removes the FOV of blurred edges in video frames during the process of shooting animated images with framed watermarks, such as LivePhotos. This improves the quality of the animated images, allowing users to view better animated images with framed watermarks locally. Furthermore, when sharing to third-party platforms, users can also share animated images with framed watermarks with better results, thereby enhancing the user's social attributes and filling the algorithmic gaps in animated images with framed watermarks.
[0143] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0144] Based on the same inventive concept, this application also provides an image processing apparatus for implementing the image processing method described above. The solution provided by this apparatus is similar to the implementation scheme described in the above method; therefore, the specific limitations in one or more image processing apparatus embodiments provided below can be found in the limitations of the image processing method described above, and will not be repeated here.
[0145] In some embodiments, such as Figure 14As shown, an image processing apparatus 1400 is provided, including: a parsing module 1401, a magnification module 1402, and a packaging module 1403. The parsing module 1401 is used to acquire a static image and an initial video of the dynamic image to be processed; each initial video frame in the initial video includes at least a valid region and a blurred region, the blurred region being located on at least one side of the valid region, and the image clarity of the valid region being higher than that of the blurred region. The magnification module 1402 is used to magnify each initial video frame of the valid region to a preset region, correspondingly generating a target video frame; the position of the total region of the blurred region and the valid region in the initial video frame is the same as the position of the preset region in the target video frame. The packaging module 1403 is used to acquire a target dynamic image based on the static image and each target video frame.
[0146] In some embodiments, the magnification module is further configured to obtain adjustment parameters for magnifying the effective area; magnify each initial video frame of the effective area to a preset area according to the adjustment parameters, and generate a corresponding target video frame.
[0147] In some embodiments, the still image and each initial video frame have a frame watermark; the magnification module is also used to obtain the initial texture coordinates of each initial video frame; determine whether the target texture coordinates of each target video frame are in the frame watermark area according to the watermark border parameters; if the target texture coordinates of each target video frame are not in the frame watermark area, map the target texture coordinates to the initial texture coordinates of the initial video frame according to the electronic image stabilization coefficient, and determine the texture color of the mapped initial texture coordinates as the texture color of the target texture coordinates to generate the target video frame.
[0148] In some embodiments, the magnification module is further configured to, when the target texture coordinates of each target video frame are within the frame watermark area, determine the texture color of the initial texture coordinates that are the same as the target texture coordinates as the texture color of the target texture coordinates, so as to generate the target video frame.
[0149] In some embodiments, the parsing module is further configured to obtain the initial offset information and initial video length of the initial video according to the packaging protocol of the dynamic image to be processed; parse the dynamic image to be processed according to the initial offset information and initial video length, and obtain the static image and the initial video.
[0150] In some embodiments, the encapsulation module is further configured to merge the static image and each target video frame; according to the packaging protocol of the dynamic image to be processed, as well as the target offset information and target video length of the target dynamic image, the merged static image and each target video frame are encapsulated, and the target dynamic image is obtained.
[0151] In some embodiments, the image processing apparatus further includes a first acquisition module and a first processing module. The first acquisition module is configured to acquire user-defined parameters for preprocessing the target dynamic image; the preprocessing includes zooming in or out. The parsing module is further configured to acquire a static image and a target video of the target dynamic image; the target video includes target video frames. The first processing module is configured to preprocess the static image and each target video frame in the target area according to the user-defined parameters. The encapsulation module is further configured to generate a custom dynamic image based on the preprocessed static image and each preprocessed target video frame.
[0152] In some embodiments, the image processing apparatus further includes a second acquisition module and a second processing module. The second acquisition module is used to acquire user-defined watermark border parameters. The second processing module is used to add a new frame watermark to the target dynamic image according to the user-defined watermark border parameters, or to update the frame watermark of the target dynamic image.
[0153] Each module in the aforementioned image processing device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in or independent of the processor in a computer device, or stored in the memory of a computer device as software, so that the processor can call and execute the operations corresponding to each module.
[0154] In some embodiments, an electronic device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 15 As shown, the electronic device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The network interface is used to communicate with external terminals via a network connection. When the computer program is executed by the processor, it implements an image processing apparatus method.
[0155] Those skilled in the art will understand that Figure 15 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0156] In some embodiments, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the aforementioned method.
[0157] In some embodiments, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the steps of the aforementioned method.
[0158] In some embodiments, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps of the aforementioned method.
[0159] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0160] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0161] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0162] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. An image processing method, characterized in that, The method includes: Acquire a static image and an initial video of the dynamic image to be processed; each initial video frame of the initial video includes at least a valid region and a blurred region, the blurred region is located on at least one side of the valid region, and the image clarity of the valid region is higher than that of the blurred region; Each initial video frame of the effective region is magnified to a preset region to generate a corresponding target video frame; the position of the total region of the blurred region and the effective region in the initial video frame is the same as the position of the preset region in the target video frame; Based on the static image and each of the target video frames, obtain the target dynamic image.
2. The method according to claim 1, characterized in that, The step of magnifying each initial video frame of the effective region to a preset region and generating a corresponding target video frame includes: Obtain the adjustment parameters for magnifying the effective region; The initial video frames of the effective region are amplified to the preset region according to the adjustment parameters, and the corresponding target video frames are generated.
3. The method according to claim 2, characterized in that, The adjustment parameters include at least an electronic image stabilization factor, which represents the magnification factor for enlarging the effective area to the preset area, and the electronic image stabilization factor is greater than 1.
4. The method according to claim 3, characterized in that, The dynamic image to be processed is a dynamic image with a frame watermark; the adjustment parameters also include watermark border parameters, which are used to represent the frame watermark area corresponding to the frame watermark, and the frame watermark area is set around the blurred area.
5. The method according to claim 4, characterized in that, The static image and each of the initial video frames have the frame watermark; The step of magnifying each initial video frame of the effective region to a preset region and generating a corresponding target video frame includes: Obtain the initial texture coordinates of each of the initial video frames; Determine whether the target texture coordinates of each target video frame are within the frame watermark area based on the watermark border parameters. If the target texture coordinates of each target video frame are not in the frame watermark area, the target texture coordinates are mapped to the initial texture coordinates of the initial video frame according to the electronic image stabilization coefficient, and the texture color of the mapped initial texture coordinates is determined as the texture color of the target texture coordinates to generate the target video frame.
6. The method according to claim 5, characterized in that, The method further includes: When the target texture coordinates of each target video frame are in the frame watermark area, the texture color of the initial texture coordinates that are the same as the target texture coordinates is determined as the texture color of the target texture coordinates to generate the target video frame.
7. The method according to claim 4, characterized in that, The watermark border parameters include a first border parameter, a second border parameter, a third border parameter, and a fourth border parameter; wherein, the first border parameter and the second border parameter are respectively used to represent the minimum distance between the outer border of the blurred area and the outer border of the frame watermark area in a first direction, and the third border parameter and the fourth border parameter are respectively used to represent the minimum distance between the outer border of the blurred area and the outer border of the frame watermark area in a second direction; the first border parameter, the second border parameter, the third border parameter, and the fourth border parameter are all greater than or equal to 0; the first direction and the second direction intersect.
8. The method according to any one of claims 1-7, characterized in that, The process of acquiring the static image and initial video of the dynamic image to be processed includes: According to the packaging protocol of the dynamic image to be processed, obtain the initial offset information and initial video length of the initial video; The dynamic image to be processed is parsed based on the initial offset information and the initial video length, and the static image and the initial video are obtained.
9. The method according to any one of claims 1-7, characterized in that, The step of obtaining the target dynamic image based on the static image and each of the target video frames includes: Merge the static image and each of the target video frames; Based on the packaging protocol of the dynamic image to be processed, the target offset information and target video length of the target dynamic image, the merged static image and each of the target video frames are encapsulated, and the target dynamic image is obtained.
10. The method according to any one of claims 1-7, characterized in that, The method further includes: Obtain user-defined parameters for preprocessing the target dynamic image; the preprocessing includes zooming in or zooming out. Acquire a static image and a target video of the target dynamic image; the target video includes the target video frames; Preprocessing is performed on the static image and each target video frame in the target area according to the user-defined parameters; Generate a custom dynamic image based on the preprocessed static image and each preprocessed target video frame.
11. The method according to claim 10, characterized in that, The target area includes the human image area.
12. The method according to any one of claims 1-7, characterized in that, The method further includes: Get user-defined watermark border parameters; Add a new frame watermark to the target dynamic image based on the user-defined watermark border parameters, or update the frame watermark of the target dynamic image.
13. An image processing apparatus, characterized in that, The device includes: The parsing module is used to acquire the static image and initial video of the dynamic image to be processed; each initial video frame in the initial video includes at least a valid region and a blurred region, the blurred region is located on at least one side of the valid region, and the image clarity of the valid region is higher than that of the blurred region; The magnification module is used to magnify each of the initial video frames of the effective region to a preset region, and generate a corresponding target video frame; the position of the blurred region and the total region of the effective region in the initial video frame is the same as the position of the preset region in the target video frame; The encapsulation module is used to obtain the target dynamic image based on the static image and each of the target video frames.
14. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 12.
15. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.
16. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 12.