Photographing method, apparatus, electronic device, and computer-readable storage medium
By generating low-quality images when hardware conditions are not met and high-quality images when conditions are met, the problem of excessive power consumption in electronic devices is solved, achieving reduced power consumption and improved shooting accuracy without affecting image quality.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD
- Filing Date
- 2023-08-28
- Publication Date
- 2026-05-15
AI Technical Summary
Traditional shooting methods result in excessive power consumption of electronic devices, especially when the hardware environment does not meet the preset conditions, the problem of continuous high power consumption of electronic devices is serious.
When the hardware environment does not meet the preset conditions, the captured image data is stored in the memory to generate a low-quality first image. When the hardware environment meets the conditions, the data is retrieved from the memory to generate a high-quality target image, thus avoiding further processing under high power consumption.
It reduces the overall power consumption of electronic devices, solves the problems of preview lag and degraded photo performance caused by high device temperature and hardware resource conflicts, and improves the accuracy and efficiency of shooting.
Smart Images

Figure CN119545167B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of imaging technology, and in particular to a shooting method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0002] In the current electronic device shooting process, when the shooting button is clicked, the shooting application (APP) will immediately send the frame data and corresponding parameters required for this shooting, obtain them from the Hardware Abstraction Layer (HAL), call the algorithm to process them, and then display the processed image.
[0003] However, traditional shooting methods usually require handling a lot of tasks, resulting in excessive power consumption of electronic devices. Summary of the Invention
[0004] This application provides a shooting method, apparatus, electronic device, computer-readable storage medium, and computer program product that can reduce the power consumption of electronic devices.
[0005] Firstly, this application provides a shooting method. The method includes:
[0006] In response to a shooting action triggered in preview mode, acquire captured image data;
[0007] If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data.
[0008] When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data; the image quality of the target image is higher than that of the first image.
[0009] Secondly, this application also provides a shooting device. The device includes:
[0010] The acquisition module is used to acquire captured image data in response to the shooting operation triggered in preview mode;
[0011] The data storage module is used to store the captured image data in a memory and generate and display a first image based on the captured image data if the hardware environment of the electronic device does not meet the preset environmental conditions.
[0012] The acquisition module is further configured to acquire the captured image data from the memory when the hardware environment of the electronic device meets preset environmental conditions.
[0013] An image processing module is used to generate a target image based on the captured image data; the image quality of the target image is higher than that of the first image.
[0014] Thirdly, this application also provides an electronic device. The electronic device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to perform the following steps:
[0015] In response to a shooting action triggered in preview mode, acquire captured image data;
[0016] If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data.
[0017] When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data; the image quality of the target image is higher than that of the first image.
[0018] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, performs the following steps:
[0019] In response to a shooting action triggered in preview mode, acquire captured image data;
[0020] If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data.
[0021] When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data; the image quality of the target image is higher than that of the first image.
[0022] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, performs the following steps:
[0023] In response to a shooting action triggered in preview mode, acquire captured image data;
[0024] If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data.
[0025] When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data; the image quality of the target image is higher than that of the first image.
[0026] The aforementioned shooting method, apparatus, electronic device, computer-readable storage medium, and computer program product, wherein the electronic device, in response to a shooting operation triggered in preview mode, acquires captured image data; if the hardware environment of the electronic device does not meet preset environmental conditions, the captured image data is stored in memory, and a first image is generated based on the captured image data, and the first image generated by the shooting operation is displayed; and when the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is acquired from memory, and a target image is generated based on the captured image data, and the image quality of the target image is higher than that of the first image, which can avoid the problem of high power consumption caused by processing captured image data when the hardware environment does not meet the preset environmental conditions. Therefore, when the hardware environment of the electronic device meets the preset environmental conditions, the target image is generated based on the captured image data, which can reduce the overall power consumption of the electronic device. Attached Figure Description
[0027] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0028] Figure 1 Here is a flowchart of a shooting method in one embodiment;
[0029] Figure 2 A flowchart of the shooting method in another embodiment;
[0030] Figure 3 A flowchart of the shooting method in another embodiment;
[0031] Figure 4 Here is a flowchart previewing the algorithm execution in one embodiment;
[0032] Figure 5 Here is a flowchart of the image capture algorithm execution in one embodiment;
[0033] Figure 6 This is a structural block diagram of the imaging device in one embodiment;
[0034] Figure 7 This is a diagram of the internal structure of an electronic device in one embodiment. Detailed Implementation
[0035] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0036] In one embodiment, such as Figure 1 As shown, a shooting method is provided. This embodiment illustrates the application of this method to an electronic device, where the electronic device can be a terminal or a server. It is understood that this method can also be applied to a system including both a terminal and a server, and is implemented through interaction between the terminal and the server. The terminal can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, drones, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, smart in-vehicle devices, smart cars, etc. Portable wearable devices can include smartwatches, smart bracelets, head-mounted devices, etc. The server can be a standalone server or a server cluster consisting of multiple servers.
[0037] In this embodiment, the shooting method includes the following steps:
[0038] Step S102: In response to the shooting operation triggered in preview mode, acquire the captured image data.
[0039] The preview mode is the mode in which a preview image is displayed on the screen of the electronic device. The shooting operation can be triggered by pressing a button on the preview screen, or it can be a long press operation on any location within the preview screen; there are no restrictions on this. The captured image data is the image data acquired in response to the shooting operation, used to generate the target image.
[0040] Optionally, the electronic device enters preview mode, displays a preview image on the screen, and, in response to a shooting operation triggered in preview mode, acquires captured image data through the camera module. The camera module includes a camera sensor and a lens, among other things.
[0041] Step S104: If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data.
[0042] The hardware environment refers to the environment in which the hardware of an electronic device exists. The hardware environment includes at least one of the electronic device's hardware resources and its current temperature, and may also include the current humidity, among other things.
[0043] Preset environmental conditions include at least one of the following: the current temperature of the electronic device is lower than or equal to a preset temperature threshold, and the hardware resources in the electronic device are in a sufficient state. The preset temperature threshold can be set as needed.
[0044] It is understandable that electronic devices include various hardware components, such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Processing Unit), ISP (Image Signal Processor), and DSP (Digital Signal Processor), etc. Various hardware components can be used to process various photography tasks.
[0045] Optionally, if the hardware environment of the electronic device does not meet the preset environmental conditions, a delayed task is executed, and the captured image data corresponding to the delayed task is stored in the memory. Here, the delayed task (deferJob, Defer capturejob) refers to a task that delays the processing of the captured image data. The memory can be a local disk of the electronic device, but is not limited to this. A disk is a memory that uses magnetic recording technology to store data.
[0046] Optionally, the electronic device detects the hardware environment to obtain hardware environment information, and determines whether the hardware environment of the electronic device meets preset environmental conditions based on the hardware environment information. If the hardware environment does not meet the preset environmental conditions, the electronic device is determined to execute a delayed task, and the image data captured corresponding to the delayed task is stored in the memory. The hardware environment information includes, for example, the status of hardware resources and the current temperature of the electronic device.
[0047] Electronic devices use temperature sensors to detect their current temperature; they also detect the status of hardware resources by monitoring their usage. The status of hardware resources can be categorized as sufficient or insufficient.
[0048] Optionally, if the current temperature of the electronic device is higher than a preset temperature threshold, and / or the hardware resources in the electronic device are in an insufficient state, then the hardware environment of the electronic device is determined to not meet the preset environmental conditions; if the current temperature of the electronic device is lower than or equal to the preset temperature threshold, and the hardware resources in the electronic device are in an sufficient state (idle state), then the hardware environment of the electronic device is determined to meet the preset environmental conditions.
[0049] Understandably, if the current temperature of the electronic device is higher than the preset temperature threshold, and / or the hardware resources in the electronic device are insufficient, it means that the electronic device is processing too many tasks, resulting in a high temperature or insufficient hardware resources, that is, the power consumption of the electronic device is high. In this case, it is determined that the electronic device will perform a delayed task, and the captured image data will be processed only when the hardware environment meets the preset environmental conditions, so as to avoid the problem of high power consumption caused by processing the captured image data under high power conditions.
[0050] Optionally, the electronic device performs image processing on the captured image data to generate a first image and displays the first image. The first image may be a thumbnail image.
[0051] It is understandable that when a user triggers a shooting operation in preview mode, if the hardware environment of the electronic device does not meet the preset environmental conditions, the electronic device will be determined to perform a delayed task. However, the electronic device needs to respond to the user's shooting operation in a perceptible way, that is, display the first image with lower image quality and lower power consumption, so as to avoid the user having no perceptible response after triggering the shooting operation, which would give the user the illusion that the electronic device has malfunctioned, thereby improving the accuracy of shooting.
[0052] Step S106: When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data; the image quality of the target image is higher than that of the first image.
[0053] Optionally, when the hardware environment of the electronic device meets preset environmental conditions, the electronic device retrieves the captured image data corresponding to the delayed task from the memory, performs image processing on the captured image data, and generates the target image. Optionally, the electronic device generates the target image by fusing at least two frames of captured image data.
[0054] It is understandable that the image quality of the target image is higher than that of the first image, which can be characterized by the target image having higher sharpness, higher resolution, higher simulation level, and so on. At the same time, the power consumption of generating the first image is lower than that of generating the target image, thus saving power consumption in generating the first image.
[0055] Optionally, the electronic device stores the target image locally on the electronic device. Specifically, the electronic device stores the target image in its local photo album.
[0056] Optionally, the temperature of the electronic device is lower when it retrieves the captured image data from the memory than the temperature when it stores the captured image data in the memory.
[0057] Optionally, if the current temperature of the electronic device is higher than the preset temperature threshold, it indicates that the hardware environment does not meet the preset environmental conditions, and the captured image data corresponding to the delayed task is stored in the memory; if the hardware environment of the electronic device meets the preset environmental conditions, and the current temperature of the electronic device is lower than the specified temperature threshold, the captured image data is retrieved from the memory; the specified temperature threshold is less than or equal to the preset temperature threshold.
[0058] For example, when an electronic device exits the camera application, there is no need to use a preview algorithm to process the preview data in parallel, indicating that the hardware resources of the electronic device are sufficient and the hardware environment of the electronic device meets the preset environmental conditions.
[0059] For example, when the current temperature of an electronic device drops below a preset temperature threshold, it indicates that the power consumption of the electronic device has decreased and the hardware environment of the electronic device meets the preset environmental conditions.
[0060] In other alternative embodiments, if there are no applications running in the background of the electronic device, or if the electronic device is turned off, it can be determined that the hardware environment meets the preset environmental conditions.
[0061] In the above-described shooting method, the electronic device responds to the shooting operation triggered in preview mode, acquires the captured image data, and if the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, and a first image is generated and displayed based on the captured image data. When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is retrieved from the memory, and a target image is generated based on the captured image data. The image quality of the target image is higher than that of the first image. This avoids the problem of high power consumption caused by processing the captured image data when the hardware environment does not meet the preset environmental conditions. Therefore, generating the target image based on the captured image data when the hardware environment of the electronic device meets the preset environmental conditions can reduce the overall power consumption of the electronic device. This solves the problem of high device temperature and overheating caused by continuous shooting, and also solves the problems of preview lag, degraded shooting performance, and degraded effect caused by hardware resource conflicts of electronic devices.
[0062] In one embodiment, such as Figure 2As shown, when a user taps to take a photo in the preview screen, the electronic device collects the image data required for the photo and sends it to the algorithm processing module (APS, Algo process system). If the algorithm processing module determines that the hardware environment of the electronic device does not meet the preset environmental conditions, it stores the image data corresponding to the delayed task on the disk. When the hardware resources of the electronic device are sufficient, it retrieves the delayed task from the disk, performs image processing on the image data corresponding to the delayed task, and returns the generated target image to the APP to be stored in the album after image processing.
[0063] In one embodiment, such as Figure 3 As shown, when the user clicks to take a photo in the preview screen, the electronic device collects the image data required for taking the photo and sends the image data to the algorithm processing module (APS, Algo process system). When the algorithm processing module determines that the hardware environment of the electronic device does not meet the preset environmental conditions, it stores the image data corresponding to the delayed task on the disk. When the temperature of the electronic device drops, it retrieves the delayed task from the disk, performs image processing on the image data corresponding to the delayed task, and returns the generated target image to the APP to save it to the album after image processing.
[0064] In one embodiment, in response to a shooting operation triggered in preview mode, after acquiring the captured image data, the method further includes: if image processing is detected on each frame of preview image data, determining that the hardware environment of the electronic device does not meet the preset environmental conditions, and processing the preview image data frame by frame; and displaying the processed preview image.
[0065] It is understandable that if an electronic device detects that the preview image data is being processed frame by frame, it means that the hardware resources of the electronic device are being used for image processing of the preview image data and that the available hardware resources are insufficient. Therefore, it is determined that the hardware environment of the electronic device does not meet the preset environmental conditions.
[0066] Optionally, if the electronic device detects that the preview image data is processed frame by frame using a preview algorithm, it determines that the hardware environment of the electronic device does not meet the preset environmental conditions, and generates a preview image after each frame of processing, and displays the preview image after each frame of processing in sequence on the preview screen.
[0067] In one embodiment, such as Figure 4 As shown, the execution flow of the electronic device using the preview algorithm to process single-frame preview image data is as follows: The electronic device calls the ISP to perform image signal processing on the single-frame preview image data to obtain a single-frame image; the single-frame algorithm A of the CPU, the algorithm B of the NPU, the algorithm C of the GPU, and the algorithm D of the DSP are called in sequence to process the single-frame image and generate a single-frame preview image.
[0068] Optionally, generating a target image based on captured image data includes: fusing captured image data from at least two frames to generate a target image.
[0069] The target image can be a high dynamic range image (HDR).
[0070] Optionally, if the hardware environment meets the preset environmental conditions, the electronic device retrieves at least two frames of captured image data from the memory, fuses the at least two frames of captured image data, and generates a target image.
[0071] Understandably, in the preview screen, the preview images are displayed frame by frame sequentially, so image processing is performed on each frame of the preview image data. However, in order to generate a better image, the captured image data of at least two frames is fused.
[0072] If no image processing of the preview image data is detected, it is determined that the hardware environment of the electronic device meets the preset environmental conditions.
[0073] In one embodiment, such as Figure 5 As shown, the execution flow of the electronic device using the photo-taking algorithm to process at least two frames of captured image data is as follows: The electronic device calls the ISP to perform image signal processing on N frames of captured image data to obtain N frames of images; it then calls the CPU's single-frame algorithm A, the NPU's algorithm B, the GPU's algorithm C, and the DSP's algorithm D to process the N frames of images in sequence to generate the target image.
[0074] In this embodiment, if image processing is detected on each frame of preview image data, it is determined that the hardware environment of the electronic device does not meet the preset environmental conditions. The preview image data is then processed frame by frame, and each processed preview image can be displayed sequentially in the preview screen. This allows for staggered image processing of captured image data and preview image data, avoiding the problem of continuous temperature rise of the electronic device caused by simultaneous processing of preview image data and captured image data, as well as potential hardware resource conflicts that could lead to preview lag and degraded photo performance.
[0075] In one embodiment, generating a first image based on captured image data includes: performing image processing on the captured image data using a first image processing algorithm to generate the first image; generating a target image based on captured image data includes: performing image processing on the captured image data using a second image processing algorithm to generate the target image; the power consumption of the first image processing algorithm is lower than the power consumption of the second image processing algorithm.
[0076] It is understandable that the power consumption of the first image processing algorithm is higher than that of the second image processing algorithm. Therefore, the image quality of the first image is lower than that of the target image. This can avoid the problem of high power consumption of electronic devices in a short period of time when the hardware environment does not meet the preset environmental conditions and still uses a high-power image processing algorithm. In this way, the power consumption of electronic devices can be reduced, and the first image can be displayed, that is, respond to the trigger operation, thus improving the accuracy of the shooting scene.
[0077] In one embodiment, after generating the target image based on the captured image data, the method further includes: updating the first image based on the target image to obtain a second image, and displaying the second image; the image quality of the second image is higher than that of the first image.
[0078] In one optional implementation, the electronic device replaces the first image with the target image to obtain a second image, i.e., the second image is the target image. In another optional implementation, the electronic device overwrites the first image with the target image to obtain a second image, i.e., the second image is the target image. In other optional implementations, the electronic device may also fill the first image with the image information of the target image to update the first image and obtain the second image; other implementations may also be used to update the first image, which are not limited here.
[0079] Optionally, after generating the first image, the electronic device displays the first image and saves the first image to the local photo album of the electronic device; after generating the target image based on the captured image data, the electronic device updates the first image based on the target image and updates the first image in the photo album to the second image; if the first image is currently displayed on the screen of the electronic device, the first image on the screen is updated to the second image.
[0080] In one embodiment, after acquiring the captured image data in response to a shooting operation triggered in preview mode, the method further includes: generating a target image based on the captured image data if the hardware environment of the electronic device meets preset environmental conditions.
[0081] Among them, a real-time capture job (RTJob) refers to a task that processes captured image data in real time.
[0082] Optionally, if the hardware environment meets the preset environmental conditions, the electronic device determines that it is performing a real-time task and uses the second image processing algorithm to process the captured image data to generate the target image.
[0083] It is understandable that if the hardware environment of the electronic device meets the preset environmental conditions, the captured image data can be processed directly in real time without storing the captured image data in the memory. The target image can be generated accurately when the hardware environment meets the preset environmental conditions.
[0084] In one embodiment, another shooting method is also provided, applied to an electronic device, the shooting method comprising the following steps:
[0085] Step A1: In response to the shooting operation triggered in preview mode, acquire the number of captured images.
[0086] Step A2: If image processing is detected on each frame of preview image data, it is determined that the hardware environment of the electronic device does not meet the preset environmental conditions, and the preview image data is processed frame by frame; the processed preview image is displayed, and steps A3 to A5 are executed; if image processing is not detected on each frame of preview image data, it is determined that the hardware environment of the electronic device meets the preset environmental conditions, and step A6 is executed; the preset environmental conditions include at least one of the following: the current temperature of the electronic device is lower than or equal to a preset temperature threshold and the hardware resources in the electronic device are in a sufficient state.
[0087] Step A3: Store the captured image data in the memory.
[0088] Step A4: Perform image processing on the captured image data using the first image processing algorithm to generate a first image; and display the first image.
[0089] Step A5: When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and the image data of at least two frames are processed by the second image processing algorithm to generate a target image. The image quality of the target image is higher than that of the first image, and the power consumption of the first image processing algorithm is lower than that of the second image processing algorithm.
[0090] Step A6: Generate the target image based on the captured image data.
[0091] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0092] Based on the same inventive concept, this application also provides a shooting apparatus for implementing the shooting method described above. The solution provided by this apparatus is similar to the solution described in the above method; therefore, the specific limitations in one or more shooting apparatus embodiments provided below can be found in the limitations of the shooting method described above, and will not be repeated here.
[0093] In one embodiment, such as Figure 6 As shown, a shooting device is provided, including: an acquisition module 602, a data storage module 604, and an image processing module 606, wherein:
[0094] The acquisition module 602 is used to acquire captured image data in response to a shooting operation triggered in preview mode.
[0095] The data storage module 604 is used to store the captured image data in the memory if the hardware environment of the electronic device does not meet the preset environmental conditions.
[0096] Image processing module 606 is used to generate a first image based on captured image data and to display the first image.
[0097] The acquisition module 602 is also used to acquire captured image data from the memory when the hardware environment of the electronic device meets the preset environmental conditions, and the image processing module 606 is also used to generate a target image based on the captured image data.
[0098] In the aforementioned shooting device, the electronic device responds to the shooting operation triggered in the preview mode, acquires the captured image data, and if the hardware environment of the electronic device does not meet the preset environmental conditions, it stores the captured image data in the memory and generates a first image based on the captured image data, displaying the first image generated by the shooting operation; when the hardware environment of the electronic device meets the preset environmental conditions, it acquires the captured image data from the memory and generates a target image based on the captured image data, and the image quality of the target image is higher than that of the first image. This avoids the problem of high power consumption caused by processing the captured image data when the hardware environment does not meet the preset environmental conditions. Therefore, generating a target image based on the captured image data when the hardware environment of the electronic device meets the preset environmental conditions can reduce the overall power consumption of the electronic device.
[0099] In one embodiment, the above-mentioned device further includes a detection module and a display module; the detection module is used to determine that the hardware environment of the electronic device does not meet the preset environmental conditions if it detects that image processing is performed on each frame of preview image data; the image processing module 606 is also used to perform frame-by-frame processing on the preview image data; the display module is used to display the processed preview image.
[0100] In one embodiment, the image processing module 606 is further configured to fuse and generate a target image based on at least two frames of captured image data.
[0101] In one embodiment, the image processing module 606 is further configured to perform image processing on the captured image data using a first image processing algorithm to generate a first image; and to perform image processing on the captured image data using a second image processing algorithm to generate a target image; wherein the power consumption of the first image processing algorithm is lower than that of the second image processing algorithm.
[0102] In one embodiment, the image processing module 606 is further configured to update the first image based on the target image to obtain a second image and display the second image; the image quality of the second image is higher than that of the first image.
[0103] In one embodiment, the image processing module 606 is further configured to generate a target image based on the captured image data if the hardware environment of the electronic device meets preset environmental conditions.
[0104] In one embodiment, the preset environmental conditions include at least one of the following: the current temperature of the electronic device is lower than or equal to a preset temperature threshold and the hardware resources in the electronic device are in a sufficient state.
[0105] Each module in the aforementioned shooting device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of the electronic device in hardware form or independent of it, or stored in the memory of the electronic device in software form, so that the processor can call and execute the corresponding operations of each module.
[0106] In one embodiment, an electronic device is provided, which may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown, this electronic device includes a processor, memory, input / output interface, communication interface, display unit, and input device. The processor, memory, and input / output interface are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interface. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interface is used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When the computer program is executed by the processor, it implements a shooting method. The display unit of this electronic device forms a visually visible image and can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the electronic device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the electronic device, or external keyboards, touchpads, or mice, etc.
[0107] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the electronic device to which the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.
[0108] This application also provides a computer-readable storage medium. One or more non-volatile computer-readable storage media containing computer-executable instructions, which, when executed by one or more processors, cause the processors to perform the steps of the imaging method.
[0109] This application also provides a computer program product containing instructions that, when run on a computer, cause the computer to perform a shooting method.
[0110] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0111] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A shooting method, characterized in that, include: In response to a shooting action triggered in preview mode, acquire captured image data; If the hardware environment of the electronic device does not meet the preset environmental conditions, the captured image data is stored in the memory, a first image is generated based on the captured image data, the first image is displayed, and the first image is stored in the local photo album of the electronic device. When the hardware environment of the electronic device meets the preset environmental conditions, the captured image data is obtained from the memory, and a target image is generated based on the captured image data. The first image is updated based on the target image to obtain a second image, and the first image in the album is updated to the second image. The image quality of the target image is higher than that of the first image. The image quality of the second image is higher than that of the first image.
2. The method according to claim 1, characterized in that, After acquiring the captured image data in response to the shooting operation triggered in preview mode, the method further includes: If image processing is detected on each frame of preview image data, it is determined that the hardware environment of the electronic device does not meet the preset environmental conditions, and the preview image data is processed frame by frame. Displays the processed preview image.
3. The method according to claim 2, characterized in that, The process of generating a target image based on the captured image data includes: The target image is generated by fusing at least two frames of captured image data.
4. The method according to claim 1, characterized in that, The process of generating a first image based on the captured image data includes: The captured image data is processed using a first image processing algorithm to generate a first image; The process of generating a target image based on the captured image data includes: The captured image data is processed using a second image processing algorithm to generate a target image; the power consumption of the first image processing algorithm is lower than that of the second image processing algorithm.
5. The method according to claim 1, characterized in that, The method further includes: The second image is displayed.
6. The method according to any one of claims 1 to 5, characterized in that, After acquiring the captured image data in response to the shooting operation triggered in preview mode, the method further includes: If the hardware environment of the electronic device meets the preset environmental conditions, a target image is generated based on the captured image data.
7. The method according to any one of claims 1 to 5, characterized in that, The preset environmental conditions include at least one of the following: the current temperature of the electronic device is lower than or equal to a preset temperature threshold and the hardware resources in the electronic device are in a sufficient state.
8. A shooting device, characterized in that, include: The acquisition module is used to acquire captured image data in response to the shooting operation triggered in preview mode; The data storage module is used to store the captured image data in the memory if the hardware environment of the electronic device does not meet the preset environmental conditions. An image processing module is used to generate a first image based on the captured image data, display the first image, and store the first image in the local photo album of the electronic device; The acquisition module is further configured to acquire the captured image data from the memory when the hardware environment of the electronic device meets preset environmental conditions. The image processing module is further configured to generate a target image based on the captured image data, update the first image based on the target image to obtain a second image, and update the first image in the album to the second image; the image quality of the target image is higher than that of the first image; the image quality of the second image is higher than that of the first image.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the computer program is executed by the processor, the processor performs the steps of the shooting method as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
11. A computer program product comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.