Shooting method and device, electronic equipment and computer readable storage medium
By processing the shooting operation in the preview mode of the electronic device, determining whether the hardware environment meets the preset conditions, and generating and displaying images accordingly, the high power consumption problem caused by the traditional shooting method is solved, and a more efficient shooting process is achieved.
Patent Information
- Application Number
- CN202311095404.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-28
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2043-08-28
AI Technical Summary
Traditional shooting methods lead to excessive power consumption of electronic devices when processing shooting tasks, especially when the hardware environment does not meet preset conditions.
Acquire the captured image data by responding to the shooting operation in the preview mode. If the hardware environment does not meet the preset conditions, the data is temporarily stored and a low-power first image display is generated. If the hardware environment meets the preset conditions, then data is obtained from the storage and a target image with high image quality is generated.
It reduces the overall power consumption of electronic devices during shooting, avoids the high power consumption problem caused by continuous processing of shooting data when the hardware environment is poor, and improves the quality of the captured images.
Smart Images

Figure CN119545167A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of imaging technology, and in particular to a photographing method, device, electronic device and computer-readable storage medium. Background Art
[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, Hardware Abstraction Layer), and call the algorithm for processing, thereby displaying the processed image.
[0003] However, traditional shooting methods usually require processing more tasks and have the problem of excessive power consumption of electronic devices. Summary of the invention
[0004] Embodiments of the present application provide a shooting method, device, electronic device, computer-readable storage medium, and computer program product, which can reduce the power consumption of the electronic device.
[0005] In a first aspect, the present application provides a shooting method. The method comprises:
[0006] In response to a shooting operation triggered in the preview mode, acquiring shot image data;
[0007] If the hardware environment of the electronic device does not meet the preset environment condition, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed;
[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 the image quality of the first image.
[0009] In a second aspect, the present application further provides a photographing device. The device comprises:
[0010] An acquisition module, used for acquiring captured image data in response to a capture operation triggered in the preview mode;
[0011] A data storage module, configured to store the captured image data in a memory if the hardware environment of the electronic device does not meet a preset environment condition, generate a first image based on the captured image data, and display the first image;
[0012] The acquisition module is also used to acquire the captured image data from the memory when the hardware environment of the electronic device meets the preset environment 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 the image quality of the first image.
[0014] In a third aspect, the present application further provides an electronic device. The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the following steps when executing the computer program:
[0015] In response to a shooting operation triggered in the preview mode, acquiring shot image data;
[0016] If the hardware environment of the electronic device does not meet the preset environment condition, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed;
[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 the image quality of the first image.
[0018] In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0019] In response to a shooting operation triggered in the preview mode, acquiring shot image data;
[0020] If the hardware environment of the electronic device does not meet the preset environment condition, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed;
[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 the image quality of the first image.
[0022] In a fifth aspect, the present application further provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0023] In response to a shooting operation triggered in the preview mode, acquiring shot image data;
[0024] If the hardware environment of the electronic device does not meet the preset environment condition, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed;
[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 the image quality of the first image.
[0026] In the above-mentioned shooting method, device, electronic device, computer-readable storage medium and computer program product, the electronic device obtains captured image data in response to the shooting operation triggered in the preview mode. 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 based on the captured image data, and the first image generated by the shooting operation is displayed; 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, and the image quality of the target image is higher than the image quality of the first image, which can avoid 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, 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. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 is a flow chart of a shooting method in one embodiment;
[0029] Figure 2 is a flow chart of a shooting method in another embodiment;
[0030] Figure 3 is a flow chart of a shooting method in another embodiment;
[0031] Figure 4 A flowchart of the execution of a preview algorithm in one embodiment;
[0032] Figure 5 A flowchart of a photo-taking algorithm execution in one embodiment;
[0033] Figure 6 is a structural block diagram of a shooting device in one embodiment;
[0034] Figure 7 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION
[0035] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0036] In one embodiment, Figure 1 As shown, a shooting method is provided. This embodiment uses the method applied to an electronic device as an example, wherein the electronic device may be a terminal or a server; it is understandable that the method may also be applied to a system including a terminal and a server, and implemented through the interaction between the terminal and the server. Among them, the terminal may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, IoT devices, drones, and portable wearable devices, and the IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, smart cars, etc. Portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server may be implemented as an independent server or a server cluster consisting of multiple servers.
[0037] In this embodiment, the shooting method includes the following steps:
[0038] Step S102 : acquiring captured image data in response to a capturing operation triggered in the preview mode.
[0039] The preview mode is a mode in which a preview screen is displayed on the screen of the electronic device. The shooting operation can be an operation of triggering a shooting case in the preview screen, or an operation of long pressing any position in the preview screen, which is not limited here. The captured image data is image data obtained in response to the shooting operation, and is used to generate a target image.
[0040] Optionally, the electronic device enters a preview mode, displays a preview image on the screen, and in response to a shooting operation triggered in the preview mode, obtains the captured image data through a camera module, wherein the camera module includes a camera sensor and a lens.
[0041] Step S104: if the hardware environment of the electronic device does not meet the preset environment conditions, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed.
[0042] The hardware environment is the environment in which the hardware of the electronic device is located. The hardware environment includes at least one of the hardware resources of the electronic device and the current temperature of the electronic device, and may also include the current humidity of the electronic device, etc., but is not limited thereto.
[0043] The preset environmental condition includes 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, such as CPU (Central Processing Unit), GPU (Graphics Processing Unit), NPU (Neural Processing Unit), ISP (Image Signal Processing) and DSP (Digital Signal Processor), etc. Various hardware 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, it is determined to execute a delayed task, and the captured image data corresponding to the delayed task is stored in a memory. Among them, the delayed task (deferJob, Defer capturejob) refers to a task of delaying the processing of captured image data. The memory can be a local disk of the electronic device, etc., but is not limited thereto. A disk refers to a memory that uses magnetic recording technology to store data.
[0046] Optionally, the electronic device detects the hardware environment, obtains hardware environment information, and determines whether the hardware environment of the electronic device meets the preset environment conditions based on the hardware environment information; if the hardware environment does not meet the preset environment conditions, the electronic device is determined to perform a delay task, and the captured image data corresponding to the delay task is stored in a memory. The hardware environment information includes the status of hardware resources, the current temperature of the electronic device, etc.
[0047] The electronic device detects the current temperature of the electronic device through the temperature sensor; the electronic device detects the usage of the hardware resources to obtain the status of the hardware resources. The status of the hardware resources includes sufficient status and insufficient status.
[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, it is determined that the hardware environment of the electronic device does 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 a sufficient state (idle state), it is determined that the hardware environment of the electronic device meets the preset environmental conditions.
[0049] It can be understood that 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 in an insufficient state, it means that the electronic device is processing more tasks resulting in a higher 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 performs a delayed task, and the captured image data is processed 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 when the power consumption is high.
[0050] Optionally, the electronic device performs image processing on the captured image data to generate a first image and displays the first image, wherein the first image may be a thumbnail image.
[0051] It is understandable that after the user triggers the shooting operation in the preview mode, if the hardware environment of the electronic device does not meet the preset environmental conditions at this time, the electronic device is determined to perform a delayed task, but the electronic device needs to respond to the user's shooting operation in a perceptible manner, that is, display a first image with lower image quality and lower power consumption, so as to avoid the user triggering the shooting operation without a perceptible response, which makes the user have 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 the image quality of the first image.
[0053] Optionally, when the hardware environment of the electronic device meets the preset environment conditions, the electronic device obtains the captured image data corresponding to the time-delay task from the memory, performs image processing on the captured image data, and generates a target image. Optionally, the electronic device generates the target image by fusing at least two frames of captured image data.
[0054] It can be understood that the image quality of the target image is higher than that of the first image, which can be characterized as the clarity of the target image is higher than that of the first image, the resolution of the target image is higher than that of the first image, the simulation degree of the target image is higher than that of the first image, and so on; at the same time, the power consumption of generating the first image is lower than the power consumption of generating the target image, which can save the power consumption of generating the first image.
[0055] Optionally, the electronic device stores the target image locally in the electronic device. The electronic device stores the target image in a local photo album of the electronic device.
[0056] Optionally, when the electronic device acquires the captured image data from the memory, the temperature of the electronic device is lower than the temperature when the captured image data is stored in the memory.
[0057] Optionally, if the current temperature of the electronic device is higher than a preset temperature threshold, indicating that the hardware environment does not meet the preset environmental conditions, the captured image data corresponding to the delayed task is stored in the memory; when the hardware environment of the electronic device meets the preset environmental conditions, the current temperature of the electronic device is less than a specified temperature threshold, and the captured image data is obtained from the memory; the specified temperature threshold is less than or equal to the preset temperature threshold.
[0058] Exemplarily, when the electronic device exits the camera application, there is no need to use the preview algorithm to process the preview data in parallel, which indicates that the hardware resources of the electronic device are sufficient and the hardware environment of the electronic device meets the preset environmental conditions.
[0059] Exemplarily, after the current temperature of the electronic device drops to less than a preset temperature threshold, it indicates that the power consumption of the electronic device is reduced and the hardware environment of the electronic device meets the preset environmental conditions.
[0060] In other optional embodiments, if there is no application running in the background of the electronic device, the screen of the electronic device is turned off, etc., it can be determined that the hardware environment meets the preset environmental conditions.
[0061] In the above-mentioned shooting method, the electronic device responds to the shooting operation triggered in the preview mode, obtains the shooting image data, and if the hardware environment of the electronic device does not meet the preset environmental conditions, the shooting image data is stored in the memory, and a first image is generated based on the shooting 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 shooting image data is obtained from the memory, and a target image is generated based on the shooting image data, and the image quality of the target image is higher than the image quality of the first image, which can avoid the problem of high power consumption caused by processing the shooting 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 shooting image data, which can reduce the overall power consumption of the electronic device. The problem of high device temperature and heating of the device caused by continuous shooting of the electronic device is solved, and the problems of preview freeze, poor performance of taking pictures and poor effect caused by hardware resource conflicts of the electronic device can be solved.
[0062] In one embodiment, Figure 2As shown, when the user clicks to take a photo in the preview screen, the electronic device collects the captured image data required for taking the photo, and sends the captured 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, the captured image data corresponding to the delayed task is stored in the disk; when the hardware resources of the electronic device are sufficient, the delayed task in the disk is obtained, and the captured image data corresponding to the delayed task is processed. After the image processing, the generated target image is returned to the APP and stored in the album.
[0063] In one embodiment, Figure 3 As shown, when the user clicks to take a photo in the preview screen, the electronic device collects the captured image data required for taking photos, and sends the captured 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, the captured image data corresponding to the delayed task is stored in the disk; when the temperature of the electronic device is lowered, the delayed task in the disk is obtained, and the captured image data corresponding to the delayed task is processed. After the image processing, the generated target image is returned to the APP and stored in the album.
[0064] In one embodiment, in response to a shooting operation triggered in a preview mode, after acquiring the captured image data, it also includes: if it is detected that image processing is performed 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; and the processed preview image is displayed.
[0065] It is understandable that if the electronic device detects that the preview image data is processed frame by frame, it means that the hardware resources of the electronic device are used to process the preview image data, and the available hardware resources are insufficient, then 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 for each processed frame, and displays each processed preview image in sequence in the preview screen.
[0067] In one embodiment, Figure 4 As shown, the execution flow of the electronic device using the preview algorithm to perform image processing on the 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; 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 single-frame image in sequence to generate a single-frame preview image.
[0068] Optionally, generating the target image based on the captured image data includes: generating the target image by fusing at least two frames of captured image data.
[0069] The target image may be a high dynamic range image (HDR, High Dynamic Range Imaging).
[0070] Optionally, when the hardware environment meets preset environmental conditions, the electronic device obtains 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] It is understandable that in the preview screen, the preview image is displayed frame by frame, so image processing is performed on each frame of preview image data, and shooting is to generate an image with better effect, so at least two frames of shot image data are fused.
[0072] If it is detected that the preview image data is not image processed, it is determined that the hardware environment of the electronic device meets the preset environment condition.
[0073] In one embodiment, Figure 5 As shown, the execution flow of the electronic device using the camera algorithm to perform image processing on 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; 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 a target image.
[0074] In this embodiment, if it is detected that image processing is performed 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. Each frame of processed preview image can be displayed in sequence on the preview screen, and the captured image data and the preview image data can be staggered for image processing to avoid processing the preview image data and the captured image data at the same time, which may lead to the problem of continuous temperature increase of the electronic device and preview jamming and poor camera performance caused by possible hardware resource conflicts.
[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 the 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 can be understood that if the power consumption of the first image processing algorithm is greater than the power consumption of the second image processing algorithm, the image quality of the first image will be lower than the image quality of the target image. This can avoid the problem of high power consumption of the electronic device for a period of time due to the use of a high power image processing algorithm for processing when the hardware environment does not meet the preset environmental conditions. This can reduce the power consumption of the electronic device and display the first image, that is, respond to the trigger operation, thereby 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 an optional implementation, the electronic device replaces the first image with the target image to obtain the second image, that is, the second image is the target image. In another optional implementation, the electronic device covers the first image with the target image to obtain the second image, that is, the second image is the target image. In other optional implementations, the electronic device may also fill the image information of the target image into the first image to update the first image to 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 stores the first image in a local photo album of the electronic device; after the electronic device generates a 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 displayed on the screen of the electronic device at the current moment, the first image on the screen is updated to the second image.
[0080] In one embodiment, in response to a shooting operation triggered in the preview mode, after acquiring the captured image data, the method further includes: if the hardware environment of the electronic device meets a preset environmental condition, generating a target image based on the captured image data.
[0081] The 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 the electronic device executes the real-time task, performs image processing on the captured image data with a second image processing algorithm, and generates a 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 directly processed in real time without storing the captured image data in the memory, and the target image can be accurately generated when the hardware environment meets the preset environmental conditions.
[0084] In one embodiment, another shooting method is provided, which is applied to an electronic device and includes the following steps:
[0085] Step A1, in response to a shooting operation triggered in a preview mode, obtaining the number of shot images.
[0086] Step A2: if it is detected that image processing is performed 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 for 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 current temperature of the electronic device being lower than or equal to the preset temperature threshold and the hardware resources in the electronic device being in a sufficient state.
[0087] Step A3: storing the captured image data in a memory.
[0088] Step A4: performing image processing on the captured image data using a first image processing algorithm to generate a first image; and displaying 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 at least two frames of the captured image data are processed using a second image processing algorithm to fuse and generate a target image; the image quality of the target image is higher than the image quality of the first image, and the power consumption of the first image processing algorithm is lower than the power consumption of the second image processing algorithm.
[0090] Step A6: Generate a target image based on the captured image data.
[0091] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0092] Based on the same inventive concept, the embodiment of the present application also provides a photographing device for implementing the photographing method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in one or more embodiments of the photographing device provided below can refer to the limitations on the photographing method above, and will not be repeated here.
[0093] In one embodiment, 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 capture operation triggered in the preview mode.
[0095] The data storage module 604 is used to store the captured image data in a memory if the hardware environment of the electronic device does not meet the preset environment conditions.
[0096] The image processing module 606 is used to generate a first image based on the captured image data and display the first image.
[0097] The acquisition module 602 is further 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 further used to generate a target image based on the captured image data.
[0098] In the above-mentioned shooting device, the electronic device responds to the shooting operation triggered in the preview mode and obtains the shot image data. If the hardware environment of the electronic device does not meet the preset environmental conditions, the shot image data is stored in the memory, and a first image is generated based on the shot image data, and the first image generated by the shooting operation is displayed; when the hardware environment of the electronic device meets the preset environmental conditions, the shot image data is obtained from the memory, and a target image is generated based on the shot image data, and the image quality of the target image is higher than the image quality of the first image, which can avoid the problem of high power consumption caused by processing the shot 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 shot image data, which can reduce the overall power consumption of the electronic device.
[0099] In one embodiment, the above-mentioned device also 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, and the above-mentioned image processing module 606 is also used to process the preview image data frame by frame; the display module is used to display the processed preview image.
[0100] In one embodiment, the image processing module 606 is further configured to generate a target image by fusing at least two frames of captured image data.
[0101] In one embodiment, the above-mentioned image processing module 606 is also used to perform image processing on the captured image data using a first image processing algorithm to generate a first image; perform image processing on the captured image data using a second image processing algorithm to generate a target image; the power consumption of the first image processing algorithm is lower than the power consumption of the second image processing algorithm.
[0102] In one embodiment, the image processing module 606 is further used 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 a preset environment condition.
[0104] In one embodiment, the preset environmental condition includes at least one of the current temperature of the electronic device being lower than or equal to a preset temperature threshold and the hardware resources in the electronic device being in a sufficient state.
[0105] Each module in the above-mentioned shooting device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0106] In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure diagram may be as follows: Figure 7 As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. Among them, the processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. Among them, the processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a shooting method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.
[0107] Those skilled in the art will understand that Figure 7 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of 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 a different arrangement of components.
[0108] The embodiment of the present application further provides a computer-readable storage medium, one or more non-volatile computer-readable storage media containing computer-executable instructions, when the computer-executable instructions are executed by one or more processors, the processors execute the steps of the shooting method.
[0109] An embodiment of the present application also provides a computer program product including instructions, which, when executed on a computer, enables the computer to execute the 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, stored data, displayed data, 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 relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0111] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present 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), magnetoresistive 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. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.
[0112] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, 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 above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A shooting method, characterized in that: include: In response to a shooting operation triggered in the preview mode, acquiring shot image data; If the hardware environment of the electronic device does not meet the preset environment condition, the captured image data is stored in a memory, a first image is generated based on the captured image data, and the first image is displayed; 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 the image quality 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 the preview mode, the method further includes: If it is detected that image processing is performed on each frame of preview image data, it is determined that the hardware environment of the electronic device does not meet the preset environment condition, and the preview image data is processed frame by frame; Displays a preview image after processing.
3. The method according to claim 2, characterized in that The generating a target image based on the captured image data comprises: Based on at least two frames of captured image data, a target image is generated by fusion.
4. The method according to claim 1, characterized in that: The step of generating a first image based on the captured image data comprises: Performing image processing on the captured image data using a first image processing algorithm to generate a first image; The generating a target image based on the captured image data comprises: 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 the power consumption of the second image processing algorithm.
5. The method according to claim 1, characterized in that After generating the target image based on the captured image data, the method further includes: Based on the target image, the first image is updated to obtain a second image, and the second image is displayed; the image quality of the second image is higher than that of the first image.
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 the preview mode, the method further includes: If the hardware environment of the electronic device meets the preset environment 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 condition includes at least one of a current temperature of the electronic device being lower than or equal to a preset temperature threshold and hardware resources in the electronic device being in a sufficient state.
8. A photographing device, characterized in that: include: An acquisition module, used for acquiring captured image data in response to a capture operation triggered in the preview mode; A data storage module, used for storing the captured image data in a memory if the hardware environment of the electronic device does not meet the preset environmental conditions; An image processing module, configured to generate a first image based on the captured image data, and display the first image; The acquisition module is also used to acquire the captured image data from the memory when the hardware environment of the electronic device meets the preset environment conditions. The image processing module is further 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.
9. An electronic device comprising a memory and a processor, wherein a computer program is stored in the memory, wherein: When the computer program is executed by the processor, the processor is caused to perform the steps of the photographing method according to any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Shooting control method and mobile terminal
CN107509025A
Method for lowering power consumption of smart terminal during shooting and terminal
CN107979725A
Method and device for regulating shooting related function, and mobile terminal
CN108289172A
Photo processing method and device and computer readable storage medium
CN110022396A
Image processing method, model training method and electronic equipment
CN116012262A