Shooting method and electronic equipment

By classifying and optimizing the captured images and image processing models, the problem of insufficient shooting modes for electronic devices in different scenarios has been solved, thereby improving photo quality and user experience.

CN121815067APending Publication Date: 2026-04-07HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2026-04-07

AI Technical Summary

Technical Problem

Existing electronic device shooting modes cannot meet users' shooting needs in diverse environments and scenarios, resulting in a lack of improvement in photo quality.

Method used

By classifying and segmenting the captured images, identifying different scene information, and providing refined shooting strategies, including speed-level, direction-level, detail-level, frequency-domain-level, structural-level, and aesthetic-level parameters, image quality is optimized in conjunction with image processing models.

Benefits of technology

It improves the photo quality of electronic devices in different scenarios, meets the diverse shooting needs of users, and provides greater shooting flexibility and image display flexibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121815067A_ABST
    Figure CN121815067A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a shooting method and electronic equipment. The method comprises the following steps: acquiring an initial image of a to-be-shot picture through a camera device of the electronic equipment; the electronic equipment can determine target scene information of the to-be-shot picture based on the initial image; the target scene information can comprise first-level scene information and second-level scene information, the first-level scene information can indicate the scene type of the to-be-shot picture, and the second-level scene information can indicate the coarseness type of a to-be-shot object contained in the to-be-shot picture; determining a shooting strategy corresponding to the to-be-shot picture based on the target scene information; the electronic equipment can obtain a target image of the to-be-shot picture according to the shooting strategy; and finally, the target image can be displayed in a shooting interface of the electronic equipment. By adopting the method, the quality of the picture shot by the electronic equipment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of terminal, and in particular, to a photographing method and an electronic device. BACKGROUND

[0002] With the rapid development of terminal technology, the photographing function of electronic devices (such as smart phones) is increasingly powerful. At present, electronic devices support multiple photographing modes, such as portrait mode, night scene mode, landscape mode, and the like. Users can select appropriate photographing modes for photographing in different scenes. Each photographing mode has camera parameters such as focal length, light measurement method, aperture size, and white balance pre-set to assist users in improving the quality of photographed photos. However, the environment and scene in which the user actually stays are different, and the photos obtained by using the current photographing modes have gradually failed to meet the user's photographing requirements. Therefore, how to improve the quality of photos taken by electronic devices to adapt to various scenes is a technical problem worthy of study. SUMMARY

[0003] Embodiments of the present application provide a photographing method and an electronic device, which can more finely identify different photographing scenes, thereby providing photographing strategies accordingly, and are beneficial to improving the quality of photos taken by electronic devices.

[0004] In a first aspect, the present application provides a photographing method, which can include: collecting, by a camera of an electronic device, an initial image of a to-be-photographed picture; determining target scene information corresponding to the to-be-photographed picture based on the initial image; the target scene information includes first-level scene information and second-level scene information; the first-level scene information indicates a scene type of the to-be-photographed picture, and the second-level scene information indicates a coarse-grained type of a to-be-photographed object contained in the to-be-photographed picture under the scene type; determining a photographing strategy corresponding to the to-be-photographed picture based on the target scene information; the photographing strategy indicates a photographing parameter corresponding to the to-be-photographed picture and / or an image processing model corresponding to the to-be-photographed picture; obtaining a target image of the to-be-photographed picture according to the photographing strategy; and displaying the target image on a photographing interface of the electronic device.

[0005] In the above embodiment, by hierarchically dividing the scene information corresponding to the photographed picture, different photographing scenes can be more finely identified. Compared with the current way of roughly dividing photographing modes and then processing all scenes according to the preset parameters under the photographing modes, the present application can finely divide the photographing scenes and provide photographing strategies accordingly, which is beneficial to improving the quality of photos taken by electronic devices.

[0006] In a possible implementation manner of the first aspect, the target scene information further includes third-level scene information, the third-level scene information indicating a fine-grained type of the to-be-photographed object under a coarse-grained type; and the determining the target hierarchical parameter corresponding to the to-be-photographed picture based on the target scene information includes: outputting a shooting prompt option on a shooting interface of the electronic device; the shooting prompt option is used to prompt whether to adopt a professional shooting mode; and in response to detecting a confirmation operation on the shooting prompt option, determining the target hierarchical parameter corresponding to the to-be-photographed picture based on the target scene information. In this technical solution, the shooting prompt option is outputted, so as to facilitate the user to flexibly select the shooting mode and meet the shooting demand of the user.

[0007] In a possible implementation manner of the first aspect, the target scene information further includes third-level scene information, the third-level scene information indicating a fine-grained type of the to-be-photographed object under a coarse-grained type; and the determining the target hierarchical parameter corresponding to the to-be-photographed picture based on the target scene information includes: outputting a shooting prompt option on a shooting interface of the electronic device; the shooting prompt option is used to prompt whether to adopt a professional shooting mode; and in response to detecting a confirmation operation on the shooting prompt option, determining the target hierarchical parameter corresponding to the to-be-photographed picture based on the target scene information. In this technical solution, the shooting prompt option is outputted, so as to facilitate the user to flexibly select the shooting mode and meet the shooting demand of the user.

[0008] In a possible implementation manner of the first aspect, the determining the target hierarchical parameter corresponding to the to-be-photographed picture based on the target scene information in response to the confirmation operation on the shooting prompt option includes: in response to detecting the confirmation operation on the shooting prompt option, acquiring the target hierarchical parameter corresponding to the to-be-photographed picture from a preset hierarchical knowledge base based on the target scene information. In this technical solution, the preset knowledge base can store the corresponding relationship between different scene information and different hierarchical parameters, which is beneficial to improving the electronic device to more efficiently determine the target hierarchical parameter.

[0009] In a possible implementation manner of the first aspect, the method further includes: displaying the target hierarchical parameter corresponding to the to-be-photographed picture on a shooting interface of the electronic device. In this way, the user can more intuitively understand the characteristics of the to-be-photographed object included in the to-be-photographed picture.

[0010] With reference to the first aspect, in a possible implementation manner, the target grading parameter corresponding to the to-be-shot picture is determined based on the target scene information in response to the detection of the confirmation operation on the shooting prompt option, including: in response to the detection of the confirmation operation on the shooting prompt option, a grading parameter setting option is output on the shooting interface of the electronic device based on the target scene information; and in response to the detection of a setting completion operation on the grading parameter setting option, the target grading parameter corresponding to the to-be-shot picture is determined based on an input parameter of the grading parameter setting option. In this technical solution, the electronic device can facilitate the user to manually set the target grading parameter by providing the grading parameter setting option, which is conducive to improving the flexibility of the electronic device in determining the target grading parameter.

[0011] With reference to the first aspect, in a possible implementation manner, the shooting strategy indicates a shooting parameter corresponding to the to-be-shot picture and an image processing model corresponding to the to-be-shot picture, and the target image of the to-be-shot picture is acquired according to the shooting strategy, including: an intermediate image of the to-be-shot picture is collected by the camera device according to the shooting parameter; and the intermediate image is processed by calling the image processing model to obtain the target image of the to-be-shot picture. It can be seen that the target image is acquired in combination with the shooting parameter and the image processing model, which is conducive to more comprehensively improving the image quality.

[0012] With reference to the first aspect, in a possible implementation manner, the target image is displayed on the shooting interface of the electronic device, including: the target image is displayed on a shooting preview area of the shooting interface of the electronic device; and / or, a thumbnail image of the target image is displayed on a gallery preview area of the shooting interface of the electronic device. In this technical solution, the target image can be a preview image displayed in the camera application, or an image stored in the gallery after the detection of the trigger operation of the user on the shutter control. In this way, it is conducive to improving the flexibility of the electronic device in displaying the target image.

[0013] In a second aspect, the present application provides an electronic device, comprising: one or more processors, a display screen and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code comprises computer instructions, the one or more processors invoke the computer instructions to enable the electronic device to perform: collecting an initial image of a to-be-shot picture through a camera of the electronic device; determining target scene information corresponding to the to-be-shot picture based on the initial image; the target scene information comprises primary scene information and secondary scene information; the primary scene information indicates a scene type of the to-be-shot picture, and the secondary scene information indicates a coarse-grained type of a to-be-shot object contained in the to-be-shot picture under the scene type; determining a shooting strategy corresponding to the to-be-shot picture based on the target scene information; the shooting strategy indicates a shooting parameter corresponding to the to-be-shot picture and / or an image processing model corresponding to the to-be-shot picture; obtaining a target image of the to-be-shot picture according to the shooting strategy; and displaying the target image on a shooting interface of the electronic device.

[0014] In a possible manner in combination with the second aspect, the target scene information further comprises tertiary scene information, the tertiary scene information indicating a fine-grained type of the to-be-shot object under the coarse-grained type; the one or more processors invoke the computer instructions to enable the electronic device to perform: outputting a shooting prompt option on the shooting interface of the electronic device; the shooting prompt option is used to prompt whether to adopt a professional shooting mode; in response to detecting a confirmation operation on the shooting prompt option, determining a target hierarchical parameter corresponding to the to-be-shot picture based on the target scene information.

[0015] In a possible manner in combination with the second aspect, the one or more processors invoke the computer instructions to enable the electronic device to perform: in response to detecting a confirmation operation on the shooting prompt option, acquiring the target hierarchical parameter corresponding to the to-be-shot picture from a preset hierarchical knowledge base based on the target scene information.

[0016] In a possible manner in combination with the second aspect, the one or more processors invoke the computer instructions to enable the electronic device to perform: displaying the target hierarchical parameter corresponding to the to-be-shot picture on the shooting interface of the electronic device.

[0017] In a possible manner in combination with the second aspect, the one or more processors invoke the computer instructions to enable the electronic device to perform: in response to detecting a confirmation operation on the shooting prompt option, outputting a hierarchical parameter setting option on the shooting interface of the electronic device based on the target scene information; in response to detecting a setting completion operation on the hierarchical parameter setting option, determining the target hierarchical parameter corresponding to the to-be-shot picture based on an input parameter of the hierarchical parameter setting option.

[0018] With reference to the second aspect, in a possible implementation, the shooting strategy indicates a shooting parameter corresponding to the to-be-shot picture and an image processing model corresponding to the to-be-shot picture, and the one or more processors invoke the computer instructions to cause the electronic device to perform: acquiring, by the camera, an intermediate image of the to-be-shot picture according to the shooting parameter; and invoking the image processing model to process the intermediate image to obtain a target image of the to-be-shot picture.

[0019] With reference to the second aspect, in a possible implementation, the one or more processors invoke the computer instructions to cause the electronic device to perform: displaying the target image in a shooting preview area of a shooting interface of the electronic device; and / or, displaying a thumbnail image of the target image in a gallery preview area of the shooting interface of the electronic device.

[0020] In a third aspect, the present application provides a computer readable storage medium, which stores a computer program. When the computer program is executed by a processor, the method according to the first aspect is implemented.

[0021] In a fourth aspect, the present application provides a chip system coupled with a memory. The chip system is configured to read and execute a computer program stored in the memory, so as to implement the method according to the first aspect.

[0022] In a fifth aspect, the present application provides a computer program product containing instructions. When the computer program product is run on an electronic device, the electronic device is caused to perform the method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0023] Figure 1 A hardware structure schematic diagram of an electronic device provided by an embodiment of the present application;

[0024] Figure 2 A software structure schematic diagram of an electronic device provided by an embodiment of the present application;

[0025] Figure 3 A schematic diagram of an application scenario provided by an embodiment of the present application;

[0026] Figure 4 A flowchart of a shooting method provided by an embodiment of the present application;

[0027] Figure 5 A shooting interface schematic diagram of an electronic device provided by an embodiment of the present application;

[0028] Figure 6 Another shooting interface schematic diagram provided by an embodiment of the present application;

[0029] Figure 7 Another flowchart of a shooting method provided by an embodiment of the present application;

[0030] Figure 8 A shooting method under a stage scene provided by an embodiment of the present application is shown in the following schematic diagram.

[0031] Figure 9 A shooting method under an animal scene provided by an embodiment of the present application is shown in the following schematic diagram. DETAILED DESCRIPTION

[0032] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.

[0033] In the embodiments of the present application, the terms “one embodiment” or “some embodiments” etc. mean that the specific features, structures or characteristics described in connection with the embodiment are included in one or more embodiments of the present application. Therefore, the statements “in one embodiment”, “in some embodiments”, “in other some embodiments”, “in further some embodiments” etc. appearing in different places in the embodiments of the present application do not necessarily all refer to the same embodiment, but mean “one or more but not all embodiments”, unless otherwise specifically emphasized. The terms “first”, “second”, “third” etc. are used to distinguish different objects, and are not used to describe a specific sequence. In addition, the terms “include” and “have” and any variations thereof are intended to cover non-exclusive inclusion. For example, a series of steps or units are included, or optionally, other steps or units not listed are also included, or optionally, other steps or units inherent to the processes, methods, products or equipment are also included.

[0034] In the embodiments of the present application, the words “exemplary”, “such as”, or “for example” are used to mean serving as an example, instance or illustration. Any embodiment or design solution described as “exemplary”, “such as” or “for example” in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design solutions. Rather, the words “exemplary”, “such as” or “for example” are used in the specific manner to present the relevant concept in a concrete way.

[0035] In addition, "at least one" means one or more, "multiple" means two or more. "And / or" describes the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent: A exists alone, A and B exist together, and B exists alone, where A and B can be singular or plural. The character " / " generally represents that the associated objects before and after are in an "or" relationship. "At least one of the following" or similar expressions means any combination of these items, including any combination of single or multiple items. For example, at least one of a, b and c, which can represent: a, or b, or c, or a and b, or a and c, or b and c, or a, b and c, where a, b, c can be single or multiple.

[0036] With the rapid development of terminal technology, the photographing function of electronic devices (such as smart phones) is increasingly powerful, and the user's camera needs are also increasing day by day. Among them, the quality of the photos taken by the electronic device is closely related to the setting parameters of the camera (such as focal length, light measurement method, aperture size, white balance, etc. Parameters). In order to facilitate users to take high-quality photos, the current electronic device supports multiple shooting modes (such as portrait mode, night scene mode, landscape mode, etc.), and each shooting mode is pre-set with camera parameters. In this way, users can choose different shooting modes for shooting in different scenes. However, due to the fact that the actual environment and scene of the user are often different, the photos taken according to this rough division of shooting mode gradually cannot meet the user's needs.

[0037] Based on this, the embodiments of the present application provide a shooting method and an electronic device, which can more finely identify different shooting scenes, thereby providing shooting strategies accordingly, which is conducive to improving the quality of the photos taken by the electronic device.

[0038] The photographing method provided in the embodiments of the present application can be applied to an electronic device with a photographing function. The electronic device can be a mobile phone, a tablet computer, a notebook computer, a palm computer, a mobile internet device (MID), a wearable device, a virtual reality (VR) device, an augmented reality (AR) device, a wireless terminal in industrial control, a wireless terminal in self driving, a wireless terminal in remote medical surgery, a wireless terminal in smart grid, a wireless terminal in transportation safety, a wireless terminal in smart city, a wireless terminal in smart home, a personal digital assistant (PDA), and the like, and the embodiments of the present application are not limited thereto.

[0039] The hardware structure of the electronic device in the embodiments of the present application will be introduced first.

[0040] Please refer to Figure 1 , Figure 1 The hardware structure of the electronic device provided in the embodiments of the present application is shown in the figure.

[0041] As shown in the figure, Figure 1 The electronic device can include a processor 110, an external memory interface 120, an internal memory 121, a universal serial bus (USB) interface 130, a charge management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a loudspeaker 170A, a receiver 170B, a microphone 170C, a headset interface 170D, a sensor module 180, a key 190, a motor 191, an indicator 192, a camera 193, a display screen 194, and a subscriber identification module (SIM) card interface 195, and the like. The sensor module 180 can include a pressure sensor 180A, a gyroscope sensor 180B, a barometric pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.

[0042] The processor 110 can include one or more processing units, for example: the processor 110 can include an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processing unit (NPU), etc. Among them, different processing units can be independent devices, or can be integrated in one or more processors. In the embodiments of the present application, the processor 110 can be used to call an image processing model to process the intermediate image of the to-be-shot picture, and then obtain the target image.

[0043] The NPU is a neural network computing processor, which can quickly process input information by drawing on the structure of a biological neural network, for example, by drawing on the transmission mode between human brain neurons, and can also constantly self-learn. Through the NPU, intelligent cognition and other applications of electronic devices can be realized, such as image recognition, face recognition, voice recognition, text understanding, etc.

[0044] The memory in the processor 110 can also be configured to store instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory can store instructions or data that have just been used or are repeatedly used by the processor 110. If the processor 110 needs to use the instructions or data again, it can directly call from the memory. This avoids repeated access and reduces the waiting time of the processor 110, thereby improving the efficiency of the system.

[0045] The internal memory 121 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 110 executes various functional applications and data processing of the electronic device by running the instructions stored in the internal memory 121. The internal memory 121 can include a program storage area and a data storage area. The program storage area can store an operating system, codes of application programs (such as a camera application program), etc. The data storage area can store data created during use of the electronic device (such as images, videos, etc. collected by the camera application program), etc.

[0046] Antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example, antenna 1 can be multiplexed as a diversity antenna for wireless local area networks. In some other embodiments, the antennas can be used in combination with a tuning switch.

[0047] The modem processor can include a modulator and a demodulator. The modulator is used to modulate a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used to demodulate a received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then transmits the demodulated low-frequency baseband signal to the baseband processor for processing. After the low-frequency baseband signal is processed by the baseband processor, it is transmitted to the application processor. The application processor outputs sound signals through audio devices (e.g., speaker 170A, microphone 170B), or displays images or videos through display screen 194. In some embodiments, the modem processor can be a separate device. In some other embodiments, the modem processor can be independent of processor 110, and be arranged in the same device as mobile communication module 150 or other functional modules.

[0048] Wireless communication module 160 can provide wireless communication solutions including wireless local area networks (WLAN) (e.g., WiFi networks), Bluetooth (BT), BLE broadcasting, global navigation satellite systems (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR) technology, and the like, which can be applied to the electronic device. Wireless communication module 160 can be one or more devices that integrate at least one communication processing module. Wireless communication module 160 receives electromagnetic waves via antenna 2, modulates and filters the electromagnetic wave signals, and transmits the processed signals to processor 110. Wireless communication module 160 can also receive signals to be transmitted from processor 110, modulate them, amplify them, and convert them into electromagnetic wave radiation via antenna 2.

[0049] The camera 193 (front-facing camera or rear-facing camera, or one camera that can be used as both front-facing and rear-facing) is used to capture still images or videos. Generally, the camera 193 can include a light-sensing element such as a lens group and an image sensor, where the lens group includes multiple lenses (convex or concave) for collecting light signals reflected by an object to be photographed and transmitting the collected light signals to the image sensor. The image sensor generates a raw image of the object to be photographed according to the light signals. In the embodiments of the present application, the camera can be used to collect initial images or intermediate images of a picture to be photographed, etc.

[0050] The display screen 194 is used to display images, videos, etc. The display screen 194 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 (AMOLED), a flexible light-emitting diode (FLED), a Miniled, a Micro Led, a Microo Led, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the electronic device can include one or N display screens 194, where N is a positive integer greater than 1. The display screen 194 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces (GUIs). For example, the display screen 194 can display photos, videos, web pages, etc. In the embodiments of the present application, the display screen 194 can be used to display the interfaces shown in FIGS. 1-3. Figure 3 、 Figure 5 、 Figure 6

[0051] It can be understood that the structure illustrated in the embodiments does not constitute a specific limitation on the electronic device. In other embodiments, the electronic device can include more or fewer components than illustrated, or combine certain components, or split certain components, or different component arrangements. The illustrated components can be implemented in hardware, software, or a combination of software and hardware.

[0052] The software structure of the electronic device in the embodiments of the present application is introduced below.

[0053] ​In the embodiments of the present application, the software structure of the electronic device can adopt a layered architecture, an event-driven architecture, a microkernel architecture, a microservice architecture, or a cloud architecture. The embodiments of the present application take the Android system with a layered architecture as an example to introduce the software structure of the electronic device.

[0054] As shown in Figure 2 , the layered architecture divides the software into several layers, each of which has a clear role and division of labor. The layers communicate with each other through software interfaces. In some embodiments, the Android system is divided into five layers, from top to bottom, the application layer, the application framework layer, the Android runtime and system library, the hardware abstraction layer, and the kernel layer.

[0055] The application layer can include a series of application packages, which can include camera, gallery, chat, map, calendar, music, call, video, and other applications.

[0056] The application framework layer provides application programming interfaces (APIs) and programming frameworks for the applications of the application layer. The application framework layer includes some pre-defined functions.

[0057] The application framework layer can include a window manager, a content provider, a view system, a phone manager, a resource manager, a notification manager, and the like. In the embodiments of the present application, the application framework layer can also include a camera access interface, which can be started by the camera application by calling a pre-set API. The camera access interface can interact with the camera hardware abstraction layer in the hardware abstraction layer during the running process.

[0058] The window manager is used to manage window programs. The window manager can obtain the size of the display screen, determine whether there is a status bar, lock the screen, and take screenshots, etc.

[0059] The content provider is used to store and obtain data, and make the data accessible to the application. The data can include videos, images, audios, dialed and received calls, browsing history and bookmarks, phonebook, and the like.

[0060] The view system includes visual controls, such as controls for displaying text, controls for displaying pictures, and the like. The view system can be used to build an application. A display interface can be composed of one or more views. For example, a display interface including a short message notification icon can include a view for displaying text and a view for displaying pictures.

[0061] The phone manager is used to provide the communication function of the electronic device. For example, the management of the call state (including connection, hang-up, and the like).

[0062] The resource manager provides applications access to various resources, such as localized strings, icons, pictures, layout files, video files, and so on.

[0063] The notification manager enables applications to display notification information in the status bar, which can be used to convey informational messages that can disappear automatically after a brief stay without user interaction. For example, the notification manager is used to inform of download completion, message reminders, and so on. The notification manager can also be a notification that appears in the form of a chart or a scrollable text in the status bar at the top of the system, such as a notification of an application running in the background, or a notification that appears in the form of a dialog window on the screen. For example, a text message is prompted in the status bar, a prompt sound is emitted, the electronic device vibrates, an indicator light flashes, and so on.

[0064] The Android Runtime includes the core libraries and the virtual machine. The Android Runtime is responsible for the scheduling and management of the Android system.

[0065] The core libraries include two parts: one part is the function functions that the java language needs to call, and the other part is the core library of Android.

[0066] The application layer and the application framework layer run in the virtual machine. The virtual machine executes the java files of the application layer and the application framework layer into binary files. The virtual machine is used to perform the management of the object life cycle, the management of the stack, the management of the thread, the management of the security and the exception, and the garbage collection and the like.

[0067] The system library can include a plurality of functional modules. For example: a surface manager, media libraries, a three-dimensional graphics processing library (for example: OpenGL ES), a two-dimensional graphics engine (for example: SGL), and the like. The surface manager is used to manage the display subsystem, and provides a plurality of applications with the fusion of 2D and 3D layers. The media library supports a plurality of commonly used audio, video format playback and recording, and static image files and the like. The three-dimensional graphics processing library is used to realize three-dimensional graphics drawing, image rendering, synthesis, and layer processing and the like. The two-dimensional graphics engine is a two-dimensional drawing drawing engine.

[0068] The hardware abstraction layer is an abstract interface of the device kernel driver, which is used to realize the application programming interface for providing access to the underlying device to the higher level java API framework. In the embodiment of the present application, the hardware abstraction layer can include, for example, a camera hardware abstraction layer. The camera hardware abstraction layer can be used to interact with the hardware device (for example, a camera) that realizes the shooting function in the electronic device. In addition, the camera hardware abstraction layer can include a scene detection module, a shooting strategy management module, an image processing module, and an algorithm library.

[0069] In the embodiments of the present application, the scene detection module can be used for scene detection on the image collected by the camera to obtain scene information of the to-be-shot picture; the shooting strategy management module can be used for managing shooting strategies under various scenes; and the image processing module can be used for calling the image processing model in the algorithm library to process the image collected by the camera to optimize the image effect. It should be understood that, here, the algorithm library is taken as an example located at the hardware abstraction layer, and in some other embodiments, the algorithm library can also be located at other layers, such as the application program framework layer, the application layer, etc., which are not limited by the present application.

[0070] The kernel layer is below the HAL and is a layer between hardware and software. The kernel layer at least includes a camera driver, a display driver, a processor driver, etc., which are not limited by the embodiments of the present application.

[0071] It should be noted that the various functional modules included in the above software structure are only exemplary and do not constitute a specific limitation on the mobile phone software architecture of the present application, and in some other embodiments, the various functional modules included in the above software structure can be more or less, which are not limited by the present application. Although the embodiments of the present application are described with respect to the Android system, the principles of the image processing method are also applicable to electronic devices running iOS or windows operating systems.

[0072] For ease of understanding, the shooting method in the embodiments of the present application is described below with respect to the software structure of Figure 2 , and the details are as follows:

[0073] 1. The application layer of the electronic device can include a camera application, in response to detecting an opening instruction for the camera application, the electronic device can open the camera application and issue a start instruction from the camera application to the camera access interface, and the camera access interface issues the start instruction to the camera hardware abstraction layer.

[0074] 2. The camera hardware abstraction layer can call the camera driver in the kernel layer according to the received start instruction, and the camera driver drives the camera and other hardware devices to collect the initial image of the to-be-shot picture in response to the start instruction.

[0075] 3. The camera can pass the collected initial image to the camera hardware abstraction layer through the camera driver, and the camera hardware abstraction layer detects the scene information of the initial image through the scene detection module, and further determines the scene type of the to-be-shot picture and the type of the to-be-shot object in the to-be-shot picture.

[0076] The scene detection module can deliver the scene type of the to-be-shot picture and the type of the to-be-shot object to the shooting strategy management module. The shooting strategy management module determines the shooting strategy of the to-be-shot picture based on the scene type of the to-be-shot picture and the type of the to-be-shot object. The shooting strategy can indicate, for example, the shooting parameter corresponding to the to-be-shot picture and the image processing model corresponding to the to-be-shot picture.

[0077] The shooting strategy management module can deliver the shooting parameter to the camera driver and related hardware such as the camera. Then the camera can collect the intermediate image of the to-be-shot picture according to the acquired shooting parameter. The shooting strategy management module can also inform the image processing module of the image processing model corresponding to the to-be-shot picture.

[0078] The camera can deliver the collected intermediate image to the image processing module through the camera driver.

[0079] The image processing module invokes the image processing model indicated by the shooting strategy management module from the algorithm library to process the intermediate image, and obtains the target image of the to-be-shot picture.

[0080] The image processing module can upload the target image of the to-be-shot picture to the camera application, and the shooting interface of the camera application can display the target image.

[0081] The shooting method provided by the embodiments of the present application can be implemented in an electronic device with the above-mentioned software and hardware structure. The application scenarios of the embodiments of the present application are introduced below.

[0082] It should be understood that the term "user interface (UI)" in the following embodiments of the present application is a medium interface for interaction and information exchange between an application program or an operating system and a user, which realizes the conversion between the internal form of information and the form acceptable to the user. The user interface is source code written in a specific computer language such as Java and extensible markup language (XML), and the interface source code is parsed, rendered and finally presented as content recognizable by the user on the electronic device. The commonly used form of user interface is graphic user interface (GUI), which refers to a user interface related to computer operation displayed in a graphical manner. It can be visual interface elements such as text, icons, buttons, menus, tabs, text boxes, dialog boxes, status bars, navigation bars, Widgets and other visible interface elements displayed on the display screen of the electronic device.

[0083] As Figure 3As shown in (1), the electronic device can display a user interface on the main screen, which includes multiple application icons, such as camera application icon 3101, gallery application icon, weather application icon, stock application icon, calculator application icon, settings application icon, email application icon, browser application icon, music application icon, video application icon, app store icon, etc. Below the multiple application icons are page indicators to show the positional relationship between the currently displayed page and other pages. Users can swipe left and right on the areas of other application icons to browse application icons on other pages. When the electronic device detects a touch operation on the camera application icon 3101 (such as a click operation on the camera application icon 3101), in response to the operation, the camera application can be opened and displayed. Figure 3 The user interface shown in (2) is shown in the image.

[0084] like Figure 3 As shown in (2), the user interface 320 includes: a shooting preview area 3201, a shooting function list 3202, a shutter control 3203, a gallery preview area 3204, and a camera flip control 3205. The shooting preview area 3201 can be used to display images captured by the camera. The shooting function list 3202 can display one or more options, such as photo options, video options, portrait options, animal options, stage options, etc. Optionally, these one or more options can be represented as text information on the interface, such as "photo", "video", "portrait", "animal", "stage". Alternatively, these one or more options can also be represented as icons or other forms of interactive elements (IE). The shutter control 3203 can be used to detect the user's action of triggering a photo capture. In response to detecting the user's action on the shutter control 3203, the electronic device can save the image in the shooting preview area 3201 to the gallery. The gallery preview area 3204 can be used to display thumbnail images of photos or videos stored in the gallery. The camera flip control 3205 can be used to detect the user's operation of flipping the camera. In response to the detection of the user's operation on the camera flip control 3205, the electronic device can flip the camera, for example, switch the rear camera to the front camera.

[0085] In this embodiment, the electronic device can, after opening the camera application, execute the shooting method provided in this embodiment to obtain a target image of the scene to be captured, and then display the target image of the scene to be captured in the shooting preview area 3201. Alternatively, the electronic device can, after opening the camera application, first display the image of the scene to be captured captured by the camera in the shooting preview area 3201, and in response to detecting the user's operation on the shutter control 3203, execute the shooting method provided in this embodiment to obtain the target image of the scene to be captured, and then display a thumbnail image of the target image of the scene to be captured in the gallery preview area 3204.

[0086] The following is a detailed description of the shooting method provided in the embodiments of this application.

[0087] The subject executing the shooting method provided in this application can be an electronic device, or a functional module and / or functional entity within that electronic device capable of implementing the shooting method. The following description uses an electronic device executing this application's embodiments as an example. Please refer to... Figure 4 , Figure 4 This is a flowchart illustrating a shooting method provided in an embodiment of this application. The method may include, but is not limited to, the following steps:

[0088] S401 captures the initial image of the scene to be captured using the camera device of the electronic device.

[0089] In this embodiment, the camera device can also be described as a camera module or a camera, which can be a front-facing camera or a rear-facing camera. In response to detecting a camera activation event, the electronic device can capture an initial image of the scene to be captured using the camera. The camera activation event can be, for example, a user clicking the camera application icon on the home screen's user interface, as shown in [reference needed]. Figure 3 The user interface in (1) of this application; or, the camera activation event may be when the electronic device displays a lock screen interface, on which the camera application icon is displayed, and the user clicks on the camera application icon on the lock screen interface; or, the camera activation event may be when the electronic device displays a lock screen interface, and the user performs a gesture operation of swiping right on the lock screen interface to indicate that the camera application is activated; or, the camera activation event may also be when the user activates the camera function in third-party software (such as social software) and calls the camera application, etc. The embodiments of this application do not limit the specific method of triggering the electronic device to activate the camera.

[0090] In some embodiments, the camera of the electronic device can collect an initial image of the to-be-shot picture according to initial shooting parameters. The initial shooting parameters can be understood as general shooting parameters pre-configured by the electronic device. The initial shooting parameters can include initial focusing parameters, initial exposure parameters, and initial white balance parameters, etc. That is, in this way, the camera of the electronic device can collect initial images of different to-be-shot pictures by using the same shooting parameters.

[0091] In some embodiments, the camera of the electronic device can also collect an initial image of the to-be-shot picture by invoking a 3A algorithm. The 3A algorithm includes three parts: auto focus (AF), auto exposure (AE), and auto white balance (AWB). The AF algorithm can automatically adjust the position of the lens by detecting the sharpness of the image collected by the camera to improve the sharpness of the image. The AE algorithm can automatically set the shutter speed, aperture size, and ISO (international organization for standardization) sensitivity of the camera by analyzing the brightness distribution of the image collected by the camera to ensure that the brightness of the image is moderate. The AWB algorithm can adjust the color temperature of the image collected by the camera to ensure the color authenticity of the object under different light sources. That is, in this way, the camera of the electronic device can collect initial images of different to-be-shot pictures by using different shooting parameters.

[0092] S402, determining target scene information corresponding to the to-be-shot picture based on the initial image.

[0093] In the embodiments of the present application, after the electronic device obtains the initial image, the target scene information corresponding to the to-be-shot picture can be determined based on the initial image. The target scene information can include primary scene information and secondary scene information. The primary scene information can indicate the scene type of the to-be-shot picture, and the secondary scene information can indicate the coarse-grained type of the to-be-shot object contained in the to-be-shot picture under the scene type. The coarse-grained type of the to-be-shot object can be understood as the large category to which the to-be-shot object belongs.

[0094] Optionally, the target scene information can also include tertiary scene information, which can indicate the fine-grained type of the to-be-shot object under the coarse-grained type. Here, the fine-grained type of the to-be-shot object can be understood as the fine classification of the to-be-shot object under the large category.

[0095] For ease of understanding, the primary scene information, the secondary scene information, and the tertiary scene information in the embodiments of the present application are illustrated below.

[0096] For example, assuming that the first-level scene information corresponding to the to-be-shot picture indicates that the to-be-shot picture belongs to a traffic scene, the second-level scene information can be a vehicle category to which the to-be-shot object contained in the to-be-shot picture belongs in the traffic scene, such as a motor vehicle, a non-motor vehicle, a train, an airplane, and the like. Taking the second-level scene information indicating that the to-be-shot object contained in the to-be-shot picture belongs to the motor vehicle category as an example, the third-level scene information can indicate a fine category to which the to-be-shot object belongs in the motor vehicle category, such as a large car, a small car, a special-purpose car, a special vehicle, a tram, a trolleybus, a two-wheeled motorcycle, and the like.

[0097] For example, assuming that the first-level scene information corresponding to the to-be-shot picture indicates that the to-be-shot picture belongs to an animal scene, the second-level scene information can be an animal category to which the to-be-shot object contained in the to-be-shot picture belongs in the animal scene, such as a cat, a dog, a bird, an insect, a wild animal, and the like. Taking the second-level scene information indicating that the to-be-shot object contained in the to-be-shot picture belongs to the bird category as an example, the third-level scene information can indicate a fine category to which the to-be-shot object belongs in the bird category, such as a magpie, a sparrow, a wild goose, a swan, a seagull, and the like.

[0098] Optionally, in some scenes, the fine category can be further classified on the basis of the third-level scene information. That is, the target scene information can further include fourth-level scene information. For example, assuming that the third-level scene information indicates that the to-be-shot object contained in the to-be-shot picture belongs to the special vehicle category in the motor vehicle category, the fourth-level scene information can indicate a fine category to which the to-be-shot object belongs in the special vehicle category, such as a racing car, an ambulance, a fire engine, a crane, and the like. For example, assuming that the third-level scene information indicates that the to-be-shot object contained in the to-be-shot picture belongs to the swan category in the bird category, the fourth-level scene information can indicate a fine category to which the to-be-shot object belongs in the swan category, such as a whooper swan, a tundra swan, a trumpeter swan, a black swan, a black-billed leucopogon, a black-necked swan, and the like.

[0099] In some embodiments, the electronic device can input the initial image into a pre-trained scene detection model to obtain the target scene information output by the scene detection model. Optionally, the scene detection model can be stored locally on the electronic device or on a cloud-side server. For the case where the scene detection model is stored on the cloud-side server, the electronic device can send a scene detection request including the initial image to the cloud-side server to request the cloud-side server to invoke the scene detection model to perform scene detection on the initial image to obtain the target scene information of the initial image. After obtaining the target scene information, the cloud-side server can send a scene detection response including the target scene information to the electronic device.

[0100] In some embodiments, the electronic device can further determine the target scene information of the to-be-shot picture in combination with system information. The system information can include system time, geographical location of the electronic device, environmental information (e.g., temperature, humidity, weather, etc.) of the geographical location, sensor information, and the like. For example, assuming that the electronic device detects, based on the initial image, that the first-level scene information corresponding to the to-be-shot picture indicates that the to-be-shot picture belongs to a stage scene, and the second-level scene information indicates that the to-be-shot object contained in the to-be-shot picture belongs to a concert in the stage scene. In this scenario, if the geographical location of the electronic device is located at the Bird's Nest, it can be determined that the third-level scene information corresponding to the to-be-shot picture is a super large outdoor concert in the concert.

[0101] In some embodiments, the electronic device can obtain the system information to determine the target scene information of the to-be-shot picture in the case of obtaining user authorization. The electronic device can output authorization prompt information on the display interface to prompt the user whether to authorize the use of the system information to improve the photographing experience. In response to detecting a confirmation operation of the user on the authorization prompt information, the electronic device can trigger the acquisition of the system information.

[0102] S403, determining a shooting strategy corresponding to the to-be-shot picture based on the target scene information.

[0103] In the embodiments of the present application, after the electronic device obtains the target scene information, it can determine the shooting strategy corresponding to the to-be-shot picture based on the target scene information. The shooting strategy can indicate the shooting parameters corresponding to the to-be-shot picture, and / or the image processing model (or image processing algorithm) corresponding to the to-be-shot picture. Optionally, the shooting parameters can include 3A (automatic focus (AF), automatic exposure (AE), and automatic white balance (AWB)), focal length, ISO sensitivity, and the like. The image processing model can include a front-end image processing model and a back-end image processing model. The front-end image processing model includes but is not limited to an image processing model for optimizing sharpness, brightness, and color, and the back-end image processing model includes but is not limited to an image processing model for image enhancement, image repair, and image denoising.

[0104] In some embodiments, the electronic device can determine the shooting strategy corresponding to the to-be-shot picture based on the target scene information in the following manner: first, determine the target hierarchical parameter corresponding to the to-be-shot picture based on the target scene information, and then determine the shooting strategy corresponding to the to-be-shot picture based on the target hierarchical parameter. The target hierarchical parameter can be used to describe the characteristics of the to-be-shot object contained in the to-be-shot picture from different dimensions. Here, the to-be-shot object can also be referred to as the to-be-shot subject, which is the most important part of the to-be-shot picture, and can be a person, an object, a scene, or any prominent element in the to-be-shot picture.

[0105] Optionally, the target grading parameters can include one or more of a speed level parameter, a direction level parameter, a detail level parameter, a frequency domain level parameter, a structure level parameter, an aesthetic level parameter, and a color level parameter.

[0106] The different parameters in the target grading parameters will be described in detail below.

[0107] (1) Speed level parameter: can be used to describe the motion speed of the to-be-photographed object. For example, in the case where the target scene information includes first-level scene information and second-level scene information, assuming that the first-level scene information indicates that the to-be-photographed picture is a traffic scene, and the second-level scene information indicates that the to-be-photographed object belongs to the train category in the traffic scene, the speed level parameter of the train can be, for example, 300 km / h. For another example, in the case where the target scene information further includes third-level scene information, assuming that the third-level scene information indicates that the to-be-photographed object belongs to a high-speed train in the train category, the speed level parameter of the high-speed train can be, for example, 350 km / h.

[0108] (2) Direction level parameter: can be used to describe the motion coordinates of the to-be-photographed object in the camera space. For example, it can include the x-axis direction, the y-axis direction, and the z-axis direction. For example, the x-axis direction can represent that the to-be-photographed object is located on the right side of the camera, the y-axis can represent that the to-be-photographed object is located above the camera, and the z-axis can represent that the to-be-photographed object is located in front of the camera, which can be adjusted according to actual needs.

[0109] (3) Detail level parameter: can be used to describe the detail performance capability of the to-be-photographed object. For example, the detail level can be described, and the higher the detail level, the richer the detail information contained by the to-be-photographed object. For example, the detail level of a to-be-photographed object with feathers (such as a cat, a dog, a bird, etc.) can be higher than that of a to-be-photographed object with smooth skin (such as a person, a fruit, a green plant, etc.).

[0110] (4) Frequency domain level parameter: can be used to describe the distribution level of the to-be-photographed object in the frequency space. In the frequency domain, each part of the image is associated with a specific frequency, which can reflect the characteristics such as details, textures, and shapes in the image. Among them, the low-frequency part can represent the smooth area in the image, such as uniform color or gradient; the medium-frequency part can represent the medium-texture details in the image, such as skin pores, hair, etc.; and the high-frequency part can represent the fine details in the image, such as sharp edges, textures, and noise.

[0111] (5) Structure level parameter: can be used to describe the structure information of the to-be-photographed object. For example, it can be described by shape, such as geometric shape (such as circle (such as sphere), square (such as a corner of a book or a building), triangle (such as a mountain peak), ellipse (such as the outline of a human face), etc.), natural shape (such as the outline of a tree, the body shape of an animal, the irregular shape of a cloud, etc.), symmetrical shape, etc.

[0112] (6) Aesthetic level parameter: can be used to describe the composition information of the object to be photographed. Different aesthetic level parameters can correspond to different composition methods. The composition methods can include, for example, a leading line composition, a center composition, a golden section composition, and the like.

[0113] (7) Color level parameter: can be used to describe the color information of the object to be photographed. Different color level parameters can correspond to different color models.

[0114] In some embodiments, the electronic device can obtain the target level parameter from a preset knowledge base based on the target scene information. The preset knowledge base can store a correspondence between different scene information and different level parameters, and one kind of scene information can correspond to one kind of level parameter.

[0115] Optionally, in the ordinary shooting mode, the target scene information of the electronic device can only include the first level scene information, and then the electronic device can determine the target level parameter according to the first level scene information; in the professional shooting mode, the target scene information of the electronic device can further include the second level scene information and / or the third level scene information, and then the electronic device can determine the target level parameter according to the second level scene information and / or the third level scene information.

[0116] In some embodiments, the level parameter corresponding to each scene information can be obtained by a pre-trained level model. The level model can be an overall model or a combination of multiple models. For the case that the level model is an overall model, the overall model can output multiple level parameters (such as speed level parameter, direction level parameter, and detail level parameter) included in the level parameter. For the case that the level model is a combination of multiple models, one model in the multiple models can output one level parameter, for example, a first model can output a speed level parameter, a second model can output a direction level parameter, and the like.

[0117] In some embodiments, the electronic device can store a correspondence between each level parameter and a shooting strategy, and after obtaining the target level parameter, the electronic device can determine the shooting strategy according to the correspondence between each level parameter and the shooting strategy.

[0118] For example, as shown in Table 1, Table 1 shows a correspondence between one kind of scene information and a level parameter, and a correspondence between the level parameter and a shooting strategy.

[0119] Table 1

[0120]

[0121] As shown in Table 1, first-level and second-level scene information can each correspond to different hierarchical parameters, thus leading to different shooting strategies. When the target scene information only includes first-level scene information, the target hierarchical parameter can be determined as the hierarchical parameter corresponding to the first-level scene information. Similarly, when the target scene information includes second-level scene information, the target hierarchical parameter can be determined as the hierarchical parameter corresponding to the second-level scene information. After determining the target hierarchical parameter, the corresponding shooting strategy is then determined based on it. This allows for a more refined matching of shooting strategies based on scene information, thereby improving shooting quality.

[0122] In some embodiments, the electronic device can automatically determine target classification parameters based on primary and secondary scene information, and then determine the shooting strategy corresponding to the target classification parameters. For example, assuming the scene to be captured is an animal scene, the electronic device can identify the major category to which the objects to be captured in the scene belong, such as insects, and thus determine the shooting strategy according to the target classification parameters corresponding to insects. This helps to save power consumption of the electronic device.

[0123] In some embodiments, the electronic device can output shooting prompt options on the shooting interface, which can be used to prompt the user whether to use the professional shooting mode. Upon detecting a user confirmation of the shooting prompt option, three-level scene information can be acquired, and then target classification parameters can be determined based on the three-level scene information, followed by a shooting strategy. In other words, in professional shooting mode, the target scene information of the electronic device can include three-level scene information. This helps meet users' higher-standard shooting needs.

[0124] Optionally, in professional shooting mode, the electronic device can automatically determine the target grading parameters, or the user can manually set the target grading parameters.

[0125] For example, please see Figure 5 , Figure 5 This is a schematic diagram of the camera interface of an electronic device provided in an embodiment of this application. Figure 5 As shown in (1), the shooting interface 500 can display a shooting prompt option 5001, which may include, for example, the text "You are currently in a concert scene. For a better photo-taking experience, you can try the professional shooting mode." Furthermore, the shooting prompt option 5001 may also include a cancel control and a confirmation control 5002. Upon detecting a user's selection operation (such as a click) on the confirmation control 5002, the three-level scene information can be further identified, thereby determining the target classification parameters.

[0126] In one example, such as Figure 5 As shown in (2), after the electronic device automatically determines the target grading parameters, it can display window 5003. Window 5003 can include three-level scene information 5004 and target grading parameters 5005. The three-level scene information 5004 can, for example, indicate that the current scene is a large stage scene. The target grading parameters 5005 can, for example, include: speed level parameters indicating low speed, direction level parameters indicating left and right movement, detail level parameters indicating level 3, frequency domain level parameters indicating high frequency center level, structure level parameters indicating the central area, aesthetic level parameters indicating extended line composition, and color level parameters indicating a high-saturation lighting model. Optionally, after the electronic device automatically determines the target grading parameters, it may not display window 5003.

[0127] In another example, such as Figure 5 As shown in (3), the electronic device can display window 5006, which includes pin-level parameter setting options 5007. Specifically, pin-level parameter setting options 5007 may include: speed-level parameter setting options, direction-level parameter setting options, detail-level parameter setting options, frequency-domain parameter setting options, structural-level parameter setting options, aesthetic-level setting options, and color-level setting options. Users can manually adjust the parameters of each setting item according to their needs. Pin-level parameter setting options 5007 may also include a confirmation control 5008. When the electronic device detects a user's selection operation (such as a click operation) on the confirmation control 5008, it can determine the target pin-level parameters based on the input parameters in the pin-level parameter setting options 5007.

[0128] S404: Acquire the target image of the scene to be captured according to the shooting strategy.

[0129] In this embodiment, after the electronic device obtains the shooting strategy corresponding to the scene to be captured, it can acquire the target image of the scene to be captured according to the shooting strategy. The target image can be understood as the high-quality image that will be displayed at the end.

[0130] In some embodiments, the shooting strategy may indicate the shooting parameters corresponding to the scene to be captured, and the image processing model corresponding to the scene to be captured. Here, the shooting parameters and image processing model can be found in the relevant description in step S403, and will not be repeated here. The way the electronic device acquires the target image of the scene to be captured according to the shooting strategy may include acquiring an intermediate image of the scene to be captured through a camera according to the shooting parameters, and then calling the image processing model to process the intermediate image to obtain the target image of the scene to be captured.

[0131] S405 displays the target image on the camera's shooting interface.

[0132] In this embodiment, after the electronic device acquires the target image, it can display the target image on the shooting interface. Optionally, the shooting interface can be the shooting interface of a camera application or the shooting interface of third-party software.

[0133] For shooting interfaces that are camera application interfaces, the electronic device can display the target image in the shooting preview area of ​​the shooting interface. Alternatively, the electronic device can display a thumbnail image of the target image in the gallery preview area of ​​the shooting interface after detecting a user's trigger operation on the shutter control.

[0134] Optionally, the electronic device can also display the detected target scene information on the shooting interface, such as one or more of the first-level scene information, second-level scene information, and third-level scene information.

[0135] For example, please see Figure 6 , Figure 6 This is a schematic diagram of another shooting interface provided in an embodiment of this application. For example... Figure 6 As shown in (1), assuming the electronic device detects that the target scene information for the image to be captured includes: primary scene information as an animal scene and secondary scene information as a cat. The shooting interface 600 can display an icon 6001, which can be, for example, the shape of an animal, indicating that the current shooting scene is an animal scene. The shooting interface 600 can also display scene prompt information 6002, which includes the detected secondary scene information, such as the text "cat". Continue to participate Figure 6 In (1), the electronic device can display a shooting prompt option 6003, which may include, for example, the text "You are currently shooting a cat. For a better shooting experience, you can try the professional shooting mode." In response to detecting a user's selection of the confirmation control 6004 in the shooting prompt option 6003, the electronic device can further identify the third-level scene information and display... Figure 6 The scene prompt information 6005 shown in (2) can include detected third-level scene information, such as the text "Persian cat".

[0136] By implementing the embodiments of this application, electronic devices can more precisely identify different shooting scenes and describe the characteristics of the objects to be photographed in the scene from multiple levels and dimensions through hierarchical parameters. Based on these hierarchical parameters, a shooting strategy can then be matched to the current shooting scene. Compared to the current method of roughly dividing shooting modes and processing all scenes according to preset parameters within those modes, this application can precisely divide shooting scenes and provide targeted shooting strategies, thus improving the quality of photos taken by electronic devices.

[0137] The following is combined with Figure 2The software structure shown introduces the photographing method provided by the embodiment of the present application from the perspective of module interaction. Please refer to Figure 7 , Figure 7 The flowchart of another photographing method provided by the embodiment of the present application is shown. As Figure 7 shown, it can include but not limited to the following steps:

[0138] S701, starting instruction.

[0139] The electronic device receives the starting instruction of the user for the camera application. Wherein, the starting instruction can be a voice instruction, for example, the voice instruction is “open the camera”. Or, the starting instruction can also be a gesture operation, for example, it can be a click operation for the camera application icon.

[0140] S702, in response to the starting instruction, collecting the initial image of the to-be-photographed picture through the camera.

[0141] The implementation process of step S702 can refer to step S401 in the embodiment shown in Figure 4 , which will not be described here.

[0142] S703, initial image.

[0143] The electronic device can deliver the collected initial image to the scene detection module through the camera.

[0144] S704, determining the primary scene information and the secondary scene information of the to-be-photographed picture based on the initial image.

[0145] The electronic device can detect the primary scene information and the secondary scene information of the to-be-photographed picture through the scene detection module based on the initial image. Here, the primary scene information and the secondary scene information are the same as the primary scene information and the secondary scene information in the foregoing content, which will not be described here.

[0146] S705, primary scene information and secondary scene information.

[0147] The scene detection module can deliver the detected primary scene information and secondary scene information to the camera application.

[0148] S706, displaying the primary scene information and the secondary scene information.

[0149] The electronic device can display the primary scene information and the secondary scene information on the photographing interface of the camera application to prompt the user of the current shooting scene. Optionally, the primary scene information can be displayed in the form of an icon, and the secondary scene information can be displayed in the form of text. Or, the primary scene information and the secondary scene information can both be displayed in the form of text, which is not limited in the present application.

[0150] S707, outputting a shooting prompt option.

[0151] The electronic device can output a shooting prompt option in a shooting interface of a camera application, prompting a user whether to adopt a professional mode to obtain higher quality photos. Optionally, the shooting prompt option can include a confirmation option and a cancel option, so as to facilitate the user to flexibly select according to actual needs.

[0152] S708, confirming operation.

[0153] The electronic device can perform steps S709-S712 in response to detecting a confirmation operation of the user on the shooting prompt option.

[0154] S709, first message.

[0155] The camera application can pass a first message to the scene detection module, and the first message can be used to inform the scene detection module to further obtain the three-level scene information.

[0156] S710, determining the three-level scene information of the to-be-shot picture in response to the first message.

[0157] After receiving the first message, the scene detection module can further detect the three-level scene information of the to-be-shot picture in response to the first message.

[0158] S711, three-level scene information.

[0159] After detecting the three-level scene information, the scene detection module can pass the three-level scene information to the shooting strategy management module.

[0160] S712, determining the target grading parameter corresponding to the to-be-shot picture based on the three-level scene information.

[0161] After receiving the three-level scene information, the shooting strategy management module can determine the target grading parameter corresponding to the to-be-shot picture based on the three-level scene information, that is, the target grading parameter is the grading parameter corresponding to the three-level scene information.

[0162] S713, cancel operation.

[0163] The electronic device can perform steps S714-S716 in response to detecting a cancel operation of the user on the shooting prompt option.

[0164] S714, second message.

[0165] The camera application can pass a second message to the scene detection module, and the second message can be used to inform the scene detection module to stop scene detection.

[0166] S715, sending the two-level scene information to the shooting strategy management module in response to the second message.

[0167] After the scene detection module receives the second message, in response to the second message, the detected secondary scene information can be delivered to the shooting strategy management module.

[0168] S716, based on the secondary scene information, determine the target grading parameter corresponding to the to-be-shot picture.

[0169] After the shooting strategy management module receives the secondary scene information, the target grading parameter corresponding to the to-be-shot picture can be determined based on the secondary scene information, that is, the target grading parameter is the grading parameter corresponding to the secondary scene information.

[0170] S717, based on the target grading parameter, determine the shooting strategy corresponding to the to-be-shot picture.

[0171] After the shooting strategy management module determines the target grading parameter, the shooting strategy corresponding to the target grading parameter, that is, the corresponding shooting strategy of the to-be-shot picture, can be determined based on the correspondence between each grading parameter and each shooting strategy. The shooting strategy can indicate the shooting parameter corresponding to the to-be-shot picture, and / or the image processing model corresponding to the to-be-shot picture. Optionally, the image processing model corresponding to the to-be-shot picture can include a locally stored image processing model and / or a cloud-side server stored image processing model.

[0172] Optionally, S718, image processing model.

[0173] Optionally, the shooting strategy management module can send the model identifier of the locally stored image processing model and / or the cloud-side server stored image processing model to the image processing module.

[0174] S719, shooting parameter.

[0175] The shooting strategy module can deliver the shooting parameter to the camera.

[0176] S720, through the camera, the intermediate image of the to-be-shot picture is collected according to the shooting parameter.

[0177] S721, intermediate image.

[0178] The camera delivers the collected intermediate image to the image processing module.

[0179] S722, call the image processing model to process the intermediate image to obtain the target image of the to-be-shot picture.

[0180] The image processing module can call a locally stored image processing model to process the intermediate image to obtain the target image of the to-be-shot picture. Alternatively, the image processing module can send an image processing request including the intermediate image and an identifier of the image processing model to a cloud-side server to request the server to process the intermediate image using the corresponding image processing model. Then, the image processing module can receive an image processing response including the target image sent by the cloud-side server.

[0181] S723, the target image.

[0182] After obtaining the target image, the image processing module can deliver the target image to the camera application.

[0183] S724, display the target image.

[0184] The electronic device can display the target image on the shooting interface of the camera application. The implementation process of step S724 can refer to the related description of step S405 in the embodiment shown in Figure 4

[0185] For ease of understanding, the shooting method provided by the embodiments of the present application is introduced below through two specific examples.

[0186] Example one, taking a stage scene as an example, Figure 8 a schematic diagram of executing the shooting method provided by the embodiments of the present application in a stage scene is shown. As shown in Figure 8 The first-level scene information corresponding to the to-be-shot picture can be a stage scene, the second-level scene information can be a concert, and the third-level scene information can be a large outdoor concert. Each level of scene information can correspond to a hierarchical parameter. Assuming that the electronic device detects a confirmation operation of the user on the shooting prompt option, i.e., the user selects a professional shooting mode, then the target hierarchical parameter can be determined according to the third-level scene information (i.e., a large outdoor concert), i.e., the large outdoor concert hierarchical parameter is taken as the target hierarchical parameter. Then, the shooting parameter corresponding to the to-be-shot picture and the image processing model corresponding to the to-be-shot picture can be determined according to the large outdoor concert hierarchical parameter. The camera can collect the intermediate image of the to-be-shot picture according to the shooting parameter, and the image processing module can call the image processing model to process the intermediate image to obtain the target image. Finally, the electronic device can display the target image or store the target image.

[0187] Example two, taking an animal scene as an example, Figure 9 a schematic diagram of executing the shooting method provided by the embodiments of the present application in an animal scene is shown. As shown in Figure 9 ​As shown, the first-level scene information corresponding to the to-be-shot picture can be an animal scene, the second-level scene information can be a bird, and the third-level scene information can be a magpie. Each level of scene information can correspond to a hierarchical parameter. In the professional shooting mode, the target hierarchical parameter can be determined according to the third-level scene information (that is, the magpie), that is, the magpie hierarchical parameter is taken as the target hierarchical parameter. Then, the shooting parameter corresponding to the to-be-shot picture and the image processing model corresponding to the to-be-shot picture can be determined according to the magpie hierarchical parameter. The camera can collect an intermediate image of the to-be-shot picture according to the shooting parameter, and the image processing module can call the image processing model to process the intermediate image to obtain a target image. Finally, the electronic device can display the target image or store the target image.

[0188] In this way, the electronic device can finely divide the shooting scene, describe the characteristics of the to-be-shot object contained in the to-be-shot picture from multiple hierarchical dimensions through the hierarchical parameter, and thus provide a shooting strategy in a targeted manner, which is conducive to improving the quality of the photo shot by the electronic device.

[0189] In the above embodiments, all or part of the embodiments can be implemented by software, hardware, firmware, or any combination thereof. When implemented by software, all or part of the embodiments can be implemented 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, all or part of the processes or functions described in the present application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can 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 can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center through a wired (such as coaxial cable, optical fiber, digital subscriber line) or wireless (such as infrared, wireless, microwave, etc.) manner. The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that includes one or more available media sets. The available medium can be a magnetic medium (for example, a floppy disk, a hard disk, a magnetic tape), an optical medium (for example, a DVD), or a semiconductor medium (for example, a solid state disk), etc.

[0190] It should be noted that, for the foregoing method embodiments, the sequences of the described actions are merely illustrative, and the present application is not limited to the sequences of the described actions. In addition, the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0191] The steps in the method embodiments of the present application can be adjusted in sequence, combined, and reduced according to actual needs.

[0192] The modules in the device embodiments of the present application can be combined, divided, and reduced according to actual needs.

[0193] Those of ordinary skill in the art can understand that all or part of the steps in the above-described various embodiments can be completed by a program instructing relevant hardware, and the program can be stored in a computer-readable storage medium, which can include a flash disk, a ROM, a RAM, a magnetic disk, or an optical disk.

[0194] The above only discloses one preferred embodiment of the present application, and only a part of the embodiments of the present application, and cannot limit the scope of the rights of the present application.

Claims

1. A shooting method, characterized in that, The method includes: The initial image of the scene to be captured is obtained through the camera device of the electronic device; Based on the initial image, target scene information corresponding to the scene to be captured is determined; the target scene information includes primary scene information and secondary scene information; the primary scene information indicates the scene type of the scene to be captured, and the secondary scene information indicates the coarse-grained type of the object to be captured contained in the scene to be captured under the scene type; Based on the target scene information, a shooting strategy corresponding to the scene to be shot is determined; the shooting strategy indicates the shooting parameters corresponding to the scene to be shot, and / or the image processing model corresponding to the scene to be shot; Acquire the target image of the scene to be captured according to the shooting strategy described above; The target image is displayed on the camera interface of the electronic device.

2. The method as described in claim 1, characterized in that, The step of determining the shooting strategy corresponding to the scene to be captured based on the target scene information includes: Based on the target scene information, the target grading parameters corresponding to the image to be captured are determined; the target grading parameters include one or more of the following: velocity level parameters, direction level parameters, detail level parameters, frequency domain level parameters, structural level parameters, aesthetic level parameters, and color level parameters. Based on the target classification parameters, the shooting strategy corresponding to the scene to be captured is determined.

3. The method as described in claim 1, characterized in that, The target scene information also includes three-level scene information, which indicates the fine-grained type of the object to be photographed under the coarse-grained type; determining the target classification parameters corresponding to the image to be photographed based on the target scene information includes: The electronic device outputs shooting prompt options on its shooting interface; these shooting prompt options are used to indicate whether to use professional shooting mode. In response to detecting a confirmation operation for the shooting prompt option, the target classification parameters corresponding to the scene to be shot are determined based on the target scene information.

4. The method as described in claim 3, characterized in that, In response to the confirmation operation for the shooting prompt option, the target classification parameters corresponding to the scene to be shot are determined based on the target scene information, including: In response to the detection of a confirmation operation for the shooting prompt option, the target classification parameters corresponding to the scene to be shot are obtained from a preset classification knowledge base based on the target scene information.

5. The method as described in claim 4, characterized in that, The method further includes: The target grading parameters corresponding to the image to be captured are displayed on the shooting interface of the electronic device.

6. The method as described in claim 3, characterized in that, In response to detecting a confirmation operation for the shooting prompt option, the method determines the target classification parameters corresponding to the image to be shot based on the target scene information, including: In response to detecting a confirmation operation for the shooting prompt option, based on the target scene information, a graded parameter setting option is output to the shooting interface of the electronic device; In response to the detection of completion of the setting operation for the grading parameter setting option, the target grading parameter corresponding to the image to be captured is determined based on the input parameters of the grading parameter setting option.

7. The method according to any one of claims 1-6, characterized in that, The shooting strategy indicates the shooting parameters corresponding to the scene to be shot, and the image processing model corresponding to the scene to be shot. The step of acquiring the target image of the scene to be shot according to the shooting strategy includes: The camera device acquires an intermediate image of the scene to be captured according to the shooting parameters. The image processing model is invoked to process the intermediate image to obtain the target image of the scene to be captured.

8. The method according to any one of claims 1-7, characterized in that, Displaying the target image on the camera interface of the electronic device includes: The target image is displayed in the shooting preview area of ​​the shooting interface of the electronic device; and / or, A thumbnail of the target image is displayed in the gallery preview area of ​​the camera interface of the electronic device.

9. An electronic device, characterized in that, The device includes a memory and one or more processors; the memory is coupled to the one or more processors for storing a computer program, the computer program including program instructions; the one or more processors invoke the program instructions to cause the electronic device to perform the method as described in any one of claims 1-8.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-8.

11. A chip system, characterized in that, The chip system is coupled to a memory, and the chip system is used to read and execute a computer program stored in the memory to implement the method as described in any one of claims 1-8.