Image shooting method and electronic device

By switching the image format when no new images are detected within the preset time period in the electronic device, the problem of the electronic device losing the image captured is solved, the user experience is improved and memory usage is optimized.

CN118381996BActive Publication Date: 2024-11-15HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410838809.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-26
Publication Date
2024-11-15
Estimated Expiration
2044-06-26

AI Technical Summary

Technical Problem

When the electronic device does not receive the user's photo operation, it may lose the captured images, resulting in poor user shooting experience.

Method used

By switching the image on the display interface when no new image is detected within the preset time period, converting from the first image format generated by the original image to the second image format, generating a third image, and deleting the first image if necessary Image to reduce memory usage.

Benefits of technology

Ensure that the electronic device can always display images captured in response to the photo operation, improve the user's shooting experience, and optimize memory usage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118381996B_ABST
    Figure CN118381996B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides an image shooting method and an electronic device, which relate to the technical field of electronic devices. The electronic device can always obtain the image captured in response to the photo operation, thereby improving the user's shooting experience. The method includes: displaying a first shooting preview interface. In response to the photo operation, collecting the original image. Displaying an image display interface, the image display interface includes a second shooting preview interface or a gallery interface. The image display interface includes a first image, which is obtained based on the original image and is in a first image format. If the second image is not detected within a preset time, the first image on the image display interface is switched to a third image. The second image is obtained by performing image processing on the original image, and the second image is in a second image format. The third image is obtained based on the first image, and the third image is in a second image format. The first image format is different from the second image format.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of electronic devices, and in particular to an image capturing method and electronic device. Background Art

[0002] Currently, electronic devices generally support a camera function, and can take photos under the instruction of a user.

[0003] For example, the electronic device may receive a photographing operation input by a user. In response to the photographing operation, the electronic device may display a photographing preview interface 1. The photographing preview interface 1 displays a preview image A. The preview image A is generated based on the original image most recently collected by the electronic device.

[0004] In some implementations, when the user does not input any operation, after a period of time, the shooting preview interface 1 switches from displaying preview image A to displaying preview image B. The preview image B corresponds to the image captured by the electronic device before receiving the shooting operation. The electronic device loses the image captured in response to the shooting operation, and the user's shooting experience is poor. Summary of the invention

[0005] The embodiments of the present application provide an image capturing method and an electronic device, so that the electronic device can always obtain images captured in response to a photographing operation, thereby improving the user's photographing experience.

[0006] To achieve the above objectives, the embodiments of the present application adopt the following technical solutions:

[0007] In a first aspect, an image shooting method is provided, the method being applied to an electronic device, the electronic device being equipped with a camera. The method comprises: displaying a first shooting preview interface. In response to a shooting operation, capturing an original image. Displaying an image display interface, the image display interface comprising a second shooting preview interface or a gallery interface. The image display interface comprises a first image, the first image being obtained based on the original image and being in a first image format. If the second image is not detected within a preset time period, the first image on the image display interface is switched to a third image. The second image is obtained by performing image processing on the original image, and the second image is in a second image format. The third image is obtained based on the first image, and the third image is in the second image format. The first image format is different from the second image format.

[0008] Based on the above scheme, the electronic device displays an image display interface in response to a photo-taking operation. The image display interface includes a first image. If the second image is not detected within a preset time, the electronic device switches the first image on the image display interface to a third image. The first image and the second image are both acquired based on the original image, and the third image is acquired based on the first image. As a result, if the electronic device does not acquire the second image within a preset time, it can continue to display the image display interface based on the third image, thereby improving the user's shooting experience.

[0009] Optionally, the third image has a different image name from the first image, and the second image has the same image name as the first image. In this way, the electronic device can subsequently identify the first image, the second image, and the third image according to the image name and the image format.

[0010] Optionally, before displaying the image display interface, the method further includes: acquiring the first image. Acquiring the first image includes: converting the image format of the original image into the first image format, acquiring a fourth image, and the fourth image is the first image. Alternatively, the fourth image is compressed according to a preset size, and a first preview image is acquired, and the first preview image is the first image. Thus, the electronic device can subsequently display the image display interface according to the fourth image or the first preview image.

[0011] Optionally, the display image display interface includes: displaying a second shooting preview interface. The first image is the first preview image. Alternatively, in response to a first operation, the gallery interface is displayed. The first operation is used to indicate the enlarged display of the first preview image in the second shooting preview interface. The first image is the fourth image. Based on the above scheme, the electronic device can display the first preview image through the second shooting preview interface and display the fourth image through the gallery interface.

[0012] Optionally, after the first image on the image display interface is switched to the third image, the method further includes: when the second image is detected, switching the third image on the image display interface to the second image.

[0013] Based on the above solution, after detecting the second image, the electronic device can switch the third image in the image display interface to the second image, thereby allowing the electronic device to display the second image in the image display interface.

[0014] Optionally, before the first image on the image display interface is switched to the third image, the method further includes: obtaining a fifth image by converting the fourth image from the first image format to the second image format. Compressing the fifth image according to a preset size to obtain a third preview image. When the image display interface is the gallery interface, the third image is the fifth image. When the image display interface is the second shooting preview interface, the third image is the third preview image.

[0015] Based on the above solution, the electronic device can obtain the fifth image according to the fourth image, and obtain the third preview image according to the fifth image. Thus, the electronic device can subsequently display the gallery interface according to the fifth image, or display the second shooting preview interface according to the third preview image.

[0016] Optionally, before switching the third image on the image display interface to the second image, the method further includes: acquiring the second image. The acquiring the second image includes: performing the image processing on the original image. After the image processing is completed, a sixth image is acquired. The sixth image is the second image. Alternatively, the sixth image is compressed according to the preset size to acquire a second preview image. The second preview image is the second image.

[0017] Based on the above solution, the electronic device can obtain the sixth image according to the original image and obtain the second preview image according to the sixth image, so that the electronic device can subsequently display the gallery interface according to the sixth image or display the second shooting preview interface according to the second preview image.

[0018] Optionally, after acquiring the second image, the method further includes: deleting the third image. Thus, the memory usage in the electronic device can be reduced.

[0019] Optionally, deleting the third image includes: deleting the third image after the electronic device is in a screen-off state. Thus, the number of operations received on the third image by the user can be reduced, thereby avoiding the deletion of the third image during other processing (such as editing) of the third image.

[0020] Optionally, the electronic device is configured with a camera hardware abstraction module. Before acquiring the fifth image by converting the fourth image from the first image format to the second image format, the method further includes: sending a first encoding instruction to the camera hardware abstraction module. The first encoding instruction carries the fourth image. Acquiring the fifth image by converting the fourth image from the first image format to the second image format includes: upon receiving the first encoding instruction, converting the fourth image carried in the first encoding instruction from the first image format to the second image format through the camera hardware abstraction module to acquire the fifth image.

[0021] Based on the above solution, when the camera hardware abstract module receives the first encoding instruction, it converts the image format of the fourth image into the second image format according to the first encoding instruction. Thus, the electronic device can obtain the fifth image through the camera abstract module.

[0022] Optionally, the electronic device is further configured with a gallery application. A first timer is configured in the gallery application. After acquiring the first image, the method further includes: starting the first timer through the gallery application. The sending of the first coding instruction to the camera hardware abstract module includes: when it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, sending the first coding instruction to the camera hardware abstract module through the gallery application.

[0023] Based on the above scheme, the gallery application starts the first timer after acquiring the first image. When it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, the image application sends a first encoding instruction to the camera hardware abstract module. Thus, the electronic device can send the first encoding instruction to the camera hardware abstract module through the gallery application.

[0024] Optionally, the electronic device is further configured with a camera application. A first timer is configured in the camera application. After acquiring the first image, the method further includes: starting the first timer through the camera application. The sending of the first coding instruction to the camera hardware abstraction module includes: when it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, sending the first coding instruction to the camera hardware abstraction module through the camera application.

[0025] Based on the above scheme, the camera application starts the first timer after acquiring the first image. When it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, the camera application sends the first coding instruction to the camera hardware abstraction module. Thus, the electronic device can send the first coding instruction to the camera hardware abstraction module through the camera application.

[0026] Optionally, the method further includes: when the second image is detected within the preset time period, replacing the first image on the image display interface with the second image.

[0027] Based on the above solution, after the electronic device detects the second image within a preset time period, the first image in the image display interface can be switched to the second image, thereby allowing the electronic device to display the second image in the image display interface.

[0028] Optionally, before switching the first image on the image display interface to the third image, the method further includes: deleting the first image. Thus, the memory usage in the electronic device can be reduced.

[0029] Optionally, the first image format includes any one of the following: ARGB format, RGB format or RGBA format. The second image format includes any one of the following: Joint Photographic Experts Group JPEG format, Portable Network Graphics PNG format or High Efficiency Image File Format HEIF.

[0030] In a second aspect, an electronic device is provided, the electronic device comprising: a camera, a display screen, a memory, and one or more processors. The camera, the display screen, and the memory are coupled to the processor respectively. The memory is used to store computer program code, and the computer program code includes computer instructions. When the computer instructions are executed by the processor, the electronic device performs the image capture method provided in the first aspect and any possible design thereof.

[0031] In a third aspect, a chip system is provided, the chip system comprising a processor and a communication interface. The processor is used to call and run a computer program stored in a storage medium from a storage medium to execute an image capture method provided in the first aspect and any possible design thereof.

[0032] According to a fourth aspect, a computer-readable storage medium is provided, on which computer instructions are stored. When the computer instructions are executed by a processor, the image capture method provided in the first aspect and any possible design thereof is implemented.

[0033] In a fifth aspect, a computer program product is provided, the computer program product comprising computer instructions, which, when executed by a processor, implement the image capturing method provided in the first aspect and any possible design thereof.

[0034] According to a sixth aspect, a computer program product is provided, wherein the computer program comprises instructions, and when the instructions are executed on a computer, the image capturing method provided in the first aspect and any possible design thereof is executed.

[0035] It can be understood that the technical solutions provided in the second to sixth aspects above can respectively correspond to the image capturing methods provided in the aforementioned designs, and the beneficial effects that can be obtained are similar and will not be elaborated on. BRIEF DESCRIPTION OF THE DRAWINGS

[0036] Figure 1 is a schematic diagram of an interface of an image shooting method;

[0037] Figure 2is a schematic diagram of an interface of another image capturing method;

[0038] Figure 3 A schematic diagram of the composition of an electronic device;

[0039] Figure 4 A schematic diagram of the interaction flow between modules of an image shooting method;

[0040] Figure 5 is a schematic diagram of an interface of another image capturing method;

[0041] Figure 6 is a schematic diagram of an interface of another image capturing method;

[0042] Figure 7 A schematic diagram of the composition of an electronic device provided in an embodiment of the present application;

[0043] Figure 8 A schematic diagram of another electronic device provided in an embodiment of the present application;

[0044] Fig. 9 A schematic diagram of the interaction flow between modules of an image capturing method provided in an embodiment of the present application;

[0045] Fig.10 A schematic diagram of an interface of an image capturing method provided in an embodiment of the present application;

[0046] Fig.11 A schematic diagram of an interface of another image capturing method provided in an embodiment of the present application;

[0047] Fig.12 A schematic diagram of an interface of another image capturing method provided in an embodiment of the present application;

[0048] Fig.13 A schematic diagram of an interface of another image capturing method provided in an embodiment of the present application;

[0049] Fig.14 A schematic diagram of another electronic device provided in an embodiment of the present application;

[0050] Fig.15 A schematic diagram of the composition of a chip system provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In the following, the terms "first", "second", etc. are used for descriptive purposes only and are not to be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Thus, a feature defined as "first", "second", etc. may explicitly or implicitly include one or more of the features. In the description of this application, unless otherwise specified, "plurality" means two or more.

[0052] At present, electronic devices are usually equipped with a camera and a camera application installed. Among them, the camera can be used to collect images. The electronic device can obtain and display the images collected by the camera through the camera application.

[0053] For example, the electronic device is a mobile phone. Figure 1 The interface 101 of the electronic device may include an icon 102 of a camera application. The user may click the icon 102 to instruct the electronic device to run the camera application, so that the user may instruct the electronic device to take a photo through the camera application.

[0054] refer to Figure 2 In response to the click operation on the icon 102, the electronic device can run the camera application. In addition, the electronic device can also switch to display the interface 201 of the camera application. In other embodiments of the present application, the interface 201 can also be called a first shooting preview interface.

[0055] like Figure 2 As shown, the interface 201 includes a preview box and a control 1. The preview box is used to display the latest image captured by the electronic device. For example, the preview box may display a preview Figure 1 .

[0056] In addition, the control 1 can be used to trigger the electronic device to take a photo.

[0057] In the interface 201 , the user may input an operation 202 . The operation 202 is used to instruct the electronic device to take a photo. For example, the operation 202 may be a click operation on the control 1 .

[0058] In the present application, after receiving operation 202, the electronic device can obtain the image captured by the camera and display the captured image.

[0059] like Figure 3 As shown, the electronic device can also be configured with a camera hardware abstraction module and a gallery application (hereinafter referred to as the gallery application). The electronic device can obtain the images captured by the camera through the camera hardware abstraction module, and display the images captured by the camera accordingly through the camera application and the gallery application.

[0060] Exemplary, reference Figure 4 After receiving operation 202, the electronic device may execute the following in response to operation 202: Figure 4 The method shown can enable the electronic device to obtain the image captured by the camera and display the captured image on a corresponding interface.

[0061] like Figure 4 As shown, the program includes:

[0062] S401. The camera application sends a photo taking instruction 1 to the camera hardware abstraction module.

[0063] For example, after receiving the operation 202 instructing to take a photo, the camera application may send a photo instruction 1 to the camera hardware abstraction module in response to the operation 202. The photo instruction 1 is used to instruct to collect an image.

[0064] S402, the camera hardware abstraction module acquires an original image by controlling the camera to collect images.

[0065] Exemplarily, after receiving the photo taking instruction 1, the camera hardware abstraction module can control the camera to collect images. Thus, the camera hardware abstraction module can obtain the original image. The original image can be obtained by converting the collected light signal into a digital signal by the camera.

[0066] S403 , the camera hardware abstraction module performs image processing 1 on the original image to generate image A.

[0067] Exemplarily, after acquiring the original image captured by the camera, the camera hardware abstraction module may perform image processing 1 on the original image to acquire image A. The image processing 1 is used to convert the image format of the original image into format 1. The format 1 is used to indicate the color information of each pixel in image A. In other embodiments of the present application, format 1 may also be referred to as the first image format. Image A may also be referred to as the fourth image.

[0068] For example, the format 1 may include any one of the ARGB format, the RGB format, and the RGBA format.

[0069] S404: The camera hardware abstraction module sends image A to the camera application.

[0070] For example, after acquiring image A, the camera hardware abstraction module may send image A to the camera application, so that the camera application can subsequently display a corresponding interface according to image A.

[0071] For example, refer to Figure 5 After receiving image A, the camera application can display the following Figure 5 The interface 501 shown in FIG. 5 includes a preview box. The preview box displays the preview Figure 1 , toggle display preview Figure 2 Among them, preview Figure 2 The image A may be obtained by compressing the image accordingly according to the preset size. Figure 2Corresponding to image A. In some other embodiments of the present application, interface 501 may also be referred to as a second shooting preview interface. Figure 2 It can also be called the first preview image.

[0072] S405: The camera application sends image A to the gallery application.

[0073] S406: The gallery application saves image A.

[0074] In the embodiment of the present application, through the processing of S405 and S406, the gallery application can obtain image A. After obtaining image A, the gallery application can save the image A. Thus, the electronic device can display image A through the gallery application later.

[0075] For example, continue to refer to Figure 5 , when the user wants to zoom in to see the preview Figure 2 When the preview is displayed, an operation 503 may be input on the interface 501. The operation 503 may be a preview Figure 2 Input operation. For example, the operation 503 may be a click operation.

[0076] refer to Figure 5 In response to the operation 503, the electronic device may switch the display interface 502. The interface 502 corresponds to the interface of the gallery application. The interface 502 includes the preview Figure 2 The corresponding image A.

[0077] In other embodiments of the present application, the interface 502 may also be referred to as a gallery interface.

[0078] S407 , the gallery application starts timer 1 .

[0079] In some embodiments of the present application, a timer 1 is configured in the gallery application. After acquiring image A, the gallery application may start the timer 1 so that the timer 1 starts timing. In other embodiments of the present application, the timer 1 may also be referred to as a first timer.

[0080] In some implementations, the maximum timing duration of the timer 1 is a preset duration.

[0081] S408: The gallery application determines whether the timing duration of timer 1 reaches a preset duration.

[0082] Exemplarily, after timer 1 is started, the gallery application may determine whether the timing duration of timer 1 reaches a preset duration.

[0083] As an implementation, the timing duration of timer 1 is less than the preset duration. In this implementation, the gallery application may repeatedly perform the process in S408.

[0084] As another implementation, the timing duration of timer 1 reaches a preset duration. In this implementation, the gallery application may jump to execute the process in S413.

[0085] S409 , the camera hardware abstraction module performs image processing 2 on the original image to generate image B.

[0086] It is understandable that due to the influence of ambient light, weather and other conditions, the resolution and clarity of the original image captured by the camera may be poor.

[0087] In an embodiment of the present application, after the camera hardware abstract module obtains the original image captured by the camera, it can also perform image processing 2 on the original image at the same time. Among them, the image processing 2 includes at least one of brightness adjustment, exposure adjustment, contrast adjustment, adding HDR display effect and beauty processing. In this way, the resolution and clarity of the original image can be improved. In other embodiments of the present application, image processing 2 can also be called image processing.

[0088] In this embodiment, after the camera hardware abstraction module performs image processing 2 on the original image, it can generate image B. In other embodiments of the present application, image B can also be called a sixth image.

[0089] In this application, in order to facilitate subsequent electronic devices to display and edit image B through applications, the image format of image B is configured as format 2. Format 2 includes one of the following: joint photographic experts group (JPEG) format, portable network graphics (PNG) format or high efficiency image file format (HEIF), etc.

[0090] In other embodiments of the present application, format 2 may also be referred to as a second image format.

[0091] It should be noted that, in the embodiment of the present application, the time length for the camera hardware abstract module to perform image processing 2 on the original image is longer than the time length for performing image processing 1 on the original image. Therefore, the time when the camera hardware abstract module generates image B is later than the time when it generates image A. After acquiring image B, the electronic device can continue to perform the processing in S409 to S411.

[0092] S410 , the camera hardware abstraction module sends the image B to the camera application.

[0093] S411 . The camera application sends image B to the gallery application.

[0094] S412: The gallery application saves image B.

[0095] S413: The gallery application deletes image A.

[0096] As an implementation, the gallery application can obtain image B before the timing duration of timer 1 reaches a preset duration. In this implementation, after obtaining image B, the gallery application deletes image A.

[0097] In the present application, after acquiring image B, the camera application and the gallery application can also display the latest captured image to the user based on image B.

[0098] As another implementation, the gallery application may execute a deletion operation on the image A when determining that the timing duration of the timer 1 reaches a preset duration.

[0099] It is understandable that in some examples, because the camera hardware abstraction module takes a long time to execute image processing 2, image processing 2 has not yet been completed when the timing duration of timer 1 reaches the preset duration. Accordingly, the camera hardware abstraction module has not generated image B.

[0100] In this example, according to the description in S413, the gallery application can execute the deletion process of image A when determining that the timing duration of timer 1 reaches the preset duration.

[0101] At this time, the electronic device does not store the image captured in response to operation 202. As a result, the electronic device cannot display the latest captured image, and the user cannot preview and view the latest captured image, which affects the user's shooting experience.

[0102] For example, refer to Figure 6 , taking the camera application as an example. When the electronic device determines that the timing duration of timer 1 reaches the preset duration, it executes deletion of image A. At this time, the electronic device has not yet acquired image B. In this scenario, after deleting image A, the electronic device can Figure 2 , switch display to preview Figure 1 . This preview Figure 1 Corresponding to the image captured by the electronic device before receiving operation 202.

[0103] In addition, electronic devices are unable to display the latest captured images to users through other applications (such as gallery applications, etc.).

[0104] To solve the above problems, an embodiment of the present application provides an image shooting method and an electronic device. Based on the method, the electronic device displays an interface 201. After receiving operation 1, the electronic device responds to operation 1 and obtains image 1. Operation 1 is used to instruct the electronic device to shoot. Image 1 is generated based on the original image captured by the camera and the image format is format 1. After the electronic device obtains image 1, it can display an image display interface according to image 1. The image display interface may include a shooting preview interface 2 or a gallery interface. The image display interface includes image 1. After the electronic device obtains image 1, it can also start timer 1. When the electronic device does not detect image 2 within a preset time, it switches image 1 in the image display interface to image 3. Image 3 is obtained based on image 1 and the image format is format 2, and image 2 is obtained by performing image processing on the original image and the image format is format 2. In this way, the electronic device can continuously obtain images captured in response to operation 1 and display the captured images to improve the user's shooting experience.

[0105] In other embodiments of the present application, image 1 may also be referred to as a first image, image 2 may also be referred to as a second image, and image 3 may also be referred to as a third image. The shooting preview interface 2 may also be referred to as a second shooting preview interface.

[0106] The technical solution provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings.

[0107] It should be noted that the solution provided in the embodiments of the present application can be applied to electronic devices.

[0108] The electronic device in the embodiments of the present application may be a mobile phone, a tablet computer, a desktop, a laptop, a handheld computer, a notebook computer, a vehicle-mounted device, an ultra-mobile personal computer (UMPC), a netbook, a cellular phone, a personal digital assistant (PDA), an augmented reality (AR) device, a virtual reality (VR) device, etc. The embodiments of the present application do not impose any special restrictions on the specific form of the electronic device.

[0109] As an implementation, the electronic device may have Figure 7 The structure of the electronic device 700 is shown.

[0110] like Figure 7As shown, the electronic device 700 may include a processor 710, an external memory interface 720, an internal memory 721, a universal serial bus (USB) connector 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a sensor module 780, a camera module 793, a display screen 794, etc.

[0111] It is to be understood that the structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic device 700. In other embodiments of the present application, the electronic device 700 may include more or fewer components than shown in the figure, or combine some components, or split some components, or arrange the components differently. The components shown in the figure may be implemented in hardware, software, or a combination of software and hardware.

[0112] The processor 710 may include one or more processing units, for example, the processor 710 may include an application processor (AP) [710A], a modem, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU), etc. Different processing units may be independent devices or integrated into one or more processors.

[0113] The processor 710 may also be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor 710 may be a cache memory. The memory may store instructions or data that have been used or are frequently used by the processor 710. If the processor 710 needs to use the instruction or data, it may be directly called from the memory. This avoids repeated access, reduces the waiting time of the processor 710, and thus improves the efficiency of the system.

[0114] The internal memory 721 can be used to store computer executable program codes, which include instructions. The internal memory 721 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc. The data storage area can store data created during the use of the electronic device 700 (such as audio data, a phone book, etc.), etc. In addition, the internal memory 721 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash storage (UFS), etc. The processor 710 executes various functional methods or data processing of the electronic device 700 by running instructions stored in the internal memory 721 and / or instructions stored in a memory provided in the processor.

[0115] The display screen 794 is used to display images, videos, etc. The display screen 794 includes a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), Miniled, MicroLed, Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device 700 may include one or more display screens 794.

[0116] The electronic device 700 can realize the camera function through the camera module 793, ISP, video codec, GPU, display screen 794, AP, NPU, etc.

[0117] The camera module 793 can be used to collect color image data and depth data of the photographed object. The ISP can be used to process the color image data collected by the camera module 793. For example, when taking a photo, the shutter is opened, and the light is transmitted to the camera photosensitive element through the lens. The light signal is converted into an electrical signal, and the camera photosensitive element transmits the electrical signal to the ISP for processing and converts it into an image visible to the naked eye. The ISP can also perform algorithm optimization on the noise, brightness, etc. of the image. The ISP can also optimize the exposure, color temperature and other parameters of the shooting scene. In some embodiments, the ISP can be set in the camera module 793.

[0118] In some embodiments, the camera module 793 may be composed of a color camera module and a 3D sensing module.

[0119] In some embodiments, the photosensitive element of the camera of the color camera module can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then transmits the electrical signal to the ISP to be converted into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format.

[0120] In other embodiments, the camera module 793 may also be composed of two or more cameras. The two or more cameras may include a color camera, which can be used to collect color image data of the photographed object. The two or more cameras may use stereo vision technology to collect depth data of the photographed object. Stereo vision technology is based on the principle of human eye parallax. Under natural light, two or more cameras are used to capture images of the same object from different angles, and then triangulation and other operations are performed to obtain the distance information between the electronic device 700 and the photographed object, that is, the depth information.

[0121] In some embodiments, the electronic device 700 may include one or more camera modules 793. Specifically, the electronic device 700 may include one front camera module 793 and one rear camera module 793. The front camera module 793 may generally be used to collect color image data and depth data of the photographer facing the display screen 794, and the rear camera module 793 may be used to collect color image data and depth data of the subject (such as a person, scenery, etc.) facing the photographer.

[0122] The electronic device involved in the embodiment of the present application may also have a layered architecture. The layered architecture includes several layers, each layer has a clear role and division of labor, and the layers communicate with each other through software interfaces.

[0123] For example, Figure 8 FIG. 1 shows a schematic diagram of the composition of an electronic device. Figure 8 As shown, the layered architecture in the electronic device is, from top to bottom, an application layer, an application framework layer, a system library, a hardware abstraction layer (HAL), a kernel layer, and a hardware layer.

[0124] The application layer can include a series of application packages.

[0125] like Figure 8 As shown, the application layer may include applications such as music, video, call, ringtone, alarm, Bluetooth, navigation, camera, gallery, etc. Of course, the application layer may also include other application packages, which are not limited in this application.

[0126] The camera application can provide users with functions such as taking photos and previewing images. The gallery application has the function of saving images, and provides users with functions such as viewing, sharing, and editing images.

[0127] The application framework layer provides an application programming interface (API) and a programming framework for the applications in the application layer. The application framework layer includes some predefined functions.

[0128] like Figure 8 As shown, the application framework layer may include a window manager, an activity manager, an input manager, a resource manager, a notification manager, a view system, and the like.

[0129] The window manager provides window management services (WMS). WMS can be used for window management, window animation management, surface management, and as a transfer station for the input system.

[0130] The Activity Manager can provide Activity Manager Service (AMS), which can be used to start, switch, and schedule system components (such as activities, services, content providers, and broadcast receivers) as well as manage and schedule application processes.

[0131] The input manager can provide input management services (IMS), which can be used to manage system input, such as touch screen input, key input, sensor input, etc. IMS takes events from input device nodes and distributes them to appropriate windows through interaction with WMS.

[0132] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0133] The notification manager enables applications to display notification information in the status bar. It can be used to convey notification-type messages and can disappear automatically after a short stay without user interaction. For example, the notification manager is used to notify download completion, message reminders, etc. The notification manager can also be a notification that appears in the system top status bar in the form of a chart or scroll bar text, such as notifications of applications running in the background, or a notification that appears on the screen in the form of a dialog window. For example, a text message is displayed in the status bar, a prompt sound is emitted, an electronic device vibrates, an indicator light flashes, etc.

[0134] The view system includes visual controls, such as controls for displaying text, controls for displaying images, etc. The view system can be used to build applications. A display interface can include one or more views. For example, a display interface including a text notification icon can include a view for displaying text and a view for displaying images.

[0135] The system library can include multiple functional modules, such as surface manager, media library, and media framework.

[0136] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications. The media framework supports playback and recording of a variety of commonly used audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as: MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0137] The hardware abstraction layer runs in user space, encapsulates the kernel layer driver, and provides a calling interface to the upper layer. The hardware abstraction layer includes at least the display module and the camera hardware abstraction module.

[0138] The camera hardware abstraction module is the core software framework of the camera. The camera hardware abstraction module is the abstraction and encapsulation of the camera, which can provide a unified access interface for upper-layer software (such as application layer or application framework layer, etc.), so that the upper-layer software can interact with the underlying camera through the access interface.

[0139] The kernel layer is the layer between hardware and software. The kernel layer includes at least the display driver and the camera driver.

[0140] Among them, the camera driver is the driver layer of the camera, which is mainly responsible for the interaction with the camera.

[0141] The hardware layer includes a camera, a display screen, and a memory, etc. In the embodiment of the present application, all components included in the hardware layer can correspond to Figure 7The components of the electronic device shown. The functions of the camera, display, and memory can be referred to Figure 7 The instructions in the article are not repeated here.

[0142] The following will describe in detail the image capture method provided in the embodiment of the present application in combination with the camera application, gallery application, camera hardware abstract module and camera in the above description.

[0143] Exemplary, reference Fig. 9 , is a schematic diagram of the module interaction flow of an image capturing method provided in an embodiment of the present application. Fig. 9 The solution shown enables the electronic device to obtain the image captured by the camera.

[0144] like Fig. 9 As shown, the program may include:

[0145] S901. The camera application sends a photo taking instruction 1 to the camera hardware abstraction module.

[0146] Exemplarily, when the camera application receives operation 1 input by the user, in response to operation 1, it can send a photographing instruction 1 to the camera hardware abstraction module. The operation 1 is used to instruct the electronic device to take a photo. The photographing instruction 1 is used to instruct image acquisition.

[0147] For example, the operation 1 can be Figure 2 Operation 202 is shown in FIG.

[0148] Correspondingly, the camera hardware abstraction module can receive the photo taking instruction 1.

[0149] S902: The camera hardware abstraction module sends a photo-taking request to the camera.

[0150] In some embodiments of the present application, after receiving the photo taking instruction 1, the camera hardware abstraction module can control the camera to collect images, so that the original image collected by the camera can be obtained later. The original image is obtained by converting the collected light signal into a digital signal by the camera.

[0151] As an example, after receiving the photographing instruction 1, the camera hardware abstraction module may send a photographing request to the camera, so that the camera performs image acquisition when receiving the photographing request.

[0152] The photo request may be sent by the camera hardware abstraction module to the camera through the camera driver. For example, the camera hardware abstraction module may first send the photo request to the camera driver. Correspondingly, after receiving the photo request, the camera driver may send the photo request to the camera.

[0153] Correspondingly, the camera can receive the photo taking request.

[0154] S903: The camera collects images and obtains original images.

[0155] In an embodiment of the present application, after receiving the photo request in S902, the camera can perform image acquisition to obtain an original image, wherein the original image is obtained by converting the optical signal acquired by the camera into a digital signal.

[0156] In this embodiment, after acquiring the original image, the camera may continue to execute the processing in S904.

[0157] S904: The camera sends the original image to the camera hardware abstraction module.

[0158] Exemplarily, after the camera acquires the original image through image acquisition, the original image may be sent to the camera hardware abstraction module, so that the camera hardware abstraction module can perform subsequent processing according to the original image.

[0159] S905 . The camera hardware abstraction module performs image processing 1 on the original image to generate image A.

[0160] In an embodiment of the present application, after acquiring the original image, the camera hardware abstraction module may perform image processing 1 on the original image. The image processing 1 is used to convert the image format of the original image into format 1. The format 1 is used to indicate the color information of each pixel in the image.

[0161] For example, the format 1 may include any one of ARGB, RGB or RGBA.

[0162] In this embodiment, after the camera hardware abstraction module performs image processing 1, it can generate image A. The image format of image A is format 1.

[0163] In addition, in an embodiment of the present application, the electronic device further includes an image format identifier and an image name. The image format identifier is used to indicate the image format used by the image. The image format identifier includes identifier 1. The identifier 1 is used to indicate format 1. The image name is used to identify the image.

[0164] According to the above description, the image A may be configured with a logo 1 indicating the format 1 and a name A. The name A is included in the image name.

[0165] S906 . The camera hardware abstraction module performs image processing 2 on the original image.

[0166] It is understandable that the image quality of the original image collected by the camera may be relatively low due to the influence of ambient light, weather, etc. The image quality may include resolution, clarity, and image distortion.

[0167] Therefore, in the embodiment of the present application, after acquiring the original image, the camera hardware abstraction module can also perform image processing 2 on the original image to improve the image quality of the original image. The image processing 2 includes at least one of brightness adjustment, exposure adjustment, contrast adjustment, adding HDR display effect and beauty processing.

[0168] It should be noted that in the embodiment of the present application, after the camera hardware abstract module obtains the original image captured by the camera, it simultaneously performs image processing 1 and image processing 2 on the original image. The time taken by the camera hardware abstract module to perform image processing 1 is shorter than the time taken to perform image processing 2.

[0169] S907 . The camera hardware abstraction module sends image A to the camera application.

[0170] Exemplarily, after the camera hardware abstraction module acquires the image A through S905 , the image A may be sent to the camera application.

[0171] In an embodiment of the present application, after receiving image A, the camera application can display to the user the image captured after receiving operation 1 based on image A.

[0172] For example, after receiving image A, the camera application can display the following information based on image A: Figure 5 The interface 501 shown in FIG. 5 includes a preview box. The preview box displays a preview Figure 2 . This preview Figure 2 Corresponds to image A.

[0173] In this example, the preview Figure 2 Or image A is included in image 1.

[0174] In some implementations, the preview Figure 2 The image A may be obtained by performing corresponding image compression on the image according to a preset size.

[0175] In this way, through interface 501 , the user can preview the image captured by the electronic device after receiving operation 1 .

[0176] S908: The camera application sends image A to the gallery application.

[0177] S909: The gallery application saves image A.

[0178] In the embodiment of the present application, through the processing of S908, the gallery application can obtain image A. After obtaining image A, the gallery application can save image A in the memory, so that the gallery application can subsequently display the image captured after receiving operation 1 to the user according to image A.

[0179] As a way, in Figure 5 In the embodiment, when the electronic device receives an operation 503 input by the user on the interface 501, it can respond to the operation 503 and display the interface 502. The interface 502 includes the preview Figure 2 The corresponding image is A. In some other embodiments of the present application, operation 503 may also be referred to as a first operation.

[0180] In this way, through interface 502 , the user can zoom in and view the image captured by the electronic device after receiving operation 1 .

[0181] Combined with the description in S905, since image processing 1 is only used to convert the image format of the original image into format 1, the electronic device can obtain image A more quickly and feedback the image captured when operation 1 is received to the user through image A.

[0182] S910 . The gallery application starts timer 1 .

[0183] In some embodiments of the present application, the electronic device is further configured with a timer 1. The maximum timing duration of the timer 1 is a preset duration. After the electronic device acquires the image A, the timer 1 can be started to count.

[0184] For example, timer 1 is configured in the gallery application. After receiving image A, the gallery application can start timer 1 to count.

[0185] S911. The gallery application determines whether the target image 1 is detected when the timing duration of the timer 1 reaches the preset duration.

[0186] In the embodiment of the present application, after the timer 1 is started, the gallery application can determine whether the target image 1 is detected when the timing duration of the timer 1 reaches the preset duration according to the name A and the identifier 1 configured in the image A. The image name corresponding to the target image 1 is name A, and the image format identifier is identifier 2.

[0187] As an implementation, the gallery application determines that the target image 1 is not detected during the process that the timing duration of the timer 1 reaches the preset duration. In this implementation, the gallery application can continue to execute the process in S912.

[0188] As another implementation, the gallery application determines that the target image 1 is detected when the timing duration of the timer 1 reaches the preset duration. In this implementation, the gallery application may jump to execute the process in S921.

[0189] S912. The gallery application sends encoding instruction 2 to the camera hardware abstraction module.

[0190] In an embodiment of the present application, when the gallery application determines that the timing duration of timer 1 reaches a preset duration, if the target image 1 is not detected, the encoding instruction 2 is sent to the camera hardware abstraction module. The encoding instruction 2 carries image A. In other embodiments of the present application, the encoding instruction 2 can also be referred to as the first encoding instruction.

[0191] It should be noted that in the above examples, the operations in S910 to S912 are all described by taking the image application as an example. In other embodiments of the present application, a timer 1 is configured in the camera application. After the camera application obtains the image A sent in S907, it can perform operations such as S910 to S912. When the camera application determines that the target image 1 is not detected during the timer 1 timing to the preset time, the encoding instruction 2 is sent to the camera hardware abstraction module.

[0192] Correspondingly, the camera hardware abstraction module can receive the encoding instruction 2.

[0193] S913 . The camera hardware abstraction module obtains image C by converting image A from format 1 to format 2.

[0194] In the embodiment of the present application, after receiving the encoding instruction 2, the camera hardware abstraction module can obtain the image C by converting the image format of the image A carried in the encoding instruction 2 from format 1 to format 2. The format 2 is different from the format 1.

[0195] In other embodiments of the present application, image C may also be referred to as a fifth image.

[0196] For example, the format 2 includes one of the following: JPEG, PNG or HEIF, etc.

[0197] The description of S913 and S914 is based on an example in which the electronic device obtains image C based on image A. In other embodiments of the present application, the electronic device may obtain image C based on the original image.

[0198] In this embodiment, the encoding instruction 2 carries the original image. After receiving the encoding instruction 2, the camera hardware abstraction module can convert the image format of the original image into format 2 to obtain image C.

[0199] In some embodiments of the present application, the image format identifier includes identifier 2. Identifier 2 is used to indicate format 2.

[0200] Similar to image A, image C is configured with a logo 1 indicating format 2 and a name B. Name B corresponds to name A.

[0201] For example, the name B may include the name A and the identifier 1.

[0202] S914. The camera hardware abstraction module sends image C to the camera application.

[0203] Exemplarily, after acquiring image C, the camera hardware abstraction module may send image C to the camera application.

[0204] In some embodiments of the present application, after receiving image C, the camera application can display to the user the image captured after receiving operation 1 based on image C.

[0205] For example, refer to Fig.10 Based on the description in S907, if the target image 1 is not detected within the preset time, the camera application can change the preview image in the interface 501 to Figure 2 Switch to preview Figure 3 Among them, preview Figure 3 With preview Figure 2 The content displayed is the same as the preview Figure 3 Corresponds to image C.

[0206] In this example, the preview Figure 3 Or image C is included in image 3.

[0207] In some implementations, the preview Figure 3 The image C may be obtained by performing corresponding image compression according to a preset size.

[0208] In other embodiments of the present application, the preview Figure 3 It can also be called the third preview image.

[0209] In this way, according to image C, the electronic device can continue to display the image captured after receiving operation 1 when the timing duration of timer 1 reaches the preset duration and the target image 1 is not acquired.

[0210] S915. The camera application sends image C to the gallery application.

[0211] S916: After acquiring image C, the gallery application replaces image A.

[0212] In an embodiment of the present application, after acquiring the image C, the gallery application may save the image C in the memory, so that the gallery application can subsequently display the image captured after receiving the operation 1 to the user according to the image C.

[0213] Exemplary, reference Fig.11 Based on the description in S909, after acquiring image C, the gallery application can switch the image A in interface 502 to be displayed with the preview image. Figure 3 The corresponding image C. The image C has the same content as the image A in the interface 502 .

[0214] In this example, the gallery application may display image C under the user's instruction. The gallery application may display image C under the user's instruction in a similar manner to display image A. For details, please refer to Figure 5 The relevant instructions are not repeated here.

[0215] In some other embodiments of the present application, after acquiring image C, the gallery application may also delete image A.

[0216] Exemplarily, before deleting image A, the gallery application can search for target image 2 in the gallery application according to name B and identifier 2 configured in image C. The image name of the target image 2 is name A corresponding to name B, and the image format identifier of the target image 2 is identifier 1.

[0217] In combination with the description in the above S905, the target image 2 is image A. After finding image A, the gallery application may delete image A.

[0218] In this embodiment, after deleting image A, the gallery application can switch the image A in the interface 502 to be displayed in the same manner as the preview image. Figure 3 Alternatively, the gallery application can switch the image A in the interface 502 to be displayed as the image corresponding to the preview. Figure 3 After the corresponding image C, delete image A.

[0219] Thus, through the processing in S912 to S916, when the target image 1 is not detected within the preset time, the electronic device can obtain the image C and display the image C and the preview corresponding to the image C. Figure 3 . This allows the electronic device to continue to display the image captured after receiving operation 1 to the user.

[0220] In addition, since the image format of image C is format 2, the electronic device can display and edit image C through other application programs that support image processing functions.

[0221] S917 . After image processing 2 is completed, the camera hardware abstraction module generates image B.

[0222] In an embodiment of the present application, the camera hardware abstraction module can generate image B by performing image processing 2 on the original image. The image processing 2 includes at least one of brightness adjustment, exposure adjustment, contrast adjustment, adding HDR display effect and beauty processing.

[0223] Combination Fig. 9 As described in , the image format used by image B is format 2. The format 2 includes one of the following: JPEG, PNG, or HEIF, etc.

[0224] In combination with the above description, image B may be configured with an identifier 2 indicating format 2.

[0225] In addition, in some implementations, since both image A and image B are generated based on the original image, image A and image B may also be configured with the same image name.

[0226] For example, name A is also placed in image B.

[0227] In this application, the target image 1 is image B.

[0228] The following takes the case where the camera hardware abstract module generates image B after the timing duration of timer 1 reaches a preset duration as an example to continue to explain the processing in S918 to S920.

[0229] S918. The camera hardware abstraction module sends image B to the camera application.

[0230] Exemplarily, after acquiring image B, the camera hardware abstraction module may send image B to the camera application.

[0231] In some embodiments of the present application, after receiving image B, the camera application can display to the user the image captured after receiving operation 1 based on image B.

[0232] For example, continue to refer to Fig.10 Based on the description in S914, after receiving image B, the camera application changes the preview in interface 501 to Figure 3 Toggle display as preview Figure 4 . Preview Figure 4 With preview Figure 2 The content displayed is the same as the preview Figure 4 Corresponds to image B.

[0233] In this example, the preview Figure 4 Or image B is included in image 2.

[0234] In some implementations, the preview Figure 4 The image B may be obtained by performing corresponding image compression according to a preset size.

[0235] In other embodiments of the present application, the preview Figure 3 It can also be called the second image.

[0236] S919: The camera application sends image B to the gallery application.

[0237] S920: After acquiring image B, the gallery application replaces image C.

[0238] In an embodiment of the present application, after acquiring image B, the gallery application may save image B in a memory, so that the gallery application can subsequently display images captured after receiving operation 1 to the user based on image B.

[0239] Exemplary, reference Fig.11 Based on the description in S916, after acquiring image B, the gallery application can switch the image C in interface 502 to be displayed with the preview image. Figure 4 The corresponding image B. The image B has the same content as the image A in the interface 502 .

[0240] In this example, the gallery application can display image B under the user's instruction. The gallery application displays image B under the user's instruction in a similar manner to that of displaying image A. For details, please refer to Figure 5 The relevant instructions are not repeated here.

[0241] In other embodiments of the present application, after acquiring image B, the gallery application may also delete image C based on the timing duration of timer 1 reaching a preset duration.

[0242] Exemplarily, before deleting image C, the gallery application can search for target image 3 in the gallery application according to name A and identifier 2 configured in image B. The image name of the target image 3 is name B corresponding to name A, and the image format identifier of the target image 3 is identifier 2.

[0243] In combination with the description in S913 above, the target image 3 is image C. After finding image C, the gallery application may delete image C.

[0244] For example, after acquiring image B, the gallery application deletes image C according to whether the electronic device is in a screen-off state or a screen-off charging state.

[0245] For another example, after acquiring image B, the gallery application creates and executes a delay thread of duration T1 according to whether the electronic device is in a screen-off state or a screen-off charging state. After the delay thread of duration T1 is executed, the gallery application can delete image C.

[0246] In this embodiment, after deleting image C, the gallery application can switch the image C in the interface 502 to be displayed as a preview image. Figure 4 Alternatively, the gallery application can switch the image C in the interface 502 to be displayed as the image B corresponding to the preview image. Figure 4 After the corresponding image B, delete image C.

[0247] In the description of S918 to S920, the electronic device does not obtain image B when the timing duration of timer 1 reaches the preset duration. In other embodiments of the present application, the electronic device obtains image B when the timing duration of timer 1 reaches the preset duration.

[0248] In this embodiment, the electronic device does not need to perform the processes in S912 to S916. The electronic device acquires image A and image B through the processes in S901 to S911 and S917 to S919.

[0249] After the camera application obtains image B through the operation of S918, it can display the image captured after receiving operation 1 to the user based on image B.

[0250] Exemplary, reference Fig.12 After receiving image B, the camera application changes the preview in interface 501 according to image B. Figure 2 Toggle display as preview Figure 4 . Preview Figure 4 With preview Figure 2 The content displayed is the same as the preview Figure 4 Corresponds to image B.

[0251] Correspondingly, after the gallery application obtains the image B through the operation of S919, it can perform the processing in S921.

[0252] S921. After acquiring image B, the gallery application replaces image A.

[0253] In the embodiment of the present application, after acquiring the image B, the gallery application may store the image B in the memory. In addition, the gallery application may also replace the image A based on the timing duration of the timer 1 being less than the preset duration.

[0254] Exemplary, reference Fig.13, when the target image 1 (ie, image B) is detected within the preset time, the gallery application can switch the image A in the interface 502 to be displayed in the same manner as the preview Figure 4 The corresponding image B.

[0255] In other embodiments of the present application, after acquiring image B, the gallery application may also delete image A based on the timing duration of timer 1 reaching a preset duration.

[0256] As an implementation manner, before deleting image A, the gallery application may search for a target image 2 with the image name being name A and the image format identifier being identifier 1 in the gallery application according to name A and identifier 2 configured in image B.

[0257] In combination with the description in the above S905, the target image 2 is image A. After finding image A, the gallery application may delete image A.

[0258] Among them, after the gallery application obtains image B, the implementation method of deleting image A is similar to that of deleting image C. For specific content, please refer to the description in S920, which will not be repeated here.

[0259] In this embodiment, after deleting image A, the gallery application can switch the image A in the interface 502 to be displayed in the same manner as the preview image. Figure 4 Alternatively, the gallery application can switch the image A in the interface 502 to be displayed as the image B corresponding to the preview. Figure 4 After the corresponding image B, delete image A.

[0260] based on Fig. 9 In the scheme, when the electronic device receives operation 1 input by the user, through the processing from S901 to S909, the electronic device can obtain image A by performing image processing 1 on the original image collected by the camera. The electronic device can display the image captured after receiving operation 1 to the user based on image A.

[0261] When the timing duration of timer 1 reaches the preset duration, if the electronic device does not detect the target image 1 (i.e., image B), according to the instructions in S912 to S915, the electronic device can obtain image C based on image A. Then, the electronic device can continue to display the image captured after receiving operation 1 to the user based on image C.

[0262] In the present application, the electronic device performs image processing 2 on the original image while performing image processing 1. After the electronic device completes image processing 2, it can obtain image B. Therefore, the electronic device can continue to display the image captured after receiving operation 1 to the user based on image B.

[0263] In addition, it can be understood that image B is generated through image processing 2. Compared with image A and image C, image B has better resolution and clarity than image A and image C. Therefore, the electronic device can not only acquire and display the latest captured image, but also improve the image quality of the image, such as improving the resolution, clarity and image distortion of the image, so as to further improve the user's shooting experience.

[0264] The above mainly introduces the solution provided by the embodiment of the present application from the perspective of each functional module. Those skilled in the art should easily realize that, in combination with the units and algorithm steps of each example described in the embodiment disclosed herein, the present application can be implemented in the form of hardware or a combination of hardware and computer software. Whether a function is executed in the form of hardware or computer software driving hardware depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present application.

[0265] The above integrated modules can be implemented in the form of hardware or software functional modules. It should be noted that the division of modules in the embodiments of the present application is schematic and is only a logical function division. There may be other division methods in actual implementation.

[0266] For example, Fig.14 FIG. 1 is a schematic diagram showing the composition of an electronic device 1400. Fig.14 As shown, the electronic device 1400 may include: a processor 1401, a memory 1402 and a display screen 1403. The processor 1401 may correspond to Figure 7 The application processor 710A in the embodiment of the present invention. The memory 1402 is used to store computer execution instructions, and the display screen 1403 is used to display images. The memory 1402 and the display screen 1403 are respectively coupled to the processor 1401. In addition, the electronic device also includes a camera. The camera is used to perform image acquisition. The camera is coupled to the processor 1401. In some embodiments, when the processor 1401 executes the instructions stored in the memory 1402, the electronic device 1400 can execute any of the methods shown in the above embodiments.

[0267] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0268] Fig.15FIG. 1 is a schematic diagram showing the composition of a chip system 1500. The chip system 1500 may include: a processor 1501 and a communication interface 1502, which are used to support related devices to implement the functions involved in the above embodiments. The processor 1501 may correspond to Figure 7 In one possible design, the chip system also includes a memory for storing program instructions and data necessary for the electronic device. The chip system may be composed of a chip, or may include a chip and other discrete devices. It should be noted that in some implementations of the present application, the communication interface 1502 may also be referred to as an interface circuit.

[0269] It should be noted that all relevant contents of each step involved in the above method embodiment can be referred to the functional description of the corresponding functional module and will not be repeated here.

[0270] The functions or actions or operations or steps in the above embodiments can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using a software program, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that can be accessed by a computer or may include one or more servers, data centers and other data storage devices that can be integrated with the medium. The available medium may be a magnetic medium (eg, a floppy disk, a hard disk, a magnetic tape), an optical medium (eg, a DVD), or a semiconductor medium (eg, a solid state disk (SSD)).

[0271] Although the present application has been described in conjunction with specific features and embodiments thereof, it is obvious that various modifications and combinations may be made thereto without departing from the scope of the present application. Accordingly, this specification and the drawings are merely exemplary illustrations of the present application as defined by the appended claims, and are deemed to have covered any and all modifications, variations, combinations or equivalents within the scope of the present application. Obviously, a person skilled in the art may make various modifications and variations to the present application without departing from the scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. An image capturing method, characterized in that: The method is applied to an electronic device, wherein the electronic device is equipped with a camera; the method comprises: Display the first shooting preview interface; In response to a photographing operation, collecting an original image; displaying an image display interface including a first image, wherein the image display interface includes a second shooting preview interface or a gallery interface; the first image is obtained based on the original image and is in a first image format; If no second image is detected within a preset time period, the first image on the image display interface is switched to a third image; the second image is obtained by performing image processing on the original image, and the second image is in a second image format; the third image is obtained based on the first image, and the third image is in the second image format; the first image format is different from the second image format.

2. The method according to claim 1, characterized in that The third image has a different image name from the first image; the second image has the same image name as the first image.

3. The method according to claim 1 or 2, characterized in that: After switching the first image on the image display interface to a third image, the method further includes: When the preset time period is exceeded and the second image is detected, the third image on the image display interface is switched to the second image.

4. The method according to claim 1 or 2, characterized in that: The method further comprises: When the second image is detected within the preset time period, the first image on the image display interface is replaced with the second image.

5. The method according to claim 3, characterized in that: Before displaying the image display interface, the method further includes: acquiring the first image; The acquiring the first image comprises: The image format of the original image is converted into the first image format to obtain a fourth image, and the first image is the fourth image.

6. The method according to claim 3, characterized in that Before displaying the image display interface, the method further includes: Converting the image format of the original image into the first image format to obtain a fourth image; The fourth image is compressed according to a preset size to obtain a first preview image, and the first image is the first preview image.

7. The method according to claim 6, characterized in that The image display interface includes: A second shooting preview interface is displayed, where the second shooting preview interface includes the first preview image.

8. The method according to claim 5, characterized in that Before switching the first image on the image display interface to a third image, the method further includes: Acquire a fifth image by converting the fourth image from the first image format to the second image format; compressing the fifth image according to a preset size to obtain a third preview image; When the image display interface is the gallery interface, the third image is the fifth image; When the image display interface is the second shooting preview interface, the third image is the third preview image.

9. The method according to claim 7, characterized in that: Before switching the third image on the image display interface to the second image, the method further includes: Acquire the second image; the acquiring the second image comprises: Performing the image processing on the original image; after the image processing is completed, obtaining a sixth image; Compressing the sixth image according to the preset size to obtain a second preview image; When the image display interface is the gallery interface, the second image is the sixth image; When the image display interface is the second shooting preview interface, the second image is the second preview image.

10. The method according to claim 9, characterized in that After acquiring the second image, the method further includes: After the electronic device is in a screen-off state, the third image is deleted.

11. The method according to claim 8, characterized in that The electronic device is configured with a camera hardware abstraction module; Before acquiring the fifth image by converting the fourth image from the first image format to the second image format, the method further includes: Sending a first encoding instruction to the camera hardware abstraction module; the first encoding instruction carries the fourth image; The step of converting the fourth image from the first image format to the second image format to obtain the fifth image includes: When the first encoding instruction is received, the fourth image carried in the first encoding instruction is converted from the first image format to the second image format through the camera hardware abstraction module to obtain the fifth image.

12. The method according to claim 11, characterized in that The electronic device is further configured with a gallery application; the gallery application is configured with a first timer; after acquiring the first image, the method further includes: Starting the first timer through the gallery application; The sending a first encoding instruction to the camera hardware abstraction module includes: When it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, the first encoding instruction is sent to the camera hardware abstraction module through the gallery application.

13. The method according to claim 11, characterized in that The electronic device is further configured with a camera application; the camera application is configured with a first timer; after acquiring the first image, the method further includes: starting the first timer by the camera application; The sending a first encoding instruction to the camera hardware abstraction module includes: When it is determined that the timing duration of the first timer reaches the preset duration and the second image is not detected, the first encoding instruction is sent to the camera hardware abstraction module through the camera application.

14. An electronic device, characterized in that: The electronic device comprises: a camera, a display screen, a memory and one or more processors; the camera, the display screen and the memory are respectively coupled to the processor; The memory is used to store computer program codes, and the computer program codes include computer instructions; when the computer instructions are executed by the processor, the electronic device executes the method as described in any one of claims 1 to 13.

15. A chip system, characterized in that: The chip system includes a processor and a communication interface; the processor is used to call and run a computer program stored in a storage medium from the storage medium to execute the method as described in any one of claims 1-13.

16. A computer-readable storage medium having computer instructions stored thereon, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.

17. A computer program product, comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method described in any one of claims 1 to 13 are implemented.