Shooting method and device, equipment and storage medium
By dynamically determining the number of targets for the night view image acquisition lens back operation, and controlling the lens to perform back operation during the acquisition process, the problem of the night view image acquisition shutter button rotation and photography delay is solved, and the user experience and image processing efficiency are improved.
Patent Information
- Application Number
- CN202311406212.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-29
AI Technical Summary
During the night scene image acquisition process, due to the different degrees of light and darkness, the exposure time changes dynamically, the shutter button rotates, the photo is delayed, and the user experience is reduced.
By acquiring the illumination intensity of the photographing scene in response to the image acquisition request, the number of image frame targets that need to be performed in-lens operation is dynamically determined. After collecting each corresponding first image frame, the lens is controlled to perform the in-lens operation and acquire subsequent second image frames.
Reduces the rotation time of the shutter button of the night view image acquisition, reduces the delay in taking pictures, improves user experience, and improves image processing efficiency.
Smart Images

Figure CN119906898A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of night scene photography, and in particular to a photography method, device, equipment and storage medium. Background Art
[0002] Currently, mobile phone camera components all use optical image stabilization modules, which can improve the stability of the image by obtaining a larger compensation angle, and the suppression of motion blur will also be better.
[0003] Currently, during the night scene image acquisition process, the exposure time will change dynamically due to the different light brightness levels. In dark scenes, the shutter button will rotate, the photo will be delayed, and the user experience will be reduced. Summary of the invention
[0004] The present disclosure provides a shooting method, device, equipment and storage medium to at least solve the problems of shutter button rotation, shooting delay and reduced user experience during the existing night scene image acquisition.
[0005] The technical solution of the present disclosure is as follows:
[0006] The present disclosure provides a shooting method, including:
[0007] In response to an image acquisition request, obtaining a light intensity corresponding to a photographing scene carried in the image acquisition request;
[0008] Determining a target number of image frames for which a lens re-centering operation is required according to the illumination intensity and the photographing scene, wherein the lens re-centering operation is adjusting a position of a lens so that the lens is at the center of an image;
[0009] According to the number of targets, after acquiring each first image frame corresponding to the number of targets, controlling the lens to perform the lens re-centering operation and to acquire subsequent second image frames;
[0010] A target image frame is generated according to the first image frame and the second image frame.
[0011] Optionally, the method further comprises:
[0012] Determine a first duration according to the light intensity, wherein the first duration is the duration during which the lens is in a non-exposure period;
[0013] Adjusting the first duration to a second duration, wherein the second duration is greater than or equal to the duration required for the shot to return to the center;
[0014] Exposure compensation is performed on the first image frame according to the second duration.
[0015] Optionally, in response to the image acquisition request, obtaining the light intensity corresponding to the photographing scene carried in the image acquisition request includes:
[0016] In response to an image acquisition request, parsing the photographing scene from the image acquisition request;
[0017] The illumination intensity corresponding to the photographing scene is determined according to the luminous flux, the reflection coefficient, the illumination intensity rate and the light source depth.
[0018] Optionally, determining a target number of image frames for which lens refocusing needs to be performed according to the illumination intensity and the photographing scene includes:
[0019] According to the illumination intensity and the photographing scene, a mapping relationship table of set illumination intensity, set photographing scene and preset quantity is queried to obtain the target quantity.
[0020] Optionally, determining a target number of image frames for which lens refocusing is required according to the illumination intensity and the photographing scene includes:
[0021] In the case where the photographing scene is a night scene photographing scene, if the illumination intensity is greater than a first illumination intensity value, the target quantity is determined to be a first value; if the illumination intensity is greater than or equal to a second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be a second value;
[0022] In the case where the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target quantity is determined to be a third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target quantity is determined to be the second value;
[0023] In the case where the shooting scene is a night owl scene, if the illumination intensity is greater than the first illumination intensity value, the target quantity is determined to be a fourth value; if the illumination intensity is greater than or equal to the second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be the second value;
[0024] Among them, the first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value.
[0025] Optionally, after acquiring each first image frame corresponding to the number of targets according to the number of targets, controlling the lens to perform the lens re-centering operation includes:
[0026] When the anti-shake function is turned on and the photographing scene is a night scene, after collecting each first image frame corresponding to the target number according to the target number, the lens is controlled to perform the lens re-centering operation.
[0027] Optionally, generating a target image frame according to the first image frame and the second image frame includes:
[0028] Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame;
[0029] The candidate image frames are subjected to image synthesis to obtain the target image frame.
[0030] The present disclosure also provides a photographing device, including:
[0031] An acquisition module, configured to obtain, in response to an image acquisition request, a light intensity corresponding to a photographing scene carried in the image acquisition request;
[0032] a determination module, configured to determine, according to the illumination intensity and the photographing scene, a target number of image frames for which a lens re-centering operation is required, wherein the lens re-centering operation is to adjust the position of the lens so that the lens is at the center of the image;
[0033] A control module, configured to control the lens to perform the lens re-centering operation and to capture subsequent second image frames after capturing each first image frame corresponding to the target number according to the target number;
[0034] A generating module is used to generate a target image frame according to the first image frame and the second image frame.
[0035] Optionally, the control module may also be used to:
[0036] Determine a first duration according to the light intensity, wherein the first duration is the duration during which the lens is in a non-exposure period;
[0037] Adjusting the first duration to a second duration, wherein the second duration is greater than or equal to the duration required for the shot to return to the center;
[0038] Exposure compensation is performed on the first image frame according to the second duration.
[0039] Optionally, when the acquisition module obtains the light intensity corresponding to the photographing scene carried in the image acquisition request in response to the image acquisition request, it includes:
[0040] In response to an image acquisition request, parsing the photographing scene from the image acquisition request;
[0041] The illumination intensity corresponding to the photographing scene is determined according to the luminous flux, the reflection coefficient, the illumination intensity rate and the light source depth.
[0042] Optionally, when determining the target number of image frames that need to be shot back according to the illumination intensity and the photographing scene, the determining module is configured to:
[0043] According to the illumination intensity and the photographing scene, a mapping relationship table of set illumination intensity, set photographing scene and preset quantity is queried to obtain the target quantity.
[0044] Optionally, when determining the target number of image frames that need to be shot back according to the illumination intensity and the photographing scene, the determining module is configured to:
[0045] In the case where the photographing scene is a night scene photographing scene, if the illumination intensity is greater than a first illumination intensity value, the target quantity is determined to be a first value; if the illumination intensity is greater than or equal to a second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be a second value;
[0046] In the case where the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target quantity is determined to be a third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target quantity is determined to be the second value;
[0047] In the case where the shooting scene is a night owl scene, if the illumination intensity is greater than the first illumination intensity value, the target quantity is determined to be a fourth value; if the illumination intensity is greater than or equal to the second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be the second value;
[0048] Among them, the first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value.
[0049] Optionally, after acquiring each first image frame corresponding to the number of targets according to the number of targets, the control module controls the lens to perform the lens re-centering operation, and is used to:
[0050] When the anti-shake function is turned on and the photographing scene is a night scene, after collecting each first image frame corresponding to the target number according to the target number, the lens is controlled to perform the lens re-centering operation.
[0051] Optionally, when generating a target image frame according to the first image frame and the second image frame, the generating module is configured to:
[0052] Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame;
[0053] The candidate image frames are subjected to image synthesis to obtain the target image frame.
[0054] The present disclosure also provides an electronic device, including:
[0055] processor;
[0056] a memory for storing instructions executable by the processor;
[0057] The processor is configured to execute the instructions to implement the steps in the above method.
[0058] The embodiment of the present disclosure further provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, each step in the above method is implemented.
[0059] The embodiment of the present disclosure further provides a computer program product, including a computer program / instruction, which implements each step in the above method when executed by a processor.
[0060] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:
[0061] In some embodiments of the present disclosure, in response to an image acquisition request, the light intensity corresponding to the photographing scene carried in the image acquisition request is obtained; based on the light intensity and the photographing scene, the number of targets on which a lens re-centering operation needs to be performed is dynamically determined; based on the number of targets, after each first image frame corresponding to the target number is acquired, the lens is controlled to perform a lens re-centering operation and acquire a subsequent second image frame, while the subsequently acquired image frames do not perform a lens re-centering operation, and a target image frame is generated based on the first image frame and the second image frame. Compared with the existing method of performing a lens re-centering operation on all acquired image frames, this method reduces the amount of calculation, improves image processing efficiency, and can reduce the rotation time of a shutter button for night scene image acquisition, reduce photographing delays, and improve user experience.
[0062] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.
[0064] Figure 1 A flowchart of a shooting method provided by an exemplary embodiment of the present disclosure;
[0065] Figure 2 A schematic diagram of multiple image frames provided for an exemplary embodiment of the present disclosure;
[0066] Figure 3 A flowchart of a shooting method provided by an exemplary embodiment of the present disclosure;
[0067] Figure 4 A structural schematic diagram of a photographing device provided by an exemplary embodiment of the present disclosure;
[0068] Figure 5 A schematic structural diagram of an electronic device provided by an exemplary embodiment of the present disclosure. DETAILED DESCRIPTION
[0069] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0070] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure.
[0071] It should be noted that the user information involved in this disclosure includes but is not limited to: user device information and user personal information; the collection, storage, use, processing, transmission, provision and disclosure of user information in this disclosure comply with the relevant laws and regulations and do not violate public order and good morals.
[0072] At present, in night scene shooting scenes, when the anti-shake function is turned on, the lens needs to perform a lens re-centering operation after collecting each image frame to obtain multiple collected image frames; select multiple candidate image frames with higher clarity from the multiple image frames, where the number of candidate image frames is 6 or 8 frames; synthesize multiple candidate image frames to obtain the target image frame and provide it to the user for viewing. During the night scene image collection process, due to the different light levels, the exposure time will also change dynamically. For scenes with dark light, it will cause the shutter button to rotate, delay the photo, and reduce the user experience.
[0073] In response to the above technical problems, in some embodiments of the present disclosure, in response to an image acquisition request, the light intensity corresponding to the photographing scene carried in the image acquisition request is obtained; according to the light intensity and the photographing scene, the number of targets that need to perform the lens re-centering operation is dynamically determined; according to the number of targets, after each first image frame corresponding to the target number is acquired, the lens is controlled to perform the lens re-centering operation and acquire a subsequent second image frame, while the subsequently acquired image frames do not perform the lens re-centering operation, and the target image frame is generated according to the first image frame and the second image frame. Compared with the existing method of performing the lens re-centering operation after all acquired image frames, this method reduces the amount of calculation, improves the image processing efficiency, and can reduce the rotation time of the shutter button for night scene image acquisition, reduce the shooting delay, and improve the user experience.
[0074] The technical solutions provided by various embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.
[0075] Figure 1 Schematic diagram of a process flow of a shooting method provided by an exemplary embodiment of the present disclosure. Figure 1 As shown, the method includes:
[0076] S101: In response to an image acquisition request, obtaining a light intensity corresponding to a photographing scene carried in the image acquisition request;
[0077] S102: determining a target number of image frames for which a lens re-centering operation is required according to light intensity and a photographing scene, wherein the lens re-centering operation is adjusting a position of a lens so that the lens is at the center of an image;
[0078] S103: After acquiring each first image frame corresponding to the target number according to the target number, controlling the lens to perform a lens re-centering operation and acquire subsequent second image frames;
[0079] S104: Generate a target image frame according to the first image frame and the second image frame.
[0080] In this embodiment, the execution subject of the above method is an image acquisition device with an image acquisition function. Image acquisition devices include but are not limited to the following: mobile phones, tablet computers, cameras and smart wearable devices. Smart wearable devices include but are not limited to the following: AR glasses, VR glasses, smart bracelets and smart watches.
[0081] In this embodiment, in response to an image acquisition request, the light intensity corresponding to the photographing scene carried in the image acquisition request is obtained; according to the light intensity and the photographing scene, the number of targets on which the lens re-centering operation needs to be performed is dynamically determined; according to the number of targets, after each first image frame corresponding to the target number is acquired, the lens is controlled to perform the lens re-centering operation and acquire a subsequent second image frame, while the subsequently acquired image frames do not perform the lens re-centering operation, and the target image frame is generated according to the first image frame and the second image frame. Compared with the existing method of performing the lens re-centering operation on all acquired image frames, the amount of calculation is reduced, the image processing efficiency is improved, the rotation time of the shutter button for night scene image acquisition can be reduced, the shooting delay is reduced, and the user experience is improved.
[0082] It should be noted that in the process of acquiring a target image frame, after the first image frame is captured, the lens re-centering operation needs to be performed, while for the second image frame obtained by subsequent shooting, the lens re-centering operation does not need to be performed, so as to reduce the amount of calculation and reduce the shooting delay.
[0083] It should be noted that the first image frame in the embodiment of the present disclosure may be the first few frames of the image captured this time, or the number of first image frames may be calculated starting from the second frame of the image captured this time. The present disclosure does not limit this and may be adjusted according to actual conditions.
[0084] In an application scenario, an image acquisition device responds to an image acquisition request and obtains the light intensity corresponding to the photographing scene carried in the image acquisition request; when the photographing scene is a night scene and the light intensity value is greater than 390, it is determined that the target number of image frames that need to perform the lens re-centering operation is 2 frames; the lens performs a lens re-centering operation once after acquiring the first two image frames, and does not perform the lens re-centering operation on the image frames acquired thereafter, that is, does not perform exposure compensation; compared with the existing method of performing the lens re-centering operation on all acquired image frames, this method reduces the amount of calculation and improves the image processing efficiency.
[0085] Lens centering operation means that the lens has an optical image stabilization function, which can adjust the position of the lens to the center of the image through the adjustment of internal mechanical or optical components, reducing image blur caused by shaking, trembling or rapid movement of the camera during shooting. It can improve the clarity and quality of photos and videos, and is particularly beneficial for handheld shooting and shooting in low light conditions.
[0086] In some embodiments of the present disclosure, in response to an image acquisition request, the light intensity corresponding to the photographic scene carried in the image acquisition request is obtained. One achievable method is to parse the photographic scene from the image acquisition request in response to the image acquisition request; and determine the light intensity corresponding to the photographic scene according to the luminous flux, the reflection coefficient, the light intensity rate, and the light source depth. Among them, the image acquisition request carries a photographic scene tag, and the photographic scene corresponding to the photographic scene tag can be parsed according to the photographic scene tag. In addition, after determining the photographic scene, the shooting image parameters of the photographic scene can be obtained for subsequent image shooting.
[0087] In some embodiments of the present disclosure, after the camera is turned on, before the user confirms the photo operation, the image collected by the camera is a preview data stream; after the user confirms the photo operation, the image collected by the camera is a photo data stream. In order to distinguish whether the image currently collected by the camera is a preview data stream or a photo data stream, a data stream identifier can be added to the preview data stream and the photo data stream, and the preview data stream and the photo data stream can be distinguished by the data stream identifier.
[0088] In the above embodiment, the illumination intensity corresponding to the photographing scene is determined according to the luminous flux, reflection coefficient, illumination intensity rate and light source depth, wherein the illumination intensity value represents the illumination intensity. The luminous flux, reflection coefficient, illumination intensity rate and light source depth disclosed in the present invention can obtain a relatively accurate illumination intensity, and then accurately determine the target number of image frames that need to perform the lens re-centering operation. The calculation formula is as follows:
[0089] L=0.35+0.657*G / (ρ*α*h)
[0090] Among them, L is the light intensity value, G is the luminous flux (usually lumens), ρ is the reflection coefficient of the object surface, α is the light intensity rate, and h is the light source depth.
[0091] In some embodiments of the present disclosure, the target number of image frames that need to perform lens re-centering is determined according to the light intensity and the shooting scene. One achievable method is to query a mapping relationship table of setting light intensity, setting shooting scene and preset number according to the light intensity and the shooting scene to obtain the target number. The present disclosure pre-sets a mapping relationship table of the target number obtained by setting light intensity, setting shooting scene and setting preset number. According to the light intensity and the shooting scene, the mapping relationship table can be queried to quickly obtain the target number, thereby improving the efficiency of determining the target number of image frames that need to perform lens re-centering operations, thereby improving the image processing efficiency. It should be noted that the embodiments of the present disclosure do not limit the target number, and can be adjusted according to actual conditions.
[0092] It should be noted that the night scene in the embodiments of the present disclosure includes but is not limited to the following scenes: night scene photo shooting scene, night scene video recording scene and night owl scene.
[0093] For example, when the photographing scene is a night scene photographing scene, if the light intensity is greater than the first light intensity value, the target number is determined to be the first value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be the second value; when the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target number is determined to be the third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be the second value; when the shooting scene is a night owl scene, if the light intensity is greater than the first light intensity value, the target number is determined to be the fourth value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be the second value; wherein, the first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value. It should be noted that the present disclosure does not limit the first light intensity value, the second light intensity value, the first numerical value, the second numerical value, the third numerical value and the fourth numerical value, and the above-mentioned first light intensity value, the second light intensity value, the first numerical value, the second numerical value, the third numerical value and the fourth numerical value can be adjusted according to actual conditions.
[0094] For example, when the photographing scene is a night scene, if the light intensity is greater than 390, the target number is determined to be 1; if the light intensity is greater than or equal to 300 and less than or equal to 390, the target number is determined to be 2.
[0095] For another example, when the photographing scene is a night scene video recording scene, if the light intensity is greater than 390, the target number is determined to be 3; if the light intensity is greater than or equal to 300 and less than or equal to 390, the target number is determined to be 2.
[0096] For another example, when the shooting scene is a night owl scene, if the light intensity is greater than 390, the number of targets is determined to be 4; if the light intensity is greater than or equal to 300 and less than or equal to 390, the number of targets is determined to be 2.
[0097] In some embodiments of the present disclosure, a first duration is determined based on the light intensity; the first duration is adjusted to a second duration, wherein the second duration is greater than or equal to the lens re-centering duration; and exposure compensation is performed on the first image frame based on the second duration. Since the lens may not be able to perform a complete lens re-centering operation within the first duration, the first duration can be extended to ensure that the lens can perform a complete lens re-centering operation, thereby improving the clarity of the image frames captured by the lens. Further, based on the second duration, the frame interval is set, and the first image frame is captured.
[0098] Figure 2 A schematic diagram of multiple image frames provided by an exemplary embodiment of the present disclosure. Figure 2 As shown, when the number of targets is 2, the lens may shake during the photo-taking process. After the lens acquires the first frame of image, it performs a lens return operation in a non-exposure period. After performing the lens return operation, the lens continues to acquire the second frame of image. After the lens acquires the second frame of image, it performs a lens return operation in a non-exposure period. After the lens acquires the third frame of image, it does not perform a lens return operation, that is, it does not perform exposure compensation for subsequent image frames.
[0099] In some embodiments of the present disclosure, the image acquisition device determines whether the anti-shake function is in an on state and whether the photographing scene is a night scene. When the anti-shake function is in an on state and the photographing scene is a night scene, the lens is controlled to perform a lens re-centering operation after each first image frame corresponding to the number of targets is acquired according to the number of targets. When the anti-shake function is not in an on state and the photographing scene is not a night scene, the lens is controlled to perform a lens re-centering operation after each first image frame corresponding to the number of targets is acquired according to the number of targets. The present disclosure sets two conditions, namely, that the anti-shake function is in an on state and that the photographing scene is a night scene, to prevent the shooting method of the present disclosure from being used in scenes with better light, thereby ensuring the scene applicability of the shooting method of the present disclosure and improving the quality of night scene shooting.
[0100] It should be noted that, generally, in a night scene, a set number of image frames need to be collected to synthesize a target image frame, and the number of collected image frames is generally 6 or 8 frames.
[0101] In some embodiments of the present disclosure, after capturing each first image frame corresponding to the target number, the lens is controlled to perform a lens re-centering operation to continue capturing subsequent second image frames. A target image frame is generated based on the first image frame and the second image frame. One achievable method is to select a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame; perform image synthesis on the candidate image frames to obtain a target image frame. It should be noted that the present disclosure does not limit the clarity threshold and the set number, and adjustments can be made according to circumstances. Among them, a set number of candidate image frames whose image clarity meets the clarity threshold are selected from the first image frame and the subsequently captured second image frames, and the candidate image frames are likely to include the first image frame, and the first image frame is an image frame taken after the lens re-centering operation, and the image clarity is relatively high, which can improve the image quality of the target image frame finally synthesized.
[0102] Combined with the description of the above embodiments, Figure 3 Schematic diagram of a process flow of a shooting method provided by an exemplary embodiment of the present disclosure. Figure 3 As shown, the method includes:
[0103] S301: In response to an image acquisition request, obtaining a light intensity corresponding to a photographing scene carried in the image acquisition request;
[0104] S302: Determine the target number of image frames that require a lens re-centering operation according to the light intensity and the photographing scene;
[0105] S303: after acquiring each first image frame corresponding to the target number according to the target number, controlling the lens to perform a lens re-centering operation, and continuing to acquire subsequent second image frames;
[0106] S304: Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame;
[0107] S305: Perform image synthesis on the candidate image frames to obtain a target image frame.
[0108] In this embodiment, the execution subject of the above method is an image acquisition device with an image acquisition function. Image acquisition devices include but are not limited to the following: mobile phones, tablet computers, cameras and smart wearable devices. Smart wearable devices include but are not limited to the following: AR glasses, VR glasses, smart bracelets and smart watches.
[0109] In this embodiment, the execution steps of the above method can refer to the description of the corresponding parts of the above embodiments, which will not be repeated here.
[0110] Figure 4 FIG. 4 is a schematic diagram of a photographing device 40 provided by an exemplary embodiment of the present disclosure. Figure 4 As shown, the photographing device 40 includes: an acquisition module 41 , a determination module 42 , a control module 43 and a generation module 44 .
[0111] The acquisition module 41 is used to obtain the light intensity corresponding to the photographing scene carried in the image acquisition request in response to the image acquisition request;
[0112] A determination module 42, configured to determine a target number of image frames requiring a lens re-centering operation according to light intensity and a photographing scene, wherein the lens re-centering operation is to adjust the position of the lens so that the lens is at the center of the image;
[0113] A control module 43, configured to control the lens to perform a lens re-centering operation and capture subsequent second image frames after capturing each first image frame corresponding to the target number according to the target number;
[0114] The generating module 44 is configured to generate a target image frame according to the first image frame and the second image frame.
[0115] Optionally, the control module 43 may also be used to:
[0116] Determine a first duration according to the light intensity, wherein the first duration is the duration during which the lens is in a non-exposure period;
[0117] The first duration is adjusted to a second duration, wherein the second duration is greater than or equal to the duration required for the shot to return to the center;
[0118] Exposure compensation is performed on the first image frame according to the second duration.
[0119] Optionally, when the acquisition module 41 acquires the light intensity corresponding to the photographing scene carried in the image acquisition request in response to the image acquisition request, it includes:
[0120] In response to the image acquisition request, parsing the photographing scene from the image acquisition request;
[0121] Determine the light intensity corresponding to the photo scene based on the luminous flux, reflection coefficient, light intensity rate and light source depth.
[0122] Optionally, when determining the target number of image frames that need to be shot back according to the light intensity and the photographing scene, the determination module 42 is configured to:
[0123] According to the light intensity and the shooting scene, the mapping relationship table of the set light intensity, the set shooting scene and the preset quantity is queried to obtain the target quantity.
[0124] Optionally, when determining the target number of image frames that need to be shot back according to the light intensity and the photographing scene, the determination module 42 is configured to:
[0125] When the photographing scene is a night scene photographing scene, if the light intensity is greater than the first light intensity value, the target number is determined to be the first value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be the second value;
[0126] When the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target number is determined to be a third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be a second value;
[0127] In the case where the shooting scene is a night owl scene, if the light intensity is greater than the first light intensity value, the target number is determined to be a fourth value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be a second value;
[0128] The first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value.
[0129] Optionally, after collecting each first image frame corresponding to the number of targets according to the number of targets, the control module 43 controls the lens to perform a lens re-centering operation, which is used to:
[0130] When the anti-shake function is turned on and the shooting scene is a night scene, according to the number of targets, after each first image frame corresponding to the number of targets is collected, the lens is controlled to perform a lens re-centering operation.
[0131] Optionally, when generating the target image frame according to the first image frame and the second image frame, the generating module 44 is configured to:
[0132] Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame;
[0133] The candidate image frames are synthesized to obtain the target image frame.
[0134] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0135] Figure 5 FIG. 1 is a schematic diagram of a structure of an electronic device provided by an exemplary embodiment of the present disclosure. Figure 5 As shown, the electronic device includes: a memory 51 and a processor 52. In addition, the electronic device also includes a power supply component 53 and a communication component 54.
[0136] The memory 51 is used to store computer programs and can be configured to store various other data to support operations on the electronic device. Examples of such data include instructions for any application program or method operating on the electronic device.
[0137] The memory 51 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0138] The communication component 54 is used for data transmission with other devices.
[0139] The processor 52 can execute computer instructions stored in the memory 51 to: obtain the light intensity corresponding to the shooting scene carried by the image acquisition request in response to the image acquisition request; determine the target number of image frames that need to perform the lens re-centering operation according to the light intensity and the shooting scene, wherein the lens re-centering operation is to adjust the position of the lens so that the lens is at the center of the image; according to the target number, after acquiring each first image frame corresponding to the target number, control the lens to perform the lens re-centering operation and acquire subsequent second image frames; generate a target image frame according to the first image frame and the second image frame.
[0140] Optionally, the processor 52 may also be configured to:
[0141] Determine a first duration according to the light intensity, wherein the first duration is the duration during which the lens is in a non-exposure period;
[0142] The first duration is adjusted to a second duration, wherein the second duration is greater than or equal to the duration required for the shot to return to the center;
[0143] Exposure compensation is performed on the first image frame according to the second duration.
[0144] Optionally, when the processor 52 obtains the light intensity corresponding to the photographing scene carried in the image acquisition request in response to the image acquisition request, it is configured to:
[0145] In response to the image acquisition request, parsing the photographing scene from the image acquisition request;
[0146] Determine the light intensity corresponding to the photo scene based on the luminous flux, reflection coefficient, light intensity rate and light source depth.
[0147] Optionally, when the processor 52 determines the target number of image frames that need to be shot back according to the light intensity and the shooting scene, it is configured to:
[0148] According to the light intensity and the shooting scene, the mapping relationship table of the set light intensity, the set shooting scene and the preset quantity is queried to obtain the target quantity.
[0149] Optionally, when the processor 52 determines the target number of image frames that need to be shot back according to the light intensity and the shooting scene, it is configured to:
[0150] When the photographing scene is a night scene photographing scene, if the light intensity is greater than the first light intensity value, the target number is determined to be the first value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be the second value;
[0151] When the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target number is determined to be a third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be a second value;
[0152] In the case where the shooting scene is a night owl scene, if the light intensity is greater than the first light intensity value, the target number is determined to be a fourth value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target number is determined to be a second value;
[0153] The first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value.
[0154] Optionally, after collecting each first image frame corresponding to the number of targets according to the number of targets, the processor 52 controls the lens to perform the lens re-centering operation, and is used to:
[0155] When the anti-shake function is turned on and the shooting scene is a night scene, according to the number of targets, after each first image frame corresponding to the number of targets is collected, the lens is controlled to perform a lens re-centering operation.
[0156] Optionally, when generating the target image frame according to the first image frame and the second image frame, the processor 52 is configured to:
[0157] Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame;
[0158] The candidate image frames are synthesized to obtain the target image frame.
[0159] Accordingly, the present disclosure also provides a computer-readable storage medium storing a computer program. When the computer-readable storage medium stores the computer program and the computer program is executed by one or more processors, the one or more processors execute Figure 1 Each step in the method embodiment.
[0160] Accordingly, the present disclosure also provides a computer program product, the computer program product includes a computer program / instruction, the computer program / instruction is executed by a processor Figure 1 Each step in the method embodiment.
[0161] Above Figure 5The communication component in is configured to facilitate wired or wireless communication between the device where the communication component is located and other devices. The device where the communication component is located can access a wireless network based on a communication standard, such as WiFi, 2G, 3G, 4G / LTE, 5G and other mobile communication networks, or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0162] Above Figure 5 The power supply component in the device provides power to various components of the device where the power supply component is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device where the power supply component is located.
[0163] The electronic device also includes a display screen and an audio component.
[0164] The display screen includes a screen, and the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.
[0165] The audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal.
[0166] In the above-mentioned device, storage medium and computer program product embodiments of the present disclosure, in response to an image acquisition request, the light intensity corresponding to the photographing scene carried in the image acquisition request is obtained; according to the light intensity and the photographing scene, the number of targets that need to perform the lens re-centering operation is dynamically determined; according to the number of targets, after each first image frame corresponding to the target number is acquired, the lens is controlled to perform the lens re-centering operation and acquire the subsequent second image frame, while the subsequently acquired image frames do not perform the lens re-centering operation, and the target image frame is generated according to the first image frame and the second image frame. Compared with the existing method of performing the lens re-centering operation after all the acquired image frames, the amount of calculation is reduced, the image processing efficiency is improved, the rotation time of the shutter button for night scene image acquisition can be reduced, the shooting delay is reduced, and the user experience is improved.
[0167] Those skilled in the art will appreciate that the embodiments of the present disclosure may be provided as methods, systems, or computer program products. Therefore, the present disclosure may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] The present disclosure is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present disclosure. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0169] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0171] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0172] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0173] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0174] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0175] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A shooting method, characterized in that: include: In response to an image acquisition request, obtaining a light intensity corresponding to a photographing scene carried in the image acquisition request; Determining a target number of image frames for which a lens re-centering operation is required according to the illumination intensity and the photographing scene, wherein the lens re-centering operation is adjusting a position of a lens so that the lens is at the center of an image; According to the number of targets, after acquiring each first image frame corresponding to the number of targets, controlling the lens to perform the lens re-centering operation and to acquire subsequent second image frames; A target image frame is generated according to the first image frame and the second image frame.
2. The method according to claim 1, characterized in that: The method further comprises: Determine a first duration according to the light intensity, wherein the first duration is the duration during which the lens is in a non-exposure period; Adjusting the first duration to a second duration, wherein the second duration is greater than or equal to the duration required for the shot to return to the center; Exposure compensation is performed on the first image frame according to the second duration.
3. The method according to claim 1, characterized in that The step of obtaining, in response to the image acquisition request, a light intensity corresponding to a photographing scene carried in the image acquisition request, includes: In response to an image acquisition request, parsing the photographing scene from the image acquisition request; The illumination intensity corresponding to the photographing scene is determined according to the luminous flux, the reflection coefficient, the illumination intensity rate and the light source depth.
4. The method according to claim 1, characterized in that: The step of determining a target number of image frames that need to be shot back according to the illumination intensity and the photographing scene includes: According to the illumination intensity and the photographing scene, a mapping relationship table of set illumination intensity, set photographing scene and preset quantity is queried to obtain the target quantity.
5. The method according to claim 1, characterized in that The step of determining a target number of image frames that need to be shot back according to the illumination intensity and the photographing scene includes: In the case where the photographing scene is a night scene photographing scene, if the illumination intensity is greater than a first illumination intensity value, the target quantity is determined to be a first value; if the illumination intensity is greater than or equal to a second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be a second value; In the case where the photographing scene is a night scene video recording scene, if the light intensity is greater than the first light intensity value, the target quantity is determined to be a third value; if the light intensity is greater than or equal to the second light intensity value and less than or equal to the first light intensity value, the target quantity is determined to be the second value; In the case where the shooting scene is a night owl scene, if the illumination intensity is greater than the first illumination intensity value, the target quantity is determined to be a fourth value; if the illumination intensity is greater than or equal to the second illumination intensity value and less than or equal to the first illumination intensity value, the target quantity is determined to be the second value; Among them, the first light intensity value is greater than the second light intensity value, the first value is less than the second value, the second value is less than the third value, and the third value is less than the fourth value.
6. The method according to claim 1, characterized in that The step of acquiring each first image frame corresponding to the number of targets according to the number of targets and controlling the lens to perform the lens re-centering operation comprises: When the anti-shake function is turned on and the photographing scene is a night scene, after collecting each first image frame corresponding to the target number according to the target number, the lens is controlled to perform the lens re-centering operation.
7. The method according to claim 1 or 2, characterized in that: Generating a target image frame according to the first image frame and the second image frame comprises: Selecting a set number of candidate image frames whose image clarity meets a clarity threshold from the first image frame and the second image frame; The candidate image frames are subjected to image synthesis to obtain the target image frame.
8. A photographing device, characterized in that: include: An acquisition module, configured to obtain, in response to an image acquisition request, a light intensity corresponding to a photographing scene carried in the image acquisition request; a determination module, configured to determine, according to the illumination intensity and the photographing scene, a target number of image frames for which a lens re-centering operation is required, wherein the lens re-centering operation is to adjust the position of the lens so that the lens is at the center of the image; A control module, configured to control the lens to perform the lens re-centering operation and to capture subsequent second image frames after capturing each first image frame corresponding to the target number according to the target number; A generating module is used to generate a target image frame according to the first image frame and the second image frame.
9. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement each step in the method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 7 is implemented.
11. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.