CN109729271A - Camera label allocation processing method, device, electronic equipment, storage medium - Google Patents

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

Info

Publication number
CN109729271A
CN109729271A CN201910012287.2A CN201910012287A CN109729271A CN 109729271 A CN109729271 A CN 109729271A CN 201910012287 A CN201910012287 A CN 201910012287A CN 109729271 A CN109729271 A CN 109729271A
Authority
CN
China
Prior art keywords
label allocation
label
camera
tag set
allocation
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.)
Granted
Application number
CN201910012287.2A
Other languages
Chinese (zh)
Other versions
CN109729271B (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

Abstract

The application provides a kind of camera label allocation processing method, device, electronic equipment, computer readable storage medium, which comprises obtains the first tag set stored in electronic equipment;The first label allocation in first tag set is traversed, the first label allocation of preset field will not included as the second label allocation;Obtained second label allocation is stored to the second tag set, wherein, second label allocation is used to indicate the electronic equipment and obtains corresponding first label allocation when application program initiates the control instruction to camera, and controls camera according to the first label allocation of acquisition and execute corresponding operation.Above-mentioned camera label allocation processing method, device, electronic equipment, computer readable storage medium, can be improved data-handling efficiency.

Description

Camera label allocation processing method, device, electronic equipment, storage medium
Technical field
This application involves field of computer technology, more particularly to a kind of camera label allocation processing method, device, electricity Sub- equipment, computer readable storage medium.
Background technique
Application program can be installed, application program can control camera and carry out parameter setting, shooting etc. in electronic equipment Operation.In general, the production firm of camera or other using the manufacturer of camera can define some label allocations, and lead to Label allocation is crossed to transmit data, to realize the control to camera.
Application program cannot directly acquire the configuration parameter of bottom when needing to control camera, need applying Layer defines variable corresponding with label allocation, to be instructed by the corresponding configuration parameter of variable to send to camera.It takes the photograph When executing different operation as head, the variable that application layer defines is also different.
Summary of the invention
The embodiment of the present application provides a kind of camera label allocation processing method, device, electronic equipment, computer-readable deposits Data-handling efficiency can be improved in storage media.
A kind of camera label allocation processing method, comprising:
Obtain the first tag set stored in electronic equipment;
The first label allocation in first tag set is traversed, the first label allocation for not including preset field is made For the second label allocation;
Obtained second label allocation is stored to the second tag set, wherein second label allocation is used for Indicate that the electronic equipment obtains corresponding first label allocation, and root when application program initiates the control instruction to camera Corresponding operation is executed according to the first label allocation control camera of acquisition.
A kind of camera label allocation processing unit, comprising:
First label acquisition module, for obtaining the first tag set stored in electronic equipment;
Second label acquisition module will not include pre- for traversing the first label allocation in first tag set If the first label allocation of field is as the second label allocation;
Second label memory module, for storing obtained second label allocation to the second tag set, wherein Second label allocation is used to indicate electronic equipment acquisition pair when application program initiates the control instruction to camera The first label allocation answered, and camera is controlled according to the first label allocation of acquisition and executes corresponding operation.
A kind of electronic equipment, including memory and processor store computer program, the calculating in the memory When machine program is executed by the processor, so that the processor executes following steps:
Obtain the first tag set stored in electronic equipment;
The first label allocation in first tag set is traversed, the first label allocation for not including preset field is made For the second label allocation;
Obtained second label allocation is stored to the second tag set, wherein second label allocation is used for Indicate that the electronic equipment obtains corresponding first label allocation, and root when application program initiates the control instruction to camera Corresponding operation is executed according to the first label allocation control camera of acquisition.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor Following steps are realized when row:
Obtain the first tag set stored in electronic equipment;
The first label allocation in first tag set is traversed, the first label allocation for not including preset field is made For the second label allocation;
Obtained second label allocation is stored to the second tag set, wherein second label allocation is used for Indicate that the electronic equipment obtains corresponding first label allocation, and root when application program initiates the control instruction to camera Corresponding operation is executed according to the first label allocation control camera of acquisition.
Above-mentioned camera label allocation processing method, device, electronic equipment, computer readable storage medium, it is available The first tag set stored in electronic equipment traverses the first label allocation in the first tag set, and judges the first configuration It whether include preset field in label.Using the first label allocation for not including preset field as the second label allocation, then will Second label allocation is stored into the second tag set.Application program, can be directly from when needing to control camera The second label allocation is obtained in two tag sets, and the second label allocation by obtaining controls camera and executes corresponding behaviour Make.So there is no need to application programs all to go to define a variable when every secondary control camera, then passes through definition Different variables goes to search the first label allocation, then removes control camera by the first label allocation, reduces and needs using journey The variable that sequence defines reduces the maintenance cost to variable, improves the efficiency of data processing.
Detailed description of the invention
In order to illustrate the technical solutions in the embodiments of the present application or in the prior art more clearly, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is only this Some embodiments of application for those of ordinary skill in the art without creative efforts, can be with It obtains other drawings based on these drawings.
Fig. 1 is the application environment schematic diagram of camera label allocation processing method in one embodiment;
Fig. 2 is the flow chart of camera label allocation processing method in one embodiment;
Fig. 3 is the flow chart of camera label allocation processing method in another embodiment;
Fig. 4 is the schematic diagram for generating the second tag set in one embodiment by the first tag set;
Fig. 5 is the flow chart of camera label allocation processing method in another embodiment;
Fig. 6 is the flow chart of camera label allocation processing method in another embodiment;
Fig. 7 is flow diagram the step of executing above-mentioned camera label allocation processing method;
Fig. 8 is the structural schematic diagram of camera label allocation processing unit in one embodiment;
Fig. 9 is the schematic diagram of image processing circuit in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, and It is not used in restriction the application.
It is appreciated that term " first " used in this application, " second " etc. can be used to describe various elements herein, But these elements should not be limited by these terms.These terms are only used to distinguish the first element from the other element.Citing comes It says, in the case where not departing from scope of the present application, the first tag set can be known as the second tag set, and similarly, Second tag set can be known as the first tag set.First tag set and the second tag set both tag set, But it is not same tag set.
Fig. 1 is the application environment schematic diagram of camera label allocation processing method in one embodiment.As shown in Figure 1, should Application environment includes electronic equipment 102, and camera 104 is installed on electronic equipment 102, and the can also be stored in electronic equipment 102 One tag set.Specifically, the first tag set of the available storage of electronic equipment 102, then traverses the first tag set In the first label allocation, will not include preset field the first label allocation as the second label allocation.It will finally obtain Second label allocation is stored to the second tag set.Wherein, the second label allocation is used to indicate electronic equipment 102 in application program It initiates to obtain corresponding first label allocation when the control instruction of control camera, and is controlled according to the first label allocation of acquisition Camera 104 executes corresponding operation.It is shot for example, controlling camera electronic equipment 102 according to the first label allocation of acquisition Obtain image 106.In one embodiment, electronic equipment 102 can be mobile phone, computer, wearable device etc., not limit herein It is fixed.
Fig. 2 is the flow chart of camera label allocation processing method in one embodiment.As shown in Fig. 2, the camera is matched Setting label processing method includes step 202 to step 206.Wherein:
Step 202, the first tag set stored in electronic equipment is obtained.
It can store the first tag set in electronic equipment, at least one first label allocation stored in the first tag set (Tag).Specifically, each first label allocation can correspond to one metadata (metadata) of storage, and pass through metadata Realize the control to camera.
In one embodiment, the first tag set can store frame (framework) the layer correspondence in electronic equipment Memory space in, cannot directly access the first tag set using (application) layer.Application program is in control camera When, it needs to define a variable in application layer, then application layer is by variable transferring to frame (framework) layer, frame Layer carries out parsing to variable and finds corresponding first label allocation, then obtains the corresponding metadata of the first label allocation, and Metadata is transmitted to hardware abstraction layer (Hardware Abstract Layer, HAL), hardware abstraction layer is according to metadata reality Now to the control of camera.
If for example, application layer sets automatic for the focal modes of camera, it is assumed that " focal modes " corresponding member Data are " 10 ", and " automatic " corresponding metadata is " 1 ", then ccf layer can send a first number into hardware abstraction layer According to (10,1), then hardware abstraction layer sets the corresponding parameter of metadata " 10 " to (10,1) by this metadata “1”。
Step 204, the first label allocation in the first tag set is traversed, the first configuration for not including preset field is marked Label are used as the second label allocation.
Specifically, electronic equipment can obtain the first tag set from ccf layer, and the first tag set is sent to Application layer.There are two types of the first label allocations for including in the first tag set stored in ccf layer: one is to camera original First label allocation of raw definition, one is customized first label allocations of platform vendor.In general, the application of electronic equipment Layer can only customized first label allocation of calling platform manufacturer, controlled by customized first label allocation of platform vendor Camera.
Application layer can traverse the first label allocation in the first tag set after getting the first tag set, Whether judge in the first label allocation comprising preset field.When in the first label allocation including preset field, it is believed that this first Label allocation is to the primary definition of camera, the i.e. intrinsic label allocation of camera;It is pre- when not including in the first label allocation If when field, it is believed that the first label allocation is the customized label allocation of platform vendor.
For example, all including in the first label allocation of the primary definition of Google in the framework of Camera HAL3 " android " field all uses the formal definition of " Business Name+effect " in the first label allocation that platform vendor defines, when When detecting in the first label allocation comprising " android " field, then it is assumed that first label allocation is primary definition;Work as inspection When measuring in the first label allocation not comprising " android " field, then it is assumed that first label allocation is that platform vendor is customized 's.
Step 206, the second obtained label allocation is stored to the second tag set, wherein the second label allocation is used for Indicate that electronic equipment obtains corresponding first label allocation when application program is initiated to the control instruction of camera, and according to obtaining The the first label allocation control camera taken executes corresponding operation.
In the embodiment of the present application, the first label allocation of preset field will not included as the second label allocation, second Label allocation is the customized label allocation of platform vendor.Second tag set is to be stored in the corresponding memory space of application layer In data acquisition system, the second obtained label allocation is stored in the second tag set, application layer can directly access second The second label allocation in tag set.
Specifically, application program is needing to control camera after the second label allocation is stored in the second tag set When can initiate control instruction to camera, the second configuration is then obtained directly from the second tag set according to control instruction Label, and the second label allocation that will acquire passes to ccf layer.Since the second label allocation and the first label allocation are corresponding , therefore ccf layer directly can search the first label allocation that match according to the second label allocation for handing down, and by phase The corresponding metadata of matched first label allocation is sent to hardware abstraction layer, and hardware abstraction layer is further according to obtained metadata control Camera processed executes corresponding operation.
Camera label allocation processing method provided in this embodiment, the first label stored in available electronic equipment Whether set traverses the first label allocation in the first tag set, and judge in the first label allocation comprising preset field.It will Then the first label allocation not comprising preset field stores the second label allocation to the second label as the second label allocation In set.Application program can obtain the second configuration mark when needing to control camera directly from the second tag set Label, and the second label allocation by obtaining controls camera and executes corresponding operation.So there is no need to application programs every It all goes to define a variable when secondary control camera, then goes to search the first configuration mark by the different variables defined Label, then control camera is gone by the first label allocation, reduce the variable for needing application program to define, reduces to variable Maintenance cost improves the efficiency of data processing.
Fig. 3 is the flow chart of camera label allocation processing method in another embodiment.As shown in figure 3, the camera Label allocation processing method includes step 302 to step 318.Wherein:
Step 302, when detecting the open command of camera of electronic equipment, camera is controlled according to open command and is beaten It opens.
It is understood that generating the process of the second tag set can realize at any time.For example, in electronic equipment In when the free time, the first tag set is obtained to generate the second tag set;Or it when electronic equipment starting, obtains First tag set generates the second tag set.
Certain electronic equipments may be limited by system, can only be allowed when camera is opened and enters preview mode, The first label allocation can be obtained, camera at this moment can be first controlled and enter preview mode, then obtains from the first tag set One label allocation.
Step 304, preview parameter is configured to camera, and preview mode is entered according to preview state modulator camera.
In embodiment provided by the present application, can in the open command for the camera for detecting electronic equipment, according to Open command controls camera and opens, and controls camera after opening camera and enter preview mode.Enter in camera Before preview mode, preview parameter can be configured to camera, preview mode is then entered according to preview state modulator camera.
Preview parameter refers to that the parameter that camera needs to be arranged when entering preview mode, such as preview parameter can be and take the photograph As head interface parameter shown on the display screen of electronic equipment after entering preview mode, be also possible to camera into The processing parameter etc. of the image acquired when entering preview mode, it is not limited here.
Step 306, the first tag set stored in electronic equipment is obtained.
Specifically, the first tag set stored in the corresponding memory space of ccf layer in electronic equipment is obtained, the first mark Label set can be the file that store the first label allocation, it is not limited here.It, can be with for example, in Android system The first label allocation is stored by " camera_metadata_tag_info.h " file in ccf layer, then " camera_ Metadata_tag_info.h " file is exactly the first tag set.
Step 308, the first label allocation in the first tag set is traversed, the first configuration for not including preset field is marked Label are used as the second label allocation.
Specifically, the application program in electronic equipment cannot directly access the corresponding memory space of ccf layer, therefore apply Program cannot directly obtain the first label allocation from the first tag set.Electronic equipment can be from the memory space of ccf layer The first tag set is obtained, and the second tag set is generated according to the first tag set.The second tag set generated is stored in In the corresponding memory space of application program, application program can directly access the second tag set.
Step 310, each corresponding frequency of use of the second label allocation is counted.
It is understood that the second label allocation is to be generated according to the first label allocation, therefore application program is controlling When camera, corresponding first label allocation directly can be searched according to the second label allocation, and mark according to the first configuration Label execute corresponding operation to control camera.
Before generating the second tag set, each corresponding frequency of use of the second label allocation can be counted.Second The corresponding frequency of use of label allocation is to correspond to the frequency of use namely electronics of the first label allocation of the second label allocation Equipment searches the frequency of the first label allocation.
Specifically, each second label allocation corresponding access times in statistical time range can be counted, according to statistics Access times and the duration of statistical time range calculate frequency of use.For example, statistics obtains the corresponding frequency of use of label allocation A 10 times/day, 4 times/day of the corresponding frequency of use of label allocation B, 21 times/day of the corresponding frequency of use of label allocation C.
Step 312, the second label allocation is ranked up according to frequency of use, and the second label allocation after sequence is deposited It stores up to the second tag set.
After statistics obtains each second label allocation, the second label allocation can be arranged according to frequency of use Then sequence stores the second label allocation into the second tag set according to sequence.The second label allocation is stored in this way It, can be according to frequency of use when application program searches the second label allocation in the second tag set in two tag sets It is searched, improves search efficiency.
In one embodiment, descending sort can be carried out to the second label allocation according to frequency of use, it can also basis Frequency of use carries out ascending sort to the second label allocation, it is not limited here.The second tag set generated is stored in application In the corresponding memory space of layer, since the first label allocation in the first tag set may have newly-increased, replacement, deletion etc. Modification, therefore electronic equipment can constantly be updated the second tag set in application layer, to guarantee that application program can Accurately call the second label allocation.
Specifically, electronic equipment can periodically be updated the second tag set, since system limits, some electronics are set Standby system can only allow to obtain the first tag set after opening camera, therefore electronic equipment can also opened every time The second tag set is updated when camera, it is without being limited thereto.
Step 314, when detecting that destination application initiates the target control instruction to camera, from the second tally set Target control is obtained in conjunction instructs corresponding second target label allocation.
After generating the second tag set, application layer can directly access the second tag set, and from the second tag set The second label allocation of middle acquisition.Electronic equipment can in real time monitor the working condition of application program, when detecting target When application program initiates the target control instruction to camera, target control instruction pair is just obtained from the second tag set The the second target label allocation answered.
It is understood that destination application when needing to camera operation, can initiate target control instruction. Instruction can be write in the target control instruction of initiation and initiates the contents such as time, operation data, can parse according to operation data Destination application is specifically which operation needed to carry out camera.
For example, destination application is wanted to take pictures, then the operation data of " photo " can be carried in target control instruction, When electronic equipment detects " photo ", so that it may go to search the second label allocation corresponding with " photo " in the second tag set As the second target label allocation, for example the second target label allocation found is " com.oppo.photo ".
Step 316, first object label allocation corresponding with the second target label allocation is obtained from the first tag set.
After getting the corresponding second target label allocation of target control instruction in the second tag set, application layer can To pass to the second target label allocation in ccf layer, ccf layer can be searched from the first tag set to be marked with the configuration of the second target Sign the first object label allocation to match.
Step 318, the corresponding target metadata of first object label allocation is obtained, camera is controlled according to target metadata Execute corresponding operation.
Electronic equipment can pre-establish the corresponding relationship of the first label allocation and metadata, and by the first label allocation and member Data correspondence is stored in the memory space of ccf layer.After getting first object label allocation, it can according to the first configuration Label obtains corresponding target metadata, and sends hardware abstraction layer for target metadata, then controls camera execution pair The operation answered.
Camera label allocation processing method provided in this embodiment obtains the second configuration mark according to the first label allocation Label, there is no need to application programs all to go to define a variable when every secondary control camera, then passes through the difference of definition Variable go search the first label allocation, then by the first label allocation go control camera, reduce need application program determine The variable of justice, reduces the maintenance cost to variable, improves the efficiency of data processing.The second obtained label allocation is according to making With being then stored into the second tag set after frequency sequence, the search efficiency of the second label allocation can be improved.
Fig. 4 is the schematic diagram for generating the second tag set in one embodiment by the first tag set.As shown in figure 4, the Several first label allocations in one tag set, the first label allocation can be with primary label (such as: Google Tags) and manufacturers Label (such as: Vendor Tags).First label allocation in first tag set is filtered, primary label is filtered, The second label allocation is generated according to remaining manufacturer's label, the second tag set is finally generated according to the second label allocation.
In one embodiment, as shown in figure 5, above-mentioned camera label allocation processing method can also include following step It is rapid:
Step 502, it when detecting that the first label allocation in the first tag set updates, obtains in the first tag set The first label allocation updated is as update label allocation.
The second tag set is generated according to the first label allocation in the first tag set, electronic equipment is just not necessarily to applying Layer defines a corresponding variable to each first label allocation, and the first label allocation in such first tag set is more When new, without corresponding variable is updated to the first label allocation that each is updated again again, application layer is reduced Maintenance cost.
Electronic equipment, can be according to update when detecting that the first label allocation in the first tag set updates First label allocation is updated the second tag set.The update of first label allocation, which refers to, deletes the first label allocation The operation such as remove, increase newly, replacing.
When detecting that the first label allocation in the first tag set updates, updated first mark can be reacquired All first label allocations in label set, and generated according to all first label allocations in updated first tag set For the second label allocation of update, the second label allocation for being used for updating will be generated replace in the second tag set and deposit originally Second label allocation of storage, to complete the update to the second tag set.It can also only obtain and be updated in first tag set First label allocation using the first label allocation of update as update label allocation, and is marked according to label allocation is updated to second Label set updates, without being limited thereto.
Step 504, the second tag set is updated according to the update label allocation for not including preset field.
In the present embodiment, using the first label allocation of update as label allocation is updated, update label allocation is got Later, it is also desirable to be filtered to label allocation is updated, only retain the update label allocation for not including preset field, then basis The update label allocation of reservation is updated the second tag set.
Specifically, updating in label allocation may include increasing label allocation newly, deleting label allocation, modification label allocation, If it is newly-increased label allocation, then the second configuration mark directly can be increased newly in the second tag set according to newly-increased label allocation Label;If it is label allocation is deleted, then it can directly be found in the second tag set and delete label allocation corresponding second Label allocation, and the second label allocation found is deleted;It, then can be in the second tag set if it is modification label allocation In find corresponding second label allocation of modification label allocation, and the second configuration found is marked according to modification label allocation Label are modified.
In the embodiment of the present application, the application program installed in electronic equipment can be classified in advance, the second label Set includes at least one tag along sort set, every corresponding tag along sort set of one kind application program.For example, electronics is set Application program in standby is divided into game class application program, shopping class application program, video class application program, photography class application program Deng without being limited thereto.
It is understood that the application operating that different application programs is realized is differentiated, therefore call camera The operation of realization is also differentiated.For example, payment class application program, which can control camera collection image, realizes payment verification Operation, payment verification need to acquire high-precision image when operating;Photography class application program can control camera collection image, It needs to adjust acquisition parameters when acquiring image.
Since the operation that different application need to control camera realization may be different, heterogeneous applications are needed The first label allocation to be called may be different, thus can be directed to inhomogeneity application respectively according to the demand of application program The second different tag set of Program Generating, application program can remove corresponding second tally set when controlling camera The second label allocation is searched in conjunction, improves search efficiency.
Specifically, the second obtained label allocation, which is stored to the second tag set, can specifically include: from the second configuration The corresponding classification configurations label of every a kind of application program is obtained in label, and obtained classification configurations label is stored respectively to right The tag along sort set answered.
In one embodiment, second tag set can also be individually established for each application program, in this way Application program directly can search the second label allocation from corresponding second tag set when controlling camera, This is without limitation.
In one embodiment, specifically may be used as shown in fig. 6, storing classification configurations label to the step of tag along sort set To include:
Step 602, the application level for obtaining every a kind of application program, adds classification configurations label according to application level Close processing.
For application layer after getting the second label allocation, the application program in electronic equipment can access the second configuration Label may generate security risk in this way.It, can be according to the application level of application program after obtaining classification configurations label Classification configurations label is encrypted.
Application level is used to indicate that the significance level of application program, the higher application program of application level to want safety Ask higher, the security requirement when controlling camera is also higher.It therefore, can be according to the application level of application program to classification Label allocation is encrypted.Specifically, application level is higher than classification configurations label corresponding to the application program of grade threshold It is encrypted.
Further, when the application level of application program is higher than grade threshold, it can also be obtained and be added according to application level Close grade is encrypted classification configurations label corresponding to application program according to secret grade.Application level is higher, encryption The safety of processing is higher.
Step 604, the classification configurations label after encryption is stored respectively to corresponding tag along sort set.
After classification configurations tag encryption, the classification configurations label after encryption is stored respectively to corresponding contingency table Label set.Application program is after initiating control instruction, could basis after needing that classification configurations label is decrypted Classification configurations label after decryption controls camera, improves the safety to camera control.
In one embodiment, the classification configurations label after encryption is stored to tag along sort set, is controlled The step of camera, can specifically include: when detecting that destination application initiates the target control instruction to camera, obtain The target application classification for taking destination application obtains target control from the corresponding tag along sort set of target application classification and refers to Enable corresponding second target label allocation;The clear crytpographic key carried in target control instruction is obtained, according to the clear crytpographic key of acquisition Second target label allocation is decrypted;The second target label allocation after obtaining and decrypting in the first tag set Corresponding first object label allocation;The corresponding target metadata of first object label allocation is obtained, according to target metadata control Camera processed executes corresponding operation.
It should be understood that although each step in the flow chart of Fig. 2,3,5,6 is successively shown according to the instruction of arrow, But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2,3,5,6 At least part step may include multiple sub-steps perhaps these sub-steps of multiple stages or stage be not necessarily Synchronization executes completion, but can execute at different times, and the execution sequence in these sub-steps or stage also need not Be so successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or Person alternately executes.
Fig. 7 is flow diagram the step of executing above-mentioned camera label allocation processing method.As shown in fig. 7, above-mentioned The step of executing camera label allocation processing method specifically includes:
Step 702, the first label allocation set is obtained.
Step 704, the first label allocation being successively read in the first label allocation set.
Step 706, judge whether comprising preset field in the first label allocation obtained, if it is not, thening follow the steps 708; If so, returning to step 704.
Step 708, when not including preset field in the first label allocation of acquisition, according to the first label allocation of acquisition Generate the second label allocation.
Step 710, the second label allocation of generation is put into the second tag set.
Step 712, judge whether the first label allocation in the first tag set is all read, if so, terminating process; If it is not, then returning to step 704.
In one embodiment, above-mentioned camera label allocation processing method can with the following steps are included:
(1) when detecting the open command of camera of electronic equipment, camera is controlled according to open command and is opened;
(2) preview parameter is configured to camera, and preview mode is entered according to preview state modulator camera.
(3) the first tag set stored in electronic equipment is obtained;
(4) the first label allocation in the first tag set is traversed, the first label allocation for not including preset field is made For the second label allocation;
(5) the corresponding classification configurations label of every a kind of application program is obtained from the second label allocation;
(6) application level for obtaining every a kind of application program, carries out at encryption classification configurations label according to application level Reason;
(7) each corresponding frequency of use of classification configurations label is counted;
(8) encrypted classification configurations label is ranked up according to frequency of use, and by the classification configurations mark after sequence Label are stored to tag along sort set;
(9) it when detecting that the first label allocation in the first tag set updates, obtains and is updated in the first tag set The first label allocation as update label allocation;
(10) tag along sort set is updated according to the update label allocation for not including preset field;
(11) when detecting that destination application initiates the target control instruction to camera, destination application is obtained Target application classification, obtain target control from the corresponding tag along sort set of target application classification and instruct corresponding second mesh Mark label allocation;
(12) clear crytpographic key carried in target control instruction is obtained, the second target is configured according to the clear crytpographic key of acquisition Label is decrypted;
(13) it is configured from the first object corresponding with the second target label allocation after decryption of acquisition in the first tag set Label;
(14) the corresponding target metadata of first object label allocation is obtained, camera is controlled according to target metadata and is executed Corresponding operation.
Fig. 8 is the structural schematic diagram of camera label allocation processing unit in one embodiment.As shown in figure 8, the camera shooting Head label allocation processing unit 800 includes that the first label acquisition module 802, the second label acquisition module 804 and the second label are deposited Store up module 806.Wherein:
First label acquisition module 802, for obtaining the first tag set stored in electronic equipment;
Second label acquisition module 804 will not include default for traversing the first label allocation in the first tag set First label allocation of field is as the second label allocation;
Second label memory module 806, the second label allocation for that will obtain are stored to the second tag set, wherein Second label allocation is used to indicate electronic equipment and obtains corresponding first when application program initiates the control instruction to camera Label allocation, and camera is controlled according to the first label allocation of acquisition and executes corresponding operation.
Camera label allocation processing unit provided by the above embodiment does not need application program in every secondary control camera When all go define a variable, then by definition different variables go search the first label allocation, then pass through first Label allocation removes control camera, reduces the variable for needing application program to define, reduces the maintenance cost to variable, improves The efficiency of data processing.
In one embodiment, it is corresponding to be also used to count each second label allocation for the second label memory module 806 Frequency of use;The second label allocation is ranked up according to frequency of use, and the second label allocation after sequence is stored to Two tag sets.
In one embodiment, the application program installed in electronic equipment is classified in advance, the second tag set packet Include at least one tag along sort set, every corresponding tag along sort set of one kind application program;Second label memory module 806 It is also used to obtain the corresponding classification configurations label of every a kind of application program, and the classification configurations that will be obtained from the second label allocation Label is stored respectively to corresponding tag along sort set.
Second label memory module 806 is also used to obtain the application level of every a kind of application program, according to application level pair Classification configurations label is encrypted;Classification configurations label after encryption is stored respectively to corresponding tag along sort collection It closes.
In one embodiment, above-mentioned camera label allocation processing module further includes camera opening module, the camera shooting Head opening module is used for when detecting the open command of camera of electronic equipment, is controlled camera according to open command and is beaten It opens;Preview parameter is configured to camera, and preview mode is entered according to preview state modulator camera.
In one embodiment, above-mentioned camera label allocation processing module further includes camera control module, the camera shooting Head control module is used for when detecting that destination application initiates the target control instruction to camera, from the second tag set Middle acquisition target control instructs corresponding second target label allocation;It obtains from the first tag set and is marked with the configuration of the second target Sign corresponding first object label allocation;The corresponding target metadata of first object label allocation is obtained, according to target metadata It controls camera and executes corresponding operation.
In one embodiment, above-mentioned camera label allocation processing module further includes the second tag update module, this Two tag update modules are used to obtain the first tag set when detecting that the first label allocation in the first tag set updates First label allocation of middle update is as update label allocation;It is marked according to the update label allocation for not including preset field to second Label set is updated.
The division of modules is only used for for example, in other embodiments in above-mentioned camera label allocation processing unit In, camera label allocation processing unit can be divided into different modules as required, to complete above-mentioned camera configuration mark Sign all or part of function of processing unit.
The realization of the modules in camera label allocation processing unit provided in the embodiment of the present application can be calculating The form of machine program.The computer program can be run in terminal or server.The program module that the computer program is constituted can It is stored on the memory of terminal or server.When the computer program is executed by processor, institute in the embodiment of the present application is realized The step of description method.
The embodiment of the present application also provides a kind of electronic equipment.It include image processing circuit in above-mentioned electronic equipment, at image Reason circuit can use hardware and or software component realization, it may include define ISP (Image Signal Processing, figure As signal processing) the various processing units of pipeline.Fig. 9 is the schematic diagram of image processing circuit in one embodiment.Such as Fig. 9 institute Show, for purposes of illustration only, only showing the various aspects of image processing techniques relevant to the embodiment of the present application.
As shown in figure 9, image processing circuit includes ISP processor 940 and control logic device 950.Imaging device 910 captures Image data handled first by ISP processor 940, ISP processor 940 to image data analyzed with capture can be used for really The image statistics of fixed and/or imaging device 910 one or more control parameters.Imaging device 910 may include having one The camera of a or multiple lens 912 and imaging sensor 914.Imaging sensor 914 may include colour filter array (such as Bayer filter), imaging sensor 914 can obtain the luminous intensity captured with each imaging pixel of imaging sensor 914 and wavelength Information, and the one group of raw image data that can be handled by ISP processor 940 is provided.Sensor 920 (such as gyroscope) can be based on biography The parameter (such as stabilization parameter) of the image procossing of acquisition is supplied to ISP processor 940 by 920 interface type of sensor.Sensor 920 Interface can use SMIA (Standard Mobile Imaging Architecture, Standard Mobile Imager framework) interface, The combination of other serial or parallel camera interfaces or above-mentioned interface.
In addition, raw image data can also be sent to sensor 920 by imaging sensor 914, sensor 920 can be based on biography Raw image data is supplied to ISP processor 940 to 920 interface type of sensor or sensor 920 deposits raw image data It stores up in video memory 930.
ISP processor 940 handles raw image data pixel by pixel in various formats.For example, each image pixel can Bit depth with 8,10,12 or 14 bits, ISP processor 940 can carry out raw image data at one or more images Reason operation, statistical information of the collection about image data.Wherein, image processing operations can be by identical or different bit depth precision It carries out.
ISP processor 940 can also receive image data from video memory 930.For example, 920 interface of sensor will be original Image data is sent to video memory 930, and the raw image data in video memory 930 is available to ISP processor 940 It is for processing.Video memory 930 can be independent special in a part, storage equipment or electronic equipment of memory device It with memory, and may include DMA (Direct Memory Access, direct direct memory access (DMA)) feature.
When receiving from 914 interface of imaging sensor or from 920 interface of sensor or from video memory 930 When raw image data, ISP processor 940 can carry out one or more image processing operations, such as time-domain filtering.Treated schemes As data can be transmitted to video memory 930, to carry out other processing before shown.ISP processor 940 is from image Memory 930 receives processing data, and carries out in original domain and in RGB and YCbCr color space to the processing data Image real time transfer.Treated that image data may be output to display 970 for ISP processor 940, for user's viewing and/or It is further processed by graphics engine or GPU (Graphics Processing Unit, graphics processor).In addition, ISP processor 940 output also can be transmitted to video memory 930, and display 970 can read image data from video memory 930.? In one embodiment, video memory 930 can be configured to realize one or more frame buffers.In addition, ISP processor 940 Output can be transmitted to encoder/decoder 960, so as to encoding/decoding image data.The image data of coding can be saved, And it is decompressed before being shown in 970 equipment of display.Encoder/decoder 960 can be real by CPU or GPU or coprocessor It is existing.
The statistical data that ISP processor 940 determines, which can be transmitted, gives control logic device Unit 950.For example, statistical data can wrap Include the image sensings such as automatic exposure, automatic white balance, automatic focusing, flicker detection, black level compensation, 912 shadow correction of lens 914 statistical information of device.Control logic device 950 may include the processor and/or micro-control for executing one or more routines (such as firmware) Device processed, one or more routines can statistical data based on the received, determine the control parameter and ISP processor of imaging device 910 940 control parameter.For example, the control parameter of imaging device 910 may include 920 control parameter of sensor (such as gain, exposure The time of integration, stabilization parameter of control etc.), camera flash control parameter, 912 control parameter of lens (such as focus or zoom With focal length) or these parameters combination.ISP control parameter may include for automatic white balance and color adjustment (for example, in RGB During processing) 912 shadow correction parameter of gain level and color correction matrix and lens.
The following are realize camera label allocation processing method provided by the above embodiment with image processing techniques in Fig. 9 The step of.
The embodiment of the present application also provides a kind of computer readable storage mediums.One or more is executable comprising computer The non-volatile computer readable storage medium storing program for executing of instruction, when the computer executable instructions are executed by one or more processors When, so that the step of processor executes camera label allocation processing method provided by the above embodiment.
A kind of computer program product comprising instruction, when run on a computer, so that computer execution is above-mentioned The camera label allocation processing method that embodiment provides.
It may include non-to any reference of memory, storage, database or other media used in the embodiment of the present application Volatibility and/or volatile memory.Suitable nonvolatile memory may include read-only memory (ROM), programming ROM (PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include Random access memory (RAM), it is used as external cache.By way of illustration and not limitation, RAM in a variety of forms may be used , such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDR SDRAM), Enhanced SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM).
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously The limitation to the application the scope of the patents therefore cannot be interpreted as.It should be pointed out that for those of ordinary skill in the art For, without departing from the concept of this application, various modifications and improvements can be made, these belong to the guarantor of the application Protect range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.

Claims (10)

1. a kind of camera label allocation processing method characterized by comprising
Obtain the first tag set stored in electronic equipment;
The first label allocation in first tag set is traversed, the first label allocation of preset field will not included as the Two label allocations;
Obtained second label allocation is stored to the second tag set, wherein second label allocation is used to indicate The electronic equipment obtains corresponding first label allocation when application program is initiated to the control instruction of camera, and according to obtaining The the first label allocation control camera taken executes corresponding operation.
2. the method according to claim 1, wherein described obtain the first tag set stored in electronic equipment Before, further includes:
When detecting the open command of camera of the electronic equipment, the camera is controlled according to the open command and is beaten It opens;
Preview parameter is configured to the camera, and the camera according to the preview state modulator enters preview mode.
3. the method according to claim 1, wherein second label allocation that will be obtained is stored to Two tag sets, comprising:
Count the corresponding frequency of use of each described second label allocation;
Second label allocation is ranked up according to the frequency of use, and by the second label allocation after sequence store to Second tag set.
4. the method according to claim 1, wherein in advance by the application program installed in the electronic equipment into Row classification, second tag set includes at least one tag along sort set, every corresponding contingency table of one kind application program Label set;
Second label allocation that will be obtained is stored to the second tag set, comprising:
The corresponding classification configurations label of every a kind of application program is obtained from second label allocation, and described in obtaining point Class label allocation is stored respectively to corresponding tag along sort set.
5. according to the method described in claim 4, it is characterized in that, the classification configurations label that will be obtained stores respectively To corresponding tag along sort set, comprising:
The application level for obtaining every a kind of application program, carries out at encryption the classification configurations label according to the application level Reason;
Classification configurations label after encryption is stored respectively to corresponding tag along sort set.
6. the method according to claim 1, wherein the method also includes:
When detecting that destination application initiates the target control instruction to the camera, from second tag set It obtains the target control and instructs corresponding second target label allocation;
First object label allocation corresponding with the second target label allocation is obtained from first tag set;
The corresponding target metadata of the first object label allocation is obtained, the camera is controlled according to the target metadata Execute corresponding operation.
7. method according to any one of claim 1 to 6, which is characterized in that the method also includes:
When detecting that the first label allocation in first tag set updates, obtains and updated in first tag set The first label allocation as update label allocation;
Second tag set is updated according to the update label allocation for not including the preset field.
8. a kind of camera label allocation processing unit characterized by comprising
First label acquisition module, for obtaining the first tag set stored in electronic equipment;
Second label acquisition module will not include predetermined word for traversing the first label allocation in first tag set First label allocation of section is as the second label allocation;
Second label memory module, for storing obtained second label allocation to the second tag set, wherein described Second label allocation be used to indicate the electronic equipment obtained when application program is initiated to the control instruction of camera it is corresponding First label allocation, and camera is controlled according to the first label allocation of acquisition and executes corresponding operation.
9. a kind of electronic equipment, including memory and processor, computer program, the computer are stored in the memory When program is executed by the processor, so that the processor executes the step of the method as described in any one of claims 1 to 7 Suddenly.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program The step of method as described in any one of claims 1 to 7 is realized when being executed by processor.
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 true CN109729271A (en) 2019-05-07
CN109729271B 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 (9)

* 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
CN1961313A (en) * 2004-06-25 2007-05-09 苹果电脑有限公司 Methods and systems for indexing files and adding associated metadata to index and metadata databases
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
CN104333587A (en) * 2014-10-30 2015-02-04 北京思特奇信息技术股份有限公司 Method and system for uniformly processing multi-platform events
WO2016007398A1 (en) * 2014-07-07 2016-01-14 Diep Louis Camera control and image streaming
CN105989112A (en) * 2015-02-12 2016-10-05 广东欧珀移动通信有限公司 Application program classification method and server
CN108712618A (en) * 2018-05-16 2018-10-26 北京百度网讯科技有限公司 Instructor in broadcasting's control method, equipment and storage medium
CN108924421A (en) * 2018-07-16 2018-11-30 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment

Patent Citations (9)

* 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
CN1961313A (en) * 2004-06-25 2007-05-09 苹果电脑有限公司 Methods and systems for indexing files and adding associated metadata to index and metadata databases
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
WO2016007398A1 (en) * 2014-07-07 2016-01-14 Diep Louis Camera control and image streaming
CN104333587A (en) * 2014-10-30 2015-02-04 北京思特奇信息技术股份有限公司 Method and system for uniformly processing multi-platform events
CN105989112A (en) * 2015-02-12 2016-10-05 广东欧珀移动通信有限公司 Application program classification method and server
CN108712618A (en) * 2018-05-16 2018-10-26 北京百度网讯科技有限公司 Instructor in broadcasting's control method, equipment and storage medium
CN108924421A (en) * 2018-07-16 2018-11-30 Oppo广东移动通信有限公司 Image processing method, device, computer readable storage medium and electronic equipment

Also Published As

Publication number Publication date
CN109729271B (en) 2021-01-12

Similar Documents

Publication Publication Date Title
CN110012224A (en) Camera stabilization system, method, electronic equipment and computer readable storage medium
CN110149482A (en) Focusing method, device, electronic equipment and computer readable storage medium
CN110166695A (en) Camera anti-fluttering method, device, electronic equipment and computer readable storage medium
CN110233970B (en) Image processing method and device, electronic equipment and computer readable storage medium
CN109951639A (en) Camera stabilization system, method, electronic equipment and computer readable storage medium
CN102567729B (en) Region specification method, region specification apparatus, server, and system
CN110248097A (en) Chase after burnt method, apparatus, terminal device, computer readable storage medium
CN110298862A (en) Method for processing video frequency, device, computer readable storage medium and computer equipment
CN108805198A (en) Image processing method, device, computer readable storage medium and electronic equipment
CN109167930A (en) Image display method, device, electronic equipment and computer readable storage medium
CN110266966A (en) Image generating method and device, electronic equipment, computer readable storage medium
CN110248101A (en) Focusing method and device, electronic equipment, computer readable storage medium
CN108024054A (en) Image processing method, device and equipment
CN109327626A (en) Image-pickup method, device, electronic equipment and computer readable storage medium
CN108769665B (en) Data transmission method and device, electronic equipment and computer readable storage medium
CN107613216B (en) Focusing method, device, computer readable storage medium and electronic equipment
CN108322650A (en) Video capture method and apparatus, electronic equipment, computer readable storage medium
CN102739942A (en) Digital image photographing apparatus and method of controlling the same
CN108924426A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN110191287A (en) Focusing method and device, electronic equipment, computer readable storage medium
CN109951641A (en) Image capturing method and device, electronic equipment, computer readable storage medium
CN108063891A (en) Image processing method, device, computer readable storage medium and computer equipment
CN110035206A (en) Image processing method and device, electronic equipment, computer readable storage medium
CN110121031A (en) Image-pickup method and device, electronic equipment, computer readable storage medium
CN108769508A (en) Data processing method, device, computer readable storage medium and electronic equipment

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