Shooting method and device, electronic equipment and computer readable storage medium

By responding to the shooting operation in the electronic device, storing image data and determining processing strategies based on feature data, the image inaccuracy problem caused by insufficient memory in the traditional shooting method is solved, and the image processing accuracy during shooting is improved.

CN119788957APending Publication Date: 2025-04-08GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTD

Patent Information

Application Number
CN202311289623.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-10-07
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

Traditional shooting methods cause inaccurate images to be processed due to insufficient memory space of electronic devices.

Method used

Image data is obtained by responsive to the shooting operation triggered in the preview scene; if the hardware environment of the electronic device does not meet the target environment conditions, the image data is stored in the memory; the target processing strategy is determined based on the characteristic data of the electronic device in at least two dimensions; according to the target processing strategy, image data is obtained from the memory, and image processing is performed on the image data to generate the target image.

Benefits of technology

Improve the accuracy of image processing during shooting, avoid image inaccuracy problems caused by insufficiency of hardware environment, and realize fine management of time-delay tasks.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119788957A_ABST
    Figure CN119788957A_ABST
Patent Text Reader

Abstract

The invention relates to a shooting method and device, electronic equipment, a storage medium and a computer program product. The method comprises the steps of obtaining image data in response to a shooting operation triggered in a preview scene; if the hardware environment of the electronic equipment does not meet the target environment condition, storing the image data in a memory; determining a target processing strategy based on the feature data of the electronic equipment in at least two dimensions; and acquiring the image data from the memory according to the target processing strategy, and performing image processing on the image data to generate a target image. By adopting the method, the accuracy of image processing during shooting can be improved.
Need to check novelty before this filing date? Find Prior Art

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, so as to display the processed image. When the electronic device processes the photo data, a certain amount of memory space is required to store the original data, the intermediate data during the processing, and the final large image return data.

[0003] However, traditional shooting methods usually result in inaccurate images due to problems such as insufficient memory space of electronic devices. Summary of the invention

[0004] Embodiments of the present application provide a shooting method, apparatus, electronic device, computer-readable storage medium, and computer program product, which can improve the accuracy of image processing during shooting.

[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 scene, acquiring image data;

[0007] If the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory;

[0008] Determining a target processing strategy based on feature data of the electronic device in at least two dimensions;

[0009] According to the target processing strategy, the image data is acquired from the memory, and image processing is performed on the image data to generate a target image.

[0010] In a second aspect, the present application further provides a photographing device. The device comprises:

[0011] An image data acquisition module, used to acquire image data in response to a shooting operation triggered in the preview scene;

[0012] An image data storage module, used for storing the image data in a memory if the hardware environment of the electronic device does not meet the target environment condition;

[0013] A strategy determination module, configured to determine a target processing strategy based on feature data of the electronic device in at least two dimensions;

[0014] The image processing module is used to obtain the image data from the memory according to the target processing strategy, and perform image processing on the image data to generate a target image.

[0015] 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:

[0016] In response to a shooting operation triggered in the preview scene, acquiring image data;

[0017] If the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory;

[0018] Determining a target processing strategy based on feature data of the electronic device in at least two dimensions;

[0019] According to the target processing strategy, the image data is acquired from the memory, and image processing is performed on the image data to generate a target image.

[0020] 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:

[0021] In response to a shooting operation triggered in the preview scene, acquiring image data;

[0022] If the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory;

[0023] Determining a target processing strategy based on feature data of the electronic device in at least two dimensions;

[0024] According to the target processing strategy, the image data is acquired from the memory, and image processing is performed on the image data to generate a target image.

[0025] 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:

[0026] In response to a shooting operation triggered in the preview scene, acquiring image data;

[0027] If the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory;

[0028] Determining a target processing strategy based on feature data of the electronic device in at least two dimensions;

[0029] According to the target processing strategy, the image data is acquired from the memory, and image processing is performed on the image data to generate a target image.

[0030] In the above-mentioned shooting method, device, electronic device, computer-readable storage medium and computer program product, the electronic device obtains image data in response to the shooting operation triggered in the preview scene. If the hardware environment of the electronic device does not meet the target environment conditions, the image data is stored in the memory to avoid the problem of inaccurate generated images caused by processing the image data when the hardware environment does not meet the target environment conditions; then, based on the feature data of the electronic device in at least two dimensions, the target processing strategy can be accurately determined, and according to the target processing strategy, the image data is obtained from the memory, and image processing is performed on the image data, so that the target image can be more accurately generated. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] 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.

[0032] Figure 1 A diagram showing an application environment of a shooting method in an embodiment;

[0033] Figure 2 is a structural block diagram of a photographing device in one embodiment;

[0034] Figure 3 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 1As shown, a shooting method is provided. This embodiment is illustrated by applying the method to an electronic device, which 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, Internet of Things devices and portable wearable devices. The Internet of Things devices may be smart speakers, smart TVs, smart air conditioners, smart car-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 image data in response to a shooting operation triggered in the preview scene.

[0039] The preview scene is a scene in which the preview screen is displayed on the screen of the electronic device. The shooting operation can be an operation of triggering a shooting button in the preview screen, or an operation of long pressing any position in the preview screen, which is not limited here. The image data is image data obtained by the electronic device in response to the shooting operation, and the image data is used to generate the target image.

[0040] Optionally, the electronic device enters a preview scene, displays a preview image on the screen, and acquires image data through a camera module in response to a shooting operation triggered in the preview scene. The camera module includes a camera sensor and a lens, etc.

[0041] Step S104: if the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory.

[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, whether the device is available, 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 the temperature threshold and the hardware resources in the electronic device are in a sufficient state. The 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); electronic devices use various hardware to process photo-taking 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 target 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 delayed task, and the captured image data corresponding to the delayed 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 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 target environmental conditions; if the current temperature of the electronic device is lower than or equal to the 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 target environmental conditions.

[0049] It can be understood that if the current temperature of the electronic device is higher than the 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, the electronic device is determined to perform a delayed task, and the image data is processed when the hardware environment meets the target environment conditions, so as to avoid the problem of high power consumption caused by processing image data when the power consumption is high.

[0050] Optionally, the electronic device performs image processing on the image data to generate a third image and displays the third image, wherein the third image may be a thumbnail image, and the image quality of the subsequent target image is higher than that of the third image.

[0051] It is understandable that after the user triggers the shooting operation in the preview scene, 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: determining a target processing strategy based on the characteristic data of the electronic device in at least two dimensions.

[0053] The target processing strategy is a strategy for processing image data. At least two dimensions include at least two of the operation scenario, application status, camera status, browsing operation and shooting event, and the target processing strategy is an immediate processing strategy, a foreground static processing strategy, a folding dual-screen processing strategy, a background processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy.

[0054] The immediate processing strategy is a strategy for processing image data immediately, the foreground static processing strategy is a strategy for processing image data when the camera application is in the foreground and static state, the folding dual-screen processing strategy is a strategy for processing image data on a folding screen device that includes two screens, the background processing strategy is a strategy for processing image data when the camera application is running in the background, the album browsing processing strategy is a strategy for processing image data when the album is in the browsing state, the stop processing strategy is a strategy for stopping processing image data, and the floating window split-screen browsing processing strategy is a strategy for processing image data when the floating window split-screen displays album images.

[0055] The characteristic of the foreground static processing strategy is to make full use of resources without affecting the smoothness and temperature rise of the preview scene. The electronic device adopts different shooting modes, and the parameters of the foreground static processing strategy can be adjusted to adapt to different shooting modes.

[0056] The characteristic of the background processing strategy is to generate the target image as quickly as possible without affecting the smoothness and latency of the application running in the foreground. If the target processing strategy is the background processing strategy, when the camera application enters the foreground, the delay task is stopped from being triggered; if there is a delayer, the delayer is canceled. When the triggering conditions of the background processing strategy are not met, it is triggered again after a specified period of time to determine whether the triggering conditions of the background processing strategy are met. After the electronic device uses the background processing strategy to generate the target image, it directly triggers the delay task, that is, obtains the image data and continues to process the image.

[0057] If responding to the camera opening information (OpenCamera information) of the third-party application, the delayed task is stopped from being queued according to the target processing strategy. If responding to the startup operation of the camera application, the image data processing is forcibly stopped. Among them, the camera application is a system application. When the camera application is running in the foreground and the current task is a real-time task, the delayed task is suspended from being queued.

[0058] The floating split-screen browsing processing strategy is characterized by being able to run both the camera application and the image display in the foreground. When the foreground application is browsing an image, the delayed task of the current image is triggered (a directional trigger); when browsing stops, if the current delayed task has been completed, the delayed task will no longer be triggered.

[0059] As shown in Table 1, at least two dimensions include at least two of the following: operation scenarios, application status, camera status, browsing operations, and shooting events. The operation scenarios of the immediate processing strategy include clicking a pop-up shortcut button or clicking a thumbnail button. The operation scenarios of the foreground static processing strategy include static after shooting. The operation scenarios of the folding dual-screen processing strategy include folding dual-screen shooting and folding screen browsing. The application status includes the shooting page (Activity) status and the window focus status. The shooting page status includes the foreground and the background. The camera status includes opening and closing. The browsing operation includes the operation object. The operation object includes quick sharing, which is currently a quick picture, or clicking a thumbnail, which is currently a quick picture. The shooting event includes delayed tasks / real-time tasks, shooting status, shooting mode, and whether it is a folding dual-screen. The shooting status includes quick picture completion. The shooting mode includes O and X. O indicates that the target processing strategy will determine that the delayed task is supported according to different shooting modes. X indicates that the target processing strategy will determine that the delayed task is not supported according to different shooting modes. Whether it is a folding dual-screen includes O and X. O indicates that the target processing strategy will determine that the delayed task is supported according to different folding dual-screen modes. In addition, the target processing strategy can also set a delay event, which means that after each use of the target image processing strategy to process the image data, the target image processing strategy is used to process the image data after a specified delay. Among them, multiple applications can be opened on electronic devices through floating windows and split screens, allowing multiple applications to run in the foreground at the same time, but only one application can obtain the window focus (Focused) at the same time.

[0060] EVENT_START: a normal trigger (if the Map has a media id, it is a directional trigger); EVENT_PAUSE: pause post-processing; EVENT_RESUME: resume post-processing, usually used to continue processing the previously paused delayed task after pausing; EVENT_FORCE_STOP: force stop post-processing, directly abandon the delayed task being executed. Additional parameters (Map), such as media id, indicate a directional trigger.

[0061] Table 1:

[0062]

[0063]

[0064] As shown in Table 2, the operation scenarios of the background processing strategy include reading the image list from the media library, a specified time after exiting the camera, receiving a message to close the camera foreground, starting the process when the camera is not in the foreground (such as a third-party application launching the camera application to take a picture), or exiting the album to browse large pictures; the specified time can be set as needed, such as 1 second.

[0065] Table 2:

[0066]

[0067]

[0068] As shown in Table 3, the operation scenarios of the album browsing processing strategy include browsing large album pictures, the operation scenarios of the stop processing strategy include starting the camera application, triggering a delayed task, or receiving the camera application start information when the camera application is in the background, and the operation scenarios of the floating window split screen browsing processing strategy include browsing on the floating window split screen.

[0069] Table 3:

[0070]

[0071] It is understandable that the electronic device can find out the corresponding target processing strategy according to the characteristic data in at least two dimensions in Table 1, Table 2 and Table 3 above.

[0072] For example, if the operation scenario of the electronic device is that it is still after taking a picture, the shooting page status is in the foreground, the shooting event is a delayed task, and the shooting status is quick picture completion, the corresponding target processing strategy can be found to be the foreground still processing strategy; if the operation scenario of the electronic device is that a specified time has passed after exiting the camera, the shooting page status is in the background, and the camera status is closed, the corresponding target processing strategy can be found to be the background processing strategy; if the operation scenario of the electronic device is that the camera application is started and the shooting page status is in the foreground, the corresponding target processing strategy can be found to be the stop processing strategy.

[0073] Step S108, according to the target processing strategy, the image data is obtained from the memory, and image processing is performed on the image data to generate a target image.

[0074] Optionally, the electronic device obtains image data that currently needs to be processed from the memory according to the target processing strategy, and performs image processing on the image data to generate a target image.

[0075] Optionally, the electronic device fuses at least two frames of image data to generate a target image.

[0076] 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.

[0077] In the above-mentioned shooting method, device, electronic device, computer-readable storage medium and computer program product, the electronic device obtains image data in response to the shooting operation triggered in the preview scene. If the hardware environment of the electronic device does not meet the target environment conditions, the image data is stored in the memory to avoid the problem of inaccurate generated images caused by processing the image data when the hardware environment does not meet the target environment conditions; then, based on the feature data of the electronic device in at least two dimensions, the target processing strategy can be accurately determined, and according to the target processing strategy, the image data is obtained from the memory and image processing is performed on the image data, which can achieve fine management of delayed tasks and more accurately generate target images.

[0078] In one embodiment, according to the target processing strategy, image data is obtained from the memory, and image processing is performed on the image data to generate a target image, including: when the electronic device meets the trigger condition in the target processing strategy, the image data is obtained from the memory; according to the processing method in the target processing strategy, the image data is processed to generate the target image.

[0079] The trigger condition is a condition for triggering the processing of image data, and the trigger condition can be set as required.

[0080] Optionally, if the target processing strategy is a foreground static processing strategy, a folded dual-screen processing strategy or a background processing strategy, the target processing strategy includes a trigger condition; if the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy, the target processing strategy does not include a trigger condition.

[0081] Optionally, if the target processing strategy is a foreground static processing strategy, the trigger condition includes one of non-switching shooting mode, non-switching resolution (image size), non-switching camera, non-recording state, non-interval continuous shooting or non-countdown. Among them, the shooting mode may include portrait mode, night scene mode or photo mode, etc.; non-switching camera means that the electronic device is not in the state of switching different cameras, such as not switching between the front camera and the rear camera.

[0082] It can be understood that when the electronic device is in a non-switching shooting mode, non-switching resolution (image size), non-switching camera, non-recording state, non-interval continuous shooting or non-countdown, it can be considered that the camera application of the electronic device is in the foreground and stationary state, which triggers the electronic device to perform image processing on the image data.

[0083] Furthermore, if the target processing strategy is a foreground static processing strategy, the trigger condition may also include that the hardware environment meets the target environment condition.

[0084] Optionally, if the target processing strategy is a folding dual-screen processing strategy, the trigger condition includes that the hardware environment meets the target environment condition.

[0085] Optionally, if the target processing strategy is a background processing strategy, the triggering condition includes that the camera application is in the background and the electronic device is on the screen, the electronic device is off the screen and no music is playing, and the electronic device is off the screen and playing music. Optionally, if the target processing strategy is a background processing strategy, the triggering condition includes that the hardware environment meets the target environment condition.

[0086] It is understandable that, for different target processing strategies, the processing method for performing image processing on image data can be set as needed and is not limited here.

[0087] Exemplarily, if the target processing strategy is a foreground static processing strategy, the image data is processed after the target duration. Exemplarily, if the target processing strategy is a folding dual-screen processing strategy, the image data is sent to the delayed task manager, and the image data is processed by the delayed task manager.

[0088] Optionally, image data is processed according to the processing method in the target processing strategy to generate a target image, including: if the target processing strategy is a foreground static processing strategy, a folded dual-screen processing strategy, or a background processing strategy, then after the target time has passed, the image data is processed according to the processing method in the target processing strategy to generate a target image; if the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy, or a floating split-screen browsing processing strategy, then the image data is processed to generate a target image.

[0089] The target duration can be set as needed. The target durations of different target processing strategies can be the same or different.

[0090] Optionally, if the target processing strategy is a foreground static processing strategy, a folded dual-screen processing strategy, or a background processing strategy, the target duration corresponding to the target processing strategy is determined, and according to the processing method in the target processing strategy, after the target duration has passed, the image data is processed to generate a target image; if the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy, or a floating split-screen browsing processing strategy, the image data is directly processed to generate a target image.

[0091] Optionally, after the target image is generated, image data may be acquired for image processing after a specified period of time, which can reduce the frequency of image data and avoid the problem of processing more data in a short period of time, which may lead to higher power consumption and higher temperature of electronic equipment.

[0092] In this embodiment, when the electronic device meets the triggering conditions in the target processing strategy, it obtains image data from the memory and processes the image data according to the processing method in the target processing strategy to generate a target image with higher image quality.

[0093] Furthermore, if the target processing strategy is a foreground static processing strategy, a folding dual-screen processing strategy or a background processing strategy, the image data is processed in accordance with the processing method in the target processing strategy after the target time has passed to generate a target image. This can avoid the foreground static processing strategy, the folding dual-screen processing strategy or the background processing strategy, which directly processes the image data and causes high power consumption in a short period of time. This can reduce the power consumption of the device and avoid the problem of electronic equipment resources being blocked in a short period of time. If the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy, it is necessary to meet the user's real-time image processing needs. In this way, the image data is directly processed to generate a target image, thereby improving the match between shooting and demand.

[0094] In one embodiment, according to the target processing strategy, image data is obtained from the memory, and image processing is performed on the image data to generate a target image, including: if the target processing strategy is an album browsing processing strategy, the image data is obtained from the memory; based on the trigger operation during album browsing, image processing is performed on the image data to generate a target image.

[0095] The trigger operation may include sliding or staying still after sliding, or may include clicking, long pressing, etc., but is not limited thereto.

[0096] It is understandable that if the target processing strategy is an album browsing processing strategy, the characteristic of the album browsing processing strategy is to display the target image within a first duration when browsing the album; the first duration is a shorter duration, that is, the characteristic of the album browsing processing strategy is to display the target image as quickly as possible when browsing the album. Therefore, the electronic device can accurately identify whether the user is the target image that needs to be browsed for the trigger operation based on the trigger operation during album browsing, so as to perform image processing more accurately.

[0097] Optionally, if the target processing strategy is an album browsing processing strategy, image data is obtained from a memory; based on a trigger operation for a third image during album browsing, image processing is performed on the image data to generate a target image; the image quality of the target image is higher than the image quality of the third image. The third image may be a thumbnail image.

[0098] Optionally, after generating the target image, the electronic device updates the third image to the target image and displays the target image.

[0099] Optionally, if the target processing strategy is an album browsing processing strategy, after generating the target image, the process directly returns to the step of acquiring the image data from the memory, that is, continues to directly trigger the album browsing triggering strategy.

[0100] In this embodiment, if the target processing strategy is an album browsing processing strategy, image data is obtained from the memory, and based on the trigger operation during album browsing, it can be accurately identified whether the user is the target image that needs to be browsed for the trigger operation, thereby performing image processing more accurately.

[0101] In one embodiment, based on a trigger operation during album browsing, image data is processed to generate a target image, including: if the trigger operation during album browsing is sliding, based on the first image after sliding, image data corresponding to the first image is processed to generate a target image; the image quality of the target image is higher than the image quality of the first image; if the trigger operation during album browsing is stillness after sliding, based on the sliding direction before stillness, image data corresponding to the second image in the sliding direction is processed to generate a target image; the image quality of the target image is higher than the image quality of the second image.

[0102] Optionally, if the trigger operation during album browsing is sliding, the information of the first image after sliding is sent to the camera application (OCamera), and through the directional trigger of the camera application, image processing is triggered on the image data corresponding to the first image to generate a target image.

[0103] The information of the first image may be the identifier of the first image, etc. The pointing trigger is a trigger for processing the pointed image data. When the trigger operation during album browsing is sliding, the target image corresponding to the first image after sliding is the one the user wants to browse, that is, the pointed image data is the image data corresponding to the first image.

[0104] Optionally, if the trigger operation during album browsing is sliding and then stillness, indicating that the user does not slide, then after the last image data is completed, the sliding direction before stillness is sent to the camera application. The camera application triggers image processing of the image data corresponding to the second image in the sliding direction based on the common trigger determined by the sliding direction to generate the target image.

[0105] The sliding direction may be a direction from top to bottom, a direction from bottom to top, a direction from left to right, or a direction from right to left, or other sliding directions, which are not limited here. When the static time reaches a specified time, it means static after sliding. The specified time can be set as needed. The second image in the sliding direction is the second image in the sliding direction that has not been browsed.

[0106] The general trigger is a trigger used to process each non-directional image data. When the trigger operation during album browsing is to slide and then stop, the image data corresponding to the second image in the sliding direction can be processed in advance by using the stop process, that is, the second image in the user's sliding direction can be predicted, and the target image can be displayed more quickly when the user continues to slide in the sliding direction.

[0107] In this embodiment, if the trigger operation during album browsing is sliding, image processing is performed on image data corresponding to the first image based on the first image after sliding, and a target image can be quickly generated; if the trigger operation during album browsing is stillness after sliding, image processing is performed on image data corresponding to the second image in the sliding direction based on the sliding direction before stillness, and a target image corresponding to the second image in the sliding direction can be generated in advance, so that the target image can be displayed more quickly when the user continues to slide in the sliding direction.

[0108] In one embodiment, an electronic device includes a first screen and a second screen; in response to a shooting operation triggered in a preview scene, image data is obtained, including: in response to a shooting operation triggered in a preview scene on the first screen, image data is obtained; according to a target processing strategy, image data is obtained from a memory, and image processing is performed on the image data to generate a target image, including: if the target processing strategy is a folding dual-screen processing strategy, image data is obtained from the memory, and image processing is performed on the image data to generate a target image; and the target image is displayed on the second screen.

[0109] Among them, the electronic device includes a first screen and a second screen, and the electronic device is a folding screen device.

[0110] Optionally, the electronic device enters a dual-screen mode, displays a preview scene page of the camera application on a first screen, and displays a target image on a second screen. The camera application runs in the foreground.

[0111] Optionally, if the target processing strategy is a folding dual-screen processing strategy, and when the electronic device is shooting on the first screen, the image data is obtained from the memory at the end of shooting, and the image data is processed to generate a target image; if the target processing strategy is a folding dual-screen processing strategy, and when the electronic device is browsing an album on the second screen, the image data is obtained from the memory, and based on the trigger operation during album browsing, the image data is processed to generate a target image.

[0112] It can be understood that if the target processing strategy is a folding dual-screen processing strategy, and when the electronic device is shooting on the first screen, it means that the user is shooting and the electronic device is in a shooting state, then the image data will not be processed during the shooting process, which can save computing resources. The image data will not be obtained from the memory until the shooting result is obtained, and the image data will be processed to generate the target image.

[0113] When the electronic device takes a picture on the first screen, it can use the quick shot mode or the normal mode, which is not limited here. The shooting speed of the quick shot mode is greater than the shooting speed of the normal mode, that is, the shooting time interval of the quick shot mode is less than the shooting time interval of the normal mode, such as the shooting time interval of the quick shot mode is 300ms (milliseconds), and the shooting time interval of the normal mode is 600ms.

[0114] If the target processing strategy is a folding dual-screen processing strategy, and when the electronic device is shooting on the first screen, after the previous image data is completed and until the snapshot mode is exited, the latest captured image data is obtained from the memory, and the image data is processed to generate the target image, which can reduce the trigger frequency of image data processing.

[0115] If the target processing strategy is the folding dual-screen processing strategy, and the electronic device is browsing the album on the second screen, the image data is obtained from the memory; if the trigger operation during album browsing is that the sliding speed is less than the speed threshold, the information of the fourth image after sliding is sent to the delayed task manager, triggering the directional trigger of the camera application, and performing image processing on the image data corresponding to the fourth image through the directional trigger to generate the target image; the image quality of the target image is higher than the image quality of the fourth image; if the trigger operation during album browsing is that the sliding speed is greater than or equal to the speed threshold, the image data corresponding to the fifth image that has been slid through is sent to the delayed task manager through the camera application, and the image data corresponding to the latest fifth image is determined through the delayed task manager when the sliding is stationary, and the image data corresponding to the latest fifth image is processed to generate the target image; the image quality of the target image is higher than the image quality of the fifth image. Among them, the speed threshold can be set as needed.

[0116] It can be understood that if the trigger operation during album browsing is that the sliding speed is less than the speed threshold, it means that the user is browsing slowly, and then it is necessary to perform image processing on the image data corresponding to the fourth image after sliding, so as to generate the target image corresponding to the fourth image after each sliding; and if the trigger operation during album browsing is that the sliding speed is greater than or equal to the speed threshold, it means that the user is sliding quickly, then in order to save computing resources, the latest fifth image when the sliding is stationary can be determined, and the target image corresponding to the fifth image is also the image that the user needs to browse, and image processing can be performed on the image data corresponding to the latest fifth image to generate the target image that the user needs to browse.

[0117] For example, an electronic device takes 10 images. If a normal trigger is used, the images will be processed in reverse order, that is, from the latest to the oldest in terms of shooting time. The directional trigger processes the image data corresponding to the image it points to. For example, if the user browses the 6th image, the 6th image will be processed first before other images.

[0118] Optionally, after generating the target image, the electronic device no longer directly triggers the folding dual-screen processing strategy.

[0119] In this embodiment, the electronic device can obtain image data in response to a shooting operation triggered in the preview scene of the first screen. If the target processing strategy is a folding dual-screen processing strategy, image processing is performed on the image data to generate a target image, so that the target image can be displayed in the second screen. That is, the first screen and the second screen can be processed collaboratively to more accurately execute the folding dual-screen processing strategy.

[0120] In one embodiment, another shooting method is provided, which is applied to an electronic device and includes the following steps:

[0121] Step A1, acquiring image data in response to a shooting operation triggered in a preview scene.

[0122] Step A2: if the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in the memory.

[0123] Step A3, determining the target processing strategy based on the feature data of the electronic device in at least two dimensions; the at least two dimensions include at least two of the operation scenario, application status, camera status, browsing operation and shooting event, and the target processing strategy is an immediate processing strategy, a foreground static processing strategy, a folding dual-screen processing strategy, a background processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy.

[0124] Step A4: when the electronic device meets the triggering condition in the target processing strategy, the image data is obtained from the memory.

[0125] If the target processing strategy is a foreground static processing strategy or a background processing strategy, execute step A5; if the electronic device includes a first screen and a second screen, and the target processing strategy is a folding dual-screen processing strategy, and the preview scene is in the first screen, execute step A6; if the target processing strategy is an immediate processing strategy, a stop processing strategy, or a floating window split-screen browsing processing strategy, execute step A7; if the target processing strategy is an album browsing processing strategy, execute step A8.

[0126] Step A5: According to the processing method in the target processing strategy, after the target time has passed, image processing is performed on the image data to generate a target image.

[0127] Step A6, acquiring image data from the memory, and performing image processing on the image data to generate a target image; and displaying the target image on the second screen.

[0128] Step A7, performing image processing on the image data to generate a target image.

[0129] Step A8, if the triggering operation during album browsing is sliding, based on the first image after sliding, image processing is performed on the image data corresponding to the first image to generate a target image; the image quality of the target image is higher than the image quality of the first image; if the triggering operation during album browsing is stillness after sliding, based on the sliding direction before stillness, image processing is performed on the image data corresponding to the second image in the sliding direction to generate a target image; the image quality of the target image is higher than the image quality of the second image.

[0130] 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.

[0131] 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.

[0132] In one embodiment, Figure 2 As shown, a shooting device is provided, including: an image data acquisition module 202, an image data storage module 204, a strategy determination module 206 and an image processing module 208, wherein:

[0133] The image data acquisition module 202 is used to acquire image data in response to a shooting operation triggered in the preview scene.

[0134] The image data storage module 204 is used to store the image data in a memory if the hardware environment of the electronic device does not meet the target environment condition.

[0135] The strategy determination module 206 is used to determine a target processing strategy based on the feature data of the electronic device in at least two dimensions.

[0136] The image processing module 208 is used to obtain the image data from the memory according to the target processing strategy, and perform image processing on the image data to generate a target image.

[0137] In the above-mentioned shooting device, the electronic device responds to the shooting operation triggered in the preview scene to obtain image data. If the hardware environment of the electronic device does not meet the target environment conditions, the image data is stored in the memory to avoid the problem of inaccurate generated images caused by processing the image data when the hardware environment does not meet the target environment conditions; then, based on the feature data of the electronic device in at least two dimensions, the target processing strategy can be accurately determined, and according to the target processing strategy, the image data is obtained from the memory, and image processing is performed on the image data, so that the target image can be generated more accurately.

[0138] In one embodiment, the at least two dimensions include at least two of an operation scenario, an application status, a camera status, a browsing operation, and a shooting event, and the target processing strategy is an immediate processing strategy, a foreground static processing strategy, a folded dual-screen processing strategy, a background processing strategy, an album browsing processing strategy, a stop processing strategy, or a floating window split-screen browsing processing strategy.

[0139] In one embodiment, the image processing module 208 is also used to obtain the image data from the memory when the electronic device meets the triggering conditions in the target processing strategy; perform image processing on the image data according to the processing method in the target processing strategy to generate a target image.

[0140] In one embodiment, the above-mentioned image processing module 208 is also used to, if the target processing strategy is a foreground static processing strategy, a folded dual-screen processing strategy or a background processing strategy, perform image processing on the image data after the target time has passed according to the processing method in the target processing strategy to generate a target image; if the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy, perform image processing on the image data to generate a target image.

[0141] In one embodiment, the image processing module 208 is also used to obtain the image data from the memory if the target processing strategy is an album browsing processing strategy; based on the triggering operation during album browsing, perform image processing on the image data to generate a target image.

[0142] In one embodiment, the image processing module 208 is also used to perform image processing on image data corresponding to the first image based on the first image after sliding to generate a target image if the triggering operation during album browsing is sliding; the image quality of the target image is higher than the image quality of the first image; if the triggering operation during album browsing is stillness after sliding, based on the sliding direction before stillness, perform image processing on image data corresponding to the second image in the sliding direction to generate a target image; the image quality of the target image is higher than the image quality of the second image.

[0143] In one embodiment, the electronic device includes a first screen and a second screen; the image data acquisition module 202 is also used to acquire image data in response to a shooting operation triggered in a preview scene of the first screen; the image processing module 208 is also used to acquire the image data from the memory if the target processing strategy is a folding dual-screen processing strategy, and perform image processing on the image data to generate a target image; and display the target image on the second screen.

[0144] 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 the operations corresponding to each module.

[0145] 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 3 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.

[0146] Those skilled in the art will understand that Figure 3 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.

[0147] 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.

[0148] 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.

[0149] 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 regulations.

[0150] 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.

[0151] 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.

[0152] 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 scene, acquiring image data; If the hardware environment of the electronic device does not meet the target environment condition, the image data is stored in a memory; Determining a target processing strategy based on feature data of the electronic device in at least two dimensions; According to the target processing strategy, the image data is acquired from the memory, and image processing is performed on the image data to generate a target image.

2. The method according to claim 1, characterized in that The at least two dimensions include at least two of the operation scenarios, application status, camera status, browsing operations and shooting events, and the target processing strategy is an immediate processing strategy, a foreground static processing strategy, a folded dual-screen processing strategy, a background processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy.

3. The method according to claim 1, characterized in that The step of acquiring the image data from the memory according to the target processing strategy and performing image processing on the image data to generate a target image includes: When the electronic device meets the triggering condition in the target processing strategy, acquiring the image data from the memory; According to the processing method in the target processing strategy, the image data is processed to generate a target image.

4. The method according to claim 3, characterized in that The step of performing image processing on the image data according to the processing method in the target processing strategy to generate a target image includes: If the target processing strategy is a foreground static processing strategy, a folding dual-screen processing strategy, or a background processing strategy, then, according to the processing method in the target processing strategy, after a target time has elapsed, image processing is performed on the image data to generate a target image; If the target processing strategy is an immediate processing strategy, an album browsing processing strategy, a stop processing strategy or a floating window split-screen browsing processing strategy, image processing is performed on the image data to generate a target image.

5. The method according to claim 1, characterized in that The step of acquiring the image data from the memory according to the target processing strategy and performing image processing on the image data to generate a target image includes: If the target processing strategy is an album browsing processing strategy, acquiring the image data from the memory; Based on a triggering operation during album browsing, the image data is processed to generate a target image.

6. The method according to claim 5, characterized in that The triggering operation during album browsing is used to process the image data to generate a target image, including: If the triggering operation during album browsing is sliding, based on the first image after sliding, image processing is performed on the image data corresponding to the first image to generate a target image; the image quality of the target image is higher than the image quality of the first image; If the trigger operation during album browsing is stillness after sliding, based on the sliding direction before stillness, image processing is performed on the image data corresponding to the second image in the sliding direction to generate a target image; the image quality of the target image is higher than that of the second image.

7. The method according to claim 1, characterized in that The electronic device comprises a first screen and a second screen; The step of acquiring image data in response to a shooting operation triggered in the preview scene includes: In response to a shooting operation triggered in the preview scene of the first screen, acquiring image data; The step of acquiring the image data from the memory according to the target processing strategy and performing image processing on the image data to generate a target image includes: If the target processing strategy is a folding dual-screen processing strategy, acquiring the image data from the memory, and performing image processing on the image data to generate a target image; The target image is displayed in the second screen.

8. A photographing device, characterized in that: include: An image data acquisition module, used to acquire image data in response to a shooting operation triggered in a preview scene; An image data storage module, used for storing the image data in a memory if the hardware environment of the electronic device does not meet the target environment condition; A strategy determination module, configured to determine a target processing strategy based on feature data of the electronic device in at least two dimensions; The image processing module is used to obtain the image data from the memory according to the target processing strategy, and perform image processing on the image data to generate a target 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

  • Electronic apparatus and method of controlling same

    CN105453541A

  • Image processing method and device for three-dimensional scene and electronic equipment

    CN113192173A

  • Shooting method and related equipment thereof

    CN115633252A

  • Image processing method and device

    CN116017146A

  • Image processing method and electronic equipment

    CN116055859A

Cited By

  • Image processing method and device, electronic equipment and readable storage medium

    CN120547433A