Shooting method and device, electronic equipment and readable storage medium

By automatically adjusting the exposure time and calculating the moving step length of the focus motor in the electronic device, the problem of low success rate when electronic devices shoot creative images with prominent explosion effects on the subject is solved, achieving a higher success rate and better shooting effects.

CN120640126APending Publication Date: 2025-09-12VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202511062893.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-09-12

AI Technical Summary

Technical Problem

In the prior art, when electronic devices are used to capture creative images of subjects highlighting explosion effects, the success rate is low and manual operations are highly random.

Method used

By obtaining the focal length and exposure time in the shooting preview interface, the exposure time is automatically adjusted and the moving step length of the focus motor is calculated to achieve automatic control of zoom and exposure, reducing the randomness of manual operation.

Benefits of technology

It improves the success rate of electronic device shooting, reduces the randomness of manual operation, and improves the shooting effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120640126A_ABST
    Figure CN120640126A_ABST
Patent Text Reader

Abstract

The invention discloses a shooting method and device, electronic equipment and a readable storage medium, and belongs to the technical field of shooting. Obtaining a first focal length and a first exposure time of a first image in the shooting preview interface; the first exposure time is adjusted to obtain second exposure time, and the second exposure time is longer than the first exposure time; determining the moving step length of the focusing motor according to the second exposure time and the first focal length; and in response to a first input for the shooting preview interface, controlling the image sensor to perform exposure according to the second exposure time, and controlling the focusing motor to move towards the focal length reduction direction according to the moving step length to obtain a second image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of photographing technology, and specifically relates to a photographing method, apparatus, electronic device, and readable storage medium. Background Art

[0002] With the development of intelligent electronic devices, the demand for creative photography with these devices is increasing. For example, electronic devices can now capture creative images with explosion effects that highlight the subject. However, these creative images are currently achieved through manual shutter and focus, resulting in a very high film rejection rate.

[0003] Therefore, how to improve the success rate of creative images of explosion special effects captured by electronic devices is an urgent problem to be solved. Summary of the Invention

[0004] The purpose of the embodiments of the present application is to provide a shooting method, device, electronic device and readable storage medium, which can improve the shooting success rate of the electronic device.

[0005] In a first aspect, an embodiment of the present application provides a shooting method, the method comprising:

[0006] Obtain the first focal length and first exposure time of the first image in the shooting preview interface;

[0007] Adjusting the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time;

[0008] determining a moving step length of a focus motor according to the second exposure time and the first focal length;

[0009] In response to a first input to the shooting preview interface, the image sensor is controlled to expose according to a second exposure time, and the focus motor is controlled to move in a direction of decreasing focal length according to a moving step length to obtain a second image.

[0010] In a second aspect, an embodiment of the present application provides a photographing device, comprising:

[0011] An acquisition module, configured to acquire a first focal length and a first exposure time of a first image in a shooting preview interface;

[0012] an adjusting module, configured to adjust the first exposure time to obtain a second exposure time, wherein the second exposure time is greater than the first exposure time;

[0013] a determination module, configured to determine a moving step length of the focus motor according to the second exposure time and the first focal length;

[0014] The shooting module is used to control the image sensor to expose according to the second exposure time in response to the first input to the shooting preview interface, and control the focus motor to move in the direction of decreasing the focal length according to the moving step length to obtain a second image.

[0015] In a third aspect, an embodiment of the present application provides an electronic device comprising a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the programs or instructions are executed by the processor, the steps of the method of the first aspect are implemented.

[0016] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method of the first aspect are implemented.

[0017] In a fifth aspect, an embodiment of the present application provides a chip, which includes a processor and a communication interface, the communication interface and the processor are coupled, and the processor is used to run programs or instructions to implement the method of the first aspect.

[0018] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method of the first aspect.

[0019] In an embodiment of the present application, the first focal length and the first exposure time of the first image in the shooting preview interface can be obtained; the first exposure time is adjusted to obtain a second exposure time, and the second exposure time is greater than the first exposure time; the moving step of the focus motor is determined based on the second exposure time and the first focal length; in response to the first input to the shooting preview interface, the image sensor is controlled to expose according to the second exposure time, and the focus motor is controlled to move in the direction of reducing the focal length according to the moving step to obtain a second image.

[0020] In this way, the current focal length and exposure time of the first image displayed on the preview interface of the electronic device can be used to automatically calculate the exposure time and moving step length of the focus motor required to capture the second image with explosion special effects based on the first image. In this way, during the shooting process, automatic control of zoom and exposure can be achieved, reducing the randomness of manual operation, thereby improving the shooting success rate of the electronic device. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 Schematic diagram of the process of the shooting method provided in the embodiment of the present application;

[0022] Figure 2 Schematic diagram of the interface of the shooting method provided in the embodiment of the present application;

[0023] Figure 3This is a flow chart of a scenario embodiment of the shooting method provided in an embodiment of the present application;

[0024] Figure 4 is a structural diagram of a photographing device provided in an embodiment of the present application;

[0025] Figure 5 is a schematic structural diagram of an electronic device provided in an embodiment of the present application;

[0026] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] The following will be combined with the accompanying drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the embodiments described are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field are within the scope of protection of this application.

[0028] The terms "first," "second," and the like in the specification and claims of this application are used to distinguish similar objects, and are not used to describe a specific order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of this application can be implemented in an order other than that illustrated or described herein, and that the objects distinguished by "first," "second," and the like are generally of the same type, and do not limit the number of objects; for example, the first object can be one or more. In addition, the term "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0029] The following describes the shooting method provided in the embodiment of the present application in detail through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0030] Figure 1 : is a flow chart of the shooting method provided in the embodiment of the present application. The shooting method may include:

[0031] Step 101: Obtain a first focal length and a first exposure time of a first image in a shooting preview interface.

[0032] In step 101, the user may open a camera application on the electronic device and select a target shooting mode. In the target shooting mode, the image captured by the electronic device may be a creative image with an "explosion effect".

[0033] For example, Figure 2As shown, the electronic device displays a shooting preview interface 200, wherein the shooting preview interface 200 can display a previewed first image 201, wherein the first image can be the image displayed by the electronic device after automatic focus and automatic exposure based on the current shooting image. The shooting preview interface 200 can also include functional controls, such as an "explosion special effect" control 202, which receives input from a user clicking on the "explosion special effect" control 202, at which point the electronic device can enter the target shooting mode. In some examples, the first image can also be any video frame in the video being previewed.

[0034] In target shooting mode, the electronic device can obtain a first focal length and a first exposure time of the first image, wherein the first focal length and the first exposure time are respectively the focal length and the exposure time corresponding to the first image displayed by the electronic device after the electronic device automatically focuses and automatically exposes the current shooting image.

[0035] Step 102: Adjust the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time.

[0036] In step 102 , an adjustment may be performed based on the first exposure time to obtain an adjusted second exposure time.

[0037] It's understandable that because the creative image corresponding to the "explosion effect" requires adjusting the focus while exposing the image, capturing it often requires a longer exposure time to allow for sufficient time for zooming. Therefore, the exposure time can be increased by a corresponding amount, i.e., the exposure time adjustment value, based on the first exposure time, to obtain a second exposure time with a larger value.

[0038] For example, the second exposure time = the first exposure time + the exposure time adjustment value. The exposure time adjustment value can be a value pre-set based on empirical data or a value determined based on the size of the object in the first image. This is not specifically limited here.

[0039] Step 103: Determine the moving step length of the focus motor according to the second exposure time and the first focal length.

[0040] In step 103 , it can be understood that the moving step length of the focus motor is the moving distance of the focus motor per unit time. In other words, it can be represented as the zoom rate of the focus motor.

[0041] In some examples, a correspondence table of exposure time, focal length and focus motor movement step length can be established in advance, and then a table lookup operation can be performed based on the correspondence table to obtain the focus motor movement step length that matches the second exposure time and the first focal length.

[0042] In other examples, the minimum focal length that the focus motor can achieve during zooming can be used as the focal length threshold. The focus motor's step length can be calculated based on the difference between the first focal length and the focal length threshold and the second exposure time. For example, the focus motor's step length = (first focal length - focal length threshold) / second exposure time.

[0043] Step 104 : In response to the first input to the shooting preview interface, control the image sensor to expose according to the second exposure time, and control the focus motor to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

[0044] In step 104, the electronic device may receive a first input from the user on the shooting preview interface, where the first input may be used to instruct to shoot the current shooting screen on the shooting preview interface. For example, the shooting preview interface may include a "shoot" control, and the first input may be an input from the user clicking the "shoot" control.

[0045] In response to the first input to the shooting preview interface, the electronic device can control the image sensor to expose the image according to the second exposure time. While the image sensor is being exposed, the electronic device can control the focus motor to move at a constant speed in a direction of decreasing focal length according to the movement step size. After the exposure is completed, a second image can be generated. The second image thus captured can achieve radial blur, highlighting the central subject, i.e., the second image is a creative image corresponding to the "explosion effect."

[0046] In an embodiment of the present application, the shooting method can obtain the first focal length and first exposure time of the first image displayed in the shooting preview interface; adjust the first exposure time to obtain a second exposure time, and the second exposure time is greater than the first exposure time; determine the moving step of the focus motor based on the second exposure time and the first focal length; in response to the first input to the shooting preview interface, control the image sensor to expose according to the second exposure time, and control the focus motor to move in the direction of reducing the focal length according to the moving step to obtain a second image.

[0047] In this way, the current focal length and exposure time of the first image displayed on the preview interface of the electronic device can be used to automatically calculate the exposure time and moving step length of the focus motor required to capture the second image with explosion special effects based on the first image. In this way, during the shooting process, automatic control of zoom and exposure can be achieved, reducing the randomness of manual operation, thereby improving the shooting success rate of the electronic device.

[0048] In some embodiments, adjusting the first exposure time to obtain the second exposure time may include:

[0049] determining an exposure time adjustment value according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0050] A second exposure time is determined according to the first exposure time and the exposure time adjustment value.

[0051] In this embodiment, if Figure 2 As shown, the subject segmentation algorithm can be used to identify and segment the photographed object in the first image to obtain the photographed object area 2011.

[0052] The area of ​​the first image and the area of ​​the subject area can be calculated, and the area ratio of the subject area can be determined based on the area of ​​the subject area and the area of ​​the first image. For example, area ratio k = area of ​​the subject area / area of ​​the first image.

[0053] The exposure time adjustment value can be determined based on the area ratio. For example, a table of correspondences between area ratios and exposure time adjustment values ​​can be pre-established. By looking up the table, the exposure time adjustment value that matches the area ratio k can be determined from the correspondence table. Alternatively, the exposure time adjustment value can be calculated based on a pre-set empirical exposure time adjustment value and the area ratio k. For example, the exposure time adjustment value = the empirical exposure time adjustment value * k.

[0054] The second exposure time may be determined based on the first exposure time and the exposure time adjustment value. For example, the second exposure time = the first exposure time + the exposure time adjustment value.

[0055] In this way, by identifying the subject, the area ratio of the subject area can be calculated, and then the exposure time adjustment value can be assisted in calculating based on the area ratio, so that the adjusted exposure time is more reasonable and can better meet the actual shooting needs, thereby improving the imaging effect of the second image and improving the shooting success rate.

[0056] In some embodiments, determining the moving step length of the focus motor according to the second exposure time and the first focal length includes:

[0057] determining a third exposure time according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0058] determining a moving step length of the focus motor according to a difference between the second exposure time and the third exposure time and the first focal length;

[0059] Controlling the image sensor to expose according to a second exposure time, and controlling the focus motor to move in a direction of decreasing focal length according to a moving step length, to obtain a second image, includes:

[0060] The image sensor is controlled to perform exposure according to the second exposure time, and when the exposure time reaches the third exposure time, the focus motor is controlled to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

[0061] In this embodiment, the third exposure time may also be determined according to the area ratio of the photographed object region in the first image, wherein the third exposure time is a static exposure time in which only the image sensor is exposed and the focus motor does not zoom.

[0062] It is understood that the second exposure time is the total exposure time during the shooting process, and the difference between the second exposure time and the third exposure time can be used as the exposure time corresponding to the focus motor zoom process. Therefore, the focus motor movement step size can be determined based on the difference between the second and third exposure times and the first focal length.

[0063] As mentioned above, based on a table lookup operation, the focus motor movement step length that matches the difference between the second exposure time and the third exposure time and the first focal length can be determined from the correspondence table of exposure time, focal length and focus motor movement step length.

[0064] Alternatively, the minimum focal length that the focus motor can achieve during zooming can be used as a focal length threshold. The focus motor's step length can be calculated based on the difference between the first focal length and the focal length threshold, as well as the difference between the second exposure time and the third exposure time. For example, the focus motor's step length = (first focal length - focal length threshold) / (second exposure time - third exposure time).

[0065] The image sensor can be controlled to expose for a second exposure time, and the focus motor can be controlled to remain stationary. When the exposure time reaches a third exposure time, the focus motor can be controlled to move at a constant speed in a direction of decreasing focal length according to a moving step size. After the exposure is completed, a second image can be generated.

[0066] This allows the second exposure time to be divided into two segments: the first being a static exposure, during which the focus motor remains stationary. The second being a zoom exposure, during which the focus motor moves in steps to decrease the focal length. This further improves imaging quality and reduces film waste.

[0067] In some embodiments, before adjusting the first exposure time to obtain the second exposure time, the method may further include:

[0068] Performing target detection on the first image to obtain a detection result; the target detection includes at least one of object position detection, ambient light brightness detection, and focal length detection;

[0069] When the detection result meets the preset detection condition, the first exposure time is adjusted to obtain a second exposure time;

[0070] If the test result does not meet the preset test conditions, a prompt message will be output.

[0071] In this embodiment, before capturing a creative image, in order to ensure the imaging effect, target detection can be performed on the first image displayed on the capture preview interface. The target detection may include at least one of the following: object position detection, ambient light brightness detection, and focal length detection.

[0072] The object position detection is used to detect whether the position of the object in the first image meets the preset requirements. For example, the position of the object in the central area of ​​the first image can achieve a better subject highlighting effect. Therefore, it is possible to detect whether the position of the object is in the central area of ​​the first image through center point detection, edge detection, deep learning, etc. If so, it can be considered that the detection result of the object position detection meets the preset detection conditions.

[0073] Ambient brightness detection can be used to determine whether the current shooting environment is too bright. If the shooting environment is too bright, overexposure is likely to occur during exposure, resulting in poor imaging quality. Therefore, parameters related to ambient brightness can be detected. If the parameter value reaches the corresponding threshold, it can be reflected that the ambient brightness is within the required range and is not too bright. The detection result of ambient brightness detection can be considered to meet the preset detection conditions.

[0074] Focus detection can be used to detect whether the current focal length of the first image is too small. It's understandable that during the creative "explosion effect" image capture process, dynamic zooming in the direction of decreasing focal length is required. If the current focal length is too small, special effects capture will not be possible. Therefore, if the current focal length is greater than a preset focal length threshold, the focus detection result can be considered to meet the preset detection condition.

[0075] If the detection result meets the preset detection conditions, the first exposure time can be adjusted to obtain a second exposure time, that is, the shooting of the creative image of the "explosion effect" can continue.

[0076] If the detection result does not meet the preset detection conditions, a prompt message can be output to prompt the user to adjust the position of the shooting object, change to a shooting environment with suitable brightness, or move away from the shooting object to increase the focal length. During the user adjustment process, if the detection result meets the preset detection conditions, a prompt message can be output again to indicate that the shooting can be continued.

[0077] In this way, before shooting the creative image of the "explosion special effect", the current shooting conditions are detected based on the position detection of the shooting object, the ambient light brightness detection and the focal length detection to detect whether they can shoot a good image. If the detection result meets the preset detection conditions, the shooting process can continue. If the detection result does not meet the preset detection conditions, a prompt message can be output so that the user can adjust it before shooting, thereby further improving the success rate.

[0078] In some embodiments, when target detection includes detecting the position of a photographed object, the method may further include:

[0079] Acquire a first center position of the first image and a second center position of the object in the first image;

[0080] In a case where the distance between the first center position and the second center position is less than or equal to the distance threshold, it is determined that the detection result of the photographed object position detection meets the preset detection condition.

[0081] In this embodiment, the first center position of the first image and the second center position of the subject in the first image can be directly obtained. If the distance between the first center position and the second center position is less than or equal to a distance threshold, it can be considered that the subject is close to the center of the first image, and a better subject highlighting effect can be achieved after the image is captured. Therefore, the detection result of the subject position detection can be considered to meet the preset detection conditions.

[0082] In this way, it is possible to detect whether the subject is in the central area of ​​the first image based on the first image and the center position of the subject in the first image. The detection method is more intuitive and convenient, and while improving the filming rate, it also improves the early detection efficiency.

[0083] In some examples, detecting the position of the photographed object may also include the following steps:

[0084] Extracting a first edge, a second edge, a third edge, and a fourth edge of the first image, and a first sub-edge, a second sub-edge, a third sub-edge, and a fourth sub-edge of a region where the photographed object is located in the first image; wherein the first edge, the third edge, the first sub-edge, and the third sub-edge are parallel to each other, and the second edge, the fourth edge, the second sub-edge, and the fourth sub-edge are parallel to each other;

[0085] Determine a first distance between the first edge and the first sub-edge, a second distance between the second edge and the second sub-edge, a third distance between the third edge and the third sub-edge, and a fourth distance between the fourth edge and the fourth sub-edge;

[0086] When the difference between the first distance and the third distance, and the difference between the second distance and the fourth distance are both less than or equal to the difference threshold, it is determined that the detection result of the object position detection meets the preset detection condition.

[0087] In this way, it is also possible to detect whether the photographed object is in the central area of ​​the first image based on edge detection.

[0088] In some embodiments, when the target detection includes ambient light brightness detection, the method further includes:

[0089] When the first exposure time is greater than or equal to the time threshold, it is determined that the detection result of the ambient light brightness detection meets the preset detection condition.

[0090] In this embodiment, the ambient light brightness is negatively correlated with the exposure time. Therefore, when the first exposure time is greater than or equal to the time threshold, it can be considered that the current ambient light brightness is not too bright, and therefore it can be determined that the detection result of the ambient light brightness detection meets the preset detection conditions.

[0091] In this way, whether the ambient light brightness is too bright can be detected directly based on the parameters needed later, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0092] In some examples, it may be that when the ambient light brightness corresponding to the first image is less than or equal to a brightness threshold, the detection result of the ambient light brightness detection is determined to meet the preset detection condition; or when the exposure value of the first image is less than or equal to an exposure threshold, the detection result of the ambient light brightness detection is determined to meet the preset detection condition.

[0093] In some embodiments, when the target detection includes focus detection, the method further includes:

[0094] In a case where the first focal length is greater than the focal length threshold, it is determined that the detection result of the focal length detection meets a preset detection condition.

[0095] In this way, it is possible to directly detect whether the focal length meets the shooting requirements of creative images of "explosion special effects" based on the parameters required subsequently, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0096] In some embodiments, controlling the image sensor to expose the image according to the second exposure time, and controlling the focus motor to move in a direction of decreasing focal length according to the moving step length, to obtain the second image, may include:

[0097] Controlling the image sensor to expose according to a second exposure time, and controlling the focus motor to move in a direction of decreasing focal length according to a moving step length, to obtain image data;

[0098] Performing image signal ISP processing on the image data to obtain processed image data;

[0099] The processed image data is encoded to obtain a second image.

[0100] In some embodiments, the image sensor is controlled to be exposed according to the second exposure time. While the image sensor is being exposed, the focus motor can be controlled to move in a direction of decreasing focal length according to a moving step at a constant speed.

[0101] After the image sensor has finished exposing the image, the generated image data can be obtained and subjected to image signal processing (ISP) to obtain processed image data. ISP processing can improve image quality. For example, it can make the image appear clearer and more natural by adjusting brightness, contrast, color balance, etc. ISP processing can enhance image details. Through techniques such as denoising and sharpening, ISP can reduce blur and noise in the image, making the image sharper and more detailed. ISP processing can also perform color correction and white balance adjustment. Different camera sensors respond differently to color, and ISP can correct it to make the color more accurate and consistent with the human eye's visual perception. White balance adjustment ensures that white objects remain white under different lighting conditions, avoiding color casts. ISP processing can optimize the dynamic range of the image, preserving details in both highlights and shadows, making the image's light and dark contrast more natural and preventing overexposure or underexposure.

[0102] The processed image data can be encoded to produce a second image. Encoding compresses image data, reducing storage space and transmission bandwidth requirements. Encoding also improves image compatibility and portability. Different devices and platforms may support different image formats. Encoding ensures that images display correctly across devices, improving image portability. Encoding also protects image data security. Encryption protects image data from tampering or theft during transmission, enhancing data security.

[0103] ISP processing enhances image quality and detail, making images clearer and more natural. Encoding compresses image data, reducing storage and transmission requirements and improving efficiency and compatibility. The combination of these two factors comprehensively improves image processing effectiveness and efficiency, resulting in a superior second image and a higher resolution.

[0104] In order to facilitate understanding of the shooting method provided by the above embodiment, the above shooting method is described below using a specific scenario embodiment. Figure 3 A flowchart of a scenario embodiment of the shooting method provided in an embodiment of the present application.

[0105] This scenario embodiment may specifically include the following steps:

[0106] Step 301: The electronic device opens a camera application and turns on an "explosion effect" photo mode;

[0107] Step 302: displaying a shooting preview interface, where the shooting preview interface includes a first image;

[0108] Step 303: Detect whether the subject of the first image is in the center area, whether the first exposure time of the first image is greater than or equal to the time threshold, and whether the first focal length of the first image is greater than the focal length threshold; if not, execute step 304; if so, execute step 305;

[0109] Step 304: Outputting a prompt message to instruct the user to adjust the photographed object to the center area, reminding the user that the current ambient light is too bright, and instructing the user to increase the distance between the electronic device and the photographed object;

[0110] Step 305: Identify the subject in the first image using a subject segmentation algorithm to obtain a subject area, and calculate the area ratio between the subject area and the first image.

[0111] Step 306: determining an exposure time adjustment value and a third exposure time according to the area ratio, and adding the exposure time adjustment value to the first exposure time to obtain a second exposure time;

[0112] Step 307 , determining a moving step length of the focus motor according to the difference between the second exposure time and the third exposure time and the first focal length;

[0113] Step 308: receiving input from the user clicking a photo button;

[0114] Step 309: The image sensor is exposed according to the second exposure time. During the first third exposure time, the focus motor remains stationary. When the third exposure time is reached, the focus motor is controlled to move at a constant speed according to the moving step size in a direction of decreasing focal length.

[0115] Step 310 , after the image sensor exposure is completed, image data generated by the image sensor is obtained;

[0116] Step 311: perform ISP processing and encoding on the image data in sequence to generate a second image.

[0117] The shooting method provided in the embodiment of the present application can be executed by a shooting device. In the embodiment of the present application, the shooting method performed by the shooting device is taken as an example to illustrate the shooting device provided in the embodiment of the present application.

[0118] like Figure 4 As shown, the photographing device 400 may include:

[0119] An acquisition module 401 is configured to acquire a first focal length and a first exposure time of a first image in a shooting preview interface;

[0120] An adjustment module 402 is configured to adjust the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time;

[0121] A determination module 403 is configured to determine a moving step length of a focus motor according to the second exposure time and the first focal length;

[0122] The shooting module 404 is configured to control the image sensor to expose the image according to the second exposure time in response to the first input to the shooting preview interface, and control the focus motor to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

[0123] In this way, the current focal length and exposure time of the first image displayed on the preview interface of the electronic device can be used to automatically calculate the exposure time and moving step length of the focus motor required to capture the second image with explosion special effects based on the first image. In this way, during the shooting process, automatic control of zoom and exposure can be achieved, reducing the randomness of manual operation, thereby improving the shooting success rate of the electronic device.

[0124] In some embodiments, the adjustment module 402 may also be used to:

[0125] determining an exposure time adjustment value according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0126] A second exposure time is determined according to the first exposure time and the exposure time adjustment value.

[0127] In this way, by identifying the subject, the area ratio of the subject area can be calculated, and then the exposure time adjustment value can be assisted in calculating based on the area ratio, so that the adjusted exposure time is more reasonable and can better meet the actual shooting needs, thereby improving the imaging effect of the second image and improving the shooting success rate.

[0128] In some embodiments, the determination module 403 may also be used to:

[0129] determining a third exposure time according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0130] determining a moving step length of the focus motor according to a difference between the second exposure time and the third exposure time and the first focal length;

[0131] The shooting module 404 can also be used to:

[0132] The image sensor is controlled to perform exposure according to the second exposure time, and when the exposure time reaches the third exposure time, the focus motor is controlled to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

[0133] This allows the second exposure time to be divided into two segments: the first being a static exposure, during which the focus motor remains stationary. The second being a zoom exposure, during which the focus motor moves in steps to decrease the focal length. This further improves imaging quality and reduces film waste.

[0134] In some embodiments, the photographing device 400 may further include:

[0135] a detection module, configured to perform target detection on the first image to obtain a detection result before adjusting the first exposure time to obtain the second exposure time; the target detection includes at least one of object position detection, ambient light brightness detection, and focal length detection;

[0136] An adjustment module 402 is configured to adjust the first exposure time to obtain a second exposure time when the detection result satisfies a preset detection condition;

[0137] The output module is used to output prompt information when the detection result does not meet the preset detection conditions.

[0138] In this way, before shooting the creative image of the "explosion special effect", the current shooting conditions are detected based on the position detection of the shooting object, the ambient light brightness detection and the focal length detection to detect whether they can shoot a good image. If the detection result meets the preset detection conditions, the shooting process can continue. If the detection result does not meet the preset detection conditions, a prompt message can be output so that the user can make adjustments before shooting, thereby further improving the success rate.

[0139] In some embodiments, when target detection includes object position detection, the detection module may further be used to:

[0140] Acquire a first center position of the first image and a second center position of the object in the first image;

[0141] In a case where the distance between the first center position and the second center position is less than or equal to the distance threshold, it is determined that the detection result of the photographed object position detection meets the preset detection condition.

[0142] In this way, it is possible to detect whether the subject is in the central area of ​​the first image based on the first image and the center position of the subject in the first image. The detection method is more intuitive and convenient, and while improving the filming rate, it also improves the early detection efficiency.

[0143] In some embodiments, when target detection includes ambient light brightness detection, the detection module may further be configured to:

[0144] When the first exposure time is greater than or equal to the time threshold, it is determined that the detection result of the ambient light brightness detection meets the preset detection condition.

[0145] In this way, whether the ambient light brightness is too bright can be detected directly based on the parameters needed later, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0146] In some embodiments, when target detection includes focus detection, the detection module may further be configured to:

[0147] In a case where the first focal length is greater than the focal length threshold, it is determined that the detection result of the focal length detection meets a preset detection condition.

[0148] In this way, it is possible to directly detect whether the focal length meets the shooting requirements of creative images of "explosion special effects" based on the parameters required subsequently, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0149] The shooting device in the embodiments of the present application can be an electronic device or a component of an electronic device, such as an integrated circuit or chip. The electronic device can be a terminal or other device other than a terminal. For example, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a mobile internet device (MID), an augmented reality (AR) / virtual reality (VR) device, a robot, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a personal digital assistant (PDA), etc. It can also be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., and the embodiments of the present application do not specifically limit this.

[0150] The shooting device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0151] The shooting device provided in the embodiment of the present application can achieve Figures 1 to 3 To avoid repetition, the various processes implemented in the method embodiment are not described here.

[0152] Alternatively, as Figure 5 As shown, an embodiment of the present application also provides an electronic device 500, including a processor 501 and a memory 502, wherein the memory 502 stores a program or instruction that can be run on the processor 501, and when the program or instruction is executed by the processor 501, the various steps of the above-mentioned shooting method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0153] It should be noted that the electronic devices in the embodiments of the present application include the above-mentioned mobile electronic devices and non-mobile electronic devices.

[0154] Figure 6 This is a schematic diagram of the hardware structure of the electronic device provided in an embodiment of the present application.

[0155] The electronic device 600 includes but is not limited to components such as a radio frequency unit 601 , a network module 602 , an audio output unit 603 , an input unit 604 , a sensor 605 , a display unit 606 , a user input unit 607 , an interface unit 608 , a memory 609 , and a processor 610 .

[0156] Those skilled in the art will understand that the electronic device 600 may also include a power source (such as a battery) to power each component, and the power source may be logically connected to the processor 610 through a power management system, thereby implementing functions such as charging, discharging, and power consumption management through the power management system. Figure 6 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be repeated here.

[0157] The processor 610 may be configured to:

[0158] Obtain the first focal length and first exposure time of the first image in the shooting preview interface;

[0159] Adjusting the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time;

[0160] determining a moving step length of a focus motor according to the second exposure time and the first focal length;

[0161] In response to a first input to the shooting preview interface, the image sensor is controlled to expose according to a second exposure time, and the focus motor is controlled to move in a direction of decreasing focal length according to a moving step length to obtain a second image.

[0162] In this way, the current focal length and exposure time of the first image displayed on the preview interface of the electronic device can be used to automatically calculate the exposure time and moving step length of the focus motor required to capture the second image with explosion special effects based on the first image. In this way, during the shooting process, automatic control of zoom and exposure can be achieved, reducing the randomness of manual operation, thereby improving the shooting success rate of the electronic device.

[0163] In some embodiments, the processor 610 may also be configured to:

[0164] determining an exposure time adjustment value according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0165] A second exposure time is determined according to the first exposure time and the exposure time adjustment value.

[0166] In this way, by identifying the subject, the area ratio of the subject area can be calculated, and then the exposure time adjustment value can be assisted in calculating based on the area ratio, so that the adjusted exposure time is more reasonable and can better meet the actual shooting needs, thereby improving the imaging effect of the second image and improving the shooting success rate.

[0167] In some embodiments, the processor 610 may also be configured to:

[0168] determining a third exposure time according to an area ratio of a photographic object region, where the photographic object region is a region where the photographic object is located in the first image;

[0169] determining a moving step length of the focus motor according to a difference between the second exposure time and the third exposure time and the first focal length;

[0170] The image sensor is controlled to perform exposure according to the second exposure time, and when the exposure time reaches the third exposure time, the focus motor is controlled to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

[0171] This allows the second exposure time to be divided into two segments: the first being a static exposure, during which the focus motor remains stationary. The second being a zoom exposure, during which the focus motor moves in steps to decrease the focal length. This further improves imaging quality and reduces film waste.

[0172] In some embodiments, the processor 610 may also be configured to:

[0173] Before adjusting the first exposure time to obtain the second exposure time, performing target detection on the first image to obtain a detection result; the target detection includes at least one of object position detection, ambient light brightness detection, and focal length detection;

[0174] When the detection result meets the preset detection condition, the first exposure time is adjusted to obtain a second exposure time;

[0175] If the test result does not meet the preset test conditions, a prompt message will be output.

[0176] In this way, before shooting the creative image of the "explosion special effect", the current shooting conditions are detected based on the position detection of the shooting object, the ambient light brightness detection and the focal length detection to detect whether they can shoot a good image. If the detection result meets the preset detection conditions, the shooting process can continue. If the detection result does not meet the preset detection conditions, a prompt message can be output so that the user can make adjustments before shooting, thereby further improving the success rate.

[0177] In some embodiments, when target detection includes subject position detection, the processor 610 may further be configured to:

[0178] Acquire a first center position of the first image and a second center position of the object in the first image;

[0179] In a case where the distance between the first center position and the second center position is less than or equal to the distance threshold, it is determined that the detection result of the photographed object position detection meets the preset detection condition.

[0180] In this way, it is possible to detect whether the subject is in the central area of ​​the first image based on the first image and the center position of the subject in the first image. The detection method is more intuitive and convenient, and while improving the filming rate, it also improves the early detection efficiency.

[0181] In some embodiments, when target detection includes ambient light brightness detection, the processor 610 may further be configured to:

[0182] When the first exposure time is greater than or equal to the time threshold, it is determined that the detection result of the ambient light brightness detection meets the preset detection condition.

[0183] In this way, whether the ambient light brightness is too bright can be detected directly based on the parameters needed later, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0184] In some embodiments, when target detection includes focus detection, the processor 610 may further be configured to:

[0185] In a case where the first focal length is greater than the focal length threshold, it is determined that the detection result of the focal length detection meets a preset detection condition.

[0186] In this way, it is possible to directly detect whether the focal length meets the shooting requirements of creative images of "explosion special effects" based on the parameters required subsequently, which can reduce the number of parameters required to be obtained to a certain extent and save computing power resources.

[0187] It should be understood that in an embodiment of the present application, the input unit 604 may include a graphics processing unit (GPU) 6041 and a microphone 6042, and the graphics processor 6041 processes the image data of a static picture or video obtained by an image capture device (such as a camera) in a video capture mode or an image capture mode. The display unit 606 may include a display panel 6061, and the display panel 6061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 607 includes a touch panel 6071 and at least one of other input devices 6072. The touch panel 6071 is also called a touch screen. The touch panel 6071 may include two parts: a touch detection device and a touch controller. Other input devices 6072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0188] The memory 609 can be used to store software programs and various data. The memory 609 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, applications or instructions required for at least one function (such as a sound playback function, an image playback function, etc.). In addition, the memory 609 may include a volatile memory or a non-volatile memory, or the memory 609 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM), and a direct memory bus random access memory (DRRAM). The memory 609 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0189] Processor 610 may include one or more processing units. Optionally, processor 610 integrates an application processor and a modem processor. The application processor primarily handles operations related to the operating system, user interface, and application programs, while the modem processor primarily processes wireless communication signals, such as a baseband processor. It is understood that the modem processor may not be integrated into processor 610.

[0190] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned shooting method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0191] The processor is the processor in the electronic device in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0192] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, which is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0193] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0194] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned shooting method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0195] It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising 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, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element. In addition, it should be noted that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in the opposite order according to the functions involved. For example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0196] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, and of course can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for enabling a terminal (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods of each embodiment of the present application.

[0197] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of this application, ordinary technicians in this field can also make many forms without departing from the purpose of this application and the scope of protection of the claims, all of which are within the protection of this application.

Claims

1. A shooting method, characterized in that: The method comprises: Obtain the first focal length and first exposure time of the first image in the shooting preview interface; Adjusting the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time; determining a moving step length of a focus motor according to the second exposure time and the first focal length; In response to a first input to the shooting preview interface, the image sensor is controlled to expose according to the second exposure time, and the focus motor is controlled to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

2. The method according to claim 1, characterized in that The adjusting the first exposure time to obtain a second exposure time includes: determining an exposure time adjustment value according to an area ratio of a photographic object region, wherein the photographic object region is a region where the photographic object is located in the first image; A second exposure time is determined according to the first exposure time and the exposure time adjustment value.

3. The method according to claim 1, characterized in that The determining the moving step length of the focus motor according to the second exposure time and the first focal length includes: determining a third exposure time according to an area ratio of a photographic object region, where the photographic object region is a region in which the photographic object in the first image is located; determining a moving step length of a focus motor according to a difference between the second exposure time and the third exposure time and the first focal length; The step of controlling the image sensor to expose the image according to the second exposure time and controlling the focus motor to move in a direction of decreasing the focal length according to the moving step length to obtain a second image includes: The image sensor is controlled to perform exposure according to the second exposure time, and when the exposure time reaches the third exposure time, the focus motor is controlled to move in a direction of decreasing focal length according to the moving step length to obtain a second image.

4. The method according to any one of claims 1 to 3, characterized in that Before adjusting the first exposure time to obtain the second exposure time, the method further includes: Performing target detection on the first image to obtain a detection result; the target detection includes at least one of object position detection, ambient light brightness detection, and focal length detection; When the detection result satisfies a preset detection condition, adjusting the first exposure time to obtain a second exposure time; If the detection result does not meet the preset detection condition, a prompt message is output.

5. The method according to claim 4, characterized in that In the case where the target detection includes detecting the position of the photographed object, the method further includes: Acquire a first center position of the first image and a second center position of the object in the first image; In a case where the distance between the first center position and the second center position is less than or equal to a distance threshold, it is determined that the detection result of the shooting object position detection meets a preset detection condition.

6. The method according to claim 4, characterized in that In the case where the target detection includes the ambient light brightness detection, the method further includes: When the first exposure time is greater than or equal to a time threshold, it is determined that the detection result of the ambient light brightness detection meets a preset detection condition.

7. The method according to claim 4, characterized in that In the case where the target detection includes the focal length detection, the method further includes: In a case where the first focal length is greater than a focal length threshold, it is determined that a detection result of the focal length detection meets a preset detection condition.

8. A photographing device, characterized in that: The device comprises: An acquisition module, configured to acquire a first focal length and a first exposure time of a first image in a shooting preview interface; an adjusting module, configured to adjust the first exposure time to obtain a second exposure time, where the second exposure time is greater than the first exposure time; a determination module, configured to determine a moving step length of a focus motor according to the second exposure time and the first focal length; The shooting module is used to control the image sensor to expose according to the second exposure time in response to the first input to the shooting preview interface, and control the focus motor to move in the direction of decreasing focal length according to the moving step to obtain a second image.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.