Shooting method, electronic equipment and storage medium
By dynamically adjusting the degree of blurring according to the shooting scene, the problem of poor blurring of photos taken by electronic devices is solved, and the user's visual impression of photos is enhanced.
Patent Information
- Application Number
- CN202410042964.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-10
- Publication Date
- 2025-07-18
AI Technical Summary
When taking photos, the blur effect of existing electronic devices is poor, affecting the user's impression of the photos.
According to factors such as the shooting scene of electronic devices, such as ambient light intensity, shooting distance, the position and category of the focus object, and the speed of the moving object, dynamically adjust the degree of blurring, and improve the blur effect through background segmentation and clarity adjustment.
It improves the blur effect of photos and improves the user's visual experience.
Smart Images

Figure CN120343391A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the technical field of terminals, and in particular, to a photographing method, an electronic device, and a storage medium. Background Art
[0002] With the development of terminal technology, users use electronic devices more and more frequently. To meet the needs of users to record and share life anytime and anywhere, most electronic devices such as mobile phones and tablets have a photographing function, and the electronic device can take pictures, record videos, and so on through the photographing function. At the same time, in order to improve the user perception of the photo, the electronic device can add a blurring effect to the photo.
[0003] Currently, the blurring effect after the electronic device blurs the photo is relatively poor, affecting the user perception of the photo. Summary of the Invention
[0004] The embodiments of the application provide a photographing method, an electronic device, and a storage medium. In this method, the electronic device can blur the photo to different degrees according to the photographing scene of the electronic device, can improve the blurring effect of the photo, and can improve the user perception of the photo.
[0005] To achieve the above object, the embodiments of the present application adopt the following technical solutions:
[0006] In a first aspect, a photographing method is provided. This photographing method can be applied to electronic devices such as mobile phones and tablet computers. The method includes: the electronic device displays a preview interface, and the preview interface includes an image collected in real time by the camera; next, in response to a first operation of the user, the electronic device takes a first blurred image. After that, in response to a second operation of the user, the electronic device takes a second blurred image; the blurring degree of the second blurred image is less than the blurring degree of the first blurred image, where the ambient light intensity of the electronic device when the first blurred image is taken is greater than the intensity threshold, and the ambient light intensity of the electronic device when the second blurred image is taken is less than or equal to the intensity threshold.
[0007] It should be understood that the above first operation of the user may include an operation for the user to turn on the blurring photographing function of the electronic device, a photographing trigger operation of the user in the photographing preview interface, and a voice command for the user to trigger photographing, and so on. The second operation of the user may be the same as or different from the above first operation of the user.
[0008] In the above method, due to the change of the ambient light when the electronic device takes pictures, that is to say, the change of the shooting scene of the electronic device, the blurring degree of the blurred image obtained by the electronic device during shooting changes. It can be seen that the electronic device can change the blurring degree of the blurred image obtained by shooting according to the shooting scene, such as the ambient light intensity where the electronic device is located. Since in some shooting scenes, such as scenes where the ambient light intensity is less than or equal to the intensity threshold, the electronic device reduces the blurring degree of the blurred image; then, in these scenes, the electronic device can obtain a blurred image with a better blurring effect, which can improve the user's perception of the blurred image.
[0009] In a possible design of the first aspect, the above method further includes: in response to the user's third operation, the electronic device obtains a third blurred image. After that, the third blurred image includes the shooting object; in response to the user's fourth operation, the electronic device obtains a fourth blurred image. The fourth blurred image includes the above shooting object, and the blurring degree of the fourth blurred image is less than that of the third blurred image. Among them, the distance between the shooting object and the electronic device when the third blurred image is obtained is less than the distance threshold, and the distance between the shooting object and the electronic device when the third blurred image is obtained is greater than or equal to the distance threshold.
[0010] It should be understood that the above user's third operation and the above user's fourth operation may be the same as or different from the above user's first operation.
[0011] In this design, the electronic device can change the blurring degree of the blurred image obtained by shooting according to the shooting scene, such as the shooting distance of the electronic device. Since in some shooting scenes, such as when the shooting distance of the electronic device is greater than or equal to the distance threshold, the electronic device reduces the blurring degree of the blurred image; then, in these scenes, the electronic device can obtain a blurred image with a better blurring effect by reducing the blurring degree of the blurred object, which can improve the user's perception of the blurred image.
[0012] In another possible design of the first aspect, the above method further includes: in response to the user's fifth operation, the electronic device obtains a fifth blurred image. The fifth blurred image includes a first tracking object. After that, in response to the user's sixth operation, the electronic device obtains a sixth blurred image. The sixth blurred image includes a second tracking object, and the blurring degree of the sixth blurred image is different from that of the fifth blurred image. Among them, the categories of the first tracking object and the second tracking object are different, and / or the position of the first tracking object in the fifth blurred image is different from the position of the second tracking object in the sixth blurred image.
[0013] It should be understood that the fifth operation of the above user and the sixth operation of the above user may be the same as or different from the first operation of the above user. Moreover, the position of the focusing object in the blurred image refers to the position of the focusing object in the blurred image in a two-dimensional space. For example, the focusing object has position relationships such as left and right, up and down in the image. Also, the category dimensions of the first focusing object and the second focusing object are unified.
[0014] In this design, the electronic device can change the blurring degree of the blurred image obtained by the electronic device according to the shooting scene, such as the position and / or category of the focusing object. Since in some shooting scenes, for example, the electronic device changes the focusing object, or the position of the focusing object of the electronic device changes, the blurring degree of the blurred image is reduced by the electronic device in these shooting scenes. Then, in these scenes, the electronic device can obtain a blurred image with a better blurring effect by reducing the blurring degree of the blurred object, and the user perception of the blurred image can be improved.
[0015] In another possible design of the first aspect, the above method further includes: in response to the seventh operation of the user, the electronic device obtains a seventh blurred image, and the seventh blurred image includes a moving object. Next, in response to the eighth operation of the user, an eighth blurred image is obtained. The eighth blurred image includes the above moving object; that is to say, the moving object included in the eighth blurred image is the same as the moving object included in the seventh blurred image, and the blurring degree of the eighth blurred image is less than the blurring degree of the seventh blurred image. Among them, the moving speed of the moving object is less than the speed threshold when the seventh blurred image is obtained, and the moving speed of the moving object is greater than or equal to the speed threshold when the eighth blurred image is obtained.
[0016] It should be understood that the seventh operation of the above user and the eighth operation of the above user may be the same as or different from the first operation of the above user.
[0017] In this design, the electronic device can change the blurring degree of the blurred image obtained by the electronic device according to the shooting scene, such as the moving speed of the moving object. Since in some shooting scenes, for example, the moving speed of the moving object is greater than or equal to the speed threshold, the blurring degree of the blurred image is reduced by the electronic device. Then, in these scenes, the electronic device can obtain a blurred image with a better blurring effect by reducing the blurring degree of the blurred object, and the user perception of the blurred image can be improved.
[0018] In another possible design of the first aspect, the blurring degree of the second blurred image is less than the blurring degree of the first blurred image, including: the clarity of the background area of the second blurred image is higher than the clarity of the background area of the first blurred image.
[0019] In another possible design of the first aspect, the clarity of the background area of the second blurred image is higher than that of the background area of the first blurred image, including: the equivalent aperture value of the second blurred image is greater than the equivalent aperture value of the first blurred image.
[0020] In another possible design of the first aspect, the electronic device captures the first blurred image, including: the electronic device acquires the original image through the camera. Then, the electronic device segments the background area of the original image from the original image. Next, the electronic device reduces the clarity of the background area of the original image to obtain the first blurred image. Among them, the non-background area of the original image is the area where the focus target of the electronic device is located; the background area of the original image is the area other than the area where the focus target of the electronic device is located in the original image.
[0021] In this design, the electronic device can quickly and accurately obtain the blurred image by reducing the background clarity after background segmentation.
[0022] In another possible design of the first aspect, before the electronic device reduces the clarity of the background area of the original image, the method further includes: the electronic device obtains the blurring parameter based on the shooting scene information or the shooting distance. The shooting scene information represents the environment where the electronic device is located when the shooting operation is performed, and the shooting distance represents the distance between the electronic device and the shooting target. And, reducing the clarity of the background area of the original image includes: the electronic device reduces the clarity of the background area of the original image according to the blurring parameter.
[0023] In this design, the electronic device can efficiently adjust the degree of reducing the clarity of the background area of the original image subsequently through the blurring parameter. That is to say, the electronic device can control the blurring degree of the subsequent obtained blurred image through the blurring parameter.
[0024] In another possible design of the first aspect, the blurring parameter includes a first blurring parameter or a second blurring parameter, and the second blurring parameter is different from the first blurring parameter. The electronic device obtains the blurring parameter based on the shooting scene information or the shooting distance, including: if the shooting distance is less than the distance threshold, the electronic device obtains the first blurring parameter based on the shooting distance; if the shooting distance is greater than or equal to the distance threshold, the electronic device obtains the second blurring parameter based on the shooting distance. And, reducing the clarity of the background area of the original image according to the blurring parameter includes: if the blurring parameter is the first blurring parameter, the electronic device reduces the clarity of the background area of the original image at the first ratio. If the blurring parameter is the second blurring parameter, the electronic device reduces the clarity of the background area of the original image at the second ratio or does not reduce the clarity of the background area of the original image. Among them, the second ratio is lower than the first ratio.
[0025] In this design, the electronic device can flexibly control the blurring degree of the subsequent obtained blurred image through the blurring parameter.
[0026] In another possible design of the first aspect, the above-mentioned shooting scene information includes a light intensity index, the light intensity index is inversely proportional to the ambient light intensity where the electronic device is located, and the blurring parameter includes a third blurring parameter or a fourth blurring parameter, and the fourth blurring parameter is different from the third blurring parameter. The above-mentioned electronic device obtains the blurring parameter based on the shooting scene information or the shooting distance, including: if the light intensity index is less than the intensity threshold, the electronic device obtains the third blurring parameter based on the light intensity index. If the light intensity index is greater than or equal to the intensity threshold, the electronic device obtains the fourth blurring parameter based on the light intensity index. And, the above-mentioned electronic device reduces the clarity of the background area of the original image according to the blurring parameter, including: if the blurring parameter is the third blurring parameter, the electronic device reduces the clarity of the background area of the original image at the third ratio. If the blurring parameter is the fourth blurring parameter, the electronic device reduces the clarity of the background area of the original image at the fourth ratio or does not reduce the clarity of the background area of the original image. Wherein, the fourth ratio is lower than the third ratio.
[0027] In this design, the electronic device can flexibly control the blurring degree of the subsequent obtained blurred image through the blurring parameter.
[0028] In another possible design of the first aspect, the above-mentioned shooting scene information includes a focus coordinate, the focus coordinate represents the position of the focusing target of the electronic device in the original image, and the blurring parameter includes a fifth blurring parameter or a sixth blurring parameter, and the sixth blurring parameter is different from the fifth blurring parameter. The above-mentioned electronic device obtains the blurring parameter based on the shooting scene information or the shooting distance, including: if the variance of the focus coordinates of multiple frames of original images is less than the variance threshold, the electronic device obtains the fifth blurring parameter based on the focus coordinates. The multiple frames of original images include the current frame of the original image and N frames before the current frame of the original image, and N is a positive integer greater than or equal to 1. If the variance of the focus coordinates of multiple frames of original images is greater than or equal to the variance threshold, the electronic device obtains the sixth blurring parameter based on the focus coordinates. And, the above-mentioned reducing the clarity of the background area of the original image according to the blurring parameter includes: if the blurring parameter is the fifth blurring parameter, the electronic device reduces the clarity of the background area of the original image at the fifth ratio. If the blurring parameter is the sixth blurring parameter, the electronic device reduces the clarity of the background area of the original image at the sixth ratio or does not reduce the clarity of the background area of the original image. Wherein, the sixth ratio is lower than the fifth ratio.
[0029] In this design, the electronic device can flexibly control the blurring degree of the subsequent obtained blurred image through the blurring parameter.
[0030] In another possible design of the first aspect, the above shooting scene information includes a subject detection frame and a focus tracking frame, the defocusing parameter includes a seventh defocusing parameter or an eighth defocusing parameter, and the eighth defocusing parameter is different from the seventh defocusing parameter. And the obtaining of the defocusing parameter based on the shooting scene information or the shooting distance includes: if the subject detection frame and the focus tracking frame corresponding to the original image of the current frame match, the electronic device obtains the seventh defocusing parameter based on the subject detection frame and the focus tracking frame. If the subject detection frame and the focus tracking frame corresponding to the original image of the current frame do not match, the electronic device obtains the eighth defocusing parameter based on the subject detection frame and the focus tracking frame. And, the reducing of the clarity of the background area of the original image according to the defocusing parameter includes: if the defocusing parameter is the seventh defocusing parameter, the electronic device reduces the clarity of the background area of the original image at a seventh ratio. If the defocusing parameter is the eighth defocusing parameter, the electronic device reduces the clarity of the background area of the original image at an eighth ratio or does not reduce the clarity of the background area of the original image. Wherein, the eighth ratio is lower than the seventh ratio.
[0031] In this design, the electronic device can flexibly control the defocusing degree of the subsequent obtained defocused image through the defocusing parameter.
[0032] In another possible design of the first aspect, the above shooting scene information includes a subject category and a focus tracking category, the defocusing parameter includes a ninth defocusing parameter or a tenth defocusing parameter, and the tenth defocusing parameter is different from the ninth defocusing parameter. And, the obtaining of the defocusing parameter based on the shooting scene information or the shooting distance includes: if the subject category and the focus tracking category corresponding to the original image of the current frame match, the electronic device obtains the ninth defocusing parameter based on the subject category and the focus tracking category. If the subject category and the focus tracking category corresponding to the original image of the current frame do not match, the electronic device obtains the tenth defocusing parameter based on the subject category and the focus tracking category. And, the reducing of the clarity of the background area of the original image according to the defocusing parameter includes: if the defocusing parameter is the ninth defocusing parameter, the electronic device reduces the clarity of the background area of the original image at a ninth ratio. If the defocusing parameter is the tenth defocusing parameter, the electronic device reduces the clarity of the background area of the original image at a tenth ratio or does not reduce the clarity of the background area of the original image. Wherein, the tenth ratio is lower than the ninth ratio.
[0033] In this design, the electronic device can flexibly control the defocusing degree of the subsequent obtained defocused image through the defocusing parameter.
[0034] In yet another possible design of the first aspect, the above-mentioned shooting scene information includes the target motion speed, the blurring parameter includes an eleventh blurring parameter or a twelfth blurring parameter, and the eleventh blurring parameter is different from the twelfth blurring parameter. Moreover, obtaining the blurring parameter based on the shooting scene information or the shooting distance includes: if the target motion speed is less than the speed threshold, the electronic device obtains the eleventh blurring parameter based on the target motion speed. If the target motion speed is greater than or equal to the speed threshold, the electronic device obtains the twelfth blurring parameter based on the target motion speed; the twelfth blurring parameter is different from the eleventh blurring parameter. Moreover, reducing the clarity of the background area of the original image according to the blurring parameter includes: if the blurring parameter is the eleventh blurring parameter, the electronic device reduces the clarity of the background area of the original image at the eleventh ratio. If the blurring parameter is the twelfth blurring parameter, the electronic device reduces the clarity of the background area of the original image at the twelfth ratio or does not reduce the clarity of the background area of the original image. Among them, the twelfth ratio is lower than the eleventh ratio.
[0035] In this design, the electronic device can flexibly control the blurring degree of the subsequent obtained blurred image through the blurring parameter.
[0036] In another possible design of the first aspect, the above method further includes: in response to a second operation, the electronic device displays a first prompt on the shooting preview interface, and the first prompt is used to indicate reducing the blurring degree of the second blurred image.
[0037] In a second aspect, there is provided an electronic device, which includes a memory, one or more processors, and the memory is coupled to the processors; wherein, computer program code is stored in the memory, and the computer program code includes computer instructions; when the computer instructions are executed by the processors, the electronic device is enabled to execute the method provided by the above-mentioned first aspect and any possible design of the first aspect.
[0038] In a third aspect, there is provided a computer-readable storage medium, including computer instructions, which when running on an electronic device, enable the electronic device to execute the method provided by the above-mentioned first aspect and any possible design of the first aspect.
[0039] In a fourth aspect, there is provided a computer program product containing instructions, which when running on an electronic device, enable the electronic device to execute the method provided by the above-mentioned first aspect and any possible design of the first aspect.
[0040] In a fifth aspect, there is provided a chip system, which is applied to an electronic device. The chip system includes one or more processors, and the processors are used to call computer instructions to enable the electronic device to execute the method provided by the above-mentioned first aspect and any possible design of the first aspect.
[0041] Among them, for the technical effects brought by any one of the design manners in the second aspect to the fifth aspect, reference may be made to the technical effects brought by different design manners in the first aspect, which will not be elaborated herein. Description of the Drawings
[0042] Figure 1 It is a schematic diagram of the pre- and post-blurring effects provided by an embodiment of the present application;
[0043] Figure 2 It is another schematic diagram of the pre- and post-blurring effects provided by an embodiment of the present application;
[0044] Figure 3 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present application;
[0045] Figure 4 It is a schematic diagram of the architecture of an electronic device provided by an embodiment of the present application;
[0046] Figure 5 It is a schematic flowchart of a shooting method provided by an embodiment of the present application;
[0047] Figure 6 It is a schematic diagram of a user graphical interface provided by an embodiment of the present application;
[0048] Figure 7 It is a schematic diagram of the data flow on a mobile phone provided by an embodiment of the present application;
[0049] Figure 8 It is a schematic flowchart of the processing of the subject detection algorithm and the focus tracking algorithm provided by an embodiment of the present application;
[0050] Figure 9 It is a schematic diagram of the principle of the depth calculation process provided by an embodiment of the present application;
[0051] Figure 10 It is another schematic diagram of a user graphical interface provided by an embodiment of the present application;
[0052] Figure 11 It is a schematic diagram of a set of shooting scenes provided by an embodiment of the present application;
[0053] Figure 12 It is a schematic diagram of another set of shooting scenes provided by an embodiment of the present application;
[0054] Figure 13 It is a schematic diagram of a set of shooting scenes provided by an embodiment of the present application;
[0055] Figure 14 It is a schematic diagram of another set of shooting scenes provided by an embodiment of the present application;
[0056] Figure 15 It is a schematic diagram of a set of shooting scenes provided by an embodiment of the present application;
[0057] Figure 16 A schematic diagram of another set of shooting scenes provided by the embodiments of the present application;
[0058] Figure 17 A schematic diagram of the structure of another electronic device provided by the embodiments of the present application;
[0059] Figure 18 A schematic diagram of a chip system provided by the embodiments of the present application. Detailed implementation manners
[0060] Next, the technical solutions in the embodiments of the present application will be described with reference to the accompanying drawings in the embodiments of the present application. Among them, in the description of the present application, unless otherwise specified, " / " means that the objects associated before and after are in an "or" relationship. For example, A / B may represent A or B; "and / or" in the present application is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. These three situations, where A and B can be singular or plural. And, in the description of the embodiments of the present application, unless otherwise specified, "a plurality of" means two or more than two. "At least one (piece)" or similar expressions below refer to any combination of these items, including any combination of single item (piece) or plural items (pieces). For example, at least one (piece) of a, b, or c may represent: a, b, c, a - b, a - c, b - c, or a - b - c, where a, b, c can be single or multiple. In addition, in order to clearly describe the technical solutions of the embodiments of the present application, in the embodiments of the present application, words such as "first" and "second" are used to distinguish the same items or similar items with basically the same functions and effects. Those skilled in the art can understand that the words such as "first" and "second" do not limit the quantity and execution order, and the words such as "first" and "second" do not necessarily limit to be different.
[0061] At the same time, in the embodiments of the present application, words such as "exemplary" or "for example" are used to represent examples, illustrations or explanations. Any embodiment or design solution described as "exemplary" or "for example" in the embodiments of the present application should not be construed as being more preferred or having more advantages than other embodiments or design solutions. Exactly speaking, using words such as "exemplary" or "for example" aims to present relevant concepts in a specific way for easy understanding.
[0062] In the technical solutions disclosed in the present application, the collection, storage, use, processing, transmission, provision and disclosure of the user's personal information and other processes all comply with the provisions of relevant laws and regulations and do not violate public order and good customs.
[0063] With the development of terminal technology, users are using electronic devices more and more frequently. To meet the needs of users to record and share their lives anytime and anywhere, most electronic devices such as mobile phones and tablets have a shooting function, and the electronic devices can take pictures, record videos, etc. through the shooting function. To improve the user perception of the photos, the electronic devices can add a blurring effect to the photos to blur the background of the photos, highlight the foreground of the photos, etc.
[0064] In some solutions, after the electronic device takes a picture in response to a shooting instruction, a blurring effect is added to the picture. For example, in response to the shooting instruction, the electronic device takes a picture. After that, the electronic device performs foreground and background segmentation on the picture to obtain the foreground and background of the picture. Next, the electronic device reduces the clarity of the background and / or enhances the clarity of the foreground to obtain a blurred picture (hereinafter referred to as a blurred picture for short).
[0065] In this solution, the electronic device can only blur the picture through fixed parameters. For example, the clarity of the background is reduced by a preset reduction coefficient of the background clarity, or the clarity of the foreground is enhanced by a preset enhancement coefficient of the foreground clarity; this will cause the blurring process of the electronic device to be inflexible, difficult to meet the shooting needs of users, and reduce the user experience. Also, in some shooting scenarios, such as shooting scenarios with relatively low ambient light, shooting scenarios where the distance between the shooting object and the electronic device is relatively far, etc. In these shooting scenarios, when the electronic device blurs the picture with fixed parameters, the effect of the blurred picture will be poor, affecting the beauty of the blurred picture.
[0066] In view of this, an embodiment of the present application provides a shooting method. In this method, the electronic device identifies the shooting scenario of the electronic device to obtain scenario identification information. After that, the electronic device adjusts the blurring parameters according to the scenario identification information, and blurs the picture to different degrees according to the blurring parameters. For example, the clarity of the background of the picture is reduced to different degrees, and / or the clarity of the foreground of the picture is enhanced to different degrees. That is to say, the blurring degree of the picture is related to the shooting scenario of the electronic device. It can be seen that the electronic device can flexibly add a blurring effect to the picture. Also, since the blurring degree of the picture is related to the shooting scenario of the electronic device, in some shooting scenarios, such as shooting scenarios with relatively low ambient light, shooting scenarios where the distance between the shooting object and the electronic device is relatively far, etc. The electronic device can reduce the blurring degree of the picture, or even not blur the picture, which can improve the effect of the blurred picture and the beauty of the blurred picture.
[0067] Among them, the foreground can also be referred to as the foreground area, which can be understood as the area in a photo or image where the focusing target of the electronic device is located. The background can also be referred to as the background area, which can be understood as the area in the photo or image other than the area where the focusing target of the electronic device is located. The focusing target is the target corresponding to the focus of the camera of the electronic device.
[0068] Exemplarily, refer to Figure 1 ; in Figure 1 , the part filled with slashes indicates relatively low clarity. As can be seen from Figure 1 , there is a phenomenon that the edge of the "person" in the blurred photo is blurred. In Figure 1 , the electronic device blurs the photo with fixed parameters. During the process of the electronic device taking the photo shown in Figure 1 , a part of the "person" in the photo, such as the edge of the "person", is segmented as the background by the electronic device, and the clarity is reduced; another part of the "person" in the photo, such as the main body of the "person", is segmented as the foreground by the electronic device, and the clarity remains unchanged. Since the electronic device blurs the photo with fixed parameters, in the blurred photo, there will be a relatively large difference in clarity between the edge of the "person" and the main body of the "person", that is, the contrast in clarity between the edge of the "person" and the main body of the "person" is relatively strong. This will affect the blurring effect of the photo and the user's perception of the photo.
[0069] Also exemplarily, refer to Figure 2 ; in Figure 2 , the part filled with horizontal lines indicates low clarity, and the clarity of the part filled with horizontal lines is higher than Figure 1 the clarity of the part filled with slashes in Figure 2 , the electronic device adopts the shooting method provided by the embodiment of the present application to take a photo and blur the photo. During the process of the electronic device taking the photo shown in Figure 2 , the shooting scene of the electronic device is the same as the shooting scene corresponding to the above Figure 1 . During the process of the electronic device taking the photo shown in Figure 2 , the electronic device changes the blurring degree of blurring the photo according to the shooting scene. In this way, even if the edge of the "person" in the photo is segmented as the background by the electronic device and the clarity is reduced, and the main body of the "person" in the photo is segmented as the foreground by the electronic device and the clarity remains unchanged. It will not result in a relatively large difference in clarity between the edge of the "person" and the main body of the "person". Even, there will be no visual difference in clarity between the edge of the "person" and the main body of the "person". Thus, the blurring effect of the photo can be improved, and the user's perception of the photo can be improved.
[0070] Exemplarily, the technical solution provided by the embodiments of the present application can be applied to the process of taking pictures with an electronic device. In particular, it is applicable to the process of using the electronic device to capture pictures.
[0071] Among them, the process of the electronic device capturing pictures can be realized through the "automatic picture capture" function of the electronic device. The "automatic picture capture" function can also be called "eagle-eye picture capture", "wonderful picture capture", etc. Exemplarily, the electronic device can analyze the preview image during the shooting process; if the aesthetic score of the preview image is relatively high, the electronic device takes a picture, and if a picture capture target appears in the preview image, the electronic device takes a picture; among them, the picture capture target can be preset by the electronic device or specified by the user. Specifically, for the process of the electronic device capturing pictures, reference can be made to the related technology, and the embodiments of the present application will not elaborate here.
[0072] Among them, the above-mentioned electronic device can also be called a terminal, a terminal device, a user equipment (UE), a mobile station (MS), a mobile terminal (MT), etc. The above-mentioned electronic device 100 can be a mobile phone, a tablet computer, a wearable device, a smart screen, an augmented reality (AR) / virtual reality (VR) device, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, a personal digital assistant (PDA), etc., which are electronic devices with a shooting function. The embodiments of the present application do not impose any restrictions on the product form of the electronic device.
[0073] Next, the hardware structure and architecture of the electronic device provided by the embodiments of the present application will be introduced.
[0074] Figure 3 Fig. shows the schematic diagram of the hardware structure of the electronic device 100. The electronic device 100 may include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a sensor module 180, a camera 193, and a display screen 194, etc. Among them, the sensor module 180 may include a distance sensor 180F, a touch sensor 180K, etc.
[0075] It can be understood that the structure illustrated in the embodiments of the present invention does not constitute a specific limitation on the electronic device 100. In some other embodiments of the present application, the electronic device 100 may include more or fewer components than shown in the figure, or combine certain components, or split certain components, or have different component arrangements. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.
[0076] The processor 110 may include one or more processing units. For example, the processor 110 may include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Among them, different processing units may be independent devices or integrated in one or more processors.
[0077] Among them, the controller may be the nerve center and command center of the electronic device 100. The controller may generate operation control signals according to the instruction operation code and timing signal to complete the control of fetching and executing instructions.
[0078] A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. This memory may store the instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to use the instruction or data again, it can directly call it from the memory. This avoids repeated accesses, reduces the waiting time of the processor 110, and thus improves the efficiency of the system.
[0079] In some embodiments, the processor 110 may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface, etc.
[0080] The I2C interface is a two-way synchronous serial bus that includes a serial data line (SDA) and a serial clock line (SCL). In some embodiments, the processor 110 may include multiple groups of I2C buses. The processor 110 may be respectively coupled to the touch sensor 180K, the charger, the flash, the camera 193, etc. through different I2C bus interfaces. For example: The processor 110 may be coupled to the touch sensor 180K through the I2C interface, enabling the processor 110 to communicate with the touch sensor 180K through the I2C bus interface to implement the touch function of the electronic device 100.
[0081] The MIPI interface may be used to connect the processor 110 to peripheral devices such as the display screen 194 and the camera 193. The MIPI interface includes a camera serial interface (CSI), a display serial interface (DSI), etc. In some embodiments, the processor 110 and the camera 193 communicate through the CSI interface to implement the shooting function of the electronic device 100. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 100.
[0082] The USB interface 130 is an interface that complies with the USB standard specification. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. The USB interface 130 can be used to connect a charger to charge the electronic device 100, and can also be used to transfer data between the electronic device 100 and peripheral devices. It can also be used to connect headphones to play audio. This interface can also be used to connect other electronic devices, such as AR devices, etc.
[0083] It can be understood that the interface connection relationship between the modules schematically shown in the embodiments of the present invention is only a schematic illustration and does not constitute a structural limitation on the electronic device 100. In other embodiments of the present application, the electronic device 100 may also adopt different interface connection methods in the above embodiments, or a combination of multiple interface connection methods.
[0084] The electronic device 100 realizes the display function through the GPU, the display screen 194, and the application processor, etc. The GPU is a microprocessor for image processing, and is connected to the display screen 194 and the application processor. The GPU is used to execute mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs, which execute program instructions to generate or change display information.
[0085] The display screen 194 is used to display images, videos, etc. The display screen 194 includes a display panel. The display panel can adopt a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active matrix organic light-emitting diode or an active matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 100 may include 1 or N display screens 194, where N is a positive integer greater than 1.
[0086] The electronic device 100 can realize the shooting function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, and the application processor, etc.
[0087] The ISP is used to process the data fed back by the camera 193. For example, when taking a photo, the shutter is opened, and light passes through the lens and is transmitted to the camera's photosensitive element. The light signal is converted into an electrical signal, and the camera's photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also optimize the noise, brightness, and skin color of the image through algorithms. The ISP can also optimize parameters such as exposure and color temperature of the shooting scene. In some embodiments, the ISP can be provided in the camera 193.
[0088] The camera 193 is used to capture still images or videos. An object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard format such as RGB or YUV. In some embodiments, the electronic device 100 may include one or N cameras 193, where N is a positive integer greater than 1.
[0089] The NPU is a neural-network (NN) computing processor. By drawing on the structure of biological neural networks, such as the transmission pattern between human brain neurons, it can quickly process the input information and can also continuously self-learn. Through the NPU, applications such as intelligent cognition of the electronic device 100 can be realized, such as image recognition, face recognition, voice recognition, and text understanding.
[0090] The external memory interface 120 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 100. The external memory card communicates with the processor 110 through the external memory interface 120 to implement the data storage function. For example, files such as music and videos are saved in the external memory card.
[0091] The internal memory 121 can be used to store computer-executable program code, and the executable program code includes instructions. The processor 110 executes various functional applications and data processing of the electronic device 100 by running the instructions stored in the internal memory 121. The internal memory 121 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, application programs required for at least one function (such as a sound playback function, an image playback function, etc.). The data storage area can store data created during the use of the electronic device 100 (such as audio data, a phone book, etc.). In addition, the internal memory 121 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash storage (UFS), etc.
[0092] The distance sensor 180F is used to measure distance. The electronic device 100 can measure distance by infrared or laser. In some embodiments, the electronic device 100 can use the distance sensor 180F to measure distance to achieve rapid focusing.
[0093] The touch sensor 180K, also known as the "touch panel". The touch sensor 180K can be disposed on the display screen 194. The touch sensor 180K and the display screen 194 form a touch screen, also known as a "touch screen". The touch sensor 180K is used to detect touch operations acting thereon or nearby. The touch sensor can transmit the detected touch operation to the application processor to determine the type of touch event. Visual output related to the touch operation can be provided through the display screen 194. In other embodiments, the touch sensor 180K can also be disposed on the surface of the electronic device 100, at a different position from the display screen 194.
[0094] After introducing the hardware structure of the electronic device provided in the embodiments of the present application, the architecture of the electronic device is introduced.
[0095] The architecture of the electronic device 100 can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservices architecture, or a cloud architecture. In the embodiments of the present invention, the Android TM system is taken as an example to exemplarily illustrate the architecture of the electronic device 100.
[0096] Exemplarily, refer to Figure 4 . The layered architecture divides software into several layers, and each layer has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, Android TMThe system is divided into five layers, from top to bottom are the application layer, the application framework layer, the hardware abstraction layer (HAL), the kernel layer, and the hardware layer.
[0097] The application layer can include a series of application packages.
[0098] Such as Figure 4 shown, the application packages can include applications such as the camera and the gallery.
[0099] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications in the application layer. The application framework layer includes some predefined functions.
[0100] Such as Figure 4 shown, the application framework layer can include the window manager, the content provider, the view system, the resource manager, etc.
[0101] The window manager is used to manage window programs. The window manager can obtain the display screen size, determine whether there is a status bar, lock the screen, capture the screen, etc.
[0102] The content provider is used to store and obtain data, and make this data accessible to applications. The data can include videos, images, audio, dialed and received calls, browsing history and bookmarks, phone books, etc.
[0103] The view system includes visible controls, such as controls for displaying text, controls for displaying pictures, etc. The view system can be used to build applications. The display interface can be composed of one or more views. For example, a display interface including a text message notification icon can include a view for displaying text and a view for displaying pictures.
[0104] The resource manager provides various resources for applications, such as localized strings, icons, pictures, layout files, video files, etc. The hardware abstraction layer is a layer of structure abstracted between the hardware and the upper layer. It is used to provide a unified interface for the upper layer. So that the upper layer applications do not have to know how the underlying hardware specifically works, thus shielding the implementation details of the lower layer.
[0105] The hardware abstraction layer can provide a standard interface to display the device hardware functions to a higher-level application framework layer. The hardware abstraction layer contains multiple library modules, and each module implements an interface for a specific type of hardware component. The library modules can include a camera module, a proximity sensor module, and so on. When the application framework layer requests access to the device hardware, the system will load the corresponding library module for the hardware component. The manufacturer can define the interface in the hardware abstraction layer.
[0106] Among them, the camera module can include: a scene distance perception module, a scene content perception module, a bokeh decision module, a bokeh processing module, and so on. In the following examples, the functions of each of the above modules will be described in detail.
[0107] The kernel layer is the layer between the hardware and the software. The kernel layer includes at least a display driver, a camera driver, an audio driver, and a sensor driver.
[0108] The hardware layer includes at least a proximity sensor and a camera.
[0109] Next, in combination with the shooting scenario of the electronic device, the working processes of the hardware and software of the electronic device during shooting will be described exemplarily.
[0110] After the electronic device starts shooting, such as when the electronic device turns on the camera application, the electronic device displays a shooting preview interface. During the process of the electronic device displaying the shooting preview interface, the electronic device can drive the camera to collect image data through the camera driver located in the kernel layer, and the electronic device can drive the proximity sensor to collect distance information through the sensor driver. After that, the scene content perception module obtains scene content information based on the image data. And, the scene distance perception module obtains the shooting distance based on the distance information. Next, the bokeh decision module obtains bokeh parameters based on the above shooting distance and scene content information. After that, the bokeh processing module performs bokeh processing on the image data collected by the camera according to the bokeh parameters, and sends the bokeh shooting result obtained from the bokeh processing to the camera application for the user to view, or saves it by the gallery application.
[0111] For the detailed descriptions of the above bokeh parameters, shooting distance, and scene content information, please refer to the specific introduction below and will not be elaborated here.
[0112] Next, it will be assumed that the electronic device is a mobile phone, and the mobile phone has the above Figure 3 shown hardware structure and the above Figure 4 shown architecture as an example to introduce the technical solution provided by the embodiment of the present application.
[0113] Exemplarily, refer to Figure 5 The shooting method provided by the embodiment of the present application may include:
[0114] The mobile phone displays a shooting preview interface.
[0115] After the mobile phone displays the shooting preview interface, the camera of the mobile phone continuously collects image data and displays the image data collected by the camera on the shooting preview interface.
[0116] As a possible implementation manner, in response to a triggering operation on the camera application, the mobile phone displays a shooting preview interface.
[0117] In some examples, refer to Figure 6 , the mobile phone displays the desktop 700. In response to a click operation on the camera icon 701, the mobile phone displays a shooting preview interface 710; the shooting preview interface 710 may include a capture control 711 in a closed state. Next, in response to a click operation on the capture control 711 in the closed state, the mobile phone displays a shooting preview interface 720; the shooting preview interface 720 may include an enabled capture control 721 and a blurred control 723 in a closed state. After that, in response to a click operation on the blurred control 723 in the closed state, the mobile phone displays a shooting preview interface 730; the shooting preview interface 730 includes an enabled blurred control 731.
[0118] It should be understood that the above capture control is used to turn on or off the capture function of the mobile phone. After the capture function is turned on, the mobile phone can automatically take pictures. And, the above blurred control is used to turn on or off the photo blurring function of the mobile phone. After the blurring function is started, the mobile phone can automatically add a blurring effect to the taken photo.
[0119] In other examples, the above shooting preview interface 710 may further include an automatic capture prompt 712 in a closed state. Next, in response to a click operation on the capture control 711 in the closed state, the mobile phone displays a shooting preview interface 720; the shooting preview interface 720 includes an enabled automatic capture prompt 722.
[0120] As another possible implementation manner, in response to a voice command, the mobile phone displays a shooting preview interface.
[0121] Exemplarily, in response to obtaining a voice wake-up word, the mobile phone turns on the voice assistant function; after that, in response to obtaining a voice command, such as, "start taking pictures", the mobile phone displays a shooting preview interface.
[0122] S601. The scene distance module obtains the distance between the shooting object and the mobile phone.
[0123] Among them, the object to be photographed can also be referred to as the photographed object, the object to be photographed, etc. The object to be photographed can be understood as the object targeted by the photographing action of the mobile phone. In the following text, for the convenience of expression, the distance between the above-mentioned object to be photographed and the mobile phone can be simply referred to as the photographing distance.
[0124] Generally speaking, during the process of mobile phone photographing, the mobile phone will correspond the focus of the camera to the object to be photographed, and then the mobile phone can obtain the photographing distance according to the focus of the preview image.
[0125] As a possible implementation manner, the mobile phone realizes focusing through an auto focus (AF) module. Thus, the mobile phone can obtain the AF data of the AF module and obtain the photographing distance according to the AF data.
[0126] For example, the mobile phone can obtain the photographing distance based on the AF data through a preset conversion function, such as the LUT_Pos2Dist function. Among them, the LUT_Pos2Dist function can be pre-configured.
[0127] As another possible implementation manner, the mobile phone realizes focusing through a distance sensor, such as a laser focusing module. Thus, the mobile phone can obtain the focusing information of the laser focusing module and obtain the photographing distance according to the focusing information of the laser focusing module.
[0128] Among them, the above-mentioned laser focusing module can be a single-point laser time of flight (ToF) module or a double time of flight (DToF) module or structured light.
[0129] S602. The scene content perception module obtains scene content information.
[0130] Among them, the scene content information can be used to characterize the shooting environment where the mobile phone is located during shooting. The scene content information can include one or more of ambient light intensity information, moving object detection information, tracking focus information, number of faces information, face detection frame information, and motion type label.
[0131] As a possible implementation manner, the scene perception module can obtain the scene content information through a tiny stream.
[0132] It can be understood that during the shooting process of the mobile phone, the image data collected by the mobile phone camera will be divided into multiple data streams. Some data streams are used to present the preview image on the preview interface of the mobile phone, some data streams are used to generate photos, and some data streams are used to assist shooting, such as guiding the camera to focus, adjusting the parameters of the camera, etc.
[0133] Exemplarily, refer to Figure 7, after preprocessing the image data collected by the camera, the mobile phone can obtain a first data stream and a second data stream. Among them, the above preprocessing can include processes such as encoding conversion. The first data stream is used to present a preview image on the preview interface of the mobile phone, and the second data stream is used to generate shooting results, such as photos, videos, images, etc. In addition, the first data stream can also be subjected to downsampling processing to reduce the resolution of the first data stream to obtain a third data stream, and the third data stream is used to assist the mobile phone in shooting. Among them, the first data stream can also be called the preview stream, and the third data stream can also be called the tiny stream. In some embodiments, the image data collected by the above camera can be called the original image data, and the original image data corresponds to the original image.
[0134] It should be understood that during the shooting process of the mobile phone, the mobile phone can also have more data streams, which can be specifically set according to actual usage requirements, and the embodiments of the present application do not impose any restrictions on this.
[0135] As an example, the scene perception module can use a face detection algorithm on the third data stream to obtain face quantity information and face detection frame information. Among them, the face quantity information can represent the number of faces in each frame of image data; the face detection frame information can represent the size of the faces in each frame of image data.
[0136] As another example, the scene perception module can use a motion reduction exposure algorithm and a moving object detection algorithm on the third data stream to obtain moving object detection information. Among them, the moving object detection can include: the moving speed of the shooting object and the exposure time of the image data. It can be understood that the exposure time can also be numerically equal to the shutter time of the mobile phone camera, which is used to represent the length of the camera exposure time.
[0137] As an example, the focus tracking information can be in the form of focus coordinates; the focus coordinates can be understood as the position of the focus tracking object in the image. For the focus tracking information in the form of focus coordinates, it can be represented by the AF data of the mobile phone camera. It should be understood that the focus tracking object is the object where the camera focus is located when the mobile phone camera collects image data.
[0138] As another example, the focus tracking information can also be in the form of a focus tracking category and a focus tracking frame. The focus tracking category can be understood as the category of the focus tracking object, such as people, animals, plants, buildings, etc. The focus tracking frame can be used to represent the position of the focus tracking object in the image. The scene perception module can use a focus tracking algorithm on the third data stream to obtain the focus tracking information. The focus tracking algorithm can obtain the focus tracking category and the focus tracking frame according to the input subject detection frame and subject category.
[0139] Among them, the above-mentioned main body detection frame and main body category can be obtained by the scene perception module using a main body detection algorithm for the image data. The main body detection frame can be used to represent the position of the main body of the image in the image, and the main body category can be used to represent the category of the main body of the image, such as, people, animals, plants, buildings, and so on. The mobile phone can use relevant flag bits to mark the main body detection frame and main body category, as well as the focus tracking category and focus tracking frame. For example, the main body detection frame and main body category correspond to the main body flag bit, and the focus tracking category and focus tracking frame correspond to the focus tracking flag bit.
[0140] It should be understood that for the main body detection algorithm, it can, based on the input image data of a certain frame, obtain the main body category and main body position in the image corresponding to the image data of this frame. Then, the main body detection algorithm outputs the main body detection frame and main body category.
[0141] It should be noted that the above-mentioned main body category can include: people, animals, plants, buildings, and so on, and the above-mentioned focus tracking category can include: people, animals, plants, buildings, and so on. In specific applications, the main body category can also have more categories, and the embodiments of the present application do not impose any restrictions on this. Also, for the concept of "category", there can be multiple category dimensions. Taking the category of people as an example, according to the gender dimension of people, it can include: men, women; according to the age dimension of people, it can include: teenagers, young people, middle-aged people, elderly people, and so on. It should be noted that in the embodiments of the present application, for the main body category and the focus tracking category, the category dimensions of the two should be unified.
[0142] Also, in the embodiments of the present application, the above-mentioned "position in the image" refers to the positional relationship understood in a two-dimensional space, such as, having left-right, up-down and other positional relationships in the image.
[0143] In some cases, the main body detection algorithm may consume more resources compared to the focus tracking algorithm. Thus, during the shooting process of the mobile phone, the mobile phone can obtain the main body detection frame and main body category of a frame of image data through the main body detection algorithm. And use the focus tracking algorithm for the main body detection frame and main body category of this frame of image data to obtain the main body detection frame and main body category of multiple frames of image data. For example, after the focus tracking algorithm receives the main body detection frame and main body category of a frame of image data; for this frame of image data and multiple frames of image data after this frame of image data, these image data all obtain the focus tracking frame and focus tracking category based on the main body detection frame and main body category of this frame of image data until receiving the main body detection frame and main body category of another frame of image data. Then, for a certain frame of image data, its corresponding main body detection frame and main body category can be the main body detection frame and main body category of this frame of image data, or it can be the main body detection frame and main body category received by the focus tracking algorithm to obtain the focus tracking frame and focus tracking category of this frame of image data.
[0144] Exemplarily, see Figure 8, the main body detection algorithm obtains the main body detection frame and main body category of the A-th frame image data based on the A-th frame image data. Subsequently, the focus tracking algorithm receives the main body detection frame and main body category of the A-th frame image data, and obtains the focus tracking detection frame and focus tracking category of the (A + N)-th frame image data; wherein, between the A-th frame and the (A + N)-th frame image data, the focus tracking algorithm does not receive new main body detection frames and main body categories, and both A and N are positive integers. Since, between the A-th frame image data and the (A + N)-th frame image data, the focus tracking algorithm does not receive new main body detection frames and main body categories, therefore, for the A-th frame image data to the (A + N)-th frame image data, the main body detection frames and main body categories corresponding to these image data can be the main body detection frame and main body category of the above-mentioned A-th frame image data.
[0145] As an example, the scene perception module can use an artificial intelligence (AI) capture detection algorithm for the third data stream to obtain a motion type label, and the motion type label can be used to characterize the motion type of the shooting object.
[0146] As a possible implementation manner, the above-mentioned scene content information may further include ambient light intensity information. The ambient light intensity information is used to characterize the intensity of light in the environment where the mobile phone is located when the camera of the mobile phone captures image data. The scene perception module can obtain the ambient light intensity information through the auto exposure (AE) data of the camera.
[0147] For example, the mobile phone can obtain LuxIdx information through AE data, and the value of LuxIdx information is inversely proportional to the ambient light intensity; that is to say, the larger the value of the Lux Index (LuxIdx) information, the smaller the ambient light intensity; the smaller the value of LuxIdx information, the larger the ambient light intensity.
[0148] It should be understood that for the focus tracking information, moving object detection information, number of faces information, face detection frame information, motion label information, and ambient light intensity information included in the scene content information; these scene content information can be generated by some relevant processing modules based on image data during the process of mobile phone shooting. Therefore, in some embodiments, for the scene perception module, it may not generate the above-mentioned scene content information; the scene perception module can obtain these scene content information from the above-mentioned relevant processing modules after the above-mentioned relevant processing modules generate these scene content information. And, in some other embodiments, the scene perception module can also obtain these scene content information in other more ways, and the embodiments of the present application do not make any restrictions on this.
[0149] S603. In response to the shooting instruction, the defocus decision module obtains defocus parameters based on the scene content information or the shooting distance.
[0150] Among them, the shooting instruction can be generated by the mobile phone in response to the user's triggering shooting operation on the above shooting preview interface. For example, it can be generated by the mobile phone in response to the user clicking the shooting button; or it can be automatically generated by the mobile phone based on the snapshot function. It should be understood that there can be more other generation methods for the shooting instruction, and the embodiments of the present application do not impose any restrictions on this.
[0151] In addition, the triggering timing for the virtualization decision module to obtain the virtualization parameter includes but is not limited to in response to the shooting instruction. In some other embodiments, the virtualization decision module can continuously obtain the virtualization parameter after the mobile phone displays the shooting preview interface. Specifically, the triggering timing for the virtualization decision module to obtain the virtualization parameter can be set according to actual usage needs, and the embodiments of the present application do not impose any restrictions on this.
[0152] Moreover, the above virtualization parameter can be used to control the virtualization degree of the subsequent virtualization processing of the shooting result. The virtualization degree can also be referred to as the virtualization intensity, virtualization coefficient, etc.; the virtualization degree can be understood as the degree of reduction in the clarity of the background of the virtualized shooting result compared to the clarity of the background of the shooting result, and / or the degree of improvement in the clarity of the foreground of the virtualized shooting result compared to the clarity of the foreground of the shooting result. Among them, the virtualized shooting result is obtained by performing virtualization processing on the shooting result.
[0153] In some cases, the virtualization degree can be characterized by the equivalent aperture. The higher the degree of reduction in the clarity of the virtualized shooting result compared to the shooting result, the lower the clarity of the background of the virtualized shooting result, and the larger the equivalent aperture. In some cases, the equivalent aperture is inversely proportional to the equivalent aperture value, that is, the smaller the equivalent aperture value, the larger the equivalent aperture.
[0154] For example, the shooting result A is subjected to virtualization processing to obtain the virtualized shooting result A. The higher the virtualization degree of the shooting result A, the higher the degree of reduction in the clarity of the background of the virtualized shooting result A, that is, the lower the clarity of the background of the virtualized shooting result A; then, the larger the equivalent aperture of the virtualized shooting result A, and the smaller the equivalent aperture value of the virtualized shooting result A. Or, the lower the virtualization degree of the shooting result A, the lower the degree of reduction in the clarity of the background of the virtualized shooting result A; then, the smaller the equivalent aperture of the virtualized shooting result A, and the larger the equivalent aperture value of the virtualized shooting result A. Or, the lower the virtualization degree of the shooting result A, the lower the degree of improvement in the clarity of the foreground of the virtualized shooting result A.
[0155] In some embodiments, the above-mentioned bokeh parameter may be in the form of a value between 0 and 1. If the bokeh parameter is 0, it means that the mobile phone can apply bokeh effect to the captured result. If the bokeh parameter is 1, it means that the mobile phone will not apply bokeh effect to the captured result in the subsequent process. Or, if the bokeh parameter is 1, it means that the mobile phone will apply bokeh effect to the captured result with a relatively low degree of bokeh in the subsequent process.
[0156] Exemplarily, the bokeh parameter can be represented by the INVALID_BOKEH_SCENE parameter. If INVALID_BOKEH_SCENE = 1, the mobile phone will not apply bokeh effect to the captured result in the subsequent process; if INVALID_BOKEH_SCENE = 0, the mobile phone will apply bokeh effect to the captured result in the subsequent process.
[0157] In some embodiments, the above-mentioned bokeh parameter may be in the form of a parameter value. Different parameter values of the bokeh parameter characterize different degrees of bokeh effect on the captured result. For example, the bokeh degree is the highest when the parameter value is 0, and the lowest when the parameter value is 1; if the above parameter value is between (0, 1), the larger the value, the lower the bokeh degree.
[0158] In the following embodiments of the present application, the case where the bokeh parameter is in the form of a value between 0 and 1 will be taken as an example for introduction; it can be understood that in actual applications, the bokeh parameter may have more forms, and the embodiments of the present application do not impose any restrictions on this.
[0159] In some embodiments, if the photographed object is too close to or too far from the mobile phone, it will affect the effect of the mobile phone's foreground and background segmentation of the captured result, which will in turn affect the bokeh effect of the mobile phone on the captured result. Therefore, when the photographed object is too close to or too far from the mobile phone, the mobile phone may not apply bokeh effect to the captured result, or the mobile phone may reduce the degree of bokeh effect applied to the captured result.
[0160] As a possible implementation manner, the bokeh decision module may obtain the bokeh parameter based on the shooting distance.
[0161] Exemplarily, if the shooting distance is within the distance range, the bokeh parameter is 0; if the shooting distance is outside the distance range, the bokeh parameter is 1.
[0162] For example, if the shooting distance > MAX_OBJECT_DISTANCE, then INVALID_BOKEH_SCENE = 1; if the shooting distance < MIN_OBJECT_DISTANCE, then INVALID_BOKEH_SCENE = 1. Wherein, MAX_OBJECT_DISTANCE is the maximum value of the above-mentioned distance range; MIN_OBJECT_DISTANCE is the minimum value of the above-mentioned distance range.
[0163] As another possible implementation, the bokeh decision module may also obtain bokeh parameters based on the above AF data.
[0164] It can be understood that when the AF module of the mobile phone obtains AF data, it has already integrated information such as focus on the image content, pixel focus, and laser focus; that is to say, the AF data can reflect the distance between the shooting object and the mobile phone. Therefore, the bokeh decision module can judge whether the shooting object is too close or too far from the mobile phone through the AF data and obtain bokeh parameters.
[0165] For example, if the AF data > MAX_POSITION, then INVALID_BOKEH_SCENE = 1. If the AF data < MIN_POSITION, then INVALID_BOKEH_SCENE = 1. Where MAX_POSITION is the maximum value of the above distance range, and MIN_POSITION is the minimum value of the above distance range.
[0166] In some embodiments, when the shooting object is a person, if the proportion of the person in the shooting picture is relatively large or relatively small, it will affect the bokeh effect of the mobile phone on the shooting result. Therefore, when the proportion of the person in the shooting picture is too large or too small, the mobile phone may not perform bokeh on the shooting result, or the mobile phone may reduce the bokeh degree of the shooting result.
[0167] As a possible implementation, the bokeh decision module may also obtain bokeh data based on the face detection frame information.
[0168] Exemplarily, if the horizontal size or vertical size of the face detection frame is within a preset size range, the bokeh parameter is 0; otherwise, the bokeh parameter is 1. If in the face detection frame information obtained by the scene perception module in the above step S602, multiple face detection frames are included, the bokeh decision module uses the largest or smallest size among the multiple face detection frames to obtain bokeh data.
[0169] For example, if the horizontal size of the face detection frame < FACE_SIZE_H, then INVALID_BOKEH_SCENE = 1. If the vertical size of the face detection frame < FACE_SIZE_V, then INVALID_BOKEH_SCENE = 1.
[0170] In some embodiments, when the shooting object is moving, if the movement of the shooting object is too fast or too frequent, it will affect the bokeh effect of the mobile phone on the shooting result. Therefore, when the shooting object is moving too fast or moving relatively frequently, the mobile phone may not perform bokeh on the shooting result, or the mobile phone may reduce the bokeh degree of the shooting result.
[0171] As yet another possible implementation, the defocus decision module may also obtain defocus parameters based on the motion type tag.
[0172] Exemplarily, if the motion type tag corresponds to a motion with a relatively fast motion speed, the defocus parameter is 1; if the motion type tag corresponds to a motion with a relatively high motion frequency, the defocus parameter is 1.
[0173] For example, if the motion type tag is WONDERFUL_ACTION_TABLETENNIS, then INVALID_BOKEH_SCENE = 1. If the motion type tag is WONDERFUL_ACTION_BADMINTON, then INVALID_BOKEH_SCENE = 1. If the motion type tag is WONDERFUL_ACTION_SPLASH, then INVALID_BOKEH_SCENE = 1. Among them, the motion corresponding to the motion type tag WONDERFUL_ACTION_TABLETENNIS is table tennis; the motion corresponding to the motion type tag WONDERFUL_ACTION_BADMINTON is badminton, and the motion corresponding to the motion type tag WONDERFUL_ACTION_SPLASH is a splashing motion.
[0174] In some implementations, the motion type tag may be represented by a numerical value; for the correspondence between the numerical value and the motion type tag, refer to Table 1 below.
[0175] Table 1
[0176] Motion Motion type label Value Unknown motion WONDERFUL_UNKNOWN 0 Single-person motion WONDERFUL_HUMAN_SINGLE 1 Multi-person motion WONDERFUL_HUMAN_MULTI 2 Animal motion WONDERFUL_ANIMAL 3 Object motion WONDERFUL_ORDINARY_OBJ 4 Scene motion WONDERFUL_ORDINARY_SCENE 5 Target action WONDERFUL_ACTION 6 Human-pet motion WONDERFUL_GROUP_AC 7 Parent-child motion WONDERFUL_GROUP_HA 8 Jumping motion WONDERFUL_ACTION_JUMP 9 Splashing motion WONDERFUL_ACTION_SPLASH 10 Throwing motion WONDERFUL_ACTION_THROW 11 Running motion WONDERFUL_ACTION_RUN 12 Table tennis motion WONDERFUL_ACTION_TABLETENNIS 13 Badminton motion WONDERFUL_ACTION_BADMINTON 14 Reciprocating motion WONDERFUL_ACTION_TURNAROUND 15 Stretching motion WONDERFUL_STRETCH 16
[0177] Among them, the target action may be a preset target action on the mobile phone, such as football, tennis, and so on.
[0178] Exemplarily, in combination with the correspondence shown in Table 1 above, if the numerical value of the motion type tag is 13, 14, or 10, the defocus decision module obtains a defocus parameter of 1.
[0179] As yet another possible implementation, the defocus decision module may also obtain defocus parameters based on the moving object detection information.
[0180] Exemplarily, if the motion speed of the shooting object is greater than the speed threshold, the defocus parameter is 1. Or, if the exposure time of the image data is greater than the exposure time threshold, the defocus parameter is 1.
[0181] For example, if Motion_Info > FAST_MOTION_TH, then INVALID_BOKEH_SCENE = 1. If Exposure_Time > SAVE_SHUTTER_SPEED, then INVALID_BOKEH_SCENE = 1. Here, Motion_Info represents the motion speed of the shooting object, Exposure_Time represents the exposure time of the image data; FAST_MOTION_TH represents the speed threshold, and SAVE_SHUTTER_SPEED represents the exposure time threshold.
[0182] As a possible implementation, the bokeh decision module can obtain bokeh parameters based on the face count information and the moving object detection information.
[0183] Exemplarily, if the shooting object includes multiple persons and the motion speed of any one of the multiple persons is greater than the speed threshold, then the bokeh parameter is 1. Alternatively, if the shooting object includes multiple persons and the exposure time of the image data is greater than the exposure time threshold, then the bokeh parameter is 1.
[0184] For example, if Face_Cnt > MAX_FACT_CNT and Motion_Info > FAST_MOTION_TH, then INVALID_BOKEH_SCENE = 1. If Face_Cnt > MAX_FACT_CNT and Exposure_Time > SAVE_SHUTTER_SPEED, then INVALID_BOKEH_SCENE = 1. Here, Face_Cnt represents the face count information, and MAX_FACT_CNT represents the count threshold.
[0185] In some embodiments, if the ambient light when the mobile phone is taking pictures is relatively dim or relatively bright, it will affect the bokeh effect of the mobile phone on the shooting result. Thus, when the ambient light is not appropriate, the mobile phone may not perform bokeh on the shooting result, or the mobile phone may reduce the bokeh degree of the shooting result.
[0186] As a possible implementation, the bokeh decision module can obtain bokeh parameters based on the ambient light intensity information.
[0187] Exemplarily, if the ambient light intensity is less than the ambient light intensity threshold, then the bokeh parameter is 1.
[0188] For example, if the LuxIdx information > MAX_LUX_IDX, then INVALID_BOKEH_SCENE = 1. Among them, MAX_LUX_IDX represents the ambient light intensity threshold. As can be seen from the above introduction, the LuxIdx information is inversely proportional to the ambient light intensity.
[0189] In some embodiments, during the process of mobile phone shooting, if the camera of the mobile phone cannot continuously and stably track the shooting object, this will cause the shooting object to jump between the foreground and the background. When the mobile phone subsequently obtains the blurred shooting result based on the shooting result, the shooting object sometimes has its clarity reduced in the background and sometimes has its clarity increased in the foreground, which will affect the blurring effect of the mobile phone on the shooting result. Therefore, in the case of inappropriate ambient light, the mobile phone may not blur the shooting result, or the mobile phone may reduce the degree of blurring of the shooting result.
[0190] As a possible implementation manner, the blurring decision module may obtain blurring parameters according to the focus tracking information.
[0191] In some examples, the blurring decision module may obtain blurring parameters based on the focus coordinates of multiple frames of image data.
[0192] For example, the blurring decision module may obtain blurring parameters based on the variance of the focus coordinates of multiple frames of image data. If the variance of the focus coordinates of the most recent 5 frames of image data is greater than the first variance threshold, and the variance of the focus coordinates of the most recent 10 frames of image data is greater than the second variance threshold, then the blurring parameter is 1. Otherwise, the blurring parameter is 0. It should be understood that the above "most recent" refers to the time closest to the shooting instruction.
[0193] Among them, the variance of the focus coordinates of multiple frames of image data can be calculated through the following process:
[0194] The blurring decision module calculates the difference between the focus coordinates of each adjacent pair of frames of image data among the focus coordinates of multiple frames of image data. Then, it calculates the average value of the above differences. Next, it obtains the variance of the focus coordinates of multiple frames of image data based on the above average value and the above differences. It can be understood that this variance can be used to measure the smoothness of the change in the focus coordinates of multiple frames of image data; the smoother the change in the focus coordinates of multiple frames of image data, the smaller the above variance will be, and if the change in the focus coordinates of multiple frames of image data is less smooth, the larger the above variance will be.
[0195] For example, the focus coordinates of 5 frame of image data are respectively: AF_Pos1, AF_Pos2, AF_Pos3, AF_Pos4, and AF_Pos5. The differences between the focus coordinates of every two adjacent frames of image data are respectively: diff1, diff2, diff3, and diff4. Among them, diff1 = AF_Pos2 - AF_Pos1, diff2 = AF_Pos3 - AF_Pos2, diff3 = AF_Pos4 - AF_Pos3, diff4 = AF_Pos5 - AF_Pos4. Next, the defocus decision module calculates the average value of the focus coordinate differences of the 5 frame of image data. The average value of the focus coordinate differences of the 5 frame of image data is denoted as mean. mean = avg(diff1, diff2, diff3, diff4); where avg() represents the average value calculation. Then, the defocus decision module calculates the variance, and the variance is denoted as var. var = ((diff1 - mean) * (diff1 - mean) + (diff2 - mean) * (diff2 - mean) + (diff3 - mean) * (diff3 - mean) + (diff4 - mean) * (diff4 - mean)).
[0196] In some other examples, the defocus decision module can also obtain the defocus parameter based on the main detection frame and the autofocus frame of the image data; or, the defocus decision module can obtain the defocus parameter based on the main object category and the autofocus category of the image data.
[0197] It should be understood that according to the above description, the autofocus algorithm can obtain the autofocus frame and the autofocus category based on the input main detection frame and the main object category. And, if the mobile phone has one or more of the following situations, such as: the moving speed of the shooting object is too fast, the camera is out of focus, the image quality is relatively low, the camera cannot perform autofocus, etc., the autofocus algorithm will perform smoothing processing on the output autofocus frame and autofocus category in the time domain, which may cause the main detection frame and the autofocus frame of a certain frame of image data to not match, or cause the main object category and the autofocus category of a certain frame of image data to not match.
[0198] For example, the defocus decision module can obtain the defocus parameter as 1 based on that the main detection frame of a certain frame of image data is different from the autofocus frame of that frame of image data, or that the main object category of a certain frame of image data is different from the autofocus category of that frame of image data; otherwise the defocus parameter is 0.
[0199] In some examples, the defocus decision module can also obtain the defocus parameter as 1 based on that the autofocus category is not a person.
[0200] For example, the defocus decision module can obtain the defocus parameter as 1 based on that the autofocus category of a certain frame of image data is not a person.
[0201] The blurring processing module blurs the shooting result based on the above blurring parameters.
[0202] The blurring processing module can perform foreground and background segmentation on the shooting result to obtain the foreground and background of the shooting result. Then, the blurring processing module reduces the clarity of the background of the shooting result and / or enhances the clarity of the foreground of the shooting result to obtain a blurred shooting result. It should be understood that the detailed processes of reducing the clarity of the background of the shooting result and enhancing the clarity of the foreground of the shooting result are similar. For the convenience of description, in the following embodiments of the present application, the example of reducing the clarity of the background of the shooting result will be used for introduction.
[0203] Among them, the above shooting result can be obtained by the mobile phone according to the second data stream shown above. Figure 7 And, the above shooting result may include the original image.
[0204] Among them, the blurring processing module can obtain the degree of reduction in the clarity of the background according to the above blurring parameters.
[0205] For example, when the blurring parameter is in the form of a value between 0 and 1, if the blurring parameter is 0, the clarity of the background is reduced by a first degree; if the blurring parameter is 1, the clarity of the background is reduced by a second degree. Among them, the first degree is higher than the second degree, the first degree is a positive number, and the second degree is an integer or zero. For example, the first degree is 0.8 and the second degree is 0.2. Or, the first degree is 0.5 and the second degree is 0, etc. Specifically, it can be set according to actual usage needs, and the embodiments of the present application do not make any restrictions on this.
[0206] For another example, when the blurring parameter is a parameter value, the degree of reduction in the clarity of the background can be: (1 - blurring parameter). That is to say, if the blurring parameter is 0, the degree of reduction in the clarity of the background is 1, that is, 100%; if the blurring parameter is 0.4, the degree of reduction in the clarity of the background is 0.6, that is, 60%.
[0207] As a possible implementation manner, the blurring processing module can implement the segmentation of the foreground and background of the shooting result through depth calculation.
[0208] Exemplarily, refer to Figure 9, the blur processing module can realize depth calculation based on multiple cameras of the mobile phone. The mobile phone can obtain the shooting result 1000 through the first camera, and obtain the shooting result 1001 through the second camera. It should be understood that due to the difference in the positions of the first camera and the second camera deployed on the mobile phone, there will be differences between the pictures of the shooting result 1000 and the shooting result 1001. This difference can be called the parallax of the camera. Next, the mobile phone can segment multiple shooting objects from the shooting results according to the parallax of the camera, such as, the multiple shooting objects include: "people", "trees" and "houses". After that, the mobile phone uses the focus object in the shooting object as the foreground and other non-focus objects as the background. For example, "people" are used as the foreground; "trees" and "houses" are used as the background.
[0209] It should be understood that the blur processing module can also have more ways to achieve the segmentation of the foreground and background of the shooting result. For details, please refer to the relevant technology, and the embodiments of the present application do not impose any limitation on this.
[0210] In some embodiments, the mobile phone may also display a prompt in the shooting preview interface in response to a shooting instruction, the prompt being used to prompt the user's mobile phone to reduce the degree of blurring of the shooting result, or the mobile phone does not blur the shooting result.
[0211] For example, see Figure 10 , the mobile phone displays a shooting preview interface 1100. In response to a shooting instruction, such as a click operation on a shooting control 1101, the mobile phone displays a shooting preview interface 1110. The shooting preview interface 1110 includes a prompt 1111. The prompt 1111 may include a text description, such as "the image blur has been turned off according to the shooting environment", to prompt the user that the mobile phone does not blur the image of the shooting result.
[0212] Again, see Figure 10 In response to a shooting instruction, such as a shooting instruction automatically generated by a snapshot function of a mobile phone, the mobile phone displays a shooting preview interface 1120. The shooting preview interface 1120 includes a prompt 1121, and the prompt 1121 may include a text description, such as "the image blur has been reduced according to the shooting environment", to prompt the user that the mobile phone has reduced the blur degree of the shooting result.
[0213] It should be noted that in some other embodiments, in the above step S603, the blur decision module can also obtain different blur parameters according to the source of the blur parameters. In the subsequent step S604, the blur processing module blurs the shooting results in different proportions based on the above different blur parameters.
[0214] As a possible implementation, if the shooting distance is less than the distance threshold, the defocus decision module obtains a first defocus parameter; if the shooting distance is greater than the distance threshold, the defocus decision module obtains a second defocus parameter. The defocus processing module performs defocus on the shooting result at a first ratio based on the first defocus parameter; the defocus processing module performs defocus on the shooting result at a second ratio based on the second defocus parameter, or the defocus processing module does not perform defocus on the shooting result based on the second defocus parameter. Wherein, the second ratio is less than the first ratio.
[0215] As a possible implementation, if the light intensity index is less than the intensity threshold, the defocus decision module obtains a third defocus parameter; if the light intensity index is greater than the intensity, the defocus decision module obtains a fourth defocus parameter. The defocus processing module performs defocus on the shooting result at a third ratio based on the third defocus parameter; the defocus processing module performs defocus on the shooting result at a fourth ratio based on the fourth defocus parameter, or the defocus processing module does not perform defocus on the shooting result based on the fourth defocus parameter. Wherein, the fourth ratio is less than the third ratio.
[0216] As a possible implementation, if the variance of the focus coordinates is less than the variance threshold, the defocus decision module obtains a fifth defocus parameter; if the variance of the focus coordinates is greater than or equal to the variance threshold, the defocus decision module obtains a sixth defocus parameter. The defocus processing module performs defocus on the shooting result at a fifth ratio based on the fifth defocus parameter; the defocus processing module performs defocus on the shooting result at a sixth ratio based on the sixth defocus parameter, or the defocus processing module does not perform defocus on the shooting result based on the sixth defocus parameter. Wherein, the sixth ratio is less than the fifth ratio. As a possible implementation, if the subject detection frame corresponding to the original image of the current frame matches the focus tracking frame, the defocus decision module obtains a seventh defocus parameter; if the subject detection frame corresponding to the original image of the current frame does not match the focus tracking frame, the defocus decision module obtains an eighth defocus parameter. The defocus processing module performs defocus on the shooting result at a seventh ratio based on the seventh defocus parameter; the defocus processing module performs defocus on the shooting result at an eighth ratio based on the eighth defocus parameter, or the defocus processing module does not perform defocus on the shooting result based on the eighth defocus parameter. Wherein, the eighth ratio is less than the seventh ratio. It should be understood that the non - matching of the above - mentioned subject detection frame and the focus tracking frame can be understood as that the coordinates of the subject detection frame and the coordinates of the focus tracking frame are different, or the sizes of the subject detection frame and the focus tracking frame are different.
[0217] As a possible implementation, if the subject category corresponding to the original image of the current frame matches the focus tracking category, the defocus decision module obtains a ninth defocus parameter; if the subject category corresponding to the original image of the current frame does not match the focus tracking category, the defocus decision module obtains a tenth defocus parameter. The defocus processing module performs defocusing on the shooting result at a ninth ratio based on the ninth defocus parameter; the defocus processing module performs defocusing on the shooting result at a tenth ratio based on the tenth defocus parameter, or the defocus processing module does not perform defocusing on the shooting result based on the tenth defocus parameter. Among them, the tenth ratio is less than the ninth ratio. It should be understood that the non-matching of the above-mentioned subject category and the focus tracking category can be understood as the subject category and the focus tracking category being different. For example, the subject category is a person and the focus tracking category is a plant, etc.
[0218] As a possible implementation, if the target motion speed is less than the speed threshold, the defocus decision module obtains an eleventh defocus parameter; if the target motion speed is greater than or equal to the speed threshold, the defocus decision module obtains a twelfth defocus parameter. The defocus processing module performs defocusing on the shooting result at an eleventh ratio based on the eleventh defocus parameter; the defocus processing module performs defocusing on the shooting result at a twelfth ratio based on the twelfth defocus parameter, or the defocus processing module does not perform defocusing on the shooting result based on the twelfth defocus parameter. Among them, the eleventh ratio is less than the twelfth ratio.
[0219] Next, the technical solution provided by the embodiments of the present application will be introduced in detail in combination with specific shooting scenarios.
[0220] Exemplarily, referring to Figure 11 , the user uses a mobile phone to shoot a shooting object 1200; in the environment where the shooting object 1200 is located, the ambient light is bright. For example, the illumination intensity of the ambient light where the shooting object 1200 is located is greater than the ambient light intensity threshold. During the process of the mobile phone shooting the shooting object 1200, the mobile phone can execute the above steps S600-S602. Next, the user triggers a shooting instruction, and the mobile phone shoots the shooting object 1200 to obtain a defocused shooting result 1201. Among them, the mobile phone can execute the above steps S603-S604 to obtain the defocused shooting result. In some other embodiments, the process of the user triggering the shooting instruction can also be referred to as the user's first operation, and the above defocused shooting result 1201 can also be referred to as the first defocused image.
[0221] Referring again to Figure 11, the user uses the mobile phone to photograph the photographed object 1210; in the environment where the photographed object 1210 is located, the ambient light is dim. For example, the illumination intensity of the ambient light where the photographed object 1210 is located is less than the ambient light intensity threshold. During the process of the mobile phone photographing the photographed object 1210, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains a blurred shooting result 1211 for the photographed object 1210. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since the illumination intensity of the ambient light where the photographed object 1210 is located is less than the ambient light intensity threshold, the mobile phone obtains a blur parameter of 1. It should be understood that the ambient light intensity threshold can also be referred to as the intensity threshold. For example, it can be 500 candela, 1000 candela, 3000 candela, etc. Specifically, it can be set according to actual usage requirements, and the embodiments of the present application do not make any restrictions on this. Since the blur parameter is 1, during the process of the mobile phone executing the above step S604, the degree of blurring of the shooting result will be reduced, or the mobile phone does not blur the shooting result. In some other embodiments, the process of the above user triggering the shooting instruction can also be referred to as the second operation of the user, and the above blurred shooting result 1211 can also be referred to as the second blurred image.
[0222] It should be understood that when the mobile phone takes a photo, the environment where the mobile phone is located is the same or approximately the same as the environment where the photographed object is located. That is to say, the ambient light intensity where the mobile phone is located can be equal to the illumination intensity of the ambient light where the photographed object is located.
[0223] It should be noted that in the blurred shooting result 1201, the slash filling indicates a relatively low clarity. That is to say, compared with the photographed object 1200, the clarity of "trees" and "houses" in the blurred shooting result 1201 is reduced. That is to say, the clarity of the background area of the blurred shooting result 1211 is higher than that of the background area of the blurred shooting result 1201. For example, the clarity of "trees" and "houses" in the blurred shooting result 1211 is higher than that of "trees" and "houses" in the blurred shooting result 1201. That is to say, the equivalent aperture value of the blurred shooting result 1211 is greater than the equivalent aperture value of the blurred shooting result 1201.
[0224] Moreover, when comparing the defocused shooting result 1201 and the defocused shooting result 1211, the shooting environment of the mobile phone is different when obtaining these two results. For example, when the mobile phone shoots the shooting object 1200, the ambient light intensity where the mobile phone is located is greater than the intensity threshold; and when the mobile phone shoots the shooting object 1210, the ambient intensity where the mobile phone is located is less than the intensity threshold. Then, the defocusing degree of the defocused shooting results obtained by the mobile phone is also different. For example, the defocusing degree of the defocused shooting result 1211 is less than that of the defocused shooting result 1201.
[0225] It should be understood that in Figure 11 , what is shown within the dashed box is the physical world corresponding to the shooting result. For example, the shooting object 1200 is the physical world corresponding to the defocused shooting result 1201, and the shooting object 1210 is the physical world corresponding to the defocused shooting result 1211.
[0226] Exemplarily again, referring to Figure 12 , the user uses the mobile phone to shoot the shooting object 1300; the distance between the shooting object 1300 and the mobile phone is distance A. During the process of the mobile phone shooting the shooting object 1300, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains the defocused shooting result 1301 by shooting the shooting object 1300. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the defocused shooting result. In some other embodiments, the process where the above user triggers the shooting instruction can also be referred to as the third operation of the user, and the above defocused shooting result 1301 can also be referred to as the third defocused image.
[0227] Referring again to Figure 12, the user uses the mobile phone to photograph the subject 1310; the distance between the subject 1310 and the mobile phone is distance B, and distance A is within the distance range, while distance B is outside the above distance range. For example, distance B is greater than or equal to the distance threshold; the subject 1310 is the same as the above-mentioned subject 1300. During the process of the mobile phone photographing the subject 1310, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains a blurred shooting result 1311 for the subject 1310. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since distance B is outside the distance range, such as distance B is greater than or equal to the distance threshold, the mobile phone obtains a blurring parameter of 1. It should be understood that the above distance threshold can be 5 meters, 10 meters, 20 meters, etc. Specifically, it can be set according to actual usage needs, and the embodiments of the present application do not make any restrictions on this. Since the blurring parameter is 1, during the process of the mobile phone executing the above step S604, the blurring degree of blurring the shooting result will be reduced, or the mobile phone does not blur the shooting result. In some other embodiments, the process of the above user triggering the shooting instruction can also be referred to as the fourth operation of the user, and the above blurred shooting result 1311 can also be referred to as the fourth blurred image.
[0228] It should be noted that in the blurred shooting result 1301, the area filled with slashes indicates relatively low clarity. That is to say, compared with the subject 1300, the clarity of the "trees" in the blurred shooting result 1301 is reduced. That is to say, the clarity of the background area of the blurred shooting result 1311 is higher than that of the background area of the blurred shooting result 1301. For example, the clarity of the "trees" in the blurred shooting result 1311 is higher than that of the "trees" in the blurred shooting result 1301. That is, the equivalent aperture value of the blurred shooting result 1311 is greater than that of the blurred shooting result 1301.
[0229] Moreover, when comparing the blurred shooting result 1301 and the blurred shooting result 1311, the distance between the mobile phone and the subject is different when the mobile phone obtains the two. For example, distance A is within the above distance range, and distance B is outside the above distance range; then, the blurring degree of the blurred shooting result obtained by the mobile phone is also different. For example, the blurring degree of the blurred shooting result 1311 is less than that of the blurred shooting result 1301.
[0230] It should be understood that in Figure 12 , what is shown within the dashed box is the physical world corresponding to the shooting result. For example, the subject 1300 is the physical world corresponding to the blurred shooting result 1301, and the subject 1310 is the physical world corresponding to the blurred shooting result 1311.
[0231] Exemplarily, refer to Figure 13 , the user uses a mobile phone to photograph a subject 1400. During this process, the magnification factor of the mobile phone camera is 2.0. During the process of the mobile phone photographing the subject 1400, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains a blurred shooting result 1401 for the subject 1400. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result.
[0232] Refer again to Figure 13 , the user uses a mobile phone to photograph a subject 1410. During this process, the magnification factor of the mobile phone camera is 0.5, and the subject 1410 is the same as the above-mentioned subject 1400. During the process of the mobile phone photographing the subject 1410, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains a blurred shooting result 1411 for the subject 1410. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since the magnification factor of the mobile phone camera becomes smaller during the shooting process of the subject 1410, this will cause a change in the proportion of the subject in the image captured by the mobile phone camera; it will also cause the size of the face detection frame in the image captured by the mobile phone camera to be outside the preset size range, such as the size of the face detection frame being too small. Therefore, during the process of executing the above step S603, the mobile phone obtains a blurring parameter of 1. Since the blurring parameter is 1, during the process of the mobile phone executing the above step S604, the blurring degree of the shooting result will be reduced, or the mobile phone will not blur the shooting result.
[0233] It should be noted that in Figure 13 , the part with diagonal hatching or horizontal hatching indicates relatively low clarity, and the clarity indicated by the diagonal hatching part is lower than the clarity indicated by the horizontal hatching part. That is to say, compared with the subject 1400, for the blurred shooting result 1401, the clarity of the background (such as, "trees") in the blurred shooting result 1401 is reduced. And, comparing the blurred shooting result 1401 and the blurred shooting result 1411, since the size of the face detection frame in the blurred shooting result 1411 is outside the preset size range, the blurring degree of the blurred shooting result 1401 is higher than the blurring degree of the blurred shooting interface 1411.
[0234] It should be understood that in Figure 13 , the physical world corresponding to the shooting result is shown within the dashed box. For example, the subject 1400 is the physical world corresponding to the blurred shooting result 1401, and the subject 1410 is the physical world corresponding to the blurred shooting result 1411.
[0235] Exemplarily, refer to Figure 14 , where the user uses the mobile phone to photograph the shooting object 1500. During this process, the focus tracking object of the mobile phone is as Figure 14 shown. During the process of the mobile phone photographing the shooting object 1500, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone photographs the shooting object 1500 to obtain a blurred shooting result 1501. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. In some other embodiments, the process of the user triggering the shooting instruction can also be referred to as the fifth operation of the user, and the above blurred shooting result 1501 can also be referred to as the fifth blurred image.
[0236] Refer to again Figure 14 , where the user uses the mobile phone to photograph the shooting object 1510. During this process, the focus tracking object of the mobile phone is as Figure 14 shown. During the process of the mobile phone photographing the shooting object 1510, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone photographs the shooting object 1510 to obtain a blurred shooting result 1511. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since the focus tracking object moves during the process of photographing the shooting object 1510. This will cause a relatively large change in the focus tracking information. For example, the focus coordinates change relatively greatly. Since the change in the focus coordinates is relatively large, the variance of the nearest 5 frame image data collected by the mobile phone for the shooting object 1510 will be greater than the first variance threshold, and the variance of the nearest 5 frame image data collected by the mobile phone for the shooting object 1510 will be greater than the second variance threshold. Thus, during the process of executing the above step S603, the mobile phone obtains a blurring parameter of 1. Since the blurring parameter is 1, during the process of the mobile phone executing the above step S604, the degree of blurring of the shooting result will be reduced, or the mobile phone does not blur the shooting result. In some other embodiments, the process of the user triggering the shooting instruction can also be referred to as the sixth operation of the user, and the above blurred shooting result 1511 can also be referred to as the sixth blurred image.
[0237] It should be noted that in Figure 14Among them, the part filled with diagonal lines indicates relatively low clarity. That is to say, compared with the shooting object 1500, the clarity of the background (such as "trees", "houses") in the blurred shooting result 1501 is reduced. That is to say, the clarity of the background area of the blurred shooting result 1511 is higher than that of the background area of the blurred shooting result 1501. That is, the equivalent aperture value of the blurred shooting result 1511 is greater than that of the blurred shooting result 1501.
[0238] Moreover, when comparing the blurred shooting result 1501 and the blurred shooting result 1511, since the change in the focus coordinates is relatively large, the degree of blurring of the blurred shooting result 1511 is less than that of the blurred shooting result 1501.
[0239] It should be understood that in Figure 14 what is shown within the dashed box is the physical world corresponding to the shooting result. For example, the shooting object 1500 is the physical world corresponding to the blurred shooting result 1501, and the shooting object 1510 is the physical world corresponding to the blurred shooting result 1511.
[0240] Exemplarily, referring to Figure 15 a user uses a mobile phone to shoot a shooting object 1600. During this process, the object being tracked by the mobile phone is as Figure 15 shown. During the process of the mobile phone shooting the shooting object 1600, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone shoots the shooting object 1600 to obtain a blurred shooting result 1601. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. In some other embodiments, the process of the user triggering the shooting instruction as described above can also be referred to as the fifth operation of the user, and the above blurred shooting result 1601 can also be referred to as the fifth blurred image.
[0241] Referring again to Figure 15 a user uses a mobile phone to shoot a shooting object 1610. During this process, the object being tracked by the mobile phone is as Figure 15As shown. During the process of the mobile phone taking a picture of the shooting object 1610, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone obtains a blurred shooting result 1611 for the shooting object 1610. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since the object to be tracked changes during the shooting process of the shooting object 1610, for example, from "person" in the shooting object 1600 to "tree" in the shooting object 1610. This will cause the main detection category and the tracking focus category of the image data to not match, or the main detection box and the tracking focus box of the image data to not match. Thus, during the process of executing the above step S603, the mobile phone obtains a blur parameter of 1. Since the blur parameter is 1, during the process of the mobile phone executing the above step S604, the degree of blurring of the shooting result will be reduced, or the mobile phone does not blur the shooting result. In some other embodiments, the above process where the user triggers a shooting instruction can also be referred to as the sixth operation of the user, and the above blurred shooting result 1611 can also be referred to as the sixth blurred image.
[0242] It should be noted that in Figure 15 , the part filled with diagonal lines indicates a relatively low clarity. That is to say, compared with the shooting object 1600, in the blurred shooting result 1601, the clarity of the background (such as "trees", "houses") in the blurred shooting result 1601 is reduced. That is to say, the clarity of the background area of the blurred shooting result 1611 is higher than that of the background area of the blurred shooting result 1601. That is, the equivalent aperture value of the blurred shooting result 1611 is greater than that of the blurred shooting result 1601.
[0243] Moreover, when comparing the blurred shooting result 1601 and the blurred shooting result 1611, since the main detection category and the tracking focus category of the image data do not match, the degree of blurring of the blurred shooting result 1611 is less than that of the blurred shooting result 1601.
[0244] It should be understood that in Figure 15 , what is shown within the dashed box is the physical world corresponding to the shooting result. For example, the shooting object 1600 is the physical world corresponding to the blurred shooting result 1601, and the shooting object 1610 is the physical world corresponding to the blurred shooting result 1611.
[0245] Exemplarily, refer to Figure 16, the user uses the mobile phone to take a picture of the shooting object 1700. During this process, the moving speed of the shooting object 1700 is relatively slow. During the process of the mobile phone taking a picture of the shooting object 1700, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone takes a picture of the shooting object 1700 to obtain a blurred shooting result 1701. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. In some other embodiments, the process where the user triggers the shooting instruction can also be referred to as the seventh operation of the user, and the above blurred shooting result 1701 can also be referred to as the seventh blurred image.
[0246] Refer to again Figure 16 , the user uses the mobile phone to take a picture of the shooting object 1710. During this process, the moving speed of the shooting object 1710 is relatively fast. During the process of the mobile phone taking a picture of the shooting object 1710, the mobile phone can execute the above steps S600 - S602. Next, the user triggers a shooting instruction, and the mobile phone takes a picture of the shooting object 1710 to obtain a blurred shooting result 1711. Among them, the mobile phone can execute the above steps S603 - S604 to obtain the blurred shooting result. During the process of the mobile phone executing the above step S603, since during the process of taking a picture of the shooting object 1710, the moving speed of the shooting object 1710 is relatively fast, such as the moving speed of the shooting object 1710 is faster than the speed threshold. It should be understood that the above speed threshold can be 1 meter per second, 5 meters per second, 10 meters per second, etc. Specifically, it can be set according to actual usage needs, and the embodiments of the present application do not make any restrictions on this. Thus, during the process of executing the above step S603, the mobile phone obtains a blur parameter of 1. Since the blur parameter is 1, during the process of the mobile phone executing the above step S604, the blur degree of blurring the shooting result will be reduced, or the mobile phone does not blur the shooting result. In some other embodiments, the process where the user triggers the shooting instruction can also be referred to as the eighth operation of the user, and the above blurred shooting result 1711 can also be referred to as the eighth blurred image.
[0247] It should be noted that in Figure 16 , the part filled with diagonal lines indicates relatively low clarity. That is to say, compared with the shooting object 1700, for the blurred shooting result 1701, the clarity of the background (such as, "trees", "houses") in the blurred shooting result 1701 is reduced. That is to say, the clarity of the background area of the blurred shooting result 1711 is higher than the clarity of the background area of the blurred shooting result 1701. That is, the equivalent aperture value of the blurred shooting result 1711 is greater than the equivalent aperture value of the blurred shooting result 1701.
[0248] Moreover, when comparing the defocused shooting result 1701 and the defocused shooting result 1711, since the main object detection category and the focus tracking category of the image data do not match, the degree of defocus of the defocused shooting result 1711 is less than that of the defocused shooting result 1701.
[0249] It should be understood that in Figure 16 what is shown within the dashed box is the physical world corresponding to the shooting result. For example, the shooting object 1700 is the physical world corresponding to the defocused shooting result 1701, and the shooting object 1710 is the physical world corresponding to the defocused shooting result 1711.
[0250] It should be noted that the personal information used in the technical solution of this application is limited to the information for which individual consent has been obtained, including but not limited to, before the user uses this function, notifying and reminding the user to read the relevant user agreement (notification), and signing the agreement (authorization) that authorizes the relevant user information.
[0251] Combined with the algorithm steps of each example described in the embodiments disclosed herein, this application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a certain function is executed in the form of hardware or computer software driving the hardware depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described function for each specific application in combination with the embodiments, but such implementation should not be considered to exceed the scope of this application.
[0252] This embodiment can divide the functional modules of the electronic device according to the above method examples. For example, each functional module can be divided corresponding to each function, or two or more functions can be integrated into one processing module. The above integrated module can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is illustrative, only a logical function division, and there can be other division methods in actual implementation.
[0253] This application embodiment also provides an electronic device, as Figure 17 shown, the electronic device can include one or more processors 1801, a memory 1802, and a communication interface 1803.
[0254] Among them, the memory 1802 and the communication interface 1803 are coupled to the processor 1801. For example, the memory 1802 and the communication interface 1803 can be coupled to the processor 1801 through a bus 1804.
[0255] Among them, the communication interface 1803 is used for data transmission with other devices. A computer program code is stored in the memory 1802. The computer program code includes computer instructions. When the computer instructions are executed by the processor 1801, the electronic device is caused to execute the relevant method steps in the method embodiments of the present application above.
[0256] Among them, the processor 1801 may be a processor or a controller. For example, it may be a central processing unit (CPU), a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, transistor logic devices, hardware components or any combination thereof. It can implement or execute various exemplary logic blocks, modules and circuits described in conjunction with the present disclosure. The processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of a DSP and a microprocessor, and so on.
[0257] Among them, the bus 1804 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The above bus 1804 can be divided into an address bus, a data bus, a control bus, etc. For the sake of representation, Figure 17 only one line is shown herein, but it does not mean that there is only one bus or one type of bus.
[0258] The embodiments of the present application also provide a chip system, as Figure 18 shown. The chip system 2000 includes at least one processor 2001 and at least one interface circuit 2002. The processor 2001 and the interface circuit 2002 can be interconnected by a line. For example, the interface circuit 2002 can be used to receive signals from other devices (such as the memory of an electronic device). For another example, the interface circuit 2002 can be used to send signals to other devices (such as the processor 2001). Exemplarily, the interface circuit 2002 can read the instructions stored in the memory and send the instructions to the processor 2001. When the instructions are executed by the processor 2001, the electronic device can be caused to execute each step in the above embodiments. Of course, the chip system may further include other discrete devices, and the embodiments of the present application do not make specific limitations thereto.
[0259] An embodiment of the present application further provides a computer-readable storage medium. Computer program code is stored in the computer storage medium. When the above-mentioned processor executes the computer program code, the electronic device executes the relevant method steps in the above-mentioned method embodiment.
[0260] An embodiment of the present application further provides a computer program product. When the computer program product runs on a computer, the computer is enabled to execute the relevant method steps in the above-mentioned method embodiment.
[0261] Among them, the electronic device, computer-readable storage medium, or computer program product provided by the present application are all used to execute the corresponding method provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding method provided above, and will not be elaborated here.
[0262] Through the description of the above embodiments, those skilled in the art can clearly understand that for the convenience and simplicity of description, only the above-mentioned division of each functional module is used as an example. In practical applications, the above functions can be allocated to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above.
[0263] In several embodiments provided by the present application, it should be understood that the disclosed device and method can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of the module or unit is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection can be through some interfaces. The indirect coupling or communication connection of the device or unit can be in an electrical, mechanical or other form.
[0264] The unit described as a separated component may or may not be physically separated. The component displayed as a unit may be a physical unit or multiple physical units, that is, it may be located in one place, or may be distributed to multiple different places. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0265] In addition, each functional unit in each embodiment of the present application can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
[0266] When the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on such an understanding, the technical solution of the embodiments of the present application, in essence, or the part that makes a contribution, or all or part of the technical solution, can be embodied in the form of a software product. The software product is stored in a storage medium and includes several instructions for causing a device (which may be a single-chip microcomputer, a chip, etc.) or a processor to execute all or part of the steps of the methods described in the embodiments of the present application. The foregoing storage medium includes: various media that can store program codes, such as USB flash drives, mobile hard disks, read only memory (ROM), random access memory (RAM), magnetic disks, or optical discs.
[0267] The above content is only the specific implementation manner of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions within the technical scope disclosed in the present application should be covered by the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A shooting method, characterized in that, The method is applied to an electronic device, and the method includes: Display a preview interface, where the preview interface includes an image captured in real time by a camera; In response to a first operation by the user, capture a first blurred image; In response to a second operation by the user, capture a second blurred image; the degree of blurring of the second blurred image is less than the degree of blurring of the first blurred image; Wherein, the ambient light intensity of the electronic device when the first blurred image is captured is greater than an intensity threshold, and the ambient light intensity of the electronic device when the second blurred image is captured is less than or equal to the intensity threshold.
2. The method according to claim 1, characterized in that, The method further includes: In response to a third operation by the user, capture a third blurred image; the third blurred image includes a captured object; In response to a fourth operation by the user, capture a fourth blurred image; the fourth blurred image includes the captured object; the degree of blurring of the fourth blurred image is less than the degree of blurring of the third blurred image; Wherein, the distance between the captured object and the electronic device when the third blurred image is captured is less than a distance threshold, and the distance between the captured object and the electronic device when the third blurred image is captured is greater than or equal to the distance threshold.
3. The method according to claim 1 or 2, characterized in that, The method further includes: In response to a fifth operation by the user, capture a fifth blurred image; the fifth blurred image includes a first autofocus object; In response to a sixth operation by the user, capture a sixth blurred image; the sixth blurred image includes a second autofocus object; the degree of blurring of the sixth blurred image is different from the degree of blurring of the fifth blurred image; Wherein, the categories of the first autofocus object and the second autofocus object are different, and / or, the position of the first autofocus object in the fifth blurred image is different from the position of the second autofocus object in the sixth blurred image.
4. The method according to any one of claims 1-3, characterized in that The method further includes: In response to a seventh operation by the user, capture a seventh blurred image; the seventh blurred image includes a moving object; In response to an eighth operation by the user, capture an eighth blurred image; the eighth blurred image includes the moving object; the degree of blurring of the eighth blurred image is less than the degree of blurring of the seventh blurred image; Wherein, the moving speed of the moving object when the seventh blurred image is captured is less than a speed threshold, and the moving speed of the moving object when the eighth blurred image is captured is greater than or equal to the speed threshold.
5. The method according to any one of claims 1-4, characterized in that, The degree of blurring of the second blurred image is less than the degree of blurring of the first blurred image, including: the clarity of the background area of the second blurred image is higher than the clarity of the background area of the first blurred image.
6. The method according to claim 5, characterized in that, The clarity of the background area of the second blurred image is higher than the clarity of the background area of the first blurred image, including: The equivalent aperture value of the second blurred image is greater than the equivalent aperture value of the first blurred image.
7. The method according to any one of claims 1-6, characterized in that, The capturing of the first blurred image includes: Collect an original image through a camera; Segment the background area of the original image from the original image; the non-background area of the original image is the area where the focus target of the electronic device is located; Reduce the clarity of the background area of the original image to obtain the first blurred image.
8. The method according to claim 7, wherein Before reducing the clarity of the background area of the original image, the method further includes: Obtaining a blurring parameter based on shooting scene information or shooting distance; the shooting scene information represents the environment where the electronic device is located when the shooting operation is performed, and the shooting distance represents the distance between the electronic device and the shooting target; Reducing the clarity of the background area of the original image includes: Reducing the clarity of the background area of the original image according to the blurring parameter.
9. The method according to claim 8, wherein The blurring parameter includes a first blurring parameter or a second blurring parameter, and the second blurring parameter is different from the first blurring parameter; Obtaining a blurring parameter based on shooting scene information or shooting distance includes: If the shooting distance is less than the distance threshold, obtaining the first blurring parameter based on the shooting distance; If the shooting distance is greater than or equal to the distance threshold, obtaining the second blurring parameter based on the shooting distance; Reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the first blurring parameter, reducing the clarity of the background area of the original image at a first ratio; If the blurring parameter is the second blurring parameter, reducing the clarity of the background area of the original image at a second ratio or not reducing the clarity of the background area of the original image; Wherein, the second ratio is lower than the first ratio.
10. The method according to claim 8, characterized in that, The shooting scene information includes a light intensity index, the light intensity index is inversely proportional to the ambient light intensity where the electronic device is located, the blurring parameter includes a third blurring parameter or a fourth blurring parameter, and the fourth blurring parameter is different from the third blurring parameter; Obtaining a blurring parameter based on shooting scene information or shooting distance includes: If the light intensity index is less than the intensity threshold, obtaining the third blurring parameter based on the light intensity index; If the light intensity index is greater than or equal to the intensity threshold, obtaining the fourth blurring parameter based on the light intensity index; Reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the third blurring parameter, reducing the clarity of the background area of the original image at a third ratio; If the blurring parameter is the fourth blurring parameter, reducing the clarity of the background area of the original image at a fourth ratio or not reducing the clarity of the background area of the original image; Wherein, the fourth ratio is lower than the third ratio.
11. The method according to claim 8, wherein The shooting scene information includes a focus coordinate, the focus coordinate represents the position of the focusing target of the electronic device in the original image, the blurring parameter includes a fifth blurring parameter or a sixth blurring parameter, and the sixth blurring parameter is different from the fifth blurring parameter; Obtaining a blurring parameter based on shooting scene information or shooting distance includes: If the variance of the focal coordinates of multiple frames of original images is less than the variance threshold, the fifth blurring parameter is obtained based on the focal coordinates; the multiple frames of original images include the current frame of original image and N frames before the current frame of original image, and N is a positive integer greater than or equal to 1; If the variance of the focal coordinates of multiple frames of original images is greater than or equal to the variance threshold, the sixth blurring parameter is obtained based on the focal coordinates; The reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the fifth blurring parameter, the clarity of the background area of the original image is reduced at a fifth ratio; If the blurring parameter is the sixth blurring parameter, the clarity of the background area of the original image is reduced at a sixth ratio or the clarity of the background area of the original image is not reduced; Wherein, the sixth ratio is lower than the fifth ratio.
12. The method according to claim 8, wherein The shooting scene information includes a subject detection frame and a focus tracking frame, the blurring parameter includes a seventh blurring parameter or an eighth blurring parameter, and the eighth blurring parameter is different from the seventh blurring parameter; The obtaining the blurring parameter based on the shooting scene information or the shooting distance includes: If the subject detection frame and the focus tracking frame corresponding to the current frame of original image match, the seventh blurring parameter is obtained based on the subject detection frame and the focus tracking frame; If the subject detection frame and the focus tracking frame corresponding to the current frame of original image do not match, the eighth blurring parameter is obtained based on the subject detection frame and the focus tracking frame; The reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the seventh blurring parameter, the clarity of the background area of the original image is reduced at a seventh ratio; If the blurring parameter is the eighth blurring parameter, the clarity of the background area of the original image is reduced at an eighth ratio or the clarity of the background area of the original image is not reduced; Wherein, the eighth ratio is lower than the seventh ratio.
13. The method according to claim 8, wherein The shooting scene information includes a subject category and a focus tracking category, the blurring parameter includes a ninth blurring parameter or a tenth blurring parameter, and the tenth blurring parameter is different from the ninth blurring parameter; The obtaining the blurring parameter based on the shooting scene information or the shooting distance includes: If the subject category and the focus tracking category corresponding to the current frame of original image match, the ninth blurring parameter is obtained based on the subject category and the focus tracking category; If the subject category and the focus tracking category corresponding to the current frame of original image do not match, the tenth blurring parameter is obtained based on the subject category and the focus tracking category; The reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the ninth blurring parameter, the clarity of the background area of the original image is reduced at a ninth ratio; If the blurring parameter is the tenth blurring parameter, the clarity of the background area of the original image is reduced at a tenth ratio or the clarity of the background area of the original image is not reduced; Wherein, the tenth ratio is lower than the ninth ratio.
14. The method according to claim 8, wherein The shooting scene information includes the target motion speed, the blurring parameter includes an eleventh blurring parameter or a twelfth blurring parameter, and the eleventh blurring parameter is different from the twelfth blurring parameter; Obtaining the blurring parameter based on the shooting scene information or the shooting distance includes: If the target motion speed is less than the speed threshold, obtaining the eleventh blurring parameter based on the target motion speed; If the target motion speed is greater than or equal to the speed threshold, obtaining the twelfth blurring parameter based on the target motion speed; Reducing the clarity of the background area of the original image according to the blurring parameter includes: If the blurring parameter is the eleventh blurring parameter, reducing the clarity of the background area of the original image at an eleventh ratio; If the blurring parameter is the twelfth blurring parameter, reducing the clarity of the background area of the original image at a twelfth ratio or not reducing the clarity of the background area of the original image; Wherein, the twelfth ratio is lower than the eleventh ratio.
15. The method according to any one of claims 1 to 14, characterized in that, The method further includes: In response to the second operation, displaying a first prompt on the shooting preview interface, where the first prompt is used to indicate reducing the blurring degree of the second blurred image.
16. An electronic device, characterized in that, The electronic device includes a processor and a memory; the processor is coupled to the memory; the memory is used to store computer program code; the computer program code includes computer instructions, and when the processor executes the above computer instructions, the electronic device executes the method according to any one of claims 1-15.
17. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes computer instructions, and when the computer instructions run on an electronic device, the electronic device executes the method according to any one of claims 1-15.
18. A chip system, characterized in that, The chip system is applied to an electronic device, the chip system includes one or more processors, and the processors are used to call computer instructions to make the electronic device execute the method according to any one of claims 1-15.
19. A computer program product, characterized in that, The computer program product includes instructions, and when the computer program product runs on an electronic device, the electronic device executes the method according to any one of claims 1-15.
Citation Information
Patent Citations
Blurring shooting method, blurring shooting terminal and computer readable storage medium
CN107277354A
Background blurring method and device and equipment
CN107977940A
Image blurring method, image blurring device, mobile terminal and storage medium
CN112217992A
Image processing method and device, mobile terminal and storage medium
CN117319812A
Photographing method and electronic device
WO2022262260A1