Image shooting processing method, device and equipment and computer readable storage medium

By selecting reference frames from multiple images in a flowing water scene and performing global registration, segmentation, averaging, and fusion, the problem of blurring and overlapping caused by camera shake and foreground movement was solved, and clear foreground subjects were captured.

CN115086537BActive Publication Date: 2026-11-20ZTE CORP
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110271668.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-03-12
Publication Date
2026-11-20
Estimated Expiration
2041-03-12

AI Technical Summary

Technical Problem

When shooting a mixed scene with a foreground subject in a flowing water scene, camera shake and foreground subject movement can cause blurry superimposed images on the outline of the foreground subject, affecting sharpness.

Method used

Reference frames are selected from multiple consecutively captured images, global registration and segmentation are performed, similar images are selected for mean processing, and dilation and fusion techniques are combined to generate a clear rendered image.

Benefits of technology

It produces clear foreground subject rendering images without edge blurring or ghosting without the need for a tripod, improving the clarity of the foreground subject's outline.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115086537B_ABST
    Figure CN115086537B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a photograph image processing method, device and equipment and a computer readable storage medium, wherein the photograph image processing method comprises: selecting a reference frame image from a plurality of frames of photograph images obtained by continuous photographing; globally registering other photograph images according to the reference frame image to obtain a plurality of frames of registered images; segmenting the reference frame image to obtain a foreground region; selecting a plurality of frames of similar images from the plurality of frames of registered images according to the foreground region; averaging a first number of similar images adjacent to the reference frame image to obtain a first average image; averaging a second number of similar images to obtain a second average image; dilating the foreground region to obtain a dilated foreground region; and fusing the foreground region of the reference frame image, the first average image and the second average image excluding the dilated foreground region to obtain a rendering image, which can solve the problem of blurred and superimposed outlines of the foreground region and obtain a rendering image of a clear foreground subject without edge blur and superposition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present invention relate to, but are not limited to, the field of communications, and particularly to an image processing method, apparatus, device, and computer-readable storage medium. Background Technology

[0002] Currently, image processing technology for shooting flowing water scenes can capture flowing water scenes with a silk-like effect. However, this image processing technology can only satisfy the image of objects in flowing water scenes. When there is a foreground subject in the flowing water scene, if the current flowing water mode is used to shoot a mixed scene with a foreground subject and flowing water scene, the camera is prone to shaking or the foreground subject is shaken during the shooting process because a certain shooting time needs to be maintained. Both camera shaking and the shaking of the foreground subject will cause blurry superimposed images at the outline of the foreground subject, which will seriously affect the clarity of the outline of the foreground subject. Summary of the Invention

[0003] The following is an overview of the subject matter described in detail herein. This overview is not intended to limit the scope of the claims.

[0004] The main objective of this invention is to provide an image processing method, apparatus, device, and computer-readable storage medium that can effectively improve the clarity of the outline of the foreground subject in a rendered image.

[0005] In a first aspect, embodiments of the present invention provide an image processing method, including:

[0006] A reference frame image is selected from multiple frames of images captured in succession.

[0007] Based on the reference frame image, the other captured images in the multi-frame captured images, excluding the reference frame, are globally registered to obtain a multi-frame registered image;

[0008] The reference frame image is segmented to obtain the foreground region;

[0009] Select multiple similar images from the multi-frame registered images based on the foreground region;

[0010] A first number of similar images adjacent to the shooting time of the reference frame image are selected, and the first number of similar images are averaged to obtain a first average image.

[0011] The second number of similar images is averaged to obtain a second average image, where the second number is greater than the first number.

[0012] The foreground region is dilated to obtain the dilated foreground region;

[0013] The foreground region image of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region are fused together to obtain the rendered image.

[0014] Secondly, embodiments of the present invention also provide an image processing apparatus, comprising:

[0015] An image selection unit is used to select a reference frame image from multiple frames of images captured in succession;

[0016] An image registration unit is used to perform global registration of the other captured images in the multi-frame captured images, excluding the reference frame, based on the reference frame image to obtain a multi-frame registered image.

[0017] An image segmentation unit is used to segment the reference frame image to obtain a foreground region;

[0018] An image similarity unit is used to select multiple similar images from the multi-frame registration images based on the foreground region;

[0019] The first image averaging unit is used to select a first number of similar images that are adjacent to the shooting time of the reference frame image, and to perform averaging processing on the first number of similar images to obtain a first average image.

[0020] The second mean value unit is used to perform mean value processing on a second number of similar images to obtain a second mean image, wherein the second number is greater than the first number;

[0021] An image dilation unit is used to dilate the foreground region to obtain a dilated foreground region;

[0022] The image fusion unit is used to fuse the image of the foreground region of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region to obtain a rendered image.

[0023] Thirdly, embodiments of the present invention also provide an image processing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the image processing method of the first aspect described above.

[0024] Fourthly, embodiments of the present invention also provide a computer-readable storage medium storing an information processing program, which, when executed by a processor, implements the image processing method described in the first aspect.

[0025] This invention includes the following steps: selecting a reference frame image from a series of continuously captured images; globally registering the other captured images (excluding the reference frame) to obtain a multi-frame registered image based on the reference frame image; segmenting the reference frame image to obtain a foreground region; selecting multiple similar images from the multi-frame registered image based on the foreground region; selecting a first number of similar images whose capture time is adjacent to that of the reference frame image, and averaging the first number of similar images to obtain a first average image; averaging a second number of similar images to obtain a second average image, wherein the second number is greater than the first number; dilating the foreground region to obtain a dilated foreground region; and fusing the foreground region image of the reference frame image, the first average image, and the second average image after removing the dilated foreground region to obtain a rendered image. According to the technical solution of the present invention, since the first number of similar images are obtained by selecting similar images that are adjacent to the shooting time of the reference frame image, the image corresponding to the foreground region coordinate position of the first number of similar images is basically the same as the image of the foreground region of the reference frame. Therefore, the first average image obtained by the average processing of the first number of similar images can solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and the shaking of the subject being photographed during shooting. Therefore, the present invention does not require the assistance of equipment such as tripods during shooting, and can capture a clear foreground subject rendering image without edge blurring ghosting even when the camera shakes or the subject being photographed shakes. Attached Figure Description

[0026] Figure 1 This is a schematic diagram of a system architecture for performing an image processing method according to an embodiment of the present invention;

[0027] Figure 2 This is a flowchart of an image processing method provided in one embodiment of the present invention;

[0028] Figure 3 This is a schematic diagram of the foreground region obtained in an image processing method provided in an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram of the foreground region after dilation processing in an image processing method provided by an embodiment of the present invention;

[0030] Figure 5 This is a flowchart of selecting similar images in an image processing method provided in one embodiment of the present invention;

[0031] Figure 6 This is a schematic diagram of the original pixels of the foreground region image of the reference frame image in an image processing method provided by an embodiment of the present invention;

[0032] Figure 7 This is a schematic diagram of the foreground region image of a highly similar registered image in an image processing method provided in an embodiment of the present invention;

[0033] Figure 8 This is a schematic diagram of the foreground region image of a low-similarity registered image in an image processing method provided by an embodiment of the present invention;

[0034] Figure 9 This is a flowchart illustrating the selection of a first number of similar images in an image processing method provided in an embodiment of the present invention;

[0035] Figure 10 This is a flowchart of the image processing method for capturing images provided in one embodiment of the present invention to obtain a rendered image;

[0036] Figure 11 This is a schematic diagram of an image processing apparatus provided in one embodiment of the present invention. Detailed Implementation

[0037] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0038] It should be noted that although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first," "second," etc., in the specification, claims, and the aforementioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence.

[0039] Traditional techniques for capturing flowing water scenes can produce a silky effect, but this method only works for images of objects within the flowing water scene. When a foreground subject is present in the flowing water scene, using current techniques to capture a mixed scene with both a foreground subject and the flowing water requires the photographer to keep the camera and the foreground subject almost stationary during the shooting process to achieve a clear blended rendering of the foreground subject and the silky texture of the background water. However, because a certain shooting time is required, camera shake or movement of the foreground subject is likely to occur. Both camera shake and foreground subject movement result in blurred, superimposed images at the outline of the foreground subject, severely affecting the clarity of the foreground subject's outline in the photo. The foreground subject can be a person, and the flowing water scene can be a fountain or a stream.

[0040] This invention provides a method, apparatus, device, and computer-readable storage medium for image processing. The image processing method includes: selecting a reference frame image from a series of captured images; globally registering the other captured images (excluding the reference frame) to obtain a multi-frame registered image based on the reference frame image; segmenting the reference frame image to obtain a foreground region; selecting multiple similar images from the multi-frame registered image based on the foreground region; selecting a first number of similar images whose capture time is adjacent to that of the reference frame image, and performing mean processing on the first number of similar images to obtain a first mean image; performing mean processing on a second number of similar images to obtain a second mean image, wherein the second number is greater than the first number; dilating the foreground region to obtain a dilated foreground region; and fusing the foreground region image of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region to obtain a rendered image. According to the technical solution of the present invention, since the first number of similar images are obtained by selecting similar images that are adjacent to the shooting time of the reference frame image, the image corresponding to the foreground region coordinate position of the first number of similar images is basically the same as the image of the foreground region of the reference frame. Therefore, the first average image obtained by the average processing of the first number of similar images can solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and the shaking of the subject being photographed during shooting. Therefore, the present invention does not require the assistance of equipment such as tripods during shooting, and can capture a clear foreground subject rendering image without edge blurring ghosting even when the camera shakes or the subject being photographed shakes.

[0041] The embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0042] like Figure 1 As shown, Figure 1 This is a schematic diagram of a system architecture for performing an image processing method according to an embodiment of the present invention. Figure 1 In this example, the system architecture platform 100 may include a camera 110, a processor 120, and a memory 130, wherein the processor 120 and the memory 130 may be connected via a bus or other means. Figure 1 Taking the example of a connection between China and Israel via a bus.

[0043] It should be noted that camera 110 is used to capture still images or videos. Camera 110 may include at least one front-facing camera and / or at least one rear-facing camera.

[0044] It should be noted that the processor 120 may include one or more processing units. For example, the processor 120 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, or a neural network processing unit (NPU). Different processing units may be independent devices or integrated into one or more processors 120.

[0045] It is understood that the processor 120 can run the software code of the image processing method provided in the embodiments of the present invention to process and obtain an image that satisfies the user.

[0046] It should be noted that memory 130 is used to store instructions and data. In some embodiments, memory 130 is a cache memory. This memory 130 can store instructions or data that the processor 120 has just used or is reusing. If the processor 120 needs to use the instruction or data again, it can directly retrieve it from memory 130. This avoids repeated accesses, reduces the waiting time of the processor 120, and thus improves the efficiency of image processing.

[0047] It is understood that memory 130, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs and non-transitory computer-executable programs. Furthermore, memory 130 may include high-speed random access memory, and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some embodiments, memory 130 may optionally include remotely located memories 130 disposed relative to processor 120, which can be connected to processor 120 via a network.

[0048] exist Figure 1 In the system architecture platform shown, the processor 120 can call the image processing program stored in the memory 130 to execute the image processing method.

[0049] It will be understood by those skilled in the art that Figure 1 The system architecture platform shown does not constitute a limitation on the embodiments of the present invention, and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0050] The system architecture platform 100 and application scenarios described in the embodiments of the present invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of the present invention, and do not constitute a limitation on the technical solutions provided by the embodiments of the present invention. As those skilled in the art will know, with the evolution of the system architecture platform 100 and the emergence of new application scenarios, the technical solutions provided by the embodiments of the present invention are also applicable to similar technical problems.

[0051] Based on the structure of the above-mentioned system architecture platform 100, various embodiments of the image processing method of the present invention are proposed.

[0052] The system architecture and application scenarios described in the embodiments of this invention are for the purpose of more clearly illustrating the technical solutions of the embodiments of this invention, and do not constitute a limitation on the technical solutions provided by the embodiments of this invention. As those skilled in the art will know, with the evolution of system architecture and the emergence of new application scenarios, the technical solutions provided by the embodiments of this invention are also applicable to similar technical problems.

[0053] Based on the above system architecture, various embodiments of the information processing method of the present invention are proposed.

[0054] In one embodiment, refer to Figure 2 , Figure 2 The flowchart is a method for processing captured images provided in an embodiment of the present invention. The method is applied to the image processing device in the above system architecture. In one embodiment, the method includes, but is not limited to, steps S210 and S280.

[0055] Step S210: Select a reference frame image from the multi-frame images captured in succession;

[0056] Step S220: Based on the reference frame image, perform global registration on the other captured images in the multi-frame captured images excluding the reference frame to obtain a multi-frame registered image;

[0057] Step S230: Segment the reference frame image to obtain the foreground region;

[0058] Step S240: Select multiple similar images from the multi-frame registration images based on the foreground region;

[0059] Step S250: Select a first number of similar images that are adjacent to the shooting time of the reference frame image, and perform mean processing on the first number of similar images to obtain a first mean image;

[0060] Step S260: Perform mean processing on the second number of similar images to obtain a second mean image, where the second number is greater than the first number;

[0061] Step S270: Dilate the foreground region to obtain the dilated foreground region;

[0062] Step S280: The foreground region image, the first mean image, and the second mean image of the foreground region after dilation removal from the reference frame image are fused to obtain the rendered image.

[0063] Specifically, during the shooting period, this embodiment of the invention requires continuously capturing multiple frames of the same scene while the photographer's handheld camera remains essentially stationary and the foreground subject also remains essentially stationary. Then, a reference frame image is selected from the captured multiple frames, and the remaining captured images are globally registered with the reference frame to obtain a multi-frame registered image. The reference frame image is then segmented to obtain... Figure 3 The foreground region 310 shown can then be morphologically expanded by a certain width to obtain, as shown below. Figure 4 The foreground region 410 shown is dilated. Based on the foreground region 310, multiple similar images are selected from the multi-frame registration images. A first number of similar images adjacent to the shooting time of the reference frame image are selected. The first number of similar images are averaged to obtain a first average image. A second number of similar images are averaged to obtain a second average image, where the second number is greater than the first number. The region corresponding to the coordinate position of the dilated foreground region 410 can be removed from the second average image to obtain a second average image of the foreground region 410 after removing the dilation. The image of the foreground region 310 of the reference frame image, the first average image, and the second average image of the foreground region 410 after removing the dilation are fused to obtain a rendered image. For example, during the fusion process, the first average image can be set... The image is placed at the bottom layer and then fused with the second mean image of the foreground region 410 after removing the dilation. This results in an image where the pixels in the region within the foreground region 410 after removing the dilation are the pixels of the first mean image, and the pixels in the region 420 outside the foreground region 410 after removing the dilation are the pixels of the second mean image. Then, the image of the foreground region 310 is fused again with the fused image according to the coordinate position of the foreground region 310 to obtain a rendered image. In this rendered image, the pixels in the foreground region 310 are the pixels of the reference frame image, the pixels in the region 420 outside the foreground region 410 after removing the dilation are the pixels of the second mean image, and the pixels in the region of the dilated foreground region 410 relative to the foreground region 310 are the pixels of the first mean image.

[0064] According to the technical solution of the present invention, since the first number of similar images is obtained by selecting similar images that are adjacent to the shooting time of the reference frame image, the image corresponding to the coordinate position of the foreground region of the first number of similar images is basically the same as the image of the foreground region of the reference frame. The shaking of the subject in the foreground region of the multiple similar images is relatively small. Therefore, the first average image obtained by the average processing of the first number of similar images can solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and shaking of the subject during shooting. Therefore, the present invention does not require the assistance of equipment such as tripods during shooting. Even when the camera shakes or the subject shakes, a clear foreground subject rendering image without edge blurring and ghosting can be captured.

[0065] It should be noted that the image in the foreground area can be a human figure or an animal; this embodiment does not impose any specific limitations on it.

[0066] It should be noted that, regarding the selection of the reference frame image mentioned above, the first frame image can be selected from multiple captured images, or a frame image of the first foreground area that is relatively clear can be selected as the reference frame image.

[0067] It should be noted that the image registration process between the reference frame image and the captured image mentioned above refers to global background registration, which means that other captured images and the reference frame image are basically registered to the same coordinate system on a largely unchanged background. Furthermore, subsequent processing such as segmentation, correction, and fusion are all performed on the registered image.

[0068] It should be noted that the segmentation methods mentioned above may include, but are not limited to, semantic segmentation methods using deep learning or image segmentation methods using image transmission.

[0069] In addition, it is understood that in order to ensure that the differences between multiple frames of images are not too large, the embodiments of the present invention can maintain the same exposure parameters within the shooting time period.

[0070] In addition, the step of averaging multiple registered images to obtain a first average image can be understood as follows: for example, if the foreground area of ​​the captured image includes a flowing water feature, then by averaging, the image of the area corresponding to the water feature in the first average image can present a silky flowing water effect.

[0071] It should be noted that the first mean image can be obtained by averaging the reference frame image and a first number of similar images, or it can be obtained by averaging the first number of similar images. This embodiment does not specifically limit it.

[0072] Furthermore, the step of averaging multiple similar images to obtain a first average image is understandable because the multiple similar images are selected from the multiple registered images based on the foreground region. Since the foreground regions of the multiple similar images are basically consistent, it can be assumed that the subject in the foreground region of the multiple images of interest has relatively little movement. Therefore, the first average image generated by the multiple similar images can improve the clarity of the outline of the foreground region of the rendered image. Moreover, when the image outside the foreground region of the captured image includes flowing water, the image of the area corresponding to the water feature in the first average image obtained through averaging can also present a silky flowing water effect.

[0073] It should be noted that the first mean image can also be obtained by averaging multiple similar images including the reference frame image, or by averaging multiple similar images excluding the reference frame image. This embodiment does not specifically limit it.

[0074] It should be noted that, regarding the averaging of the first number of similar images, after accumulating the first number of similar images, this embodiment of the invention divides the final accumulated first image by the first number to output the first average image of the first number of similar images. Similarly, regarding the averaging of the second number of similar images, after accumulating the second number of similar images, this embodiment of the invention divides the final accumulated second image by the second number to output the second average image of the second number of similar images.

[0075] In one embodiment, a reference frame image can be used as the initial value of the background accumulation image. All registered images are traversed, and the foreground region image of the current registered image is compared with the foreground region image of the reference frame image. If the similarity is lower than a preset threshold, the registered image of that frame is discarded and other registered images are traversed. Conversely, if the similarity is greater than the preset threshold, the current registered image is determined to be a similar image and added to the background accumulation image. Then, the similarity comparison is performed on the next registered image. If the current background accumulation image reaches a first number of similar images with a preset shooting time, the current accumulation image is divided by the first number of similar images currently accumulated, and the first average image of the first number of similar images is output. Then, similar images can continue to be added to the background accumulation image until the number of similar images in the background accumulation image reaches a second number. Then, the current accumulation image is divided by the second number of similar images currently accumulated, and the second average image of the second number of similar images is output.

[0076] The background cumulative image is the image obtained by summing the pixel values ​​of multiple registered images at corresponding coordinate positions.

[0077] In addition, it is understood that the second number can be less than or equal to the number of all similar images, but greater than the first number; this embodiment does not specifically limit it.

[0078] Reference Figure 5 In one embodiment, step S240 includes, but is not limited to, steps S510, S520, and S530:

[0079] Step S510: Compare the similarity between the images corresponding to the coordinate positions of the foreground region in the multi-frame registration images and the images of the foreground region in the reference frame images to obtain the similarity parameters that correspond one-to-one with the images corresponding to the coordinate positions of the foreground region in the multi-frame registration images.

[0080] Step S520: Select multiple similar images from the multi-frame registration images based on the similarity parameter.

[0081] Specifically, firstly, foreground images of the multi-frame registration images are extracted from the foreground region based on the multi-frame registration images. Then, the foreground images of the multi-frame registration images are compared with the foreground images of the reference frames to obtain a similarity parameter that corresponds one-to-one with the foreground images of the registration images. Then, multiple similar images are selected from the multi-frame registration images based on the similarity parameter. Since the foreground images of the similar images have a high similarity to the foreground images of the reference frames, and the subject in the foreground region of the multi-frame similar images has relatively little movement, it can be considered that the image at the outline of the foreground region of the multi-frame similar images is basically consistent with the image at the outline of the foreground region of the reference frames. This allows the first average image obtained by the average processing of the first number of similar images in the subsequent steps to solve the problem of blurring and ghosting at the outline of the foreground subject caused by camera shake and the movement of the subject during shooting. Therefore, this embodiment of the invention does not require the assistance of equipment such as a tripod during shooting, and can capture a clear foreground subject rendering image without edge blurring and ghosting even when the camera shakes or the subject moves. When shooting a scene involving a user's portrait and flowing water, it can capture a rendered image with a clear foreground subject and flowing water effect.

[0082] Specifically, the step of selecting multiple similar images from multiple registered images based on similarity parameters can be as follows: First, compare the similarity parameters of the multiple similar images with a preset threshold to determine the similarity parameters that are greater than the preset threshold. Then, select multiple similar images from the multiple registered images based on the similarity parameters that are greater than the preset threshold. If the subject in the foreground region of the selected multiple similar images has relatively little shaking, it can be considered that the image at the outline of the foreground region of the multiple similar images is basically consistent with the image at the outline of the foreground region of the reference frame image. This allows the first average image obtained by the average processing of the first number of similar images in subsequent steps to solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and shaking of the subject during shooting. Therefore, this embodiment of the invention does not require the assistance of equipment such as a tripod during shooting. Even when the camera shakes or the subject shakes, it can still capture a clear foreground subject rendering image without edge blurring and ghosting.

[0083] It should be noted that when the scene being filmed includes a human figure, i.e., the foreground area of ​​the image is a human figure, in order to avoid the ghosting problem in the mean background caused by the large-scale shaking of the human figure's body during the filming process, this implementation compares the similarity between the foreground area of ​​the current registered image and the foreground area of ​​the reference frame image when performing mean processing on the registered image. If the similarity is too low, it indicates that there is a large shaking of the human figure, and the registered image can be directly discarded and not included in the mean processing.

[0084] It should be noted that the evaluation index of similarity can be structural similarity, peak signal-to-noise ratio (PSNR), or mean square error. This embodiment does not make specific limitations on it.

[0085] It should be noted that the principle behind determining the image of interest by comparing the similarity between the foreground region of the registered image and the foreground region of the reference frame image is as follows: Figure 6 This is a schematic diagram of the original pixels of the foreground region image of the reference frame image. Figure 7 This is a schematic diagram of the foreground region image of a highly similar registered image. Figure 8 This is a schematic diagram of the foreground region image of a registered image with low similarity. For example, considering only the foreground region of the reference frame image... Figure 7 The foreground area of ​​the registered image is only visible on the left side of the portrait, near the hand. Figure 6 The foreground region image of the reference frame image differs, which can be considered... Figure 7 The foreground region of the registered image and Figure 6 If the foreground regions of the reference frame image have high similarity, then it can be... Figure 7The registered image is determined as the image of interest for calculating the second mean image. Figure 8 The foreground region of the registered image shows the pixels of the left arm and head of the portrait. Figure 6 The corresponding pixels in the foreground region of the reference frame image are significantly different. Figure 8 The foreground region of the registered image and Figure 6 The low similarity between the foreground regions of the reference frame image and the actual human figure suggests significant motion. Figure 8 Using the registered image as the image of interest for calculating the second mean image will cause the second mean image to include human ghosting in the background region, so it is necessary to... Figure 8 The registered images are discarded.

[0086] Reference Figure 9 In one embodiment, the selection of a first number of similar images adjacent to the shooting time of the reference frame image in step S250 includes, but is not limited to, steps S910 to S940:

[0087] Step S910: Obtain the capture time of the reference frame image and the capture time of multiple similar images;

[0088] Step S920: Determine multiple time differences between the shooting time of multiple similar images and the shooting time of the reference frame.

[0089] Step S930: Sort the similar images corresponding to the multiple time differences in ascending order to obtain a sequence of similar images;

[0090] Step S940: Starting from the first frame of similar images in the similar image sequence, select a first number of similar images.

[0091] Specifically, since the image processing method is based on the reference frame image, the closer the shooting time of the similar image is to that of the reference frame image, the closer the similarity of the images in the foreground region of the similar images is. Therefore, the first number of similar images can be selected by the following steps: First, the shooting time of the reference frame image and the shooting time of multiple similar images can be obtained. Then, multiple time differences between the shooting time of the multiple similar images and the shooting time of the reference frame image can be determined. Next, the similar images corresponding to the multiple time differences are sorted in ascending order to obtain a similar image sequence. Starting from the first similar image in the similar image sequence, the first number of similar images can be selected, which means that the first number of similar images with the highest similarity to the foreground region of the reference frame image can be obtained. This allows the first average image obtained by averaging the first number of similar images in subsequent steps to solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and the shaking of the foreground subject during shooting. Therefore, the embodiments of the present invention do not require the assistance of equipment such as tripods during shooting, and can capture a clear foreground subject rendering image without edge blurring and ghosting even when the camera shakes or the foreground subject shakes.

[0092] Specifically, during the shooting process, the changes in the portrait are usually relatively small in the early stages of shooting. The first frame of the captured image can be selected as the reference frame image. The step of selecting a first number of similar images may include, but is not limited to, the following steps: according to the chronological order of the shooting time of the similar images, starting from the first frame of similar images, select several registration images according to the set first number. This will result in a first number of similar images with high image similarity to the foreground area of ​​the reference frame image. Thus, the first average image obtained by averaging the first number of similar images in subsequent steps can solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and the shaking of the subject during shooting. Therefore, this embodiment of the invention does not require the assistance of equipment such as a tripod during shooting, and can capture a clear foreground subject rendering image without edge blurring and ghosting even when the camera shakes or the subject shakes.

[0093] Reference Figure 10 In one embodiment, step S260 includes, but is not limited to, steps S1010 to S1040:

[0094] Step S1010: Extract the foreground region from the reference frame image to obtain the foreground region image;

[0095] Step S1020: Remove the region corresponding to the dilated foreground region from the second mean image to obtain the third mean image;

[0096] Step S1030: The first mean image and the third mean image are fused to obtain the background image;

[0097] Step S1040: The foreground region image and the background image are fused to obtain the rendered image.

[0098] Specifically, the foreground region is extracted from the reference frame image to obtain the foreground region image. Then, the region corresponding to the dilated foreground region is removed from the second mean image to obtain the third mean image. The third mean image and the third mean image are fused to obtain the background image. Finally, the foreground region image and the background image are fused to obtain the rendered image. Since the first number of similar images are obtained by selecting similar images that are adjacent to the shooting time of the reference frame image, the images corresponding to the coordinate positions of the foreground region of the first number of similar images are basically consistent with the foreground region image of the reference frame. The subject in the foreground region of the multi-frame similar images has relatively little shaking. Therefore, the fusion of the first mean image, the foreground region image and the third mean image obtained by the averaging of the first number of similar images can solve the problem of blurry ghosting at the outline of the foreground subject caused by camera shake and shaking of the subject during shooting. Therefore, this embodiment of the invention does not require the assistance of equipment such as a tripod during shooting. Even when the camera shakes or the subject shakes, a clear foreground subject rendered image without edge blurring and ghosting can be captured.

[0099] In one embodiment, a first mean image can be set at the bottom layer and then fused with a second mean image after removing the dilated foreground region. This results in an image where the pixels in the region after removing the dilated foreground region are the pixels of the first mean image, and the pixels in the region outside the region after removing the dilated foreground region are the pixels of the second mean image. Then, the image of the foreground region is fused again with the fused image according to the coordinate position of the foreground region to obtain a rendered image. In this rendered image, the pixels in the foreground region are the pixels of the reference frame image, the pixels in the region outside the dilated foreground region are the pixels of the second mean image, and the pixels in the region of the dilated foreground region that is dilated relative to the foreground region are the pixels of the first mean image. According to the technical solution of the present invention, since the first number of similar images are obtained by selecting similar images that are adjacent to the shooting time of the reference frame image, the image corresponding to the coordinate position of the foreground region of the first number of similar images is basically the same as the image of the foreground region of the reference frame. The shaking of the subject in the foreground region of the multiple similar images is relatively small. Therefore, by fusing the first average image, the foreground region image and the third average image obtained by the average processing of the first number of similar images, the problem of blurry superimposed images at the outline of the foreground subject caused by camera shake and shaking of the subject during shooting can be solved. Therefore, the present invention does not require the assistance of equipment such as tripods during shooting. Even when the camera shakes or the subject shakes, a clear foreground subject rendering image without edge blur superimposed images can be captured.

[0100] It should also be noted that the fusion algorithm between the foreground region image and the background mean image mentioned above may include, but is not limited to, classic image fusion algorithms such as Laplacian fusion and Poisson fusion.

[0101] Based on the image processing method described above, various embodiments of the image processing apparatus of the present invention are presented below.

[0102] like Figure 11 As shown, Figure 11 This is a schematic diagram of an image processing apparatus provided in an embodiment of the present invention. The image processing apparatus 1100 includes, but is not limited to, an image selection unit 1110, an image registration unit 1120, an image segmentation unit 1130, an image similarity unit 1140, an image first mean unit 1150, an image second mean unit 1160, an image dilation unit 1170, and an image fusion unit 1180.

[0103] Specifically, the image selection unit 1110 is used to select a reference frame image from a series of captured images. The image registration unit 1120 is used to globally register the other captured images (excluding the reference frame) from the series of captured images based on the reference frame image to obtain a multi-frame registered image. The image segmentation unit 1130 is used to segment the reference frame image to obtain a foreground region. The image similarity unit 1140 is used to select multiple similar images from the multi-frame registered image based on the foreground region. The image first averaging unit 1150 is used to select a first number of similar images adjacent to the capture time of the reference frame image, and perform averaging on the first number of similar images to obtain a first average image. The image second averaging unit 1160 is used to perform averaging on a second number of similar images to obtain a second average image, where the second number is greater than the first number. The image dilation unit 1170 is used to dilate the foreground region to obtain a dilated foreground region. The image fusion unit 1180 is used to fuse the foreground region image of the reference frame image, the first average image, and the second average image after removing the dilated foreground region to obtain a rendered image.

[0104] In addition, the image similarity unit 1140 described above is also used to compare the similarity of the images corresponding to the coordinate positions of the foreground region in the multi-frame registered images with the images of the foreground region in the reference frame image, and obtain similarity parameters that correspond one-to-one with the images corresponding to the coordinate positions of the foreground region in the multi-frame registered images; and select multiple similar images from the multi-frame registered images according to the similarity parameters.

[0105] In addition, the image similarity unit 1140 mentioned above is also used to determine a similarity parameter greater than a preset threshold; and to select multiple similar images from the multi-frame registered images based on the similarity parameter greater than the preset threshold.

[0106] In addition, the image first averaging unit 1150 mentioned above is also used to obtain the shooting time of the reference frame image and the shooting time of multiple similar images; determine multiple time differences between the shooting time of the multiple similar images and the shooting time of the reference frame image; sort the similar images corresponding to the multiple time differences in ascending order to obtain a similar image sequence; and select a first number of similar images starting from the first similar image in the similar image sequence.

[0107] In addition, the image first averaging unit 1150 mentioned above is also used to accumulate a first number of similar images to obtain a first accumulated image; and to perform averaging processing on the first accumulated image to obtain a first average image.

[0108] In addition, the image second averaging unit 1160 mentioned above is also used to accumulate a second number of similar images to obtain a second accumulated image; and to perform averaging processing on the second accumulated image to obtain a second average image.

[0109] In addition, the image fusion unit 1180 described above is also used to extract the reference frame image based on the foreground region to obtain a foreground region image; remove the region corresponding to the dilated foreground region from the second mean image to obtain a third mean image; fuse the first mean image and the third mean image to obtain a background image; and fuse the foreground region image and the background image to obtain a rendered image.

[0110] It is worth noting that the technical effects of the image processing device 1100 in this embodiment of the invention can be referred to the embodiments of the image processing method described above.

[0111] Based on the image processing method described above, various embodiments of the image processing device and computer-readable storage medium of the present invention are presented below.

[0112] In addition, one embodiment of the present invention provides an image processing device, the controller including: a memory, a processor, and a computer program stored in the memory and executable on the processor.

[0113] The processor and memory can be connected via a bus or other means.

[0114] It should be noted that the controller in this embodiment may include, for example, the controller with the following components: Figure 1 The memory and processor in the illustrated embodiment can constitute Figure 1 The system architecture platform shown in the embodiment is part of the same inventive concept, and therefore has the same implementation principle and beneficial effects, which will not be described in detail here.

[0115] The non-transient software program and instructions required to implement the image processing method of the above embodiments are stored in memory. When executed by a processor, the image processing method of the above embodiments is executed, for example, the method described above is executed. Figure 2 Method steps S210 to S280 in the text Figure 5 Method steps S510 to S520 in the text Figure 9 Method steps S910 to S940 in the text Figure 10 Method steps S1010 to S1040.

[0116] Specifically, the image processing device in this embodiment of the invention can be a terminal image processing device, such as a mobile phone, tablet computer, or wearable image processing device. The image processing device itself may have a camera for capturing images. For example, a user can capture images using a mobile phone's camera and process the images internally to obtain a rendered image.

[0117] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0118] Furthermore, one embodiment of the present invention provides a computer-readable storage medium storing computer-executable instructions that are executed by a processor or controller, for example, by a processor in the image processing apparatus described above, causing the processor to perform the image processing method described above, for example, performing the above-described... Figure 2 Method steps S210 to S280 in the text Figure 5 Method steps S510 to S520 in the text Figure 9 Method steps S910 to S940 in the text Figure 10 Method steps S1010 to S1040.

[0119] It will be understood by those skilled in the art that all or some of the steps and systems in the methods disclosed above can be implemented as software, firmware, hardware, and suitable combinations thereof. Some or all of the physical components can be implemented as software executed by a processor, such as a central processing unit, digital signal processor, or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and is accessible to a computer. Furthermore, as is known to those skilled in the art, communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

[0120] The above is a detailed description of the preferred embodiments of the present invention. However, the present invention is not limited to the above embodiments. Those skilled in the art can make various equivalent modifications or substitutions without departing from the spirit of the present invention. All such equivalent modifications or substitutions are included within the scope defined by the claims of the present invention.

Claims

1. A method for processing captured images, comprising: A reference frame image is selected from multiple frames of images captured in succession. Based on the reference frame image, the other captured images in the multi-frame captured images, excluding the reference frame, are globally registered to obtain a multi-frame registered image; The reference frame image is segmented to obtain the foreground region; Select multiple similar images from the multi-frame registered images based on the foreground region; A first number of similar images adjacent to the shooting time of the reference frame image are selected, and the first number of similar images are averaged to obtain a first average image. The second number of similar images is averaged to obtain a second average image, where the second number is greater than the first number. The foreground region is dilated to obtain the dilated foreground region; The foreground region image of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region are fused together to obtain the rendered image; The process of fusing the foreground region image of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region to obtain the rendered image includes: The foreground region image is obtained by extracting the reference frame image based on the foreground region. The third mean image is obtained by removing the region corresponding to the dilated foreground region from the second mean image; The first mean image and the third mean image are fused to obtain the background image; The foreground region image and the background image are fused together to obtain a rendered image.

2. The image processing method according to claim 1, characterized in that, The step of selecting multiple similar images from the multi-frame registration images based on the foreground region includes: The similarity of the images corresponding to the coordinate positions of the foreground region in the multi-frame registration images is compared with the images of the foreground region in the reference frame image to obtain a similarity parameter that corresponds one-to-one with the images corresponding to the coordinate positions of the foreground region in the multi-frame registration images. Multiple similar images are selected from the multi-frame registration images based on the similarity parameter.

3. The image processing method according to claim 2, characterized in that, The step of selecting multiple similar images from the multi-frame registration images based on the similarity parameter includes: Determine the similarity parameter to be greater than a preset threshold; Multiple similar images are selected from the multi-frame registration images based on the similarity parameter that is greater than a preset threshold.

4. The image processing method according to claim 1, characterized in that, The selection of a first number of similar images adjacent to the time of capture of the reference frame image includes: Obtain the capture time of the reference frame image and the capture time of the multiple similar images; Determine multiple time differences between the capture time of the multiple similar images and the capture time of the reference frame image; The similar images corresponding to the multiple time differences are sorted in ascending order to obtain a sequence of similar images; Starting from the first frame of similar images in the similar image sequence, a first number of similar images are selected.

5. The image processing method according to any one of claims 1 to 4, characterized in that, The step of averaging the first number of similar images to obtain a first mean image includes: The first number of similar images are summed to obtain the first summed image; The first accumulated image is subjected to mean processing to obtain the first mean image.

6. The image processing method according to any one of claims 1 to 4, characterized in that, The second number of similar images are averaged to obtain a second mean image, including: The second number of similar images are summed to obtain the second summed image; The second accumulated image is subjected to mean processing to obtain the second mean image.

7. An image processing apparatus, characterized in that, include: An image selection unit is used to select a reference frame image from multiple frames of images captured in succession; An image registration unit is used to perform global registration of the other captured images in the multi-frame captured images, excluding the reference frame, based on the reference frame image to obtain a multi-frame registered image. An image segmentation unit is used to segment the reference frame image to obtain a foreground region; An image similarity unit is used to select multiple similar images from the multi-frame registration images based on the foreground region; The first image averaging unit is used to select a first number of similar images that are adjacent to the shooting time of the reference frame image, and to perform averaging processing on the first number of similar images to obtain a first average image. The second mean value unit is used to perform mean value processing on a second number of similar images to obtain a second mean image, wherein the second number is greater than the first number; An image dilation unit is used to dilate the foreground region to obtain a dilated foreground region; An image fusion unit is used to fuse the image of the foreground region of the reference frame image, the first mean image, and the second mean image after removing the dilated foreground region to obtain a rendered image; The image fusion unit is specifically used for: The foreground region image is obtained by extracting the reference frame image based on the foreground region. The third mean image is obtained by removing the region corresponding to the dilated foreground region from the second mean image; The first mean image and the third mean image are fused together to obtain the background image; The foreground region image and the background image are fused together to obtain a rendered image.

8. An image processing apparatus, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, when the processor executes the computer program, it implements the image processing method as described in any one of claims 1 to 6.

9. A computer-readable storage medium storing computer-executable instructions for performing the image processing method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Methods of image fusion for image stabilizaton

    CN105264567A

  • Image processing method and device, electronic equipment and readable storage medium

    CN112215877A