Image processing method and system and computer program product
By extracting target spots in different areas of the image and blurring the image, the problem of automation and poor accuracy of blurring processing in the prior art is solved, and an efficient and unified blurring effect is achieved.
Patent Information
- Application Number
- CN202510177202.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-18
- Publication Date
- 2025-05-16
AI Technical Summary
The prior art is difficult to automate and accurately blur the image, resulting in difficult to unify the blur effect, poor processability, high production cost and low efficiency.
By acquiring the first image containing the rotation focus effect and the second image without the blur effect, the target light spots of different regions in the first image are extracted, and the second image is blurred based on these light spots to generate a corresponding blur image. Then, according to the correspondence between the spot area in the blurred image, the sub-images of the blurred image are stitched to generate a third image.
The automatic blur processing of images is realized, the accuracy and unity of blur effect is improved, the production cost and time are reduced, and efficiency is improved.
Smart Images

Figure CN120013803A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to an image processing method, system and computer program product. Background Art
[0002] Blur processing is an image processing technology that produces a specific blur effect by reducing the details and edge information in the image. For example, the image can be blurred to simulate the effect of rotation. At present, blur processing is generally done by manually adding blur effects to images through image processing software. However, due to different production experience of users, the processed blur effects are difficult to unify in visual presentation and difficult to process. The accuracy of manually adding blur effects is also difficult to guarantee, and the production cost is high and the production efficiency is low.
[0003] In view of this, some embodiments of the present specification provide an image processing method, system and computer program product, which aim to automatically blur images, improve the accuracy of adding blur effects, reduce the production cost of adding blur effects, and improve production efficiency. Summary of the invention
[0004] One or more embodiments of the present specification provide an image processing method, the method comprising: acquiring a first image and a second image, the first image being an image including a rotation focus effect; acquiring target light spots located in different areas of the first image; blurring the second image based on each target light spot to obtain each blurred image, wherein the blurred image corresponds one-to-one to the target light spot; determining a sub-image corresponding to the corresponding area in each blurred image based on an area in the first image corresponding to the target light spot used by each blurred image during its blurring, and splicing the sub-images of each blurred image to obtain a third image.
[0005] According to the method provided by one or more embodiments of the present specification, target light spots located in different areas of a first image are obtained, including: dividing the first image into regions to obtain first divided regions occupying different position areas; obtaining target light spots in each first divided region, wherein the target light spots correspond to the first divided regions one by one.
[0006] According to the method provided by one or more embodiments of the present specification, the target light spot in each first divided area is obtained, including: intercepting a target area containing a light spot picture in each first divided area; and extracting the target light spot in each target area based on brightness information of the target area.
[0007] According to the method provided by one or more embodiments of the present specification, before extracting the target light spot in each target area based on the brightness information of the target area, the method further includes: increasing the brightness information of the target area.
[0008] According to the method provided by one or more embodiments of the present specification, the first image is divided into regions to obtain first divided regions occupying different position regions, including: uniformly dividing the first image to obtain first divided regions occupying different position regions and having the same area.
[0009] According to the method provided in one or more embodiments of the present specification, blurring the second image based on each target light spot to obtain each blurred image, including: blurring the second image based on preset blurring parameters and each target light spot to obtain each blurred image.
[0010] According to the method provided in one or more embodiments of the present specification, blurring the second image based on each target light spot to obtain each blurred image, including: acquiring a depth of field channel map of the second image; blurring the second image based on preset blur parameters, the depth of field channel map and each target light spot to obtain each blurred image.
[0011] According to the method provided in one or more embodiments of the present specification, obtaining a depth of field channel map of a second image includes: processing the second image based on an image processing tool to obtain the depth of field channel map of the second image, wherein the image processing tool is obtained based on training of a sample training set, and the sample training set includes a sample image and a sample depth of field channel map corresponding to the sample image.
[0012] According to the method provided in one or more embodiments of the present specification, the second image is blurred based on preset blur parameters, a depth of field channel map, and each target light spot to obtain each blurred image, including: determining the focus area of the second image based on the depth of field channel map; blurring the second image based on the focus area, preset blur parameters, a depth of field channel map, and each target light spot to obtain each blurred image including a defocus range.
[0013] According to the method provided in one or more embodiments of the present specification, based on the area in the first image corresponding to the target light spot used by each blurred image during blurring, the sub-images corresponding to the corresponding areas in each blurred image are determined, and the sub-images of each blurred image are spliced to obtain a third image, including: based on the correspondence between the target light spot and the first divided areas and the correspondence between the target light spot and the blurred image, determining the second divided areas in each blurred image corresponding to each first divided area; obtaining the sub-images of each blurred image in the second divided areas; and splicing the sub-images of each blurred image in the second divided areas to obtain the third image.
[0014] According to the method provided by one or more embodiments of the present specification, each blurred image is stitched together as a sub-image in the second divided area to obtain a third image, including: stitching together the sub-images in the second divided area of each blurred image, and performing feathering processing on the edge areas of the sub-images to obtain the third image.
[0015] According to the method provided by one or more embodiments of this specification, the first image and the second image have the same size.
[0016] According to the method provided by one or more embodiments of the present specification, the first image is an image frame in a first video, and the second image is an image frame in a second video. The method also includes: obtaining a preset number of third images based on a preset number of first images in the first video and a preset number of second images in the second video, and obtaining a third video based on the preset number of third images.
[0017] One or more embodiments of the present specification also provide an image processing system, the system comprising: an image acquisition module, used to acquire a first image and a second image, the first image being an image including a rotation focus effect; a light spot acquisition module, used to acquire target light spots located in different areas of the first image; a blur processing module, used to blur the second image based on each target light spot, to obtain each blurred image, wherein the blurred image corresponds to the target light spot one-to-one; a stitching module, used to determine, based on the area in the first image corresponding to the target light spot used by each blurred image during its blurring, a sub-image corresponding to the corresponding area in each blurred image, and stitch the sub-images of each blurred image to obtain a third image.
[0018] One or more embodiments of the present specification further provide a computer program product, including a computer program, which can implement the image processing method described in some embodiments of the present specification when at least a portion of the computer program is executed by a processor.
[0019] The beneficial effects that may be brought about by the embodiments of this specification include but are not limited to: (1) by acquiring a first image and a second image, and acquiring target light spots located in different areas of the first image, blurring the second image based on each target light spot to obtain each blurred image, and further, based on the area corresponding to the target light spot used by each blurred image in the blurring process in the first image, determining the sub-image corresponding to the corresponding area in each blurred image, and splicing the sub-images of each blurred image to obtain a third image, thereby automating the blurring process, improving the accuracy of adding blurring effects, reducing the production cost of adding blurring effects, and improving the production efficiency. Efficiency, when the first image includes a rotational focus effect, the obtained third image also includes a rotational focus effect; (2) each blurred image is spliced in the sub-images of the second divided area, and the edge area of the sub-image is feathered, so that the edge area of the sub-image of the second divided area to be spliced is softer, thereby obtaining a more natural and coordinated third image; (3) by blurring the second image based on the depth of field channel map, the defocus range in the blurred image can be determined, and the defocus range in the blurred image can be further customized, thereby more flexibly controlling which parts of the generated third image are displayed as clear images and which parts are displayed as blurred images. It should be noted that different embodiments may produce different beneficial effects. In different embodiments, the beneficial effects that may be produced may be any one or a combination of the above, or any other beneficial effects that may be obtained. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] This specification will be further explained by way of exemplary embodiments, which will be described in detail by way of the accompanying drawings. The same numbers in the drawings represent the same structures or steps.
[0021] Figure 1 It is an exemplary flow chart of an image processing method shown in some embodiments of this specification.
[0022] Figure 2 This is a schematic diagram of a first image shown in some embodiments of this specification.
[0023] Figure 3 This is a schematic diagram of a second image shown in some embodiments of this specification.
[0024] Figure 4 This is a schematic diagram of a first image shown in some embodiments of this specification.
[0025] Figure 5 This is a schematic diagram of a first image shown in some embodiments of this specification.
[0026] Figure 6It is a schematic diagram of a target light spot after stitching according to some embodiments of this specification.
[0027] Figure 7 This is a schematic diagram of a blurred image according to some embodiments of this specification.
[0028] Figure 8-1 This is a schematic diagram of a blurred image according to some embodiments of this specification.
[0029] Figure 8-2 This is a schematic diagram of a blurred image according to some embodiments of this specification.
[0030] Figure 8-3 This is a schematic diagram of a blurred image according to some embodiments of this specification.
[0031] Figure 8-2' This is a schematic diagram of a first spliced image according to some embodiments of this specification.
[0032] Figure 8-3' This is a schematic diagram of a second stitched image according to some embodiments of this specification.
[0033] Fig. 9 It is a schematic diagram of a third image shown in some embodiments of this specification.
[0034] Fig.10 This is an exemplary flow chart of a blurring processing method according to some embodiments of this specification.
[0035] Fig.11 It is a schematic diagram of a third image shown in some embodiments of this specification.
[0036] Fig.12 is an exemplary block diagram of an image processing system according to some embodiments of the present specification. DETAILED DESCRIPTION
[0037] In order to more clearly illustrate the technical solutions of the embodiments of this specification, the embodiments will be described in detail below with reference to the accompanying drawings. Obviously, the contents described below are some examples or embodiments of this specification. For ordinary technicians in this field, without paying creative work, the technical solutions or means disclosed in this specification can also be applied to other scenarios based on these technical contents.
[0038] It should be understood that the "system", "device", "unit" and / or "module" used in this specification is a method for distinguishing different components, elements, parts, portions or assemblies at different levels. However, if other words can achieve the same purpose, the words can be replaced by other expressions.
[0039] Unless otherwise specified, technical terms used in this specification to describe components, elements, etc. do not refer to the singular, but may also include the plural. Generally speaking, terms such as "include", "comprise", etc. only indicate that the steps, elements, or components that have been clearly identified are included, and these steps, elements, and components do not constitute an exclusive list, such as the method or device described may also include other steps or components.
[0040] Flowcharts are used in this specification to illustrate the operation steps performed by the device or system of the relevant embodiments, but unless otherwise specified, the order used to describe these steps should not be understood as a limitation on the order in which the steps are performed. A person of ordinary skill in the art can adjust the order in which these steps are performed based on the knowledge and information conveyed by the embodiments of this specification, and the adjustment includes but is not limited to swapping the order of the order, merging multiple steps, and splitting a certain step.
[0041] Blur processing is an image processing technique that produces a specific blur effect by reducing the details and edge information in the image. For example, the image can be blurred to simulate the focus effect. In some live-action film projects, a focus lens is often used to shoot some movie scenes with a focus effect. After the shooting is completed, some scenes may need to present a focus effect, but the focus lens was not used during the shooting. Therefore, the scene needs to be blurred in post-production to add the focus effect.
[0042] In some embodiments, the image processing software can be used to manually add blur effects to the image. For example, in the post-production stage, the image processing software's masking tools and cutout tools are used to manually perform blur processing to simulate the rotation focus effect. However, due to different production experiences of different users, the processed blur effects are difficult to unify in visual presentation and difficult to process. The accuracy of manually adding blur effects is also difficult to guarantee, and the production cost is high and the production efficiency is low.
[0043] To this end, some embodiments of the present specification propose an image processing method, by acquiring a first image and a second image, and acquiring target light spots located in different areas of the first image, blurring the second image based on each target light spot to obtain each blurred image, wherein the blurred image corresponds to the target light spot one-to-one, and further, based on the area in the first image corresponding to the target light spot used by each blurred image during its blurring, a sub-image corresponding to the corresponding area in each blurred image is determined, and the sub-images of each blurred image are spliced to obtain a third image, thereby automating the blurring process, improving the accuracy of adding blur effects, reducing the production cost of adding blur effects, and improving production efficiency.
[0044] Figure 1It is an exemplary flow chart of an image processing method shown in some embodiments of this specification. Figure 1 The process 100 shown can be executed by a terminal device, for example, it can be implemented by an image processing system 1200 deployed on a computing device. In some embodiments, the computing device can be a desktop computer, a laptop computer, a mobile phone, a VR device, a tablet computer, a gaming device, etc. In some embodiments, the computing device can be a user-end device, or a server-end device or a cloud device. In some embodiments, part of the process 100 can be executed by a computing device as a user end, and another part can be executed by a computing device as a server end. Figure 1 As shown, process 100 may include the following steps.
[0045] Step 110 , acquiring a first image and a second image. In some embodiments, step 110 may be implemented by the image acquisition module 1210 .
[0046] In some embodiments, the first image may be an image including a rotation focus effect. The rotation focus effect refers to the effect that when shooting with a larger aperture, the light spot outside the focus and near the edge of the image is compressed into an elliptical image. It was originally caused by defects in the optical structure design, and later became widely loved for its strong artistic effect and high recognition. In an image with a rotation focus effect, the closer the light spot shape is to the center of the image, the closer it is to a circle, and the closer the light spot shape is to the edge of the image, the closer it is to an ellipse. The light spots in the image together form a ring-shaped blur effect, and the closer the area is to the edge of the image, the more obvious the ring-shaped blur effect is.
[0047] In some embodiments, the first image may be a real image material, for example, the first image may be obtained by shooting with a rotary focus lens. Among them, the rotary focus lens is an optical lens that can continuously change the focal length within a certain range to achieve shooting from different angles. The rotary focus lens usually has a larger aperture (such as f / 2.8, f / 4, etc.), and an image or video with a rotary focus effect can be captured by adjusting the aperture, focal length and other parameters of the rotary focus lens. In other embodiments, the first image may also be a computer-generated image containing a rotary focus effect. For example, a synthetic image containing a rotary focus effect can be generated by a computer to simulate a real image obtained by shooting with a rotary focus lens.
[0048] Figure 2 is a schematic diagram of a first image according to some embodiments of this specification. Figure 2 As shown, the first image may be an image including a rotational focus effect taken by a rotational focus lens. Figure 2 The closer the spot shape in the center area is to a circle, the closer Figure 2The closer the spot shape of the edge area is to an ellipse, and the spots in the image together form a ring-shaped blur effect, the closer the area is to the edge of the image, the more obvious the ring-shaped blur effect is. Figure 2 The enlarged image indicated by the middle finger connecting line shows that Figure 2 The arrangement direction of the light spots in the upper left dotted frame and the light spots in the lower right dotted frame is roughly inclined from the lower left to the upper right. Figure 2 The arrangement direction of the light spots on the upper right and lower left is roughly inclined from the upper left to the lower right. In addition, Figure 2 The arrangement direction of the light spots in the upper middle area and the lower middle area is roughly horizontal. Figure 2 The arrangement direction of the light spots in the left middle area and the right middle area is roughly vertical, so that the light spots in each position area together form a ring-shaped blur effect. It should be understood that Figure 2 The dashed boxes and pointing lines in the figure are only identifiers to assist understanding, to clarify the marked area and the enlarged image indicating the marked area, and should not be understood as part of the first image. There are dashed lines and / or pointing lines with similar functions in the subsequent schematic diagrams, and their functions are similar to this, and will not be repeated in the subsequent description.
[0049] In some embodiments, the second image may be a real image material, for example, the second image may be an image shot through a lens with a relatively small aperture, and the shot image screen does not include a blur effect. In other embodiments, the second image may also be a computer-generated image, for example, a special effect image generated by 3D animation software that does not include a blur effect. Figure 3 is a schematic diagram of a second image according to some embodiments of this specification, such as Figure 3 As shown, the second image may be an image material that is actually shot and does not contain a blur effect.
[0050] Step 120 , acquiring target light spots located in different areas of the first image. In some embodiments, step 120 may be implemented by a light spot acquisition module 1220 .
[0051] In some embodiments, when the first image includes a rotation focus effect, the shapes and arrangement directions of the light spots in different position areas are different, and target light spots in different position areas can be acquired to obtain target light spots with different shapes and different arrangement directions. Figure 4 is a schematic diagram of a first image according to some embodiments of this specification, such as Figure 4As shown in the target light spots circled by the dotted frame, nine target light spots can be obtained, namely, the upper left corner area, the left middle area, the lower left corner area, the upper middle area, the center area, the lower middle area, the upper right corner area, the right middle area and the lower right corner area in the first image. The number of target light spots obtained can be flexibly adjusted, for example, only four target light spots located in the four corner areas of the first image can be obtained, which is not specifically limited here.
[0052] In some embodiments, target light spots located in different areas of the first image can be obtained according to the user's operation of extracting the target light spot. For example, the user can use the capture tool to capture the target area containing the light spot picture in the first image, adjust the brightness information of the target area, and extract the light spot pattern in the target area according to a preset brightness threshold, thereby removing the background in the target area and obtaining an image with only the light spot pattern retained as the target light spot.
[0053] In other embodiments, the first image may be divided into regions to obtain first divided regions occupying different position areas, and further, the target light spot in each first divided region is obtained. The following specifically describes how to divide the first image into regions and how to obtain the target light spot in the first divided region.
[0054] In some embodiments, when the first image includes a rotation focus effect, the shapes and arrangement directions of the light spots in different position areas are different. The first image can be divided into multiple first divided areas, and the target light spots in each first divided area can have different shapes and different arrangement directions. Figure 5 is a schematic diagram of a first image according to some embodiments of this specification, such as Figure 5 As shown, you can follow Figure 5 The first image is divided into regions by the “well”-shaped dotted lines in the figure to obtain nine first divided regions 51, 52, 53, 54, 55, 56, 57, 58, and 59.
[0055] In some embodiments, the first image may be evenly divided to obtain first divided regions occupying different position regions and having the same area. Figure 5 As shown, you can follow Figure 5 The “well”-shaped dotted lines in the figure evenly divide the first image into nine first divided areas 51, 52, 53, 54, 55, 56, 57, 58, and 59 of the same shape and area. Assuming that the size of the first image is 3840*2160, the size of each first divided area is 1280*720.
[0056] In some embodiments, after obtaining the first divided areas occupying different position areas, the target area containing the light spot image can be further intercepted in each first divided area. Figure 5 As shown, the user can use the capture tool to capture the target area 50 containing the light spot picture in the first divided area 51, and similarly, capture the other eight target areas containing the light spot pictures in the first divided area 52 to the first divided area 59.
[0057] In some embodiments, after intercepting the target area containing the light spot image, the target light spot can be further extracted in each target area based on the brightness information of the target area. Exemplarily, for the target area 50 in the first divided area 51, the brightness information of the image of the target area 50 can be used as the transparency channel of the image through a color processing tool (such as the keyer in nuke), for example, the image of the target area 50 is connected to the input end of the keyer, the input port is set to the RGB channel in the configuration information of the keyer, and the output port is set to RGBA.alpha, so as to output an image containing a transparency channel, and the operation type operation port is set to luminance key, indicating that the pixels are extracted based on the brightness value of the image. Furthermore, the range corresponding to the brightness information can be set in the configuration information of the keyer, so as to determine the transparency of the image of the target area 50 based on the range corresponding to the brightness information. After setting the parameters, the keyer can extract the pixels in the image of the target area 50 based on the range corresponding to the brightness information, and output the image containing the transparency channel. Furthermore, the image containing the transparency channel can be added to the Premult node in nuke, and the transparency value of the image is multiplied by the color value of the image of the target area 50 through the Premult node, and the color value of the pixel area with a transparency value of 0 is removed, thereby removing the background in the target area 50 and obtaining an image that only retains the spot pattern as the target spot. Similarly, the target areas in the first divided area 52 to the first divided area 59 are processed similarly according to the processing method for the target area 50, and the target spots in the first divided area 52 to the first divided area 59 are obtained, and each extracted target spot corresponds to each first divided area one by one.
[0058] In some embodiments, the obtained target light spots may be spliced together. For example, the target light spots in the first divided areas may be spliced together based on the positional relationship of the first divided areas. Figure 6 is a schematic diagram of a target light spot after splicing according to some embodiments of this specification, such as Figure 6As shown, the target light spot 61 is the target light spot obtained from the first divided area 51. Similarly, the target light spots 62 to 69 are the target light spots obtained from the first divided area 52 to the first divided area 59, respectively. The target light spots 61 to 69 can be arranged and spliced in the order of the first divided area 51 to the first divided area 59 to obtain the following: Figure 6 In the image shown in FIG. 1 , when blurring the second image based on each target light spot, the sub-images to be spliced in the blurred image can be determined according to the positions of each target light spot in the spliced image. In some embodiments, the image obtained after the target light spots are spliced (e.g. Figure 6 ) can be consistent with the resolution of the first image. For example, if the resolution of the first image is 3840*2160, the image obtained after the target spot is spliced (such as Figure 6 ) is also 3840*2160 so as to correspond to the positions of the first divided areas in the first image.
[0059] Step 130 , blurring the second image based on each target light spot to obtain each blurred image. In some embodiments, step 130 may be implemented by blurring processing module 1230 .
[0060] In some embodiments, when the second image is blurred, the target light spot is used to indicate the shape and arrangement direction of the light spot in the blurred image. For example, when the shape of the target light spot is circular, the shape of the light spot in the obtained blurred image is also circular; when the shape of the target light spot is elliptical and the arrangement direction is roughly inclined from the lower left to the upper right, the shape of the light spot in the obtained blurred image is also elliptical and the arrangement direction is also inclined from the lower left to the upper right.
[0061] In some embodiments, the second image can be blurred based on preset blur parameters and each target light spot to obtain each blurred image. The preset blur parameters are used to characterize the degree and range of blurring the second image, and can be adjustable parameters open to user-defined settings. Exemplarily, the second image can be blurred by calling a defocus blur tool (such as zdefocus or PXF-zdefocus used in nuke, Firschluft Lenscare used in after effects, etc.). For example, the second image can be connected as one of the inputs to the image port of the zdefocus node, and the target light spot (such as Figure 6The target light spot 61 in the second image is connected to the filter port of the zdefocus node as another input. The preset blur parameters can be further set in the configuration information of the zdefocus node. The preset blur parameters can include, for example, a size parameter and a maximum parameter, wherein the size parameter can adjust the range of the blur effect, and the maximum parameter can adjust the maximum intensity of the blur effect. The target light spot is distributed and displayed in the second image according to the pixel information in the second image and the shape and arrangement direction of the target light spot by calling the zdefocus node, and the second image with the target light spot distributed and displayed is blurred based on the setting of the preset blur parameters to obtain a blurred image.
[0062] In some embodiments, the number of blurred images and the target light spots correspond one to one. Exemplarily, the number of blurred images can be the same as the number of target light spots and correspond one to one. Figure 6 When the nine target light spots described in the embodiment perform blurring processing on the second image, nine corresponding blurred images can be obtained, and the nine target light spots correspond to the nine blurred images one by one.
[0063] Figure 7 is a schematic diagram of a blurred image according to some embodiments of this specification. For example, it can be based on Figure 6 The target spot 61 shown in FIG. 6 and the preset blur parameters are used to blur the second image, and the image is obtained as shown in FIG. Figure 7 The blurred image shown, Figure 7 As shown, in the blurred image generated based on the target light spot 61, the shape and arrangement direction of the light spot (such as Figure 7 The shape and arrangement direction of the target light spot 61 are roughly the same. Figure 6 The second image is blurred based on the target light spots 62 to 69 in the image and the preset blur parameters to obtain blurred images corresponding to the target light spots. The shape and arrangement direction of the light spots in each blurred image are substantially the same as the shape and arrangement direction of the target light spots used in the blurring process. In some embodiments, when blurring the second image based on the target light spots and the preset blur parameters, the preset blur parameters may be the same parameter value so that the blurring degree and range in the obtained blurred images are consistent, thereby ensuring the coordination of the stitched images when the images are stitched together later.
[0064] Step 140, based on the area in the first image corresponding to the target light spot used by each blurred image during blurring, determine the sub-images corresponding to the corresponding area in each blurred image, and stitch the sub-images of each blurred image to obtain a third image. In some embodiments, step 140 can be implemented by the stitching module 1240.
[0065] In some embodiments, the blurred images can be regionally divided based on the regions of the target light spots in the first image used during the blurring process. Exemplarily, when the target light spots are located in the four corner regions of the first image, the blurred image can be divided into four second divided regions corresponding to the four corner regions. For example, the blurred image can be regionally divided according to a division method similar to a "field" shape. Assuming the size of the blurred image is 3840*2160, after being divided into four second divided regions, the size of each second divided region is 1920*1080.
[0066] In some embodiments, when the first image is divided into several first divided regions, the second divided regions corresponding to each first divided region in each blurred image can also be determined based on the correspondence between the target light spots and the first divided regions and the correspondence between the target light spots and the blurred images. Among them, each target light spot is obtained from each first divided region, so each target light spot corresponds one-to-one with each first divided region in the first image; each blurred image is obtained by blurring the second image based on the target light spots in each first divided region, so each blurred image corresponds one-to-one with each target light spot. Exemplarily, the first image can be divided into several first divided regions according to a certain regional division method, and the blurred images can be regionally divided according to the regional division method of the first image. Further, based on the correspondence between the target light spots and the first divided regions and the correspondence between the target light spots and the blurred images, the second divided regions corresponding to each first divided region in the first image in each blurred image are determined. That is, according to the first divided region corresponding to each target light spot in the first image, the second divided regions corresponding to each target light spot in each blurred image are determined, where the second divided regions in each blurred image correspond one-to-one with the first divided regions of the corresponding target light spots of each blurred image in the first image.
[0067] Figure 8-1 is a schematic diagram of a blurred image shown in some embodiments of this specification. This blurred image is obtained by blurring the second image based on the target light spot 61. Exemplarily, when the first image is divided into nine first divided regions according to the "grid" dotted line in Figure 5 , the blurred image shown in Figure 8-1 can also be regionally divided according to the "grid" dotted line to obtain nine regions. Among them, the target light spot 61 corresponds to the first divided region 51, and the target light spot 61 corresponds to the blurred image 8-1. The second divided region 81 corresponding to the first divided region 51 in the blurred image 8-1 can be determined based on the correspondence between the target light spot 61 and the first divided region 51 and the correspondence between the target light spot 61 and the blurred image 8-1.
[0068] Figure 8-2is a schematic diagram of a blurred image according to some embodiments of the present specification, wherein the blurred image is obtained by blurring the second image based on the target light spot 62. For example, when the blurred image is obtained according to Figure 5 When the first image is divided into nine first divided areas by the "well"-shaped dotted lines in Figure 8-2 The blurred image shown is also divided into nine regions according to the "well"-shaped dotted lines. Among them, the target light spot 62 corresponds to the first divided region 52, and the target light spot 62 corresponds to the blurred image 8-2. Based on the corresponding relationship between the target light spot 62 and the first divided region 52 and the corresponding relationship between the target light spot 62 and the blurred image 8-2, the second divided region 82 corresponding to the first divided region 52 in the blurred image 8-2 can be determined.
[0069] Figure 8-3 is a schematic diagram of a blurred image according to some embodiments of this specification, wherein the blurred image is obtained by blurring the second image based on the target light spot 63. For example, when the blurred image is obtained according to Figure 5 When the first image is divided into nine first divided areas by the "well"-shaped dotted lines in Figure 8-3 The blurred image shown is also divided into nine regions according to the "well"-shaped dotted lines. Among them, the target light spot 63 corresponds to the first divided region 53, and the target light spot 63 corresponds to the blurred image 8-3. Based on the corresponding relationship between the target light spot 63 and the first divided region 53 and the corresponding relationship between the target light spot 63 and the blurred image 8-3, the second divided region 83 corresponding to the first divided region 53 in the blurred image 8-3 can be determined.
[0070] For the blurred image obtained by blurring the second image based on other target light spots (such as target light spots 64 to 69), the second divided areas in each other blurred image can be determined according to the above-mentioned method of determining the second divided area 81, the second divided area 82 or the second divided area 83, and the second divided areas in each blurred image correspond one-to-one to each first divided area in the first image.
[0071] In some embodiments, the second divided area in each blurred image can be determined by calling an image cropping tool (such as the crop node in nuke). For example, a coordinate system can be established based on the size of the blurred image, and the vertex coordinates of the second divided area in each blurred image can be determined. The crop node can determine the cropping area based on the coordinates of each vertex, and then determine the second divided area in the blurred image.
[0072] In some embodiments, after determining the second divided area corresponding to each first divided area in each blurred image, a sub-image of each blurred image in the second divided area may be further obtained. The sub-image may be an image within the second divided area of each blurred image. Figure 8-1 The second divided area 81 shown in FIG. 1 may be a sub-image 81′. Figure 8-2 The second divided area 82 shown in FIG. 1 may be a sub-image 82′. Figure 8-3 In the second divided area 83 shown, the sub-image of the second divided area may be a sub-image 83'.
[0073] In some embodiments, after obtaining the sub-images of each blurred image in the second divided area, the sub-images of each blurred image in the second divided area can be further stitched together to obtain a third image. Exemplarily, the sub-images can be stitched together by calling an image stitching tool (such as Keymix in nuke). The Keymix node can include an A input terminal, a B input terminal, and a Mask channel input terminal, wherein the image input to the B input terminal can be used as a base image, the image input to the A input terminal can be an image to be inserted into the B input terminal image, and the Mask channel input terminal can define a mask area for representing the sub-image in the A input terminal image to be inserted into the B input terminal image. For example, Figure 8-1 Connect the blurred image shown to the B input of Keymix. Figure 8-2 Connect the blurred image shown in the figure to the A input of Keymix, and connect the crop node to the Figure 8-2 The second divided area of the blurred image shown is connected as a Mask channel to the Mask channel input of Keymix. Figure 8-2 The sub-image of the second divided area of the blurred image is inserted into Figure 8-1 In the blurred image shown in the figure, the first spliced image is obtained after splicing, so as to realize Figure 8-1 The sub-image of the second divided area in the blurred image shown is Figure 8-2 The sub-images of the second divided area in the blurred image are stitched together. Figure 8-2' is a schematic diagram of a first spliced image according to some embodiments of this specification, for example, Figure 8-2' As shown, the blurred image obtained based on the target light spot 61 Figure 8-1 Can be used as a base map to blur the image Figure 8-1 The sub-image 81' (i.e., the blurred image obtained based on the target light spot 61) Figure 8-1 Sub-image 82′ (i.e., a blurred image obtained based on the target light spot 62) Figure 8-2The sub-image of the second divided area 82 in the image) can be inserted into the blurred image through the Keymix node Figure 8-1 Thus, we can obtain Figure 8-2' Next, create a new Keymix node and add the first stitched image (as shown above) Figure 8-2' ) is connected to the B input terminal of the new Keymix node, and the blurred image (as shown in the above) obtained by blurring the second image based on the target light spot 63 is obtained. Figure 8-3 ) to the A input of the new Keymix node, and pass the blurred image obtained by the crop node Figure 8-3 The second divided area is connected as the Mask channel to the Mask channel input of the new Keymix node. The blurred image is then Figure 8-3 The sub-image of the second divided area is inserted into Figure 8-2' The third stitched image is obtained from the stitched images of Figure 8-1 The sub-image of the second divided area in the blurred image shown, Figure 8-2 The sub-image of the second divided area in the blurred image and the blurred image Figure 8-3 The stitching of sub-images of the second divided area in . Figure 8-3' is a schematic diagram of a second stitched image according to some embodiments of this specification, for example, Figure 8-3' As shown, the first stitched image Figure 8-2' Can be used as base map, first stitched image Figure 8-2' The sub-image 81' (i.e., the blurred image obtained based on the target light spot 61) Figure 8-1 ), and the sub-image 82′ (i.e., the blurred image obtained based on the target light spot 62). Figure 8-2 Sub-image 83′ (i.e., a blurred image obtained based on the target light spot 63) Figure 8-3 The sub-image of the second divided area 83 in the first stitched image can be inserted into the first stitched image through the Keymix node Figure 8-2' Thus, we can obtain Figure 8-3' Similarly, new Keymix nodes are continuously created to insert sub-images of the second divided areas in other blurred images based on the stitched image, until the sub-images of the second divided areas in all blurred images are stitched together to obtain the final third image.
[0074] Directly stitching the sub-images of the second divided area with each blurred image may cause the problem of incoordination at the stitching point. Therefore, in some embodiments, each blurred image may also be stitched with the sub-images of the second divided area, and the edge area of the sub-image may be feathered to obtain a third image. Wherein, feathering refers to smoothing the splicing edge in image processing, so that the edge of the splicing area gradually transitions to transparency or transitions to the color of the spliced image. The feathering process can create a smooth transition effect, so that the synthesized or spliced image is more natural visually. Exemplarily, the edge area of the sub-image of the second divided area can be feathered by a feathering tool. For example, for the second divided area of the blurred image obtained by the crop node, the second divided area can be expanded by the Filter Erode node in nuke, and the expanded area can be feathered by the blur node in nuke, and the output end of the blur node is connected to the Mask channel input end of the Keymix node, so that the sub-images after feathering can be spliced, so that the edge area of the sub-images of the second divided area to be spliced is softer, thereby obtaining a more natural and coordinated third image.
[0075] Fig. 9 is a schematic diagram of a third image according to some embodiments of this specification, such as Fig. 9 As shown, the third image is obtained by splicing and feathering multiple sub-images, wherein the sub-image 81' comes from the blurred image obtained based on the target light spot 61 (such as Figure 8-1 ), the sub-image 82' comes from the blurred image obtained based on the target light spot 62 (such as Figure 8-2 ), the sub-image 83' comes from the blurred image obtained based on the target light spot 63 (such as Figure 8-3 ), similarly, sub-images 84 ′ to 89 ′ are respectively derived from blurred images obtained based on target light spots 64 to 69 .
[0076] In some embodiments, the first image may be an image frame in a first video, and the second image may be an image frame in a second video. For example, the first video may include a preset number of first images, and the preset number of first images (also called frame sequences or image sequences) are continuous and arranged in chronological order; the second video may include a preset number of second images, and the preset number of second images (also called frame sequences or image sequences) are continuous and arranged in chronological order.
[0077] In some embodiments, a preset number of third images can be obtained based on a preset number of first images in the first video and a preset number of second images in the second video, and a third video can be obtained based on a preset number of third images. Exemplarily, the first images in the first video can correspond one-to-one to the second images in the second video, and for each first image in the first video and each second image in the second video, the third image can be processed according to the image processing method provided in some embodiments of this specification to obtain a third image, and the preset number of third images can be processed in a time sequence corresponding to the first image (or the second image) to obtain a third video, thereby automatically blurring the video, improving the accuracy of adding blurring effects, reducing the production cost of adding blurring effects, and improving production efficiency.
[0078] In some embodiments, the image processing method can be applied to visual effects synthesis software (such as nuke) in the form of a plug-in, and the plug-in can call tools or nodes in the visual effects synthesis software to perform image processing.
[0079] When blurring the second image based on the target light spot, blurring may be further performed in combination with the depth of field channel map of the second image. Fig.10 is an exemplary flow chart of a blurring processing method according to some embodiments of this specification. In some embodiments, Fig.10 The process 1000 shown may be executed by a computing device, for example, may be implemented by an image processing system 1200 deployed on the computing device. In some embodiments, the process 1000 may be another processing method for step 130 in the process 100. Fig.10 As shown, process 1000 may include the following steps.
[0080] Step 1010 , obtaining a depth channel map of the second image. In some embodiments, step 1010 may be implemented by the depth channel map obtaining module 1250 .
[0081] The depth channel map is a channel map used to represent different depth information in an image. It usually uses a grayscale image to represent the distance information between the object and the camera in the image scene. Usually, closer objects appear as brighter areas in the depth channel map, while farther objects appear as darker areas in the depth channel map.
[0082] In some embodiments, a preset depth channel map corresponding to the second image can be directly obtained. In other embodiments, when the second image does not have a corresponding preset depth channel map, the second image can be processed based on an image processing tool to obtain a depth channel map of the second image. Among them, the image processing tool can be, for example, copycat in nuke, or Depth Scanner in Adobe After Effects, etc. The image processing tool can be obtained based on the sample training set training, and the sample training set can include a sample image and a sample depth channel map corresponding to the sample image. Exemplarily, the sample image and the sample depth channel map corresponding to the sample image can be connected to the copycat node, and the training parameters can be set, for example, the number of training steps, the number of samples, the loss function, etc., and the performance indicators of the model (such as loss value, accuracy, etc.) can be monitored during the training process to adjust the training parameters according to the situation, and the trained AI model is obtained after the training is completed. The second image can be input into the AI model to obtain the depth channel map of the second image.
[0083] Step 1020 , blurring the second image based on the preset blurring parameters, the depth of field channel map and each target light spot to obtain each blurred image. In some embodiments, step 1020 may be implemented by blurring processing module 1230 .
[0084] In some embodiments, preset blur parameters are used to characterize the degree and range of blurring of the second image, which may be adjustable parameters open to user-defined settings. The depth of field channel map is used to determine which parts of the blurred image remain clear images and which parts are processed as blurred images, and to achieve a smooth transition between clear images and blurred images. Exemplarily, a depth layer may be created for the second image based on the depth of field channel map, and the color information of the depth layer is the same as the color information of the depth of field channel map. Furthermore, the second image is blurred by calling a defocus blur tool (such as zdefocus or PXF-zdefocus used in nuke, Firschluft Lenscare used in after effects, etc.). For example, the second image may be connected as one of the inputs to the image port of the zdefocus node, and the target spot (such as Figure 6The target light spot 61 in the image is connected to the filter port of the zdefocus node as another input. The depth channel and the preset blur parameters can be further configured in the configuration information of the zdefocus node. The depth channel can be configured as a depth Z channel (depth.z), which is used to indicate that the second image is blurred using the depth layer of the second image. The preset blur parameters may include, for example, a size parameter and a maximum parameter, wherein the size parameter can adjust the range of the blur effect, and the maximum parameter can adjust the maximum intensity of the blur effect. The target light spot is distributed and displayed in the second image according to the pixel information in the second image and the shape and arrangement direction of the target light spot by calling the zdefocus node, and the second image with the target light spot distributed and displayed is blurred based on the setting of the preset blur parameters and the depth layer of the second image to obtain a blurred image.
[0085] In some embodiments, when blurring the second image, the focus area of the second image can be determined based on the depth of field channel map, and the second image can be blurred based on the focus area, preset blur parameters, the depth of field channel map, and each target light spot to obtain each blurred image including a defocus range. The focus area is used to determine the defocus range in the generated defocused image. Exemplarily, when calling the zdefocus node to blur the second image, the second image can be connected as one of the inputs to the image port of the zdefocus node according to the method of the above embodiment, and the target light spot (such as Figure 6The target light spot 61 in the second image is connected to the filter port of the zdefocus node as another input. The depth channel and the preset blur parameters can be further configured in the configuration information of the zdefocus node. The zdefocus node displays the target light spot distribution in the second image according to the pixel information in the second image and the shape and arrangement direction of the target light spot, and blurs the second image with the target light spot distributed based on the setting of the preset blur parameters and the depth layer of the second image. In addition, the zdefocus node also determines the distance information of each pixel from the camera based on the color of each pixel in the depth of field channel map and determines the focus area of the second image based on the distance information, and determines the defocus range of the defocused image based on the focus area when generating the defocused image, thereby determining which parts of the defocused image are displayed as clear images and which parts are displayed as blurred images. In some embodiments, the focus area of the second image can also be adjusted according to the specified focus point. For example, when configuring the configuration information of the zdefocus node, the user can specify the focus point in the second image, and the computing device redetermines the focus area of the second image based on the specified focus point through the zdefocus node, and when generating a blurred image, determines the defocus range of the blurred image based on the specified focus area, thereby obtaining a blurred image including the defocus range.
[0086] In some embodiments, the second image can be blurred based on the same preset blur parameters, the same depth of field channel map, and target light spots in different areas of the first image, so as to obtain blurred images. The defocus range in each blurred image can be the same, but the shape and arrangement direction of the target light spots can be different.
[0087] For more information about this step, please refer to the description of step 140 above, which will not be repeated here.
[0088] In some embodiments, after step 1020, step 140 in process 100 may be further executed to obtain a third image with a defocused range. For the specific description of step 140, reference may be made to the above description, which will not be repeated here. Fig.11 This is a schematic diagram of a third image shown in some embodiments of the present specification. For example, when the focus points of each blurred image are set at the grass area below, the close view (such as the grass area) in the obtained third image presents a clear image, while the middle and distant views are within the blurred focus range and present a natural rotation focus effect.
[0089] By blurring the second image based on the depth of field channel map, the defocus range in the blurred image can be determined, and the defocus range in the blurred image can be further customized, thereby more flexibly controlling which parts of the generated third image are displayed as clear images and which parts are displayed as blurred images.
[0090] This specification also provides an image processing system. Fig.12 is an exemplary block diagram of an image processing system according to some embodiments of this specification. Fig.12 As shown, in some embodiments, the image processing system 1200 may include an image acquisition module 1210 , a light spot acquisition module 1220 , a blur processing module 1230 , and a stitching module 1240 .
[0091] The image acquisition module 1210 is used to acquire a first image and a second image, where the first image is an image including a rotation focus effect.
[0092] The light spot acquisition module 1220 is used to acquire target light spots located in different areas of the first image.
[0093] The blur processing module 1230 is used to perform blur processing on the second image based on each target light spot to obtain each blurred image, wherein the blurred images correspond to the target light spots one by one.
[0094] The stitching module 1240 is used to determine the sub-image corresponding to the corresponding area in each blurred image based on the area in the first image corresponding to the target light spot used in the blurring process of each blurred image, and stitch the sub-images of each blurred image to obtain a third image.
[0095] In some optional embodiments, the light spot acquisition module 1220 can also be used to divide the first image into regions to obtain first divided regions occupying different position areas; obtain the target light spot in each first divided region, and the target light spot corresponds to the first divided region one by one.
[0096] In some optional embodiments, the light spot acquisition module 1220 may also be used to intercept a target area containing a light spot image in each first divided area; and extract a target light spot in each target area based on brightness information of the target area.
[0097] In some optional embodiments, the light spot acquisition module 1220 may also be used to increase the brightness information of the target area before extracting the target light spot in each target area based on the brightness information of the target area.
[0098] In some optional embodiments, the light spot acquisition module 1220 may also be used to evenly divide the first image to obtain first divided regions occupying different position regions and having the same area.
[0099] In some optional embodiments, the blur processing module 1230 may also be used to perform blur processing on the second image based on preset blur parameters and each target light spot to obtain each blurred image.
[0100] In some optional embodiments, the image processing system 1200 may further include a depth of field channel map acquisition module 1250 for acquiring a depth of field channel map of the second image; the blur processing module 1230 may further be used to blur the second image based on preset blur parameters, the depth of field channel map and each target light spot to obtain each blurred image.
[0101] In some optional embodiments, the depth of field channel map acquisition module 1250 can also be used to process the second image based on an image processing tool to obtain a depth of field channel map of the second image, wherein the image processing tool is obtained based on training of a sample training set, and the sample training set includes a sample image and a sample depth of field channel map corresponding to the sample image.
[0102] In some optional embodiments, the blur processing module 1230 can also be used to determine the focus area of the second image based on the depth of field channel map; blur the second image based on the focus area, preset blur parameters, the depth of field channel map and each target light spot to obtain each blurred image including the defocus range.
[0103] In some optional embodiments, the stitching module 1240 can also be used to determine the second divided area corresponding to each first divided area in each blurred image based on the correspondence between the target light spot and the first divided area and the correspondence between the target light spot and the blurred image; obtain the sub-image of each blurred image in the second divided area; and stitch the sub-images of each blurred image in the second divided area to obtain a third image.
[0104] In some optional embodiments, the stitching module 1240 may also be used to stitch the sub-images of each blurred image in the second divided area, and perform feathering processing on the edge areas of the sub-images to obtain a third image.
[0105] In some optional embodiments, the first image is an image frame in a first video, and the second image is an image frame in a second video. The image processing system 1200 may also include a video acquisition module 1260 for obtaining a preset number of third images based on a preset number of first images in the first video and a preset number of second images in the second video, and obtaining a third video based on the preset number of third images.
[0106] For more information about each module, see Figures 1 to 11 The relevant description of will not be repeated here. It should be understood that Fig.12The system and its modules shown can be implemented in various ways. For example, in some embodiments, the system and its modules can be implemented by hardware, software, or a combination of software and hardware. Among them, the hardware part can be implemented using dedicated logic; the software part can be stored in a memory and executed by an appropriate instruction execution system, such as a microprocessor or dedicated design hardware. Those skilled in the art will understand that the above methods and systems can be implemented using computer executable instructions and / or control codes contained in a processor, such as a disk, CD or DVD-ROM, etc., and such codes are provided in a carrier medium or a memory of a programmable device. The system and its modules of this specification can not only be implemented by hardware circuits such as ultra-large-scale integrated circuits or gate arrays, semiconductors such as logic chips, transistors, etc., or programmable hardware devices such as field programmable gate arrays, programmable logic devices, etc., but can also be implemented by software executed by various types of processors, and can also be implemented by a combination of the above hardware circuits and software (e.g., firmware).
[0107] It should be noted that the above description of the system and its modules is only for convenience of description and does not limit this specification to the scope of the embodiments. It is understandable that for those skilled in the art, after understanding the principle of the system, it is possible to arbitrarily combine the modules without deviating from this principle to form a subsystem connected to other modules. Or some modules may be split to obtain more modules or multiple units under the module. Such variations are all within the scope of the disclosure of this specification.
[0108] Some embodiments of the present specification also provide a computer program product, including computer instructions. When at least part of the computer instructions are executed by a processor, the present specification can be implemented. Figures 1 to 11 In some embodiments, the computer program product may only involve computer instructions, which may be carried by a storage medium or a processing device. In other embodiments, the computer program product may also be a storage medium or a processing device containing the aforementioned computer instructions. The processing device may include one or more processors and a storage medium.
[0109] In some embodiments, the processor may be a combination of one or more of the following processors: a central processing unit (CPU), an application specific integrated circuit (ASIC), an application specific instruction set processor (ASIP), a graphics processing unit (GPU), a physical processing unit (PPU), a digital signal processor (DSP), a field programmable gate array (FPGA), a programmable logic device (PLD), a programmable logic controller (PLC), a reduced instruction set computer (RISC), and a microprocessor.
[0110] In some embodiments, the storage medium may include a combination of one or more of the following: a mass storage, a removable storage, a volatile read-write memory, and a read-only memory (ROM). Exemplary mass storage may include a magnetic disk, an optical disk, a solid-state hard disk, and the like. Exemplary removable storage may include a flash disk, a floppy disk, an optical disk, a memory card, a compressed hard disk, a magnetic tape, and the like. Exemplary volatile read-write memory may include a random access memory (RAM). Exemplary random access memory may include a dynamic random access memory (DRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), a static random access memory (SRAM), a thyristor random access memory (T-RAM), and a zero capacitance memory (Z-RAM), and the like. Exemplary read-only memory may include a masked read-only memory (MROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a compact disk read-only memory (CD-ROM), and a digital multifunction hard disk read-only memory, and the like.
[0111] The basic concepts have been described above. Obviously, for those skilled in the art, the above detailed disclosure is only for example and does not constitute a limitation of this specification. Although not explicitly stated here, those skilled in the art may make various modifications, improvements and corrections to this specification. Such modifications, improvements and corrections are taught in this specification, so such modifications, improvements and corrections still belong to the spirit and scope of the exemplary embodiments of this specification.
Claims
1. An image processing method, characterized in that: The method comprises: Acquire a first image and a second image, wherein the first image is an image including a rotation focus effect; Acquire target light spots located in different areas of the first image; Based on each of the target light spots, blurring the second image respectively to obtain each blurring image, wherein the blurring image corresponds to the target light spot one by one; Based on the area corresponding to the target light spot in the first image used by each of the blurred images during blurring, a sub-image corresponding to the corresponding area in each blurred image is determined, and the sub-images of each of the blurred images are spliced to obtain a third image.
2. The method according to claim 1, characterized in that The acquiring target light spots located in different areas of the first image includes: Performing region division on the first image to obtain first divided regions occupying different position regions; A target light spot in each of the first divided areas is acquired, and the target light spot corresponds to the first divided areas one by one.
3. The method according to claim 2, characterized in that The step of acquiring the target light spot in each of the first divided areas comprises: Intercepting a target area containing a light spot image in each of the first divided areas; The target light spot is extracted in each of the target areas based on the brightness information of the target area.
4. The method according to claim 3, characterized in that Before extracting the target light spot in each target area based on the brightness information of the target area, the method further includes: The brightness information of the target area is increased.
5. The method according to claim 2, characterized in that: The step of dividing the first image into regions to obtain first divided regions occupying different position regions includes: The first image is evenly divided to obtain first divided regions occupying different position regions and having the same area.
6. The method according to claim 1, characterized in that The blurring the second image based on each of the target light spots to obtain each blurred image comprises: The second image is blurred based on the preset blur parameters and each of the target light spots to obtain each of the blurred images.
7. The method according to claim 1, characterized in that The blurring the second image based on each of the target light spots to obtain each blurred image comprises: Acquire a depth channel image of the second image; The second image is blurred based on the preset blur parameters, the depth of field channel map and each of the target light spots to obtain each of the blurred images.
8. The method according to claim 7, characterized in that The step of acquiring a depth channel map of the second image includes: The second image is processed based on an image processing tool to obtain a depth channel map of the second image, wherein the image processing tool is obtained based on a sample training set, and the sample training set includes a sample image and a sample depth channel map corresponding to the sample image.
9. The method according to claim 7, characterized in that: The blurring the second image based on the preset blurring parameter, the depth of field channel map and each of the target light spots to obtain each of the blurred images comprises: Determining a focus area of the second image based on the depth of field channel map; The second image is blurred based on the focus area, the preset blur parameters, the depth of field channel map and each of the target light spots to obtain each of the blurred images containing a defocus range.
10. The method according to claim 2, characterized in that The method of determining a sub-image corresponding to the corresponding area in each blurred image based on an area corresponding to the target light spot in the first image used in blurring processing of each blurred image, and splicing the sub-images of each blurred image to obtain a third image includes: Based on the correspondence between the target light spot and the first divided area and the correspondence between the target light spot and the blurred image, determining the second divided area corresponding to each of the first divided areas in each of the blurred images; Acquire a sub-image of each of the blurred images in the second divided area; The sub-images of each of the blurred images in the second divided areas are spliced to obtain a third image.
11. The method according to claim 10, characterized in that The step of stitching the sub-images of the blurred images in the second divided areas to obtain a third image includes: The sub-images of the blurred images in the second divided areas are spliced, and the edge areas of the sub-images are feathered to obtain a third image.
12. The method according to claim 1, characterized in that The first image and the second image have the same size.
13. The method according to claim 1, characterized in that The first image is an image frame in a first video, the second image is an image frame in a second video, and the method further includes: The preset number of third images is obtained based on the preset number of first images in the first video and the preset number of second images in the second video, and a third video is obtained based on the preset number of third images.
14. An image processing system, characterized in that: The system comprises: An image acquisition module, used to acquire a first image and a second image, wherein the first image is an image including a rotation focus effect; A light spot acquisition module, used for acquiring target light spots located in different areas of the first image; A blur processing module, configured to perform blur processing on the second image based on each of the target light spots to obtain each blur image, wherein the blur images correspond to the target light spots one by one; The splicing module is used to determine the sub-images corresponding to the corresponding areas in each blurred image based on the areas corresponding to the target light spots used in the blurring process of each blurred image in the first image, and to splice the sub-images of each blurred image to obtain a third image.
15. A computer program product, characterized in that The invention comprises a computer program, and when at least a part of the computer program is executed by a processor, the method according to any one of claims 1 to 13 can be implemented.