Photographing method and device, electronic equipment and medium
By detecting the state of the flash of the electronic device after the photography operation and obtaining and processing images from the shooting image sequence, the problem that the photographic image in the prior art does not meet the user's expectations is solved, and the photography effect with high brightness and high definition is achieved.
Patent Information
- Application Number
- CN202311406104.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-26
- Publication Date
- 2025-04-29
AI Technical Summary
When taking pictures, the prior art uses zero shutter lag (zsl) method to capture frames, resulting in a large difference between the images collected in the preview state and the images that the user clicks to take pictures, which may not meet users' expectations. Especially in dark environments, the images collected after the flash fills up light are different from those that are expected.
When the photo operation is detected, the current status of the flash of the electronic device is obtained. If the current state is the state where the flash lights up after the photo operation is detected, the image is acquired from the shot image sequence and process it to obtain a high brightness and high definition photo image.
By acquiring and processing images after flash fill light, the brightness and clarity of the films are improved, so that the obtained films are consistent with the user's expected photos and improve the photo experience.
Smart Images

Figure CN119906900A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of terminal technology, and in particular to a photographing method, device, electronic device and medium. Background Art
[0002] In order to save processing time when users take photos, thereby providing users with a better photo experience, terminal devices usually use zero-second delay (zero shutter lag, ZSL) to take frames when taking photos, that is, the device collects images when it is in the preview state, and after the user clicks to take a photo, the pre-collected images are used to process the photo images. When the image previewed in the preview state is significantly different from the image after the user clicks to take a photo, the image obtained by taking frames using the ZSL method in the related art may not meet the user's expectations. Summary of the invention
[0003] In order to overcome the problems existing in the related art, the present disclosure provides a photographing method, device, electronic device and medium.
[0004] According to a first aspect of an embodiment of the present disclosure, a photographing method is provided, the method comprising: when a photographing operation is detected for an electronic device, acquiring a first image from a photographing image sequence, wherein the first state is a state in which the flash is on after the photographing operation is detected, and the photographing image sequence is composed of images taken by the electronic device after the photographing operation is detected; and processing the first image to obtain a first photographed image.
[0005] Optionally, the method also includes: if the current state is the second state or the third state, obtaining a second image from a preview image sequence, wherein the second state is a state in which the flash is on before the photographing operation is detected, and the third state is a state in which the flash is not on, and the preview image sequence is composed of images captured by the electronic device before the photographing operation is detected; and processing the second image to obtain a second photographed image.
[0006] Optionally, the processing the first image to obtain the first photographic image includes: converting the first image in a raw format to obtain the first photographic image in a target format.
[0007] Optionally, acquiring the first image from the captured image sequence includes: configuring preset parameters to a preset state; generating preset data according to the preset parameters of the preset state; and acquiring the first image from the captured image sequence according to the preset data.
[0008] Optionally, obtaining the first image from the captured image sequence includes: obtaining the first image of a target frame number from the captured image sequence; processing the first image to obtain the first captured image includes: processing the first image of the target frame number through a multi-frame noise reduction algorithm to obtain the first captured image.
[0009] Optionally, the first image of the target frame number is a continuous image of the target frame number captured after a photographing operation is detected in the captured image sequence.
[0010] Optionally, the acquiring the current state of the flashlight of the electronic device includes: acquiring the current state of the flashlight by acquiring a state tag of the flashlight of the electronic device.
[0011] According to a second aspect of an embodiment of the present disclosure, a photographing device is provided, comprising: a first acquisition module, for acquiring a current state of a flash of the electronic device when a photographing operation is detected for the electronic device; a second acquisition module, for acquiring a first image from a captured image sequence if the current state is a first state, wherein the first state is a state in which the flash is on after the photographing operation is detected, and the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected; and a processing module, for processing the first image to obtain a first photographed image.
[0012] According to a third aspect of an embodiment of the present disclosure, an electronic device is provided, comprising: a processor; and a memory for storing processor-executable instructions; wherein the processor is configured to implement the steps of the photographing method provided in the first aspect of the present disclosure when executing the instructions.
[0013] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the photographing method provided in the first aspect of the present disclosure are implemented.
[0014] The technical solution provided by the embodiments of the present disclosure may include the following beneficial effects: when a photographing operation is detected for an electronic device, the current state of the flash of the electronic device is obtained, if the current state is the first state, the first state refers to the state where the flash is on after the photographing operation is detected, then the first image is obtained from the captured image sequence, and then the first image is processed to obtain a first photographed image, the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected, because the images in the captured image sequence are captured after the flash is filled in, they have the characteristics of high brightness and rich details, etc., the first photographed image thus obtained, compared with the method of obtaining a film using the image captured before the flash flashes in the related art, has the characteristics of high brightness and high clarity, thereby improving the quality of the film, so that the obtained film is consistent with the photo expected by the user.
[0015] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0017] Figure 1 It is an image schematic diagram in the related art;
[0018] Figure 2 It is an image schematic diagram in the related art;
[0019] Figure 3 It is a schematic diagram of a film obtained in the related art;
[0020] Figure 4 is a flow chart of a photographing method according to an exemplary embodiment;
[0021] Figure 5 It is a schematic diagram of the film obtained by the present disclosure;
[0022] Figure 6 is a block diagram of a photographing device according to an exemplary embodiment;
[0023] Figure 7 The invention is a block diagram of an electronic device applied to a photographing method according to an exemplary embodiment. DETAILED DESCRIPTION
[0024] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.
[0025] It should be noted that all actions of acquiring signals, information or data in the present disclosure are carried out in compliance with the relevant data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0026] In order to save processing time when users take photos, thereby providing users with a better photo experience, terminal devices usually use the ZSL method to take frames when taking photos, that is, the image is captured when the device is in the preview state, and after the user clicks to take a photo, the image captured in advance is used for processing to obtain the photo image. When the image previewed in the preview state is very different from the image after the user clicks to take a photo, the image obtained by taking frames using the ZSL method in the related art may not meet the user's expectations. For example, when the device is clicked to take a photo in a dark environment, the flash flashes to fill in the light to increase the brightness of the framing. However, in the framing method of the related art, the image captured in the preview state is still taken, and the image is the image captured before the flash fills in the light, so that the final photo image is darker and has lower clarity, which is inconsistent with the image after the fill in light expected by the user, so that the obtained film is inconsistent with the user's expectations, causing a difference in the photo experience for the user.
[0027] For ease of understanding, Figure 1 It is a schematic diagram of the image captured by the terminal device in the preview state. The image can be saved in the zsl preview queue. Figure 1 From the terminal device settings, it can be seen that the flash is in the on state, which means that when a photo operation (such as a click operation) is performed on the terminal device, the flash flashes to fill in the light of the shooting scene. Figure 1 Click the circular camera control in the middle to perform the operation, such as Figure 2 As shown, the flashlight flashes to fill in the light for the scene being viewed, and at the same time, the camera shoots the scene with the fill in light. In the existing method, the image is still obtained from the ZSL preview queue to generate the following Figure 3 As shown in the film. Figure 3 The brightness and clarity of the film are in line with the user's expectations. Figure 2 There are differences in the images, with lower brightness and clarity.
[0028] To this end, the present disclosure provides a method for taking photos, see Figure 4 The photographing method can be applied to Figure 6 The photographing device 200 shown, Figure 7 The electronic device 800 and the computer readable storage medium shown in the figure. Figure 7 The electronic device 800 shown in the figure is taken as an example, wherein the electronic device can be a mobile phone, a tablet computer, a smart wearable device, or other device with a camera function. Figure 4 The process shown is described in detail, and the photographing method may specifically include the following steps:
[0029] Step S110: When a photo-taking operation on the electronic device is detected, the current state of the flash of the electronic device is obtained.
[0030] A camera application is installed on the electronic device, and an icon corresponding to the camera application can be displayed on the display screen of the electronic device. After the user clicks the icon, the display screen enters the camera interface. At this time, the electronic device is in a preview state, and the camera interface displays the image captured in real time by the camera of the electronic device for the user to preview, and displays the camera controls for taking pictures. Clicking the camera control on the camera interface is a camera operation. In addition to clicking the camera control as mentioned above, you can also press the preset hardware on the electronic device, and the pressing operation is also a camera operation. For example, after the user clicks anywhere on the camera interface of the display screen, the camera of the electronic device focuses, and the click operation can also be considered a camera operation.
[0031] When a photographing operation is performed on an electronic device, the current state of the flash of the electronic device is obtained. For example, the current state may be one of the first state, the second state, and the third state. Among them, the first state refers to the state in which the flash is lit after the photographing operation is detected. Optionally, the electronic device is in the first state, and after the photographing operation is detected, the flash of the electronic device may be lit within a preset time period and then extinguished. After the next photographing operation is performed on the electronic device, the flash is still lit and extinguished according to this rule, wherein the preset time period is a very short time period, for example, the preset time period may be between a few milliseconds and tens of milliseconds. The second state is the state in which the flash is lit before the photographing operation is detected. For example, for an electronic device in the second state, after entering the photographing interface, the flash is lit until the photographing interface is exited. The third state is the state in which the flash is not turned on. It is easy to understand that the flash of the electronic device in the third state is not lit during the entire preview and photographing process, that is, the flash does not fill the entire preview and photographing process.
[0032] As a method, the current state of the flashlight is obtained by obtaining the state tag of the flashlight of the electronic device. For example, the state tag is 00, which indicates that the current state of the flashlight is the third state. The state tag is 10, which indicates that the current state of the flashlight is the second state. The state tag is 11, which indicates that the current state of the flashlight is the first state.
[0033] The state of the electronic device may be manually set by the user, for example, by clicking a setting control on the camera interface, and selecting any one of the first state, the second state and the third state as the current state through the setting control.
[0034] Alternatively, when the electronic device is in the photo taking interface, the brightness of the environment in which the electronic device is located is detected, and if the brightness is higher than a preset brightness, the third state is set as the current state. If the brightness is lower than or equal to the preset brightness, the first state or the second state is determined as the current state according to the user's setting.
[0035] Step S120: If the current state is the first state, obtain a first image from a captured image sequence, wherein the first state is a state in which the flash is on after a photographing operation is detected, and the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected.
[0036] In one case, the current state is the first state. For the electronic device in the first state, before detecting that the user performs a photo operation on the electronic device, the flash does not light up. It can be understood that the flash does not fill in the light for the shooting scene. In this case, the brightness and clarity of the image captured by the camera of the electronic device are low. Accordingly, the brightness and clarity of the image presented on the photo interface for the user to preview are low. For the electronic device in the first state, after detecting that the user performs a photo operation on the electronic device, the flash is controlled to light up. It can be understood that the flash fills in the light for the shooting scene. In this case, the brightness and clarity of the image that can be captured by the camera of the electronic device are high. Accordingly, the brightness and clarity of the image presented on the photo interface for the user to preview are high. In order to obtain a better quality photographed image, for the electronic device in the first state, a first image is acquired from a sequence of photographed images.
[0037] Step S130: Process the first image to obtain a first photographed image.
[0038] The processing performed on the first image may include filtering, cutting, format conversion and the like, thereby obtaining a first photographed image.
[0039] The first photographed image obtained in this embodiment can be understood as the finished image of this shooting. Figure 5As shown, compared with the related art Figure 3 As shown in the film, the film obtained in this embodiment has stronger brightness and richer details, which improves the photo effect.
[0040] Optionally, the photographed images can be stored in a local album of the electronic device, so that the user can view them in time. The electronic device can also store them in a cloud connected to the electronic device.
[0041] The photographing method provided in this embodiment, when a photographing operation on an electronic device is detected, obtains the current state of the flash of the electronic device. If the current state is the first state, the first state refers to the state where the flash is on after the photographing operation is detected. Then, the first image is obtained from the captured image sequence, and the first image is processed to obtain a first photographed image. The captured image sequence is composed of images captured by the electronic device after the photographing operation is detected. Since the images in the captured image sequence are captured after the flash is filled in, they have the characteristics of high brightness and rich details. Compared with the method of obtaining a film by using the image captured before the flash is flashed in the related art, the first photographed image obtained thereby has the characteristics of high brightness and high definition, thereby improving the quality of the film, so that the obtained film is consistent with the photo expected by the user.
[0042] In one embodiment, step S120 may be performed in the following manner to obtain the first image from the captured image sequence: configure the preset parameters to a preset state, for example, the preset parameters may be a zsl untenable meta parameter, and the preset state refers to the value of the zsl untenable meta parameter being configured to 0 or 1. Then, according to the preset parameters of the preset state, preset data is generated, and the generated preset data carries the preset parameters of the preset state. Optionally, the preset parameters of the preset state carried in the preset data may be set not to be allowed to be changed, so that the stability of the transmission of the preset parameters of the preset state is improved by the preset data. Then, according to the preset data, the first image is obtained from the captured image sequence.
[0043] Optionally, the captured image sequence stores multiple frames of images captured after the camera operation is detected, and the multiple frames of images can be stored in the captured image sequence in the order of capture. In another embodiment, step S120 can also be to obtain the first image of the target frame number from the captured image sequence. The first image of the target frame number can be an image of any target frame number in the captured image sequence, or can be a continuous image of the target frame number captured after the camera operation is detected in the captured image sequence. The target frame number can be one frame. The target frame number can also be multiple frames, for example, the target frame number is 8 frames, 9 frames, etc.
[0044] In one implementation, step S130 may be performed in the following manner, for example, the first image is in a raw format, and the first image is converted into a target format to obtain a first photographed image, for example, the target format may be a jpeg format, a png format, a webp format, a bmp format, etc.
[0045] The processing of the first image is not limited to the above-mentioned format conversion, and the first image may also be processed as follows. In another embodiment, the first image of the target frame number may be processed by a multi-frame noise reduction algorithm (MFNR) to obtain the first photographed image, thereby obtaining a finished film. For example, the multi-frame noise reduction algorithm may perform noise reduction, enhancement, segmentation, merging, and other processing on the first image.
[0046] Exemplarily, the first image may be processed by a multi-frame noise reduction algorithm in the following manner: the first image in raw format is converted into a first image in RGB (red green bleu) format. Since the data structure of the first image in RGB format is relatively simple compared to the first image in raw format, the first image in RGB format is convenient for subsequent processing. The size of the first image in RGB format may be adjusted to fit the size of the display screen of the electronic device. The first image in RGB format after the size adjustment is then encoded to obtain a first photographed image in, for example, JPEG format. During the encoding process, the size of the image will be compressed, so that the first photographed image in JPEG format finally obtained can occupy smaller storage resources of the electronic device.
[0047] In this implementation, the first image is processed by a multi-frame noise reduction algorithm, thereby obtaining a first photographed image, thereby improving the quality of the film.
[0048] In another case, if the current state is not the first state, for example, the current state is the second state or the third state, a second image is obtained from the preview image sequence, the second state is a state where the flash is on before the photographing operation is detected, the third state is a state where the flash is not on, and the preview image sequence is composed of images collected by the electronic device before the photographing operation is detected. The second image is then processed to obtain a second photographed image.
[0049] When the current state is the second state or the third state, the brightness of the image before and after the electronic device performs a photographing operation is not much different, so the second photographed image can be directly obtained by using the preview image sequence collected in advance before the photographing operation, which improves the speed of photographed image output so that the user can quickly view the second photographed image. It can be understood that the second photographed image is a finished image obtained when the electronic device is in the second state or the third state.
[0050] As a method, the second image can be obtained from the preview image sequence by configuring the preset parameters as the remaining states. For example, the preset parameters can be zsl untenable meta parameters. If the aforementioned preset state is 1, the remaining states are 0. If the aforementioned preset state is 0, the remaining states are 1. Then, according to the preset parameters of the remaining states, the remaining data are generated. The generated remaining data carries the preset parameters of the remaining states. Optionally, the preset parameters of the remaining states in the remaining data can be set to not be changed, thereby improving the stability of the transmission of the preset parameters of the remaining states. Then, according to the remaining data, the second image is obtained from the preview image sequence.
[0051] Optionally, the preview image sequence stores multiple frames of images captured before the photo-taking operation is detected, and the multiple frames of images can be stored in the preview image sequence in the order of capture. As a method, obtaining the second image from the preview image sequence can be to obtain the second image of the target frame number from the preview image sequence. The second image of the target frame number can be any image of the target frame number in the preview image sequence, or can be a continuous image of the target frame number captured before the photo-taking operation obtained in the preview image sequence. The target frame number can be one frame. The target frame number can also be multiple frames, for example, the target frame number is 8 frames, 9 frames, etc.
[0052] In one implementation, the second image is in raw format, and the second image in raw format is converted to obtain a second photographed image in a target format, wherein the target format may be jpeg format, png format, webp format, bmp format, etc.
[0053] The processing of the second image is not limited to the above-mentioned format conversion method, and the second image can also be processed in the following manner. In another embodiment, the second image of the target frame number can be processed by a multi-frame noise reduction algorithm to obtain the second photographed image, thereby obtaining a film. For example, the multi-frame noise reduction algorithm can perform noise reduction, enhancement, segmentation, merging, etc. on the second image.
[0054] Exemplarily, the second image may be processed by a multi-frame noise reduction algorithm in the following manner: the second image in raw format is converted into a second image in RGB format by color space conversion. Since the second image in RGB format has a relatively simple data structure compared to the second image in raw format, the second image in RGB format is convenient for subsequent processing. The size of the second image in RGB format may be adjusted to fit the size of the display screen of the electronic device. The resized second image in RGB format is then encoded to obtain a second photographed image in, for example, JPEG format. During the encoding process, the size of the image is compressed, so that the second photographed image in JPEG format obtained in the end may occupy less storage resources of the electronic device.
[0055] In this implementation, the second image is processed by a multi-frame noise reduction algorithm, thereby obtaining a second photographed image, thereby improving the quality of the film.
[0056] In this implementation, the second image is processed by a multi-frame noise reduction algorithm to obtain a photographic image, thereby improving the quality of the photographic image.
[0057] Based on the same inventive concept, the present disclosure also provides a photographing device, see Figure 6 , the photographing device 200 includes: a first acquisition module 210, a second acquisition module 220 and a photographing module 230;
[0058] A first acquisition module 210 is used to acquire a current state of a flash of the electronic device when a photo-taking operation on the electronic device is detected;
[0059] A second acquisition module 220 is configured to acquire a first image from a captured image sequence if the current state is a first state, wherein the first state is a state in which the flash is on after a photographing operation is detected, and the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected;
[0060] The processing module 230 is used to process the first image to obtain a first photographed image.
[0061] Optionally, the photographing device 200 further includes: a third acquisition module and a collection module;
[0062] a third acquisition module, configured to acquire a second image from a preview image sequence if the current state is a second state or a third state, wherein the second state is a state in which the flash is on before the photographing operation is detected, the third state is a state in which the flash is not on, and the preview image sequence is composed of images collected by the electronic device before the photographing operation is detected;
[0063] The image acquisition module is used to process the second image to obtain a second photographic image.
[0064] Optionally, the second acquisition module 220 includes: a format conversion module;
[0065] The format conversion module is used to convert the first image in raw format to obtain a first photographed image in a target format.
[0066] Optionally, the second acquisition module 220 includes: a configuration module, a generation module and a first image acquisition submodule;
[0067] A configuration module, used to configure preset parameters to a preset state;
[0068] A generating module, used for generating preset data according to preset parameters of a preset state;
[0069] The first image acquisition submodule is used to acquire the first image from the captured image sequence according to preset data.
[0070] Optionally, the first image acquisition module includes: a second image acquisition submodule;
[0071] A second image acquisition submodule, used for acquiring the first image of a second target frame number from the captured image sequence;
[0072] The processing module includes: a first processing module;
[0073] The first processing module is used to process the first image of a target frame number by using a multi-frame noise reduction algorithm to obtain the first photographed image.
[0074] Optionally, the first image of the target frame number is a continuous image of the target frame number captured after a photographing operation is detected in the captured image sequence.
[0075] Optionally, the first acquisition module includes: a state tag acquisition module;
[0076] The status tag acquisition module is used to acquire the current status of the flashlight of the electronic device by acquiring the status tag of the flashlight.
[0077] Regarding the photographing device 200 in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0078] The present disclosure also provides a computer-readable storage medium on which computer program instructions are stored. When the program instructions are executed by a processor, the steps of the photographing method provided by the present disclosure are implemented.
[0079] Figure 7 8 is a block diagram of an electronic device applied to a photographing method according to an exemplary embodiment. For example, the electronic device 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0080] Reference Figure 7 , the electronic device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0081] The processing component 802 generally controls the overall operation of the electronic device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0082] The memory 804 is configured to store various types of data to support operations on the electronic device 800. Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0083] The power supply component 806 provides power to the various components of the electronic device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device 800.
[0084] The multimedia component 808 includes a screen that provides an output interface between the electronic device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0085] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device 800 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0086] The input / output interface 812 provides an interface between the processing component 802 and the peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.
[0087] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device 800. For example, the sensor assembly 814 can detect the open / closed state of the electronic device 800, the relative positioning of the components, such as the display and keypad of the electronic device 800, and the sensor assembly 814 can also detect the position change of the electronic device 800 or a component of the electronic device 800, the presence or absence of contact between the user and the electronic device 800, the orientation or acceleration / deceleration of the electronic device 800, and the temperature change of the electronic device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0088] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices. The electronic device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0089] In an exemplary embodiment, the electronic device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0090] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by a processor 820 of an electronic device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0091] In addition to being an independent electronic device, the electronic device may also be a part of an independent electronic device. For example, in one embodiment, the device may be an integrated circuit (IC) or a chip, wherein the integrated circuit may be an IC or a collection of multiple ICs; the chip may include but is not limited to the following types: GPU (Graphics Processing Unit), CPU (Central Processing Unit), FPGA (Field Programmable Gate Array), DSP (Digital Signal Processor), ASIC (Application Specific Integrated Circuit), SOC (System on Chip, SoC), etc. The above-mentioned integrated circuit or chip can be used to execute executable instructions (or codes) to implement the above-mentioned photographing method. The executable instructions may be stored in the integrated circuit or chip, or may be obtained from other devices or equipment, such as the integrated circuit or chip including a processor, a memory, and an interface for communicating with other devices. The executable instruction can be stored in the memory, and when the executable instruction is executed by the processor, the above-mentioned photographing method is implemented; alternatively, the integrated circuit or chip can receive the executable instruction through the interface and transmit it to the processor for execution, so as to implement the above-mentioned photographing method.
[0092] In another exemplary embodiment, a computer program product is further provided. The computer program product includes a computer program that can be executed by a programmable device. The computer program has a code portion for executing the above-mentioned photographing method when executed by the programmable device.
[0093] In summary, the present disclosure provides a photographing method, device, electronic device and medium. When a photographing operation is detected on an electronic device, the current state of the flash of the electronic device is obtained. If the current state is a first state, the first state refers to a state in which the flash is on after the photographing operation is detected. Then, a first image is obtained from a captured image sequence, and the first image is processed to obtain a first photographed image. The captured image sequence is composed of images captured by the electronic device after the photographing operation is detected. Since the images in the captured image sequence are captured after being filled with flash light, they have the characteristics of high brightness and rich details. Compared with the method of obtaining a film using images captured before the flash is flashed in the related art, the first photographed image obtained thereby has the characteristics of high brightness and high definition, thereby improving the quality of the film, so that the obtained film is consistent with the photo expected by the user.
[0094] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the present disclosure. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered as exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.
[0095] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A photographing method, characterized in that: The method comprises: When a photo-taking operation on the electronic device is detected, obtaining a current state of a flash of the electronic device; In response to the current state being a first state, acquiring a first image from a captured image sequence, wherein the first state is a state in which the flash is on after a photographing operation is detected, and the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected; The first image is processed to obtain a first photographed image.
2. The method according to claim 1, characterized in that Also includes: If the current state is the second state or the third state, acquiring a second image from a preview image sequence, wherein the second state is a state in which the flash is on before the photographing operation is detected, the third state is a state in which the flash is not on, and the preview image sequence is composed of images captured by the electronic device before the photographing operation is detected; The second image is processed to obtain a second photographed image.
3. The method according to claim 1, characterized in that The step of processing the first image to obtain a first photographed image includes: The first image in the raw format is converted into a format to obtain a first photographed image in a target format.
4. The method according to claim 1, characterized in that The acquiring of a first image from a sequence of captured images comprises: Configure the preset parameters to the preset state; Generate preset data according to preset parameters of the preset state; According to preset data, the first image is acquired from the captured image sequence.
5. The method according to claim 1, characterized in that: The acquiring of a first image from a sequence of captured images comprises: Acquire a target number of frames of the first image from the captured image sequence; The step of processing the first image to obtain a first photographed image includes: The first image of the target frame number is processed by a multi-frame noise reduction algorithm to obtain the first photographed image.
6. The method according to claim 5, characterized in that The first image of the target frame number is a continuous image of the target frame number captured after a photographing operation is detected in the captured image sequence.
7. The method according to any one of claims 1 to 6, characterized in that: The obtaining the current state of the flashlight of the electronic device includes: The current state of the flashlight is obtained by obtaining a state tag of the flashlight of the electronic device.
8. A photographing device, characterized in that: The device comprises: A first acquisition module, configured to acquire a current state of a flash of the electronic device when a photo-taking operation on the electronic device is detected; A second acquisition module is used to acquire a first image from a captured image sequence if the current state is a first state, wherein the first state is a state in which the flash is on after a photographing operation is detected, and the captured image sequence is composed of images captured by the electronic device after the photographing operation is detected; A processing module is used to process the first image to obtain a first photographed image.
9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; Wherein, the processor is configured to implement the steps of any one of the methods of claims 1 to 7 when executing the instructions.
10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that: When the program instructions are executed by a processor, the steps of the method described in any one of claims 1 to 7 are implemented.