CN109729271B - Camera configuration label processing method and device, electronic equipment and storage medium - Google Patents

Camera configuration label processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN109729271B
CN109729271B CN201910012287.2A CN201910012287A CN109729271B CN 109729271 B CN109729271 B CN 109729271B CN 201910012287 A CN201910012287 A CN 201910012287A CN 109729271 B CN109729271 B CN 109729271B
Authority
CN
China
Prior art keywords
configuration
tag
camera
tags
label
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.)
Active
Application number
CN201910012287.2A
Other languages
Chinese (zh)
Other versions
CN109729271A (en
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 CN201910012287.2A priority Critical patent/CN109729271B/en
Publication of CN109729271A publication Critical patent/CN109729271A/en
Application granted granted Critical
Publication of CN109729271B publication Critical patent/CN109729271B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Studio Devices (AREA)

Abstract

The application provides a processing method and device for a camera configuration label, electronic equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring a first label set stored in electronic equipment; traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags; and storing the obtained second configuration tag to a second tag set, wherein the second configuration tag is used for indicating the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and controlling the camera to execute a corresponding operation according to the obtained first configuration tag. The processing method and device for the camera configuration label, the electronic equipment and the computer readable storage medium can improve the data processing efficiency.

Description

Camera configuration label processing method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method and an apparatus for processing a camera configuration tag, an electronic device, and a computer-readable storage medium.
Background
The electronic equipment can be provided with an application program, and the application program can control the camera to perform operations such as parameter setting and shooting. Generally, a manufacturer of the camera or other manufacturers using the camera may define some configuration tags and transmit data through the configuration tags to control the camera.
When the application program needs to control the camera, the configuration parameters of the bottom layer cannot be directly acquired, and variables corresponding to the configuration labels need to be defined in the application layer, so that instructions are sent to the camera through the configuration parameters corresponding to the variables. When the camera executes different operations, the variables defined by the application layer are different.
Disclosure of Invention
The embodiment of the application provides a method and a device for processing a camera configuration label, electronic equipment and a computer readable storage medium, which can improve data processing efficiency.
A camera configuration tag processing method comprises the following steps:
acquiring a first label set stored in electronic equipment;
traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags;
and storing the obtained second configuration tag to a second tag set, wherein the second configuration tag is used for indicating the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and controlling the camera to execute a corresponding operation according to the obtained first configuration tag.
A camera configuration tag processing apparatus, comprising:
the first tag acquisition module is used for acquiring a first tag set stored in the electronic equipment;
the second tag obtaining module is used for traversing the first configuration tags in the first tag set and taking the first configuration tags which do not contain preset fields as second configuration tags;
and the second tag storage module is configured to store the obtained second configuration tag to a second tag set, where the second configuration tag is used to instruct the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and control the camera to execute a corresponding operation according to the obtained first configuration tag.
An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of:
acquiring a first label set stored in electronic equipment;
traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags;
and storing the obtained second configuration tag to a second tag set, wherein the second configuration tag is used for indicating the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and controlling the camera to execute a corresponding operation according to the obtained first configuration tag.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a first label set stored in electronic equipment;
traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags;
and storing the obtained second configuration tag to a second tag set, wherein the second configuration tag is used for indicating the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and controlling the camera to execute a corresponding operation according to the obtained first configuration tag.
According to the camera configuration label processing method, the camera configuration label processing device, the electronic equipment and the computer readable storage medium, the first label set stored in the electronic equipment can be obtained, the first configuration label in the first label set is traversed, and whether the first configuration label contains the preset field or not is judged. And taking the first configuration label which does not contain the preset field as a second configuration label, and then storing the second configuration label into a second label set. When the application program needs to control the camera, the application program can directly acquire the second configuration tag from the second tag set, and control the camera to execute corresponding operations through the acquired second configuration tag. Therefore, the application program is not required to define a variable when the camera is controlled each time, the first configuration label is searched through different defined variables, and the camera is controlled through the first configuration label, so that the variables required to be defined by the application program are reduced, the maintenance cost of the variables is reduced, and the data processing efficiency is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of an application environment of a processing method for configuring a tag for a camera in one embodiment;
FIG. 2 is a flowchart of a method for processing a camera configuration tag in one embodiment;
fig. 3 is a flowchart of a processing method of a camera configuration tag in another embodiment;
FIG. 4 is a diagram that illustrates generating a second set of tags from a first set of tags, under an embodiment;
FIG. 5 is a flowchart of a method for processing a camera configuration tag in yet another embodiment;
FIG. 6 is a flowchart of a method for processing a camera configuration tag in yet another embodiment;
fig. 7 is a flowchart illustrating steps of the method for processing the camera configuration tag;
FIG. 8 is a schematic structural diagram of a tag processing apparatus configured to a camera in one embodiment;
FIG. 9 is a schematic diagram of an image processing circuit in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
It will be understood that, as used herein, the terms "first," "second," and the like may be used herein to describe various elements, but these elements are not limited by these terms. These terms are only used to distinguish one element from another. For example, a first labelset may be referred to as a second labelset, and similarly, a second labelset may be referred to as a first labelset, without departing from the scope of the present application. Both the first labelset and the second labelset are labelsets, but they are not the same labelset.
Fig. 1 is a schematic application environment diagram of a processing method for configuring a tag for a camera in one embodiment. As shown in fig. 1, the application environment includes an electronic device 102, a camera 104 is installed on the electronic device 102, and a first tag set may be further stored in the electronic device 102. Specifically, the electronic device 102 may obtain a stored first tag set, then traverse a first configuration tag in the first tag set, and use the first configuration tag that does not include the preset field as a second configuration tag. And finally, storing the obtained second configuration label to a second label set. The second configuration tag is used to instruct the electronic device 102 to obtain the corresponding first configuration tag when the application program initiates a control instruction for controlling the camera, and control the camera 104 to execute the corresponding operation according to the obtained first configuration tag. For example, the camera electronic device 102 is controlled to capture the image 106 according to the acquired first configuration tag. In one embodiment, the electronic device 102 may be a mobile phone, a computer, a wearable device, and the like, which is not limited herein.
Fig. 2 is a flowchart of a processing method for configuring a tag for a camera in one embodiment. As shown in fig. 2, the method for processing the camera configuration label includes steps 202 to 206. Wherein:
step 202, a first tag set stored in the electronic device is obtained.
A first set of tags may be stored in the electronic device, the first set of tags having at least one first configuration Tag (Tag) stored therein. Specifically, each first configuration tag may store one metadata (metadata) correspondingly, and control the camera is implemented through the metadata.
In one embodiment, the first set of tags may be stored in a memory space corresponding to a framework (framework) layer of the electronic device, the first set of tags not being directly accessible to an application (application) layer. When an application program controls a camera, a variable needs to be defined in an application Layer, then the application Layer transmits the variable to a framework (frame) Layer, the framework Layer analyzes the variable to find a corresponding first configuration label, then metadata corresponding to the first configuration label is obtained, the metadata is transmitted to a Hardware Abstraction Layer (HAL), and the Hardware abstraction Layer controls the camera according to the metadata.
For example, if the application layer sets the focus mode of the camera to automatic, assuming that the metadata corresponding to the "focus mode" is "10" and the metadata corresponding to the "automatic" is "1", the framework layer may send a metadata pair (10,1) to the hardware abstraction layer, and then the hardware abstraction layer sets the parameter corresponding to the metadata "10" to "1" through the metadata pair (10, 1).
Step 204, traversing the first configuration tag in the first tag set, and using the first configuration tag not containing the preset field as a second configuration tag.
Specifically, the electronic device may obtain a first set of tags from the framework layer and send the first set of tags to the application layer. There are two types of first configuration tags contained in a first set of tags stored in the framework layer: one is a first configuration tag defined natively for the camera and one is a first configuration tag customized by the platform vendor. Generally, an application layer of the electronic device can only call a first configuration tag customized by a platform manufacturer, and the camera is controlled through the first configuration tag customized by the platform manufacturer.
After the application layer obtains the first tag set, the application layer may traverse the first configuration tag in the first tag set, and determine whether the first configuration tag includes a preset field. When the first configuration tag contains a preset field, the first configuration tag is considered to be originally defined for the camera, namely the configuration tag inherent to the camera; and when the first configuration tag does not contain the preset field, the first configuration tag is considered to be a configuration tag customized by a platform manufacturer.
For example, in the architecture of Camera HAL3, the first configuration tags defined by Google native are all defined by "android" fields, the first configuration tags defined by platform vendors are all defined by "company name + role", and when the "android" fields are detected to be included in the first configuration tags, the first configuration tags are considered as native definitions; when the first configuration tag is detected to contain no 'android' field, the first configuration tag is considered to be self-defined by the platform manufacturer.
And step 206, storing the obtained second configuration tag to a second tag set, where the second configuration tag is used to instruct the electronic device to obtain a corresponding first configuration tag when the application program initiates a control instruction for the camera, and control the camera to execute a corresponding operation according to the obtained first configuration tag.
In the embodiment of the application, the first configuration tag which does not include the preset field is used as the second configuration tag, and the second configuration tag is the configuration tag defined by the platform manufacturer. The second tag set is a data set stored in a storage space corresponding to the application layer, the obtained second configuration tag is stored in the second tag set, and the application layer can directly access the second configuration tag in the second tag set.
Specifically, after the second configuration tag is stored in the second tag set, the application program may initiate a control instruction for the camera when the camera needs to be controlled, then directly acquire the second configuration tag from the second tag set according to the control instruction, and transmit the acquired second configuration tag to the framework layer. The second configuration tag and the first configuration tag are corresponding, so that the framework layer can directly search the matched first configuration tag according to the passed second configuration tag, and send the metadata corresponding to the matched first configuration tag to the hardware abstraction layer, and the hardware abstraction layer controls the camera to execute corresponding operation according to the obtained metadata.
The method for processing the camera configuration tag provided in this embodiment can obtain a first tag set stored in the electronic device, traverse a first configuration tag in the first tag set, and determine whether the first configuration tag includes a preset field. And taking the first configuration label which does not contain the preset field as a second configuration label, and then storing the second configuration label into a second label set. When the application program needs to control the camera, the application program can directly acquire the second configuration tag from the second tag set, and control the camera to execute corresponding operations through the acquired second configuration tag. Therefore, the application program is not required to define a variable when the camera is controlled each time, the first configuration label is searched through different defined variables, and the camera is controlled through the first configuration label, so that the variables required to be defined by the application program are reduced, the maintenance cost of the variables is reduced, and the data processing efficiency is improved.
Fig. 3 is a flowchart of a processing method for configuring a tag for a camera in another embodiment. As shown in fig. 3, the camera configuration label processing method includes steps 302 to 318. Wherein:
step 302, when a starting instruction of a camera of the electronic device is detected, controlling the camera to be opened according to the starting instruction.
It will be appreciated that the process of generating the second set of tags can be implemented at any time. For example, when the electronic device is idle, a first set of tags is obtained to generate a second set of tags; or when the electronic equipment is started, acquiring the first label set to generate a second label set.
Some electronic devices may be limited by the system, and only when the camera is turned on and enters the preview mode, the first configuration tag may be acquired.
And step 304, configuring preview parameters for the camera, and controlling the camera to enter a preview mode according to the preview parameters.
In the embodiment provided by the application, when a starting instruction of the camera of the electronic device is detected, the camera is controlled to be opened according to the starting instruction, and the camera is controlled to enter the preview mode after the camera is started. Before the camera enters the preview mode, the preview parameters can be configured for the camera, and then the camera is controlled to enter the preview mode according to the preview parameters.
The preview parameter refers to a parameter that needs to be set when the camera enters the preview mode, for example, the preview parameter may be an interface parameter displayed on a display screen of the electronic device after the camera enters the preview mode, or may be a processing parameter of an image acquired by the camera when the camera enters the preview mode, and the like, which is not limited herein.
Step 306, a first tag set stored in the electronic device is obtained.
Specifically, a first tag set stored in a storage space corresponding to a framework layer in the electronic device is obtained, where the first tag set may be a file storing a first configuration tag, and is not limited herein. For example, in the android system, the first configuration tag may be stored by a "camera _ metadata _ tag _ info.h" file in the framework layer, and then the "camera _ metadata _ tag _ info.h" file is the first set of tags.
Step 308, traverse the first configuration tag in the first tag set, and use the first configuration tag not containing the preset field as the second configuration tag.
Specifically, an application in the electronic device cannot directly access a storage space corresponding to the framework layer, and therefore the application cannot directly obtain the first configuration tag from the first tag set. The electronic device may obtain the first set of tags from the memory space of the framework layer and generate the second set of tags from the first set of tags. The generated second labelset is stored in a storage space corresponding to the application program, and the application program can directly access the second labelset.
Step 310, counting the use frequency corresponding to each second configuration tag.
It can be understood that the second configuration tag is generated according to the first configuration tag, so that when the application program controls the camera, the application program can directly search the corresponding first configuration tag according to the second configuration tag, and control the camera to execute the corresponding operation according to the first configuration tag.
Before generating the second tag set, the usage frequency corresponding to each second configuration tag may be counted. The use frequency corresponding to the second configuration tag is the use frequency of the first configuration tag corresponding to the second configuration tag, that is, the frequency of the electronic device searching for the first configuration tag.
Specifically, the number of times of use of each second configuration tag in the statistical time period may be counted, and the frequency of use may be calculated according to the counted number of times of use and the duration of the statistical time period. For example, the usage frequency corresponding to the configuration tag a is counted for 10 times/day, the usage frequency corresponding to the configuration tag B is counted for 4 times/day, and the usage frequency corresponding to the configuration tag C is counted for 21 times/day.
Step 312, sorting the second configuration tags according to the usage frequency, and storing the sorted second configuration tags in a second tag set.
After each second configuration tag is obtained through statistics, the second configuration tags may be sorted according to the use frequency, and then the second configuration tags are stored in the second tag set according to the sorting. Therefore, the second configuration label is stored in the second label set, and when the application program searches for the second configuration label in the second label set, the application program can search according to the use frequency, so that the searching efficiency is improved.
In an embodiment, the second configuration tags may be sorted in a descending order according to the usage frequency, or sorted in an ascending order according to the usage frequency, which is not limited herein. The generated second tag set is stored in a storage space corresponding to the application layer, and the electronic device may continuously update the second tag set in the application layer because the first configuration tag in the first tag set may be modified such as newly added, replaced, deleted, and the like, so as to ensure that the application program can accurately call the second configuration tag.
Specifically, the electronic device may update the second tag set at regular time, and due to system limitations, some systems of the electronic device may only allow the first tag set to be acquired after the camera is turned on, so the electronic device may also update the second tag set each time the camera is turned on, which is not limited to this.
Step 314, when it is detected that the target application program initiates a target control instruction for the camera, a second target configuration tag corresponding to the target control instruction is obtained from the second tag set.
After the second labelset is generated, the application layer may directly access the second labelset and obtain a second configuration label from the second labelset. The electronic device can monitor the working state of the application program in real time, and when the target application program is detected to initiate a target control instruction for the camera, a second target configuration tag corresponding to the target control instruction is obtained from the second tag set.
It will be appreciated that the target application may initiate target control instructions when it needs to operate the camera. The initiated target control instruction can be written to the instruction initiation time, the operation data and other contents, and the target application program can be analyzed according to the operation data, wherein the operation is specifically required to be performed on the camera.
For example, the target application program may carry operation data of "photo" in the target control instruction, and when the electronic device detects "photo", the electronic device may search for a second configuration tag corresponding to "photo" in the second tag set as the second target configuration tag, for example, the searched second target configuration tag is "com.
Step 316, obtaining a first target configuration tag corresponding to the second target configuration tag from the first tag set.
After the second target configuration tag corresponding to the target control instruction is acquired from the second tag set, the application layer may transmit the second target configuration tag to the framework layer, and the framework layer may search for the first target configuration tag matched with the second target configuration tag from the first tag set.
And step 318, acquiring target metadata corresponding to the first target configuration tag, and controlling the camera to execute corresponding operation according to the target metadata.
The electronic equipment establishes a corresponding relation between the first configuration tag and the metadata in advance, and correspondingly stores the first configuration tag and the metadata in a storage space of the framework layer. After the first target configuration tag is acquired, corresponding target metadata can be acquired according to the first configuration tag, the target metadata is sent to the hardware abstraction layer, and then the camera is controlled to execute corresponding operations.
According to the processing method for the camera configuration tag, the second configuration tag is obtained according to the first configuration tag, so that an application program is not required to define a variable when the camera is controlled each time, the first configuration tag is searched through different defined variables, and the camera is controlled through the first configuration tag, so that the variables required to be defined by the application program are reduced, the maintenance cost of the variables is reduced, and the efficiency of data processing is improved. The obtained second configuration labels are sorted according to the use frequency and then stored in the second label set, so that the searching efficiency of the second configuration labels can be improved.
FIG. 4 is a diagram that illustrates generating a second labelset from a first labelset, under an embodiment. As shown in FIG. 4, the first configuration Tags in the first tag set may be native Tags (e.g., Google Tags) and Vendor Tags (e.g., Vendor Tags). And filtering the first configuration label in the first label set, filtering the original label, generating a second configuration label according to the rest manufacturer labels, and finally generating a second label set according to the second configuration label.
In an embodiment, as shown in fig. 5, the method for processing the camera configuration tag may further include the following steps:
step 502, when it is detected that the first configuration tag in the first tag set is updated, acquiring the updated first configuration tag in the first tag set as an updated configuration tag.
The second tag set is generated according to the first configuration tags in the first tag set, and the electronic device does not need to define a corresponding variable for each first configuration tag in the application layer, so that when the first configuration tags in the first tag set are updated, the corresponding variables do not need to be updated for each updated first configuration tag, and the maintenance cost of the application layer is reduced.
When detecting that the first configuration tag in the first tag set is updated, the electronic device may update the second tag set according to the updated first configuration tag. The updating of the first configuration tag refers to operations such as deleting, adding, replacing and the like of the first configuration tag.
When it is detected that the first configuration tag in the first tag set is updated, all the first configuration tags in the updated first tag set may be obtained again, a second configuration tag for updating is generated according to all the first configuration tags in the updated first tag set, and the generated second configuration tag for updating replaces the originally stored second configuration tag in the second tag set, so as to complete updating of the second tag set. It is also possible to obtain only the updated first configuration tag in the first tag set, use the updated first configuration tag as the updated configuration tag, and update the second tag set according to the updated configuration tag, but not limited thereto.
Step 504, updating the second tag set according to the updated configuration tag not containing the preset field.
In this embodiment, the updated first configuration tag is used as the update configuration tag, and after the update configuration tag is obtained, the update configuration tag also needs to be filtered, only the update configuration tag that does not include the preset field is reserved, and then the second tag set is updated according to the reserved update configuration tag.
Specifically, the updating of the configuration tag may include adding a configuration tag, deleting a configuration tag, and modifying a configuration tag, and if the configuration tag is the added configuration tag, a second configuration tag may be directly added in the second tag set according to the added configuration tag; if the configuration label is deleted, a second configuration label corresponding to the deleted configuration label can be directly found in the second label set, and the found second configuration label is deleted; if the configuration label is modified, a second configuration label corresponding to the modified configuration label can be found in the second label set, and the found second configuration label is modified according to the modified configuration label.
In this embodiment of the application, applications installed in the electronic device may be classified in advance, where the second set of tags includes at least one classification tag set, and each class of application corresponds to one classification tag set. For example, applications in the electronic device are classified into game applications, shopping applications, video applications, camera applications, and the like, but are not limited thereto.
It will be appreciated that the application operations implemented by different application programs are different and therefore the operations implemented by the calling camera are also different. For example, the payment application program can control the camera to acquire images to realize payment verification operation, and high-precision images need to be acquired during the payment verification operation; the camera can be controlled by the photographic application program to collect images, and shooting parameters need to be adjusted when the images are collected.
The operation that different application programs need to control the camera to realize the operation may be different, so that the first configuration tags that different types of application programs need to call may be different, different second tag sets can be generated for different types of application programs according to the requirements of the application programs, and when the application programs control the camera, the application programs can search for the second configuration tags in the corresponding second tag sets, thereby improving the searching efficiency.
Specifically, the storing the obtained second configuration tag in the second tag set may specifically include: and acquiring the classification configuration labels corresponding to each type of application program from the second configuration labels, and respectively storing the acquired classification configuration labels to the corresponding classification label sets.
In an embodiment, a second tag set may be separately established for each application program, so that when the application program controls the camera, the application program may directly search for the second configuration tag from the corresponding second tag set, which is not limited herein.
In an embodiment, as shown in fig. 6, the step of storing the classification configuration tag in the classification tag set may specifically include:
step 602, obtaining the application level of each type of application program, and encrypting the classification configuration label according to the application level.
After the application layer acquires the second configuration tag, the application program in the electronic device may access the second configuration tag, which may cause a security risk. After the class configuration tag is obtained, the class configuration tag may be encrypted according to the application level of the application program.
The application level is used to indicate the importance of the application program, and the higher the application level is, the higher the security requirement of the application program is, the higher the security requirement is when controlling the camera. Therefore, the classification configuration tag can be encrypted according to the application level of the application program. Specifically, the encryption processing is performed by applying a classification configuration tag corresponding to an application program with a level higher than a level threshold.
Further, when the application level of the application program is higher than the level threshold, the encryption level can be obtained according to the application level, and the classification configuration tag corresponding to the application program is encrypted according to the encryption level. The higher the application level, the higher the security of the encryption process.
And step 604, storing the encrypted classification configuration labels to corresponding classification label sets respectively.
And after encrypting the classification configuration labels, respectively storing the encrypted classification configuration labels to corresponding classification label sets. After the application program initiates the control instruction, the camera can be controlled according to the decrypted classification configuration label after the classification configuration label is decrypted, so that the safety of controlling the camera is improved.
In an embodiment, after storing the encrypted classification configuration tag in the classification tag set, the step of controlling the camera may specifically include: when detecting that a target application program initiates a target control instruction for a camera, acquiring a target application category of the target application program, and acquiring a second target configuration label corresponding to the target control instruction from a classification label set corresponding to the target application category; acquiring a decryption password carried in the target control instruction, and decrypting the second target configuration tag according to the acquired decryption password; acquiring a first target configuration label corresponding to the decrypted second target configuration label from the first label set; and acquiring target metadata corresponding to the first target configuration tag, and controlling the camera to execute corresponding operation according to the target metadata.
It should be understood that although the steps in the flowcharts of fig. 2, 3, 5, and 6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2, 3, 5, and 6 may include multiple sub-steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternatingly with other steps or at least some of the sub-steps or stages of other steps.
Fig. 7 is a flowchart illustrating steps of the method for processing the camera configuration tag. As shown in fig. 7, the steps of executing the processing method for configuring the label of the camera specifically include:
step 702, obtain a first configuration tag set.
Step 704, reading the first configuration tags in the first configuration tag set in sequence.
Step 706, determining whether the acquired first configuration tag includes a preset field, if not, executing step 708; if yes, go back to step 704.
Step 708, when the acquired first configuration tag does not include the preset field, generating a second configuration tag according to the acquired first configuration tag.
Step 710, the generated second configuration label is put into a second label set.
Step 712, determining whether all the first configuration tags in the first tag set are read, if yes, ending the process; if not, go back to step 704.
In an embodiment, the method for processing the camera configuration tag may further include the following steps:
(1) when a starting instruction of a camera of the electronic equipment is detected, controlling the camera to be opened according to the starting instruction;
(2) and configuring preview parameters for the camera, and controlling the camera to enter a preview mode according to the preview parameters.
(3) Acquiring a first label set stored in electronic equipment;
(4) traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags;
(5) obtaining a classification configuration label corresponding to each type of application program from the second configuration label;
(6) acquiring the application level of each type of application program, and encrypting the classified configuration labels according to the application level;
(7) counting the use frequency corresponding to each classification configuration label;
(8) sorting the encrypted classification configuration labels according to the use frequency, and storing the sorted classification configuration labels to a classification label set;
(9) when detecting that a first configuration tag in a first tag set is updated, acquiring the updated first configuration tag in the first tag set as an updated configuration tag;
(10) updating the classification label set according to the updating configuration label which does not contain the preset field;
(11) when detecting that a target application program initiates a target control instruction for a camera, acquiring a target application category of the target application program, and acquiring a second target configuration label corresponding to the target control instruction from a classification label set corresponding to the target application category;
(12) acquiring a decryption password carried in the target control instruction, and decrypting the second target configuration tag according to the acquired decryption password;
(13) acquiring a first target configuration label corresponding to the decrypted second target configuration label from the first label set;
(14) and acquiring target metadata corresponding to the first target configuration tag, and controlling the camera to execute corresponding operation according to the target metadata.
Fig. 8 is a schematic structural diagram of a camera configuration label processing apparatus in one embodiment. As shown in fig. 8, the camera configuration tag processing apparatus 800 includes a first tag obtaining module 802, a second tag obtaining module 804, and a second tag storing module 806. Wherein:
a first tag obtaining module 802, configured to obtain a first tag set stored in an electronic device;
a second tag obtaining module 804, configured to traverse the first configuration tag in the first tag set, and use the first configuration tag that does not include the preset field as a second configuration tag;
the second tag storage module 806 is configured to store the obtained second configuration tag in a second tag set, where the second configuration tag is used to instruct the electronic device to obtain a corresponding first configuration tag when the application program initiates a control instruction for the camera, and control the camera to execute a corresponding operation according to the obtained first configuration tag.
The camera configuration tag processing device provided by the embodiment does not need an application program to define a variable when the camera is controlled each time, then searches for the first configuration tag through different defined variables, and controls the camera through the first configuration tag, so that the variables required to be defined by the application program are reduced, the maintenance cost of the variables is reduced, and the data processing efficiency is improved.
In one embodiment, the second tag storage module 806 is further configured to count a usage frequency corresponding to each second configuration tag; and sorting the second configuration tags according to the use frequency, and storing the sorted second configuration tags to a second tag set.
In one embodiment, applications installed in the electronic device are classified in advance, the second label set comprises at least one classification label set, and each class of application corresponds to one classification label set; the second tag storage module 806 is further configured to obtain the class configuration tags corresponding to each class of application programs from the second configuration tags, and store the obtained class configuration tags to corresponding class tag sets respectively.
The second tag storage module 806 is further configured to obtain an application level of each type of application program, and encrypt the class configuration tag according to the application level; and respectively storing the encrypted classification configuration labels to corresponding classification label sets.
In one embodiment, the camera configuration tag processing module further includes a camera opening module, and the camera opening module is configured to control the camera to be opened according to an opening instruction when the opening instruction of the camera of the electronic device is detected; and configuring preview parameters for the camera, and controlling the camera to enter a preview mode according to the preview parameters.
In an embodiment, the camera configuration tag processing module further includes a camera control module, where the camera control module is configured to, when it is detected that a target application program initiates a target control instruction for a camera, obtain a second target configuration tag corresponding to the target control instruction from a second tag set; acquiring a first target configuration label corresponding to a second target configuration label from a first label set; and acquiring target metadata corresponding to the first target configuration tag, and controlling the camera to execute corresponding operation according to the target metadata.
In an embodiment, the camera configuration tag processing module further includes a second tag updating module, where the second tag updating module is configured to, when it is detected that a first configuration tag in the first tag set is updated, obtain an updated first configuration tag in the first tag set as an updated configuration tag; and updating the second label set according to the updating configuration label which does not contain the preset field.
The division of each module in the camera configuration tag processing apparatus is only used for illustration, and in other embodiments, the camera configuration tag processing apparatus may be divided into different modules as needed to complete all or part of the functions of the camera configuration tag processing apparatus.
The implementation of each module in the camera configuration tag processing apparatus provided in the embodiment of the present application may be in the form of a computer program. The computer program may be run on a terminal or a server. The program modules constituted by the computer program may be stored on the memory of the terminal or the server. Which when executed by a processor, performs the steps of the method described in the embodiments of the present application.
The embodiment of the application also provides the electronic equipment. The electronic device includes therein an Image Processing circuit, which may be implemented using hardware and/or software components, and may include various Processing units defining an ISP (Image Signal Processing) pipeline. FIG. 9 is a schematic diagram of an image processing circuit in one embodiment. As shown in fig. 9, for convenience of explanation, only aspects of the image processing technique related to the embodiments of the present application are shown.
As shown in fig. 9, the image processing circuit includes an ISP processor 940 and a control logic 950. The image data captured by the imaging device 910 is first processed by the ISP processor 940, and the ISP processor 940 analyzes the image data to capture image statistics that may be used to determine and/or control one or more parameters of the imaging device 910. The imaging device 910 may include a camera having one or more lenses 912 and an image sensor 914. Image sensor 914 may include an array of color filters (e.g., Bayer filters), and image sensor 914 may acquire light intensity and wavelength information captured with each imaging pixel of image sensor 914 and provide a set of raw image data that may be processed by ISP processor 940. The sensor 920 (e.g., a gyroscope) may provide parameters of the acquired image processing (e.g., anti-shake parameters) to the ISP processor 940 based on the type of interface of the sensor 920. The sensor 920 interface may utilize an SMIA (Standard Mobile Imaging Architecture) interface, other serial or parallel camera interfaces, or a combination of the above.
In addition, image sensor 914 may also send raw image data to sensor 920, sensor 920 may provide raw image data to ISP processor 940 based on the type of interface of sensor 920, or sensor 920 may store raw image data in image memory 930.
The ISP processor 940 processes the raw image data pixel by pixel in a variety of formats. For example, each image pixel may have a bit depth of 8, 10, 12, or 14 bits, and the ISP processor 940 may perform one or more image processing operations on the raw image data, collecting statistical information about the image data. Wherein the image processing operations may be performed with the same or different bit depth precision.
ISP processor 940 may also receive image data from image memory 930. For example, the sensor 920 interface sends raw image data to the image memory 930, and the raw image data in the image memory 930 is then provided to the ISP processor 940 for processing. The image Memory 930 may be a part of a Memory device, a storage device, or a separate dedicated Memory within an electronic device, and may include a DMA (Direct Memory Access) feature.
Upon receiving raw image data from image sensor 914 interface or from sensor 920 interface or from image memory 930, ISP processor 940 may perform one or more image processing operations, such as temporal filtering. The processed image data may be sent to image memory 930 for additional processing before being displayed. ISP processor 940 receives processed data from image memory 930 and performs image data processing on the processed data in the raw domain and in the RGB and YCbCr color spaces. The image data processed by ISP processor 940 may be output to display 970 for viewing by a user and/or further processed by a Graphics Processing Unit (GPU). Further, the output of ISP processor 940 may also be sent to image memory 930 and display 970 may read image data from image memory 930. In one embodiment, image memory 930 may be configured to implement one or more frame buffers. In addition, the output of the ISP processor 940 may be transmitted to an encoder/decoder 960 for encoding/decoding the image data. The encoded image data may be saved and decompressed before being displayed on a display 970 device. The encoder/decoder 960 may be implemented by a CPU or GPU or coprocessor.
The statistical data determined by the ISP processor 940 may be transmitted to the control logic 950 unit. For example, the statistical data may include image sensor 914 statistics such as auto-exposure, auto-white balance, auto-focus, flicker detection, black level compensation, lens 912 shading correction, and the like. The control logic 950 may include a processor and/or microcontroller that executes one or more routines (e.g., firmware) that may determine control parameters of the imaging device 910 and control parameters of the ISP processor 940 based on the received statistical data. For example, the control parameters of imaging device 910 may include sensor 920 control parameters (e.g., gain, integration time for exposure control, anti-shake parameters, etc.), camera flash control parameters, lens 912 control parameters (e.g., focal length for focusing or zooming), or a combination of these parameters. The ISP control parameters may include gain levels and color correction matrices for automatic white balance and color adjustment (e.g., during RGB processing), as well as lens 912 shading correction parameters.
The following steps are steps for implementing the method for processing the camera configuration tag provided in the above embodiment by using the image processing technology in fig. 9.
The embodiment of the application also provides a computer readable storage medium. One or more non-transitory computer-readable storage media containing computer-executable instructions that, when executed by one or more processors, cause the processors to perform the steps of the camera configuration tag processing method provided by the above embodiments.
A computer program product containing instructions which, when run on a computer, cause the computer to perform the camera configuration tag processing method provided by the above embodiments.
Any reference to memory, storage, database, or other medium used by embodiments of the present application may include non-volatile and/or volatile memory. Suitable non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM), which acts as external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms, such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronous Link (Synchlink) DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and bus dynamic RAM (RDRAM).
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A processing method for a camera configuration label is characterized by comprising the following steps:
acquiring a first tag set stored in electronic equipment, wherein first configuration tags are stored in the first tag set, each first configuration tag correspondingly stores metadata, the control of a camera is realized through the metadata, and the first tag set is stored in a storage space corresponding to a framework layer of the electronic equipment;
traversing first configuration tags in the first tag set, and taking the first configuration tags which do not contain preset fields as second configuration tags;
and storing the obtained second configuration tag into a second tag set, where the second tag set is stored in a storage space corresponding to an application layer of the electronic device, and the second configuration tag is used to instruct the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for the camera, and to control the camera to execute a corresponding operation according to the obtained first configuration tag.
2. The method of claim 1, wherein prior to obtaining the first set of tags stored in the electronic device, further comprising:
when a starting instruction of a camera of the electronic equipment is detected, controlling the camera to be opened according to the starting instruction;
and configuring preview parameters for the camera, and controlling the camera to enter a preview mode according to the preview parameters.
3. The method of claim 1, wherein storing the obtained second configuration tag to a second set of tags comprises:
counting the use frequency corresponding to each second configuration label;
and sorting the second configuration tags according to the use frequency, and storing the sorted second configuration tags to the second tag set.
4. The method of claim 1, wherein applications installed in the electronic device are classified in advance, the second set of tags includes at least one set of classification tags, and each type of application corresponds to one set of classification tags;
the storing the obtained second configuration tag to a second tag set includes:
and acquiring the classification configuration label corresponding to each type of application program from the second configuration label, and respectively storing the acquired classification configuration labels to the corresponding classification label sets.
5. The method according to claim 4, wherein the storing the obtained category configuration labels to corresponding category label sets respectively comprises:
acquiring the application level of each type of application program, and encrypting the classified configuration label according to the application level;
and respectively storing the encrypted classification configuration labels to corresponding classification label sets.
6. The method of claim 1, further comprising:
when a target application program is detected to initiate a target control instruction for the camera, acquiring a second target configuration tag corresponding to the target control instruction from the second tag set;
acquiring a first target configuration label corresponding to the second target configuration label from the first label set;
and acquiring target metadata corresponding to the first target configuration tag, and controlling the camera to execute corresponding operation according to the target metadata.
7. The method according to any one of claims 1 to 6, further comprising:
when detecting that a first configuration tag in the first tag set is updated, acquiring the updated first configuration tag in the first tag set as an updated configuration tag;
and updating the second label set according to the updating configuration label which does not contain the preset field.
8. A camera configuration tag processing apparatus, comprising:
the system comprises a first tag acquisition module, a first configuration module and a second configuration module, wherein the first tag acquisition module is used for acquiring a first tag set stored in electronic equipment, the first tag set stores first configuration tags, each first configuration tag correspondingly stores metadata, the control of a camera is realized through the metadata, and the first tag set is stored in a storage space corresponding to a framework layer of the electronic equipment;
the second tag obtaining module is used for traversing the first configuration tags in the first tag set and taking the first configuration tags which do not contain preset fields as second configuration tags;
and the second tag storage module is configured to store the obtained second configuration tag to a second tag set, where the second tag set is stored in a storage space corresponding to an application layer of the electronic device, and the second configuration tag is used to instruct the electronic device to obtain a corresponding first configuration tag when an application program initiates a control instruction for a camera, and control the camera to execute a corresponding operation according to the obtained first configuration tag.
9. An electronic device comprising a memory and a processor, the memory having stored therein a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201910012287.2A 2019-01-07 2019-01-07 Camera configuration label processing method and device, electronic equipment and storage medium Active CN109729271B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910012287.2A CN109729271B (en) 2019-01-07 2019-01-07 Camera configuration label processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910012287.2A CN109729271B (en) 2019-01-07 2019-01-07 Camera configuration label processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109729271A CN109729271A (en) 2019-05-07
CN109729271B true CN109729271B (en) 2021-01-12

Family

ID=66298236

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910012287.2A Active CN109729271B (en) 2019-01-07 2019-01-07 Camera configuration label processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109729271B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578164A (en) * 2003-06-27 2005-02-09 三星电子株式会社 System and method for detecting communication equipment with internal camera
CN102883139A (en) * 2011-07-12 2013-01-16 北京中星微电子有限公司 Camera application system and method
CN103389900A (en) * 2013-07-23 2013-11-13 Tcl集团股份有限公司 Control method and device for Android equipment camera
CN108712618A (en) * 2018-05-16 2018-10-26 北京百度网讯科技有限公司 Instructor in broadcasting's control method, equipment and storage medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7730012B2 (en) * 2004-06-25 2010-06-01 Apple Inc. Methods and systems for managing data
DE112015002418T5 (en) * 2014-07-07 2017-06-14 Louis Diep Camera control and image streaming
CN104333587B (en) * 2014-10-30 2018-07-17 北京思特奇信息技术股份有限公司 A kind of method and system that multi-platform event is uniformly processed
CN105989112B (en) * 2015-02-12 2019-10-25 Oppo广东移动通信有限公司 A kind of method and server of application program classification
CN108924421B (en) * 2018-07-16 2020-09-11 Oppo广东移动通信有限公司 Image processing method, image processing device, computer-readable storage medium and electronic equipment

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1578164A (en) * 2003-06-27 2005-02-09 三星电子株式会社 System and method for detecting communication equipment with internal camera
CN102883139A (en) * 2011-07-12 2013-01-16 北京中星微电子有限公司 Camera application system and method
CN103389900A (en) * 2013-07-23 2013-11-13 Tcl集团股份有限公司 Control method and device for Android equipment camera
CN108712618A (en) * 2018-05-16 2018-10-26 北京百度网讯科技有限公司 Instructor in broadcasting's control method, equipment and storage medium

Also Published As

Publication number Publication date
CN109729271A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
CN109842753B (en) Camera anti-shake system, camera anti-shake method, electronic device and storage medium
US8738622B2 (en) Processing captured images having geolocations
CN110035228B (en) Camera anti-shake system, camera anti-shake method, electronic device, and computer-readable storage medium
CN110233970B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN110572573B (en) Focusing method and device, electronic equipment and computer readable storage medium
CN108769665B (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN108716983A (en) Optical element detection method and device, electronic equipment, storage medium
CN108924426B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN107948617B (en) Image processing method, image processing device, computer-readable storage medium and computer equipment
US10951808B2 (en) Method for focusing control, mobile terminal and non-transitory storage medium
CN110956679B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN110177212B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN110225258B (en) Data processing method and device, computer readable storage medium and electronic equipment
CN109685748B (en) Image processing method, image processing device, electronic equipment and computer readable storage medium
CN109951641B (en) Image shooting method and device, electronic equipment and computer readable storage medium
CN109683698B (en) Payment verification method and device, electronic equipment and computer-readable storage medium
CN107465880B (en) Focusing method, device, terminal and computer readable storage medium
CN107977437B (en) Image processing method, image processing apparatus, storage medium, and electronic device
CN108712400B (en) Data transmission method and device, computer readable storage medium and electronic equipment
CN110705532A (en) Method, device and equipment for identifying copied image
CN109523456B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN109963081B (en) Video processing method and device, electronic equipment and computer readable storage medium
US11218650B2 (en) Image processing method, electronic device, and computer-readable storage medium
CN108881876B (en) Method and device for carrying out white balance processing on image and electronic equipment
CN109461201B (en) Image processing method and device, electronic equipment and computer readable 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
GR01 Patent grant
GR01 Patent grant