CN115696016A - Shooting scene starting method and device and electronic equipment - Google Patents

Shooting scene starting method and device and electronic equipment Download PDF

Info

Publication number
CN115696016A
CN115696016A CN202211111503.7A CN202211111503A CN115696016A CN 115696016 A CN115696016 A CN 115696016A CN 202211111503 A CN202211111503 A CN 202211111503A CN 115696016 A CN115696016 A CN 115696016A
Authority
CN
China
Prior art keywords
shooting
resource
configuration
resources
configuration parameter
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211111503.7A
Other languages
Chinese (zh)
Inventor
朱文波
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN202211111503.7A priority Critical patent/CN115696016A/en
Publication of CN115696016A publication Critical patent/CN115696016A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The embodiment of the application discloses a shooting scene starting method and device and electronic equipment. The method comprises the following steps: acquiring shooting configuration parameters; acquiring a corresponding first shooting resource based on the shooting configuration parameters; configuring first shooting resources, and synchronously starting to determine a shooting scene based on shooting configuration parameters; after the shooting scene is determined, acquiring target resources which are required to be configured and correspond to the determined shooting scene; and configuring a second shooting resource to finish starting the determined shooting scene, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource. Therefore, by the method, all resources (target resources) required by the determined shooting scene are not configured after the shooting scene is actually determined, so that the starting speed of the shooting scene is improved, and the preview picture corresponding to the shooting scene is displayed more quickly.

Description

Shooting scene starting method and device and electronic equipment
Technical Field
The present application relates to the field of computer technologies, and in particular, to a shooting scene starting method and apparatus, and an electronic device.
Background
With the upgrade of software and hardware of electronic equipment, the electronic equipment also supports more and more shooting functions. For example, the electronic device may support portrait shooting, landscape shooting, night-scene shooting, and the like. When the electronic device shoots, a shooting scene is determined, and then resources required by the determined shooting scene are configured. However, the related resource allocation method causes a picture stuck problem.
Disclosure of Invention
In view of the above problems, the present application provides a shooting scene starting method, device and electronic device to improve the above problems.
In a first aspect, the present application provides a shooting scene starting method, which is applied to an electronic device, and includes: acquiring shooting configuration parameters; acquiring a corresponding first shooting resource based on the shooting configuration parameters; configuring the first shooting resources, and synchronously starting to determine a shooting scene based on the shooting configuration parameters; after the shooting scene is determined, acquiring target resources which are required to be configured and correspond to the determined shooting scene; and configuring a second shooting resource to finish starting the determined shooting scene, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
In a second aspect, the present application provides a memory page processing apparatus, which is executed in an electronic device, and includes: a configuration parameter acquiring unit for acquiring shooting configuration parameters; a first resource obtaining unit, configured to obtain a corresponding first shooting resource based on the shooting configuration parameter; a resource configuration unit, configured to configure the first shooting resource; the scene determining unit is used for synchronously determining shooting scenes based on the shooting configuration parameters when the resource configuration unit starts to configure the first shooting resources; the target resource determining unit is used for acquiring the target resource which needs to be configured and corresponds to the determined shooting scene after the shooting scene is determined; the resource configuration unit is further configured to configure a second shooting resource to complete starting of the determined shooting scene, where the second shooting resource is included in the target resource and is not included in the first shooting resource.
In a third aspect, the present application provides an electronic device comprising one or more processors and a memory; one or more programs are stored in the memory and configured to be executed by the one or more processors to implement the methods described above.
In a fourth aspect, the present application provides a computer readable storage medium having program code stored therein, wherein the method described above is performed when the program code is executed by a processor.
According to the shooting scene starting method, the shooting scene starting device and the electronic equipment, after the shooting configuration parameters are obtained, the corresponding first shooting resources can be obtained based on the shooting configuration parameters, then the first shooting resources are configured, and the shooting scene is determined based on the shooting configuration parameters synchronously. And then, after the shooting scene is determined, acquiring a target resource which is required to be configured and corresponds to the determined shooting scene, and configuring a second shooting resource to finish starting the determined shooting scene. Therefore, by the above method, before the shooting scene is actually determined, part of resources (resources included in the first shooting resource) in the target resources required to be configured corresponding to the subsequently determined shooting scene can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining resources (second shooting resources) which are not configured can be configured, so that the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, thereby facilitating the increase of the starting speed of the shooting scene and the faster display of the preview picture corresponding to the shooting scene.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a flowchart of a shooting scene starting method proposed in an embodiment of the present application;
fig. 2 shows schematic diagrams of a first shooting resource and a second shooting resource in an embodiment of the present application;
fig. 3 is a flowchart illustrating a shooting scene starting method according to still another embodiment of the present application;
fig. 4 is a schematic diagram showing a determination of a shooting scene in the embodiment of the present application;
fig. 5 is a flowchart illustrating a shooting scene starting method according to another embodiment of the present application;
fig. 6 is a flowchart illustrating a shooting scene starting method according to another embodiment of the present application;
fig. 7 is a flowchart illustrating a shooting scene starting method according to yet another embodiment of the present application;
fig. 8 is a block diagram illustrating a configuration of a shooting scene starting apparatus according to an embodiment of the present application;
fig. 9 is a block diagram illustrating a configuration of an electronic device for executing a shooting scene starting method according to an embodiment of the present application in real time;
fig. 10 illustrates a storage unit for storing or carrying program codes for implementing the shooting scene starting method according to the embodiment of the present application in real time.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the present application.
With the upgrade of software and hardware of electronic equipment, the shooting functions supported by the electronic equipment are more and more. For example, the electronic device may support portrait shooting, landscape shooting, night-scene shooting, and the like. When the electronic device shoots, a shooting scene is determined, and then resources required by the determined shooting scene are configured. However, the related resource allocation method causes a picture stuck problem.
Therefore, the inventor proposes a shooting scene starting method, a shooting scene starting device, and an electronic device in the present application, after acquiring shooting configuration parameters, the corresponding first shooting resource may be acquired based on the shooting configuration parameters, and then the first shooting resource is configured, and the shooting scene is determined synchronously based on the shooting configuration parameters. And then, after the shooting scene is determined, acquiring a target resource which is required to be configured and corresponds to the determined shooting scene, and configuring a second shooting resource so as to finish starting the determined shooting scene. Therefore, by the above method, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in the target resources required to be configured corresponding to the subsequently determined shooting scene can be configured in advance based on the shooting configuration parameters, and after the shooting scene is actually determined, only the remaining resources (second shooting resources) which are not configured can be configured, so that the resources are not required to be configured after the shooting scene is actually determined, and all the resources (target resources) required by the determined shooting scene are configured, thereby facilitating the increase of the starting speed of the shooting scene, and facilitating the faster display of the preview picture corresponding to the shooting scene.
Embodiments of the present application will be described in detail below with reference to the accompanying drawings.
Referring to fig. 1, a shooting scene starting method provided in an embodiment of the present application is applied to an electronic device, and the method includes:
s110: and acquiring shooting configuration parameters.
In the embodiment of the present application, the shooting configuration parameters are parameters for determining a shooting scene. A shooting scene may be understood as a set of ways to process an image captured by an electronic device. For example, the photographing mode currently selected by the user is a portrait mode, and further the photographing effect including the beauty effect is selected. In this case, the determined shooting scene may be understood as a beauty process in the portrait mode. Correspondingly, the determined shooting scene comprises a processing mode corresponding to the portrait mode and a beautifying processing mode. As another example, the photographing mode currently selected by the user is a landscape mode, and further the photographing effect including the anti-shake effect is selected. In this case, the determined photographing scene may then be understood as the anti-shake effect processing in the landscape mode. Correspondingly, the determined shooting scene comprises a processing mode corresponding to the landscape mode and a processing mode corresponding to the anti-shake effect.
In the embodiment of the present application, in one mode, the shooting configuration parameters may include parameters selected by a user. For example, if the user operates the electronic device to select the portrait mode, the photographing configuration parameters may include the portrait mode. For another example, in a case where the user operates the electronic device to select the portrait mode, the user further selects the beauty effect, and in this case, the photographing configuration parameters include the portrait mode and the beauty effect.
In another way, besides the parameters selected by the user, the configuration parameters determined according to the parameters selected by the user can be included. It should be noted that, when the electronic device implements some shooting modes or shooting effects, some functional modules need to be used. The functional module needs to be configured before running, in which case, the configuration parameters determined according to the parameters selected by the user may include the configuration parameters corresponding to the functional module. The functional module may include a software module and may also include a hardware module.
In the embodiment of the present application, the shooting configuration parameters may be acquired in response to the electronic device starting the camera, or in response to a user-triggered switching of the shooting mode when the camera is started, the shooting configuration parameters may be acquired.
S120: and acquiring a corresponding first shooting resource based on the shooting configuration parameters.
After the shooting configuration parameters are obtained, the corresponding shooting resources can be obtained according to the obtained shooting configuration parameters and serve as the first shooting resources. It should be noted that, after the electronic device obtains the shooting configuration parameters, it may be determined what manner of processing needs to be performed on the image acquired by the camera. The image processing requires an algorithm, and for the algorithm, initialization and configuration of a corresponding buffer (buffer) are required before the algorithm is run. Correspondingly, the shooting configuration parameters are used for acquiring the corresponding first shooting resources, and the algorithm determined according to the shooting configuration parameters and the cache required by the algorithm can be understood.
For example, if the shooting configuration parameters include a portrait mode and a beauty treatment, the determined algorithm for processing the image collected by the camera may include a portrait processing algorithm and a beauty processing algorithm. The corresponding determined first photographing resource may include a portrait processing algorithm, a cache required by the portrait processing algorithm, a beauty processing algorithm, and a cache required by the beauty processing algorithm.
It should be noted that, the algorithm needs to store data during the operation process and after the operation is completed, and under the condition of configuration and caching, intermediate data obtained during the operation process of the algorithm and finally output data can be stored in a corresponding cache. For example, the algorithm may include a plurality of operators, and the plurality of operators sequentially run to complete the function to be implemented by the algorithm, wherein the content output by the operator running in the past is used as the input of the operator running in the past, and in this case, the data output by the operator running in the past is understood as the intermediate data of the algorithm.
S130: and configuring the first shooting resource, and synchronously starting to determine a shooting scene based on the shooting configuration parameters.
When the first shooting resource includes the algorithm and the cache corresponding to the algorithm, configuring the first shooting resource may be understood as initializing the algorithm and actually configuring the cache corresponding to the algorithm. In addition, in the embodiment of the present application, in order to improve the efficiency of starting a shooting scene, when the first shooting resource is configured, a shooting scene (usecast) is also determined synchronously.
S140: and after the shooting scene is determined, acquiring the target resource required to be configured corresponding to the determined shooting scene.
In the embodiment of the application, each shooting scene corresponds to a target resource with required configuration. The target resource corresponding to the shooting scene can be understood as a resource required by the electronic device to realize the shooting target corresponding to the shooting scene. As one way, a correspondence relationship between a shooting scene and a target resource may be established in the electronic device. In this way, after the shooting scene is determined, the corresponding target resource can be further determined according to the corresponding relationship.
S150: and configuring a second shooting resource to finish starting the determined shooting scene, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
It should be noted that, in the aforementioned process of acquiring the corresponding first shooting resource based on the shooting configuration parameter, the determined first shooting resource is only a part of the finally realized shooting target required resources, and after the target resource is determined, a resource (second resource) that has not been configured may be configured to complete the start of the determined shooting scene.
Illustratively, as shown in FIG. 2, the determined target resources include: the method comprises the steps of calculating A, a cache C1 corresponding to the algorithm A, calculating B, a cache C2 corresponding to the algorithm B, calculating C, a cache C3 corresponding to the algorithm C, calculating D and a cache C4 corresponding to the algorithm D. In the shooting scene shown in fig. 2, the image acquired by the camera is processed by an algorithm a, an algorithm B, an algorithm C and an algorithm D in sequence to obtain a shooting target. In this case, after the target resource is determined, only the algorithm C, the cache C3 corresponding to the algorithm C, the cache D corresponding to the algorithm D, and the cache C4 corresponding to the algorithm D may be configured.
After the determined photographing scene is completely started, the display of the preview screen may be started according to the determined photographing scene.
In the shooting scene starting method provided in this embodiment, after the shooting configuration parameters are obtained, the corresponding first shooting resources may be obtained based on the shooting configuration parameters, and then the first shooting resources are configured, and the shooting scene is determined based on the shooting configuration parameters synchronously. And then, after the shooting scene is determined, acquiring a target resource which is required to be configured and corresponds to the determined shooting scene, and configuring a second shooting resource so as to finish starting the determined shooting scene. Therefore, by the above method, before the shooting scene is actually determined, part of resources (resources included in the first shooting resource) in the target resources required to be configured corresponding to the subsequently determined shooting scene can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining resources (second shooting resources) which are not configured can be configured, so that the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, thereby facilitating the increase of the starting speed of the shooting scene and the faster display of the preview picture corresponding to the shooting scene.
Referring to fig. 3, a shooting scene starting method provided in an embodiment of the present application is applied to an electronic device, and the method includes:
s210: the method comprises the steps of obtaining a first configuration parameter input by a user.
By one approach, the first configuration parameters include at least one of a photographing mode, an image output size, a frame rate, and a photographing effect.
The shooting mode may include one of a portrait mode, a landscape mode, a night-view portrait mode, a dynamic mode, a backlight mode, and a panorama mode. The image output size then characterizes the size of the photograph obtained by taking a photograph in the case of taking a photograph. The frame rate represents the frame rate of the captured video in the case of video capture. The shooting effect comprises a beautifying effect, an anti-shake effect and the like.
It should be noted that, a user may perform shooting configuration through an image capture program in the electronic device, and for convenience of an image capture architecture of the electronic device, the configuration generated by the image capture program may be recognized. The configuration generated by the image acquisition program can be converted through the Framework of the electronic device, so that the first configuration parameter is obtained.
S220: and acquiring a second configuration parameter according to the first configuration parameter, wherein the second configuration parameter comprises the configuration parameter of the functional module corresponding to the first configuration parameter.
As one mode, acquiring the second configuration parameter according to the first configuration parameter includes: and analyzing the preset configuration file according to the first configuration parameter to obtain a second configuration parameter, wherein the preset configuration file records the corresponding relation between the configuration parameter input by the user and the corresponding functional module. The default configuration file may be a SW/HW configuration file.
As one way, the first configuration parameter generated by the Framework may be obtained by the Camera hal of the electronic device, and then the second configuration parameter may be obtained by the configuration Stream of the Camera hal according to the SW/HW configuration file.
S230: and taking the first configuration parameter and the second configuration parameter as shooting configuration parameters.
S240: and acquiring a corresponding first shooting resource based on the shooting configuration parameters.
S250: and configuring the first shooting resources, and synchronously starting to determine a shooting scene based on the shooting configuration parameters.
Wherein the shooting scene can be determined by the Camera hal of the electronic device based on the shooting configuration parameters.
As one way, as shown in fig. 4, in the embodiment of the present application, the corresponding shooting scene may be determined according to resources, inputs, and rules. Among them, the resources may include configuration files (e.g., SW/HW configuration files), shooting configuration parameters (Stream configuration), and Metadata (Metadata). The input may include a kind of Application (Special Application), a photographing target (Targets), a photographing Mode (Operation Mode), a number of cameras (Camera Nums), a number of data Streams (Streams Nums), a Camera Vendor (Vendor/OEM specific), and the like. The rule may include selecting a special shooting scene (special use scene) and selecting a Common use scene (Common use selection scene).
S260: and after the shooting scene is determined, acquiring the target resource required to be configured corresponding to the determined shooting scene.
S270: and configuring a second shooting resource to complete the shooting scene determined by starting, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
After the shooting scene is selected, the corresponding XML file is parsed according to the identifier (id) of the determined shooting scene to create a corresponding data stream (pipeline), and a node (node may be understood as a data node with independent data processing capability, such as a different algorithm) of the data stream is initialized, so as to complete starting the determined shooting scene.
According to the shooting scene starting method provided by the embodiment, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in target resources which are required to be configured corresponding to the shooting scene determined subsequently can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining and unconfigured resources (second shooting resources) can be configured, so that all the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, and therefore the starting speed of the shooting scene is improved, and the preview picture corresponding to the shooting scene is displayed more quickly. In addition, in this embodiment, the corresponding relationship between the configuration parameters (first configuration parameters) input by the user and the function modules may be established through the configuration file, so that the second configuration parameters may be determined more flexibly. In addition, in this embodiment, the shooting configuration parameters may include a first configuration parameter input by the user and a second configuration parameter of the functional module required for shooting, which is beneficial to enabling more resources to be configured in advance, so as to further improve the starting efficiency of the shooting scene.
Referring to fig. 5, a shooting scene starting method provided in an embodiment of the present application is applied to an electronic device, and the method includes:
s310: and acquiring shooting configuration parameters which comprise a first configuration parameter and a second configuration parameter.
S320: and if the first configuration parameter is obtained, obtaining the corresponding first shooting resource based on the first configuration parameter.
S330: and if the second configuration parameter is obtained, obtaining the corresponding first shooting resource based on the second configuration parameter, wherein the second configuration parameter is obtained based on the first configuration parameter after the first configuration parameter is obtained, and the second configuration parameter comprises the configuration parameter of the functional module corresponding to the first configuration parameter.
It should be noted that, in this embodiment, after acquiring the first configuration parameter, the electronic device acquires the second configuration parameter according to the first configuration parameter. In this case, the electronic device may actually obtain a part of resources required for the subsequently determined shooting scene according to the first configuration parameter. Furthermore, when the first configuration parameter is detected to be obtained, the corresponding first shooting resource can be obtained, then the second configuration parameter is obtained according to the first configuration parameter, and then the corresponding first shooting resource is obtained according to the second configuration parameter, so that the corresponding first shooting resource is obtained without waiting for the first configuration parameter and the second configuration parameter to be obtained, and further the subsequent determined target resource is configured in an earlier manner, and the efficiency of starting the determined shooting scene is further improved.
S340: and configuring the first shooting resource, and synchronously starting to determine a shooting scene based on the shooting configuration parameters.
S350: and after the shooting scene is determined, acquiring the target resource which is required to be configured and corresponds to the determined shooting scene.
S360: and configuring a second shooting resource to complete the shooting scene determined by starting, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
According to the shooting scene starting method provided by the embodiment, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in target resources which are required to be configured corresponding to the shooting scene determined subsequently can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining and unconfigured resources (second shooting resources) can be configured, so that all the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, and therefore the starting speed of the shooting scene is improved, and the preview picture corresponding to the shooting scene is displayed more quickly. In addition, in this embodiment, when the shooting configuration parameters include the first configuration parameter and the second configuration parameter, when the first configuration parameter or the second configuration parameter is obtained, the corresponding first resource may be obtained, and the obtained first resource is configured, so that the first resource is obtained in multiple stages, and the efficiency of starting the shooting scene is further improved.
Referring to fig. 6, a shooting scene starting method provided in an embodiment of the present application is applied to an electronic device, and the method includes:
s410: and acquiring shooting configuration parameters.
S420: and acquiring a corresponding first shooting resource based on the shooting configuration parameters.
S430: if the first shooting resources are multiple, the time consumed for obtaining the respective configuration of the multiple first shooting resources is obtained.
S440: and sequentially configuring the plurality of first shooting resources from the corresponding first shooting resource with the largest configuration time consumption, and synchronously determining the shooting scene based on the shooting configuration parameters, wherein the first shooting resource with the larger configuration time consumption is configured in the front.
As a manner, if there are a plurality of first shooting resources, before the time for obtaining the respective configuration of the plurality of first shooting resources is consumed, the method further includes: acquiring the residual processing resources of the electronic equipment;
if the remaining processing resources are lower than the resource threshold, executing to obtain the respective configuration time consumption of the plurality of first shooting resources if the first shooting resources are multiple; and if the residual processing resources are not lower than the resource threshold, starting to configure the plurality of first shooting resources in parallel.
The processing resources of the electronic device are, it should be noted that, when the remaining processing resources of the electronic device are lower than the resource threshold, it is characterized that the current remaining processing resources of the electronic device are relatively tense, and in this case, the first shooting resources are serially processed according to the configuration time consumption, so that the consumption of the processing resources of the electronic device is not excessively increased, and the efficiency of starting the shooting scene can be improved.
S450: and after the shooting scene is determined, acquiring the target resource which is required to be configured and corresponds to the determined shooting scene.
S460: and configuring a second shooting resource to complete the shooting scene determined by starting, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
As another mode, acquiring a corresponding first shooting resource based on the shooting configuration parameters includes: acquiring corresponding to-be-selected configuration resources based on the shooting configuration parameters; and selecting a first shooting resource from the to-be-selected configuration resources based on the configuration time consumption of the to-be-selected configuration resources. In this way, based on the configuration time consumption of the configuration resources to be selected, selecting the first shooting resource from the configuration resources to be selected includes: taking the resource to be configured, of which the corresponding configuration time consumption is greater than a time consumption threshold value, as a first shooting resource; or sequencing the resources to be configured based on the configuration time; and taking the corresponding resources to be configured which are sequenced at the front designated position as first shooting resources.
According to the shooting scene starting method provided by the embodiment, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in target resources which are required to be configured corresponding to the shooting scene determined subsequently can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining and unconfigured resources (second shooting resources) can be configured, so that all the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, and therefore the starting speed of the shooting scene is improved, and the preview picture corresponding to the shooting scene is displayed more quickly. In addition, in this embodiment, when there are a plurality of determined first resources, the first resource consuming time may be selected to be preferentially configured according to the configuration consuming time of the first resource.
Referring to fig. 7, a shooting scene starting method provided in an embodiment of the present application is applied to an electronic device, and the method includes:
s510: and acquiring shooting configuration parameters.
S520: and acquiring a corresponding first shooting resource based on the shooting configuration parameters.
S530: and configuring the first shooting resources, and synchronously starting to determine a shooting scene based on the shooting configuration parameters.
S540: and after the shooting scene is determined, acquiring the target resource which is required to be configured and corresponds to the determined shooting scene.
S550: and configuring a second shooting resource to complete the shooting scene determined by starting, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
S560: and acquiring a third resource, wherein the third resource is included in the first shooting resource and is not included in the target resource.
S570: and releasing the configured third resource.
It should be noted that, when the first shooting resource is determined according to the shooting configuration parameters, the resource determination is performed according to a single configuration parameter, or a resource that may be required may be estimated according to the first configuration parameter selected by the user as the first shooting resource, and therefore, the determined first shooting resource may not be a target resource required by a subsequently determined shooting scene. In this case, in order not to cause a waste of resources for the electronic device, the third resource may be released after the target resource is determined.
Illustratively, the determined first photographing resource includes a resource Z1, a resource Z2, a resource Z3, and a resource Z4. The target resource may include resource Z1, resource Z2, resource Z3, and resource Z5. In this case, the resource Z4 is determined as the third resource to be released.
According to the shooting scene starting method provided by the embodiment, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in target resources which are required to be configured corresponding to the shooting scene determined subsequently can be configured in advance based on the shooting configuration parameters, and then after the shooting scene is actually determined, only the remaining and unconfigured resources (second shooting resources) can be configured, so that all the resources (target resources) required by the determined shooting scene are not required to be configured after the shooting scene is actually determined, and therefore the starting speed of the shooting scene is improved, and the preview picture corresponding to the shooting scene is displayed more quickly. In addition, in this embodiment, when there is a third resource that is not required for the determined shooting scene in the first resource, the configured third resource may be released when the third resource has been configured, so as to avoid occupation of too many resources in the electronic device. For example, the third resource may be released by the deinite manner.
Referring to fig. 8, in an electronic device, a shooting scene starting apparatus 600 according to an embodiment of the present application runs, and the apparatus 600 includes:
a configuration parameter acquiring unit 610, configured to acquire shooting configuration parameters.
A first resource obtaining unit 620, configured to obtain a corresponding first shooting resource based on the shooting configuration parameters.
A resource configuration unit 630, configured to configure the first shooting resource.
A scene determining unit 640, configured to start determining the shooting scene based on the shooting configuration parameters synchronously when the resource configuring unit starts configuring the first shooting resource.
And a target resource determining unit 650, configured to, after determining the shooting scene, acquire a target resource that needs to be configured and corresponds to the determined shooting scene.
The resource configuration unit 630 is further configured to configure a second shooting resource to complete the shooting scene determined by the starting, where the second shooting resource is included in the target resource and is not included in the first shooting resource.
As one mode, the configuration parameter obtaining unit 610 is specifically configured to obtain a first configuration parameter input by a user; acquiring a second configuration parameter according to the first configuration parameter, wherein the second configuration parameter comprises a configuration parameter of a functional module corresponding to the first configuration parameter; and taking the first configuration parameter and the second configuration parameter as shooting configuration parameters. Optionally, the configuration parameter obtaining unit 610 is specifically configured to analyze the preset configuration file according to the first configuration parameter to obtain a second configuration parameter, where a corresponding relationship between the configuration parameter input by the user and the corresponding functional module is recorded in the preset configuration file.
By one approach, the first configuration parameters include at least one of a photographing mode, an image output size, a frame rate, and a photographing effect.
As a manner, the first resource obtaining unit 620 is specifically configured to, if the first configuration parameter is obtained, obtain the corresponding first shooting resource based on the first configuration parameter; and if the second configuration parameter is obtained, obtaining the corresponding first shooting resource based on the second configuration parameter, wherein the second configuration parameter is obtained based on the first configuration parameter after the first configuration parameter is obtained, and the second configuration parameter comprises the configuration parameter of the functional module corresponding to the first configuration parameter.
As a manner, the resource configuration unit 630 is specifically configured to, if there are multiple first shooting resources, obtain respective configuration time consumption of the multiple first shooting resources; and sequentially configuring the plurality of first shooting resources from the corresponding first shooting resource with the largest configuration time consumption, wherein the first shooting resource with the larger configuration time consumption is configured in the front. Optionally, the resource configuration unit 630 is further specifically configured to obtain the remaining processing resources of the electronic device; if the remaining processing resources are lower than the resource threshold, executing to obtain the respective configuration time consumption of the plurality of first shooting resources if the number of the first shooting resources is multiple; and if the residual processing resources are not lower than the resource threshold, starting to configure the plurality of first shooting resources in parallel.
As one mode, the first resource obtaining unit 620 is specifically configured to obtain a corresponding to-be-selected configuration resource based on the shooting configuration parameter; and selecting a first shooting resource from the to-be-selected configuration resources based on the configuration time consumption of the to-be-selected configuration resources. Optionally, the first resource obtaining unit 620 is specifically configured to use, as the first shooting resource, a resource to be configured, of the resources to be configured, whose corresponding configuration time consumption is greater than a time consumption threshold; or sequencing the resources to be configured based on the configuration time consumption; and taking the corresponding resources to be configured which are sequenced at the front designated position as first shooting resources.
As one mode, the resource allocation unit 630 is further configured to, after the shooting scene is determined, obtain a target resource that needs to be allocated and corresponds to the determined shooting scene, and obtain a third resource, where the third resource is included in the first shooting resource and is not included in the target resource; and releasing the configured third resource.
According to the shooting scene starting device, after the shooting configuration parameters are obtained, the corresponding first shooting resources can be obtained based on the shooting configuration parameters, then the first shooting resources are configured, and the shooting scene is determined synchronously based on the shooting configuration parameters. And then, after the shooting scene is determined, acquiring a target resource which is required to be configured and corresponds to the determined shooting scene, and configuring a second shooting resource so as to finish starting the determined shooting scene. Therefore, by the above method, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in the target resources required to be configured corresponding to the subsequently determined shooting scene can be configured in advance based on the shooting configuration parameters, and after the shooting scene is actually determined, only the remaining resources (second shooting resources) which are not configured can be configured, so that the resources are not required to be configured after the shooting scene is actually determined, and all the resources (target resources) required by the determined shooting scene are configured, thereby facilitating the increase of the starting speed of the shooting scene, and facilitating the faster display of the preview picture corresponding to the shooting scene.
It should be noted that the device embodiment and the method embodiment in the present application correspond to each other, and specific principles in the device embodiment may refer to the contents in the method embodiment, which is not described herein again.
An electronic device provided by the present application will be described below with reference to fig. 9.
Referring to fig. 9, based on the shooting scene starting method and apparatus, another electronic device 200 capable of executing the shooting scene starting method is further provided in the embodiment of the present application. The electronic device 200 includes one or more processors 202 (only one shown), a memory 204, a network module 206, a sensor module 208, and an audio capture device 210 coupled to one another. The memory 204 stores programs that can execute the content of the foregoing embodiments, and the processor 202 can execute the programs stored in the memory 204.
Processor 202 may include one or more processing cores, among others. The processor 202 interfaces with various components throughout the electronic device 200 using various interfaces and circuitry to perform various functions of the electronic device 200 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 204 and invoking data stored in the memory 204. Alternatively, the processor 202 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 202 may integrate one or more of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 202, but may be implemented by a communication chip.
The Memory 204 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 204 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 204 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like.
The network module 206 is used for implementing information interaction between the electronic device 200 and other devices, for example, transmitting device control instructions, manipulation request instructions, status information acquisition instructions, and the like. When the electronic device 200 is embodied as a different device, the corresponding network module 206 may be different.
The sensor module 208 may include at least one sensor. Specifically, the sensor module 208 may include, but is not limited to: light sensors, motion sensors, pressure sensors, infrared heat sensors, distance sensors, acceleration sensors, and other sensors.
Among them, the pressure sensor may detect a pressure generated by pressing on the electronic device 200. That is, the pressure sensor detects pressure generated by contact or pressing between the user and the electronic device, for example, contact or pressing between the user's ear and the mobile terminal. Thus, the pressure sensor may be used to determine whether contact or pressure has occurred between the user and the electronic device 200, as well as the magnitude of the pressure.
The acceleration sensor may detect the magnitude of acceleration in each direction (generally, three axes), detect the magnitude and direction of gravity when stationary, and may be used for applications (such as horizontal and vertical screen switching, related games, magnetometer attitude calibration) for recognizing the attitude of the electronic device 200, and related functions (such as pedometer and tapping) for vibration recognition. In addition, the electronic device 200 may further be configured with other sensors such as a gyroscope, a barometer, a hygrometer and a thermometer, which are not described herein again.
And the audio acquisition device 210 is used for acquiring audio signals. Optionally, the audio capturing device 210 includes a plurality of audio capturing devices. The audio capture device may be a microphone. For example, in one approach, the audio capture device 210 may include two microphones, in which one of the microphones may correspond to an analog-to-digital converter and the other microphone may correspond to an analog-to-digital converter with two different analog gains. In another approach, the audio capture device 210 may include three microphones. In this manner, two of the microphones (e.g., the primary microphone and the secondary microphone) may each have one analog-to-digital converter, and the other microphone (e.g., the camera microphone) may have two analog-to-digital converters of different analog gains.
As one mode, the network module of the electronic device 200 is a radio frequency module, and the radio frequency module is configured to receive and transmit electromagnetic waves, and implement interconversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. The radio frequency module may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and so forth. For example, the radio frequency module may perform information interaction with an external device through transmitted or received electromagnetic waves, and further receive an audio signal transmitted by the external device.
Furthermore, the electronic device 200 may further include an image capturing device to capture an image. For example, a video, a still picture, or a moving picture may be taken by the image pickup device.
Referring to fig. 10, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer-readable medium 800 has stored therein a program code that can be called by a processor to execute the method described in the above-described method embodiments.
The computer-readable storage medium 800 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 800 includes a non-volatile computer-readable medium. The computer readable storage medium 800 has storage space for program code 810 to perform any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 810 may be compressed, for example, in a suitable form.
According to the shooting scene starting method, the shooting scene starting device and the electronic equipment, after the shooting configuration parameters are obtained, the corresponding first shooting resources can be obtained based on the shooting configuration parameters, then the first shooting resources are configured, and the shooting scene is determined based on the shooting configuration parameters synchronously. And then, after the shooting scene is determined, acquiring a target resource which is required to be configured and corresponds to the determined shooting scene, and configuring a second shooting resource to finish starting the determined shooting scene. Therefore, by the above method, before the shooting scene is actually determined, part of resources (resources included in the first shooting resources) in the target resources required to be configured corresponding to the subsequently determined shooting scene can be configured in advance based on the shooting configuration parameters, and after the shooting scene is actually determined, only the remaining resources (second shooting resources) which are not configured can be configured, so that the resources are not required to be configured after the shooting scene is actually determined, and all the resources (target resources) required by the determined shooting scene are configured, thereby facilitating the increase of the starting speed of the shooting scene, and facilitating the faster display of the preview picture corresponding to the shooting scene.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not necessarily depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (13)

1. A shooting scene starting method is applied to electronic equipment and comprises the following steps:
acquiring shooting configuration parameters;
acquiring a corresponding first shooting resource based on the shooting configuration parameter;
configuring the first shooting resource, and synchronously starting to determine a shooting scene based on the shooting configuration parameters;
after the shooting scene is determined, acquiring target resources which are required to be configured and correspond to the determined shooting scene;
and configuring a second shooting resource to finish starting the determined shooting scene, wherein the second shooting resource is included in the target resource and is not included in the first shooting resource.
2. The method according to claim 1, wherein the obtaining the shooting configuration parameters comprises:
acquiring a first configuration parameter input by a user;
acquiring a second configuration parameter according to the first configuration parameter, wherein the second configuration parameter comprises a configuration parameter of a functional module corresponding to the first configuration parameter;
and taking the first configuration parameter and the second configuration parameter as shooting configuration parameters.
3. The method according to claim 2, wherein the obtaining a second configuration parameter according to the first configuration parameter comprises:
and analyzing a preset configuration file according to the first configuration parameter to obtain a second configuration parameter, wherein the preset configuration file records the corresponding relation between the configuration parameter input by the user and the corresponding functional module.
4. The method of claim 1, wherein the first configuration parameters comprise at least one of a photographing mode, an image output size, a frame rate, and a photographing effect.
5. The method of claim 1, wherein the shooting configuration parameters comprise a first configuration parameter and a second configuration parameter, and wherein the obtaining the corresponding first shooting resource based on the shooting configuration parameters comprises:
if the first configuration parameter is obtained, obtaining a corresponding first shooting resource based on the first configuration parameter;
and if a second configuration parameter is obtained, obtaining the corresponding first shooting resource based on the second configuration parameter, wherein the second configuration parameter is obtained based on the first configuration parameter after the first configuration parameter is obtained, and the second configuration parameter comprises the configuration parameter of the functional module corresponding to the first configuration parameter.
6. The method of claim 1, wherein the configuring the first camera resource comprises:
if the first shooting resources are multiple, acquiring the configuration time consumption of each first shooting resource;
and sequentially allocating the plurality of first shooting resources from the corresponding first shooting resource with the largest allocation time consumption, wherein the first shooting resources with the larger allocation time consumption are allocated more front.
7. The method of claim 6, wherein before the time for obtaining the respective configurations of the plurality of first camera resources is consumed if there are a plurality of first camera resources, the method further comprises:
acquiring the residual processing resources of the electronic equipment;
if the remaining processing resources are lower than a resource threshold, executing that if the number of the first shooting resources is multiple, the configuration time of each of the multiple first shooting resources is obtained;
and if the residual processing resources are not lower than the resource threshold, starting to configure the plurality of first shooting resources in parallel.
8. The method according to claim 1, wherein the obtaining the corresponding first shooting resource based on the shooting configuration parameters comprises:
acquiring corresponding to-be-selected configuration resources based on the shooting configuration parameters;
and selecting a first shooting resource from the to-be-selected configuration resources based on the configuration time consumption of the to-be-selected configuration resources.
9. The method according to claim 8, wherein the selecting a first shooting resource from the candidate configuration resources based on the configuration time of the candidate configuration resources comprises:
taking the corresponding resource to be configured, of the resources to be configured, of which the configuration time consumption is greater than a time consumption threshold value as a first shooting resource; or
Sequencing resources to be configured based on the configuration time;
and taking the corresponding resources to be configured which are sequenced at the front designated position as first shooting resources.
10. The method according to claim 1, wherein after determining the shooting scene, acquiring the target resource required to be configured corresponding to the determined shooting scene further comprises:
acquiring a third resource, wherein the third resource is included in the first shooting resource and is not included in the target resource;
releasing the configured third resource.
11. A shooting scene starting apparatus, operable on an electronic device, the apparatus comprising:
a configuration parameter acquiring unit for acquiring shooting configuration parameters;
a first resource obtaining unit, configured to obtain a corresponding first shooting resource based on the shooting configuration parameter;
a resource configuration unit, configured to configure the first shooting resource;
the scene determining unit is used for synchronously determining shooting scenes based on the shooting configuration parameters when the resource configuration unit starts to configure the first shooting resources;
the target resource determining unit is used for acquiring the target resource which needs to be configured and corresponds to the determined shooting scene after the shooting scene is determined;
the resource configuration unit is further configured to configure a second shooting resource to complete starting the determined shooting scene, where the second shooting resource is included in the target resource and is not included in the first shooting resource.
12. An electronic device comprising one or more processors and memory; one or more programs stored in the memory and configured to be executed by the one or more processors to perform the method of any of claims 1-10.
13. A computer-readable storage medium, having program code stored therein, wherein the program code when executed by a processor performs the method of any of claims 1-10.
CN202211111503.7A 2022-09-13 2022-09-13 Shooting scene starting method and device and electronic equipment Pending CN115696016A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211111503.7A CN115696016A (en) 2022-09-13 2022-09-13 Shooting scene starting method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211111503.7A CN115696016A (en) 2022-09-13 2022-09-13 Shooting scene starting method and device and electronic equipment

Publications (1)

Publication Number Publication Date
CN115696016A true CN115696016A (en) 2023-02-03

Family

ID=85061753

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211111503.7A Pending CN115696016A (en) 2022-09-13 2022-09-13 Shooting scene starting method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN115696016A (en)

Similar Documents

Publication Publication Date Title
CN108924420B (en) Image shooting method, image shooting device, image shooting medium, electronic equipment and model training method
CN109756671B (en) Electronic device for recording images using multiple cameras and method of operating the same
EP3687161B1 (en) Method for image shooting, apparatus, and storage medium
CN111491102B (en) Detection method and system for photographing scene, mobile terminal and storage medium
US10181203B2 (en) Method for processing image data and apparatus for the same
EP3627823B1 (en) Image selection method and related product
CN108132790B (en) Method, apparatus and computer storage medium for detecting a garbage code
CN107360366B (en) Photographing method and device, storage medium and electronic equipment
WO2013181014A1 (en) Storyboards for capturing images
CN108616687B (en) Photographing method and device and mobile terminal
CN111416996B (en) Multimedia file detection method, multimedia file playing device, multimedia file equipment and storage medium
US11102397B2 (en) Method for capturing images, terminal, and storage medium
CN113014804A (en) Image processing method, image processing device, electronic equipment and readable storage medium
CN110231962B (en) Process performance configuration method, device, terminal and storage medium
CN107734269B (en) Image processing method and mobile terminal
CN111464864B (en) Reverse order video acquisition method and device, electronic equipment and storage medium
CN116320727B (en) Algorithm scheduling method and electronic equipment
CN113744139A (en) Image processing method, image processing device, electronic equipment and storage medium
CN115696016A (en) Shooting scene starting method and device and electronic equipment
CN111371998B (en) Camera starting control method and related device
CN117041726A (en) Shooting processing method and device, electronic equipment and storage medium
CN112672046B (en) Method and device for storing continuous shooting images, electronic equipment and storage medium
CN110830723B (en) Shooting method, shooting device, storage medium and mobile terminal
WO2024093512A1 (en) Object processing method and apparatus, electronic device and readable storage medium
CN117130764A (en) Algorithm operation method, device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination