Shooting method and electronic equipment

By acquiring multiple images of the target scene in the pre-flash stage of the flash, determining the brightness distribution and adjusting the brightness of the main flash, the problem of the inability to adjust the brightness of the main flash according to the target scene in the prior art is solved, and a better shooting and exposure effect is achieved.

CN119996840APending Publication Date: 2025-05-13LENOVO (BEIJING) LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411981324.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-05-13

AI Technical Summary

Technical Problem

The existing flash photography scheme cannot dynamically adjust the brightness of the main flash according to the brightness distribution of the target scene, resulting in the frequent overexposed or overly dark background of the photos.

Method used

By acquiring multiple images of the target scene when the flash is in the pre-flash stage, the brightness distribution of the target scene is determined, and based on this, the brightness of the flash is in the main flash stage is adjusted to obtain a suitable exposed captured image.

Benefits of technology

It is realized that the main flash brightness is dynamically adjusted according to the brightness distribution of the target scene, thereby improving the exposure effect of the captured image and reducing overexposure or overblack background.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119996840A_ABST
    Figure CN119996840A_ABST
Patent Text Reader

Abstract

The invention discloses a shooting method and electronic equipment. The method comprises the following steps: acquiring a plurality of images of a target scene when a flash lamp is in a first stage; the first stage is a stage in which the flash lamp emits pre-flash, the first stage at least comprises a first sub-stage and a second sub-stage, the flash lamp has first brightness in the first sub-stage, the flash lamp has second brightness in the second sub-stage, and the first brightness is different from the second brightness; determining brightness distribution of the target scene based on the plurality of images; determining the brightness of the flash lamp in the second stage based on the brightness distribution to obtain a shot image of the target scene in the second stage; the second stage is a stage in which the flash lamp emits main flash.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a shooting method and electronic equipment. Background Art

[0002] The existing flash photography scheme is basically based on the ratio of the brightness of the main flash and the pre-flash, directly converting the brightness applied by the flash pre-flash to the main flash through the ratio to obtain the exposed photo. However, this method will result in the main flash brightness not being able to change according to the target scene, which often results in over-exposure in the photo or a darker overall background. Summary of the invention

[0003] In view of this, an embodiment of the present application provides a photographing method and an electronic device.

[0004] According to the first aspect of the present application, an embodiment of the present application provides a shooting method, including:

[0005] Acquire multiple images of a target scene when the flash is in the first stage; the first stage is a stage in which the flash emits a pre-flash, the first stage includes at least a first sub-stage and a second sub-stage, the flash has a first brightness in the first sub-stage, the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different;

[0006] Based on multiple images, determine the brightness distribution of the target scene;

[0007] The brightness of the flash when it is in the second stage is determined based on the brightness distribution to obtain a captured image of the target scene in the second stage; the second stage is the stage in which the flash emits a main flash.

[0008] Optionally, a plurality of images of the target scene are acquired when the flash is in the first stage, including:

[0009] At least one first image of the target scene when the flash is in the first sub-stage is acquired, and at least one second image of the target scene when the flash is in the second sub-stage is acquired.

[0010] Optionally, the first brightness is greater than the second brightness, and the first sub-stage precedes the second sub-stage.

[0011] Optionally, based on the multiple images, determining the brightness distribution of the target scene includes:

[0012] Determine the brightness of each area in each image;

[0013] Based on the brightness of each area in each image, the brightness change value of each area in the target scene is determined to obtain the brightness distribution of the target scene.

[0014] Optionally, determining the brightness of the flashlight when it is in the second stage based on the brightness distribution includes:

[0015] Based on the brightness distribution, determining a first weight of the brightness when the flash is in the second stage;

[0016] The brightness of the flashlight when it is in the first stage is weighted based on the first weight to obtain the brightness of the flashlight when it is in the second stage.

[0017] Optionally, based on the brightness distribution, determining a first weight of the brightness when the flash is in the second stage includes:

[0018] Based on the brightness distribution, determine the maximum brightness change value in the target scene;

[0019] If the maximum brightness change value is less than the first threshold, the second threshold is used as the first weight of the brightness when the flash is in the second stage, and the second threshold ∈ (0, 1).

[0020] Optionally, weighting the brightness of the flashlight when it is in the first stage based on the first weight to obtain the brightness of the flashlight when it is in the second stage includes:

[0021] Based on the brightness distribution, determining a target area in the target scene, wherein a brightness change value of the target area is greater than a third threshold;

[0022] Determining a second weight of brightness when the flash is in the second stage based on an area ratio of the target area to other areas; the other areas are areas other than the target area in the target scene;

[0023] The brightness of the flashlight when it is in the first stage is weighted based on the first weight and the second weight to obtain the brightness of the flashlight when it is in the second stage.

[0024] Optionally, determining a second weight of brightness of the flashlight when it is in the second stage based on an area ratio of the target area to other areas includes:

[0025] The area ratio of the target area to other areas is used as the second weight of the brightness when the flash is in the second stage.

[0026] Optionally, weighting the brightness of the flashlight when it is in the first stage based on the first weight and the second weight to obtain the brightness of the flashlight when it is in the second stage includes:

[0027] The current of the flash lamp when it is in the first stage is weighted based on the first weight and the second weight to obtain the current of the flash lamp when it is in the second stage;

[0028] The brightness of the flash lamp when in the second stage is determined based on the current of the flash lamp when in the second stage.

[0029] According to a second aspect of the present application, an embodiment of the present application provides an electronic device, including:

[0030] Flash, used to emit pre-flash and main flash;

[0031] A camera, used to obtain multiple images of a target scene when the flash is in a first stage; the first stage is a stage in which the flash emits a pre-flash, the first stage includes at least a first sub-stage and a second sub-stage, the flash has a first brightness in the first sub-stage, and the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different;

[0032] The processor is used to determine the brightness distribution of the target scene based on multiple images; determine the brightness of the flash when it is in the second stage based on the brightness distribution to obtain a captured image of the target scene in the second stage; the second stage is the stage where the flash emits a main flash.

[0033] The above description is only an overview of the technical solution of the present application. In order to more clearly understand the technical means of the present application, it can be implemented in accordance with the contents of the specification. In order to make the above and other purposes, features and advantages of the present application more obvious and easy to understand, the specific implementation methods of the present application are listed below. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of a process of a photographing method in an embodiment of the present application;

[0035] Figure 2 It is a flowchart of another shooting method in an embodiment of the present application;

[0036] Figure 3 The relationship between the brightness change of different areas of the target scene and the brightness change of the flash in the embodiment of the present application;

[0037] Figure 4 It is a flowchart of another shooting method in an embodiment of the present application;

[0038] Figure 5 It is a flowchart of another shooting method in an embodiment of the present application;

[0039] Figure 6 A schematic diagram of a target area and other areas in an image in an embodiment of the present application;

[0040] Figure 7 This is a schematic diagram of the structure of an electronic device in an embodiment of the present application;

[0041] Figure 8 Schematic diagram of the hardware structure of another electronic device in an embodiment of the present application. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the embodiments of the present application clearer, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments 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 those skilled in the art without creative work are within the scope of protection of the present application.

[0043] The present application embodiment provides a shooting method, such as Figure 1 As shown, including:

[0044] S101, acquiring multiple images of a target scene when the flash is in the first stage; the first stage is the stage in which the flash emits a pre-flash, the first stage includes at least a first sub-stage and a second sub-stage, the flash has a first brightness in the first sub-stage, the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different.

[0045] In this embodiment, flash photography is divided into two stages: a first stage of emitting a pre-flash and a second stage of taking a photo by a main flash.

[0046] In this embodiment, the first sub-stage and the second sub-stage may be stages in which the pre-flash emitted by the flash lamp gradually becomes brighter; or may be stages in which the pre-flash emitted by the flash lamp gradually goes out.

[0047] In this embodiment, when the flash is in the first stage, the exposure can be locked to capture multiple images of the target scene, so that the multiple images have different brightness.

[0048] S102: Determine the brightness distribution of the target scene based on the multiple images.

[0049] In this embodiment, the brightness distribution of the target scene may be a change value of the brightness of the target scene as the brightness of the flash changes.

[0050] In this embodiment, since pre-flashes with different brightness are used when capturing multiple images, the multiple images have different brightnesses, and thus the brightness change of the target scene can be obtained through the multiple images, thereby obtaining the brightness distribution of the target scene.

[0051] S103, determining the brightness of the flash when it is in the second stage based on the brightness distribution, so as to obtain a captured image of the target scene in the second stage; the second stage is the stage in which the flash emits a main flash.

[0052] In this embodiment, based on the brightness distribution of the target scene, the area and degree of the target scene affected by the flash can be determined, thereby determining the brightness of the flash when it is in the second stage to ensure that the captured image of the target scene has appropriate exposure.

[0053] The shooting method provided by the embodiment of the present application obtains multiple images of the target scene when the flash is in the first stage; the first stage is the stage where the flash emits a pre-flash, the first stage at least includes a first sub-stage and a second sub-stage, the flash has a first brightness in the first sub-stage, and the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different; based on the multiple images, the brightness distribution of the target scene is determined; based on the brightness distribution, the brightness of the flash when it is in the second stage is determined to obtain a shot image of the target scene in the second stage; the second stage is the stage where the flash emits a main flash; in this way, the brightness when the flash emits the main flash is determined by the brightness distribution of the target scene when the flash emits the pre-flash, so that the brightness of the main flash can be determined according to the area and degree of the target scene affected by the pre-flash, so as to obtain a shot image with appropriate exposure.

[0054] In an optional embodiment, if Figure 2 As shown, step S101, obtaining multiple images of the target scene when the flash is in the first stage, includes:

[0055] S1011, acquiring at least one first image of the target scene when the flash is in the first sub-stage, and at least one second image of the target scene when the flash is in the second sub-stage.

[0056] In this embodiment, by acquiring at least one first image of the target scene when the flash is in the first sub-stage, and acquiring at least one second image of the target scene when the flash is in the second sub-stage, the multiple images acquired are at different moments when the flash emits a pre-flash, and the multiple images have different brightnesses, which makes it easy to subsequently determine the brightness distribution of the target scene, or the relationship between the brightness change and the pre-flash brightness change, etc. through the multiple images with different brightnesses.

[0057] In an optional embodiment, the first brightness is greater than the second brightness, and the first sub-stage precedes the second sub-stage.

[0058] In this embodiment, the process of extinguishing the pre-flash emitted by the flash lamp may include a first sub-stage and a second sub-stage. In the first sub-stage, the pre-flash brightness of the flash lamp is reduced to a first brightness, and in the second sub-stage, the pre-flash brightness of the flash lamp is further reduced to a second brightness, so that the pre-flash brightness of the first sub-stage is greater than the pre-flash brightness of the second sub-stage, and the first sub-stage precedes the second sub-stage.

[0059] In a specific implementation, when locking the exposure, the brightness of different areas of the target scene is related to the brightness of the flash, for example, Figure 3As shown, the horizontal axis is the process of the flash brightness gradually decreasing, and the vertical axis is the brightness value of different areas of the target scene. It can be seen that there is a first area in the target scene whose brightness change is consistent with the flash brightness change, a second area whose brightness change is weaker than the flash brightness change, and a third area whose brightness is not affected by the flash. Therefore, by collecting multiple images of the target scene at different flash brightnesses, the change of brightness of different areas of the target scene with the flash brightness can be determined. Therefore, the pre-flash emitted by the flash can be adjusted to gradually go out, and multiple images of the target scene can be obtained during the process of the pre-flash gradually going out.

[0060] In this embodiment, by making the first brightness greater than the second brightness, the first sub-stage is preceded by the second sub-stage, so that multiple images of the target scene during the gradual extinguishing of the pre-flash can be obtained, thereby determining the relationship between the target scene brightness and the pre-flash brightness change.

[0061] In an optional embodiment, if Figure 4 As shown, step S102, based on multiple images, determines the brightness distribution of the target scene, including:

[0062] S1021, determining the brightness of each area in each image.

[0063] S1022, based on the brightness of each area in each image, determine the brightness change value of each area in the target scene to obtain the brightness distribution of the target scene.

[0064] In this embodiment, each image can be divided into multiple regions. Each pixel can be divided into one region, or multiple pixels can be divided into one region. Then, for each image, the brightness value of each region is counted. The pixel value of each region can be used as the brightness value of the region. If the region is composed of multiple pixels, the brightness value of each pixel in each region can be counted, and then the average brightness of the region is calculated based on the brightness value of each pixel as the brightness value of the region.

[0065] In this embodiment, after the brightness of each area in each image is determined, the brightness change value of each area in the target scene can be calculated, thereby obtaining the brightness distribution of the target scene.

[0066] In this embodiment, by determining the brightness of each area in each image; based on the brightness of each area in each image, determining the brightness change value of each area in the target scene, the brightness distribution of the target scene is obtained; thereby, the brightness distribution of the target scene can be quickly determined.

[0067] In an optional embodiment, if Figure 5 As shown, in step S103, determining the brightness of the flashlight when it is in the second stage based on the brightness distribution includes:

[0068] S1031, based on the brightness distribution, determine a first weight of the brightness when the flash is in the second stage.

[0069] S1032, weighting the brightness of the flash when it is in the first stage based on the first weight to obtain the brightness of the flash when it is in the second stage.

[0070] In this embodiment, based on the brightness distribution, the area and degree of the target scene affected by the flash can be determined, so that the first weight of the brightness when the flash is in the second stage can be determined. For example, if the target scene is less affected by the flash, the brightness of the main flash can be appropriately reduced, so that the brightness of the flash in the first stage can be weighted based on the first weight to obtain the brightness of the flash in the second stage.

[0071] In this embodiment, the first weight of the brightness when the flash is in the second stage is determined by the brightness distribution, and then the brightness when the flash is in the first stage is weighted by the first weight to obtain the brightness when the flash is in the second stage. This allows the main flash to change with the brightness of the target scene and be associated with the pre-flash to ensure that the captured image is properly exposed.

[0072] In an optional embodiment, step S1031, based on the brightness distribution, determining a first weight of the brightness when the flash is in the second stage, includes:

[0073] Based on the brightness distribution, the maximum brightness change value in the target scene is determined; if the maximum brightness change value is less than the first threshold, the second threshold is used as the first weight of the brightness when the flash is in the second stage, and the second threshold ∈ (0, 1).

[0074] In this embodiment, based on the brightness distribution, the brightness change value of each area in the target scene can be determined, so that the maximum brightness change value in the target scene can be determined. The maximum brightness change value represents the degree to which the target scene is most strongly affected by the flash. Then, the maximum brightness change value can be compared with the first threshold value, and when the maximum brightness change value is less than the first threshold value, it can be determined that the brightness of the main flash of the flash needs to be reduced, so that a second threshold value less than 1 is used as the first weight of the brightness when the flash is in the second stage.

[0075] In some embodiments, if the maximum brightness change value is not less than the first threshold, the brightness of the main flash may not be reduced, and may even be enhanced.

[0076] In this embodiment, by determining the maximum brightness value in the target scene, the degree to which the target scene is most affected by the flash can be determined, thereby quickly determining whether it is necessary to weight the brightness of the flash when it is in the second stage, and the size of the weighting, to obtain a suitable main flash brightness.

[0077] In an optional embodiment, step S1032, weighting the brightness of the flashlight when it is in the first stage based on the first weight to obtain the brightness of the flashlight when it is in the second stage, includes:

[0078] Based on the brightness distribution, the target area in the target scene is determined, and the brightness change value of the target area is greater than the third threshold; based on the area ratio of the target area to other areas, the second weight of the brightness when the flash is in the second stage is determined; other areas are areas other than the target area in the target scene; based on the first weight and the second weight, the brightness of the flash when it is in the first stage is weighted to obtain the brightness when the flash is in the second stage.

[0079] In this embodiment, the target area is an area in the target scene that is greatly affected by the flash, such as a subject in the target scene. Other areas are areas in the target scene that are not greatly affected by the flash, such as an area in the target scene that is far from the flash or an area with an obvious light source.

[0080] In this embodiment, if the brightness change value of the target scene area is greater than the third threshold, it means that the area is greatly affected by the flash and is determined as the target area, otherwise it is other areas. The proportion of the area affected by the flash in the target scene can be determined by the area ratio of the target area to other areas, so as to determine the second weight of the brightness when the flash is in the second stage. The second weight is used as the main flash attenuation coefficient.

[0081] In this embodiment, after the first weight and the second weight are determined, the brightness of the flash in the first stage can be adjusted by the first weight and the second weight to obtain the brightness of the flash in the second stage.

[0082] In this embodiment, based on the brightness distribution, the target area in the target scene is determined, and the brightness change value of the target area is greater than the third threshold; based on the area ratio of the target area to other areas, the second weight of the brightness when the flash is in the second stage is determined, and the brightness of the flash when it is in the first stage is weighted based on the first weight and the second weight to obtain the brightness of the flash when it is in the second stage; thereby, the pre-flash brightness can be weighted not only based on the degree to which the target scene is affected by the flash, but also based on the proportion of the area in the target scene affected by the flash, so that a more suitable exposure can be obtained.

[0083] In an optional embodiment, determining a second weight of brightness when the flash is in the second stage based on the area ratio of the target area to other areas includes:

[0084] The area ratio of the target area to other areas is used as the second weight of the brightness when the flash is in the second stage.

[0085] In this embodiment, the area of ​​the target region can be determined by the number of pixels in the target region, and the area of ​​other regions can be determined by the number of pixels in other regions. Figure 6 As shown, the target area occupies 12 pixels, and the other areas occupies 36 pixels, so the area ratio of the target area to the other areas is 1 / 3, and 1 / 3 is the second weight of the brightness when the flash is in the second stage.

[0086] In this embodiment, if the area ratio of the target area to the other areas is greater than 1, the area ratio of the target area to the other areas is used as the second weight of the brightness when the flash is in the second stage, so that the pre-flash brightness is enhanced, so that the brightness when the flash is in the second stage is greater than the brightness when the flash is in the first stage. If the area ratio of the target area to the other areas is less than 1, the area ratio of the target area to the other areas is used as the second weight of the brightness when the flash is in the second stage, so that the pre-flash brightness is weakened, so that the brightness when the flash is in the second stage is less than the brightness when the flash is in the first stage.

[0087] In this embodiment, the area ratio of the target area to other areas is directly used as the second weight of the brightness when the flash is in the second stage, which can be consistent with the actual situation of the target scene and obtain exposure that meets the target scene.

[0088] In an optional embodiment, weighting the brightness of the flashlight when it is in the first stage based on the first weight and the second weight to obtain the brightness of the flashlight when it is in the second stage includes:

[0089] The current of the flash lamp in the first stage is weighted based on the first weight and the second weight to obtain the current of the flash lamp in the second stage; based on the current of the flash lamp in the second stage, the brightness of the flash lamp in the second stage is determined.

[0090] In this embodiment, the brightness of the flash lamp can be adjusted by adjusting the current of the flash lamp.

[0091] Therefore, after the first weight and the second weight are determined, the first weight and the second weight can be used to weight the current of the flash lamp when it is in the first stage.

[0092] In a specific implementation, the current of the flash lamp when it is in the first stage may be multiplied by the first weight and the second weight to obtain the current of the flash lamp when it is in the second stage.

[0093] In this embodiment, the current of the flash lamp when it is in the first stage is weighted based on the first weight and the second weight, so that the brightness of the flash lamp when it is in the second stage can be quickly adjusted.

[0094] The present application also provides an electronic device, such as Figure 7 As shown, including:

[0095] The flash 21 is used for emitting pre-flash and main flash.

[0096] Camera 22 is used to obtain multiple images of the target scene when the flash is in the first stage; the first stage is the stage where the flash emits a pre-flash, and the first stage includes at least a first sub-stage and a second sub-stage. The flash has a first brightness in the first sub-stage, and the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different.

[0097] Processor 23 is used to determine the brightness distribution of the target scene based on multiple images; determine the brightness of the flash when it is in the second stage based on the brightness distribution to obtain a captured image of the target scene in the second stage; the second stage is the stage where the flash emits a main flash.

[0098] The electronic device provided by the embodiment of the present application obtains multiple images of the target scene when the flash is in the first stage; the first stage is the stage where the flash emits a pre-flash, the first stage at least includes a first sub-stage and a second sub-stage, the flash has a first brightness in the first sub-stage, and the flash has a second brightness in the second sub-stage, and the first brightness and the second brightness are different; based on the multiple images, the brightness distribution of the target scene is determined; based on the brightness distribution, the brightness of the flash when it is in the second stage is determined to obtain a captured image of the target scene in the second stage; the second stage is the stage where the flash emits a main flash; in this way, the brightness when the flash emits the main flash is determined by the brightness distribution of the target scene when the flash emits the pre-flash, so that the brightness of the main flash can be determined according to the area and degree of the target scene affected by the pre-flash, so as to obtain a captured image with appropriate exposure.

[0099] In some embodiments, Figure 8A schematic block diagram of an example electronic device 800 that can be used to implement an embodiment of the present application is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present application described and / or required herein.

[0100] like Figure 8 As shown, the electronic device 800 includes a computing unit 801, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 802 or a computer program loaded from a storage unit 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 can also be stored. The computing unit 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0101] Multiple components in the electronic device 800 are connected to the I / O interface 805, including: an input unit 806, such as a keyboard, a mouse, a camera, etc.; an output unit 807, such as various types of displays, speakers, etc., a flashlight; a storage unit 808, such as a disk, an optical disk, etc.; and a communication unit 809, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 809 allows the electronic device 800 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0102] The computing unit 801 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 801 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 801 performs the various methods and processes described above, such as the shooting method. For example, in some embodiments, the shooting method may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 808. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 800 via the ROM 802 and / or the communication unit 809. When the computer program is loaded into the RAM 803 and executed by the computing unit 801, one or more steps of the shooting method described above may be performed. Alternatively, in other embodiments, the computing unit 801 may be configured to execute the shooting method in any other appropriate manner (e.g., by means of firmware).

[0103] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0104] The program code for implementing the method of the present application can be written in any combination of one or more programming languages. These program codes can be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, implements the functions / operations specified in the flow chart and / or block diagram. The program code can be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0105] In the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0106] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0107] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0108] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0109] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this application can be executed in parallel, sequentially or in different orders, as long as the expected results of the technical solution disclosed in this application can be achieved, and this document is not limited here.

[0110] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is two or more, unless otherwise clearly and specifically defined.

[0111] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

Claims

1. A shooting method, comprising: Acquire multiple images of the target scene when the flash is in the first stage; The first stage is a stage in which the flash emits a pre-flash, and the first stage includes at least a first sub-stage and a second sub-stage. In the first sub-stage, the flash has a first brightness, and in the second sub-stage, the flash has a second brightness, and the first brightness and the second brightness are different. Based on the multiple images, determining a brightness distribution of a target scene; The brightness of the flash when it is in the second stage is determined based on the brightness distribution to obtain a captured image of the target scene in the second stage; the second stage is the stage in which the flash emits a main flash.

2. The shooting method according to claim 1, wherein the step of acquiring multiple images of the target scene when the flash is in the first stage comprises: Acquire at least one first image of the target scene when the flash is in the first sub-stage, and acquire at least one second image of the target scene when the flash is in the second sub-stage.

3. The shooting method according to claim 1, wherein the first brightness is greater than the second brightness, and the first sub-stage precedes the second sub-stage.

4. The shooting method according to claim 1, determining the brightness distribution of the target scene based on the multiple images, comprising: determining the brightness of each region in each of said images; Based on the brightness of each area in each of the images, a brightness change value of each area in the target scene is determined to obtain the brightness distribution of the target scene.

5. The photographing method according to claim 1, determining the brightness of the flash when it is in the second stage based on the brightness distribution, comprising: Based on the brightness distribution, determining a first weight of brightness when the flash is in the second stage; The brightness of the flashlight when it is in the first stage is weighted based on the first weight to obtain the brightness of the flashlight when it is in the second stage.

6. The photographing method according to claim 5, determining a first weight of brightness when the flash is in the second stage based on the brightness distribution, comprising: Based on the brightness distribution, determining a maximum brightness change value in the target scene; If the maximum brightness change value is less than the first threshold, the second threshold is used as the first weight of the brightness when the flash is in the second stage, and the second threshold ∈ (0, 1).

7. The shooting method according to claim 5, weighting the brightness of the flash in the first stage based on the first weight to obtain the brightness of the flash in the second stage, comprising: Based on the brightness distribution, determining a target area in the target scene, wherein a brightness change value of the target area is greater than a third threshold; Determining a second weight of brightness when the flash is in the second stage based on the area ratio of the target area to the other areas; The other areas are areas in the target scene other than the target area; The brightness of the flashlight when it is in the first stage is weighted based on the first weight and the second weight to obtain the brightness of the flashlight when it is in the second stage.

8. The shooting method according to claim 7, determining a second weight of brightness when the flash is in the second stage based on the area ratio of the target area to other areas, comprising: The area ratio of the target area to other areas is used as the second weight of the brightness when the flash is in the second stage.

9. The shooting method according to claim 7, weighting the brightness of the flash in the first stage based on the first weight and the second weight to obtain the brightness of the flash in the second stage, comprising: Weighting the current of the flash lamp when it is in the first stage based on the first weight and the second weight to obtain the current of the flash lamp when it is in the second stage; The brightness of the flash lamp when in the second stage is determined based on the current of the flash lamp when in the second stage.

10. An electronic device comprising: Flash, used to emit pre-flash and main flash; a camera for acquiring multiple images of a target scene when the flash is in the first stage; The first stage is a stage in which the flash emits a pre-flash, and the first stage includes at least a first sub-stage and a second sub-stage. In the first sub-stage, the flash has a first brightness, and in the second sub-stage, the flash has a second brightness, and the first brightness and the second brightness are different. A processor, configured to determine a brightness distribution of a target scene based on the plurality of images; The brightness of the flash when it is in the second stage is determined based on the brightness distribution to obtain a captured image of the target scene in the second stage; the second stage is the stage in which the flash emits a main flash.

Citation Information

Cited By

  • Image capturing method and electronic device

    WO2026144717A1