Movatterモバイル変換


[0]ホーム

URL:


CN105893283A - Camera parameter reading-writing method and apparatus as well as terminal device - Google Patents

Camera parameter reading-writing method and apparatus as well as terminal device
Download PDF

Info

Publication number
CN105893283A
CN105893283ACN201510812340.9ACN201510812340ACN105893283ACN 105893283 ACN105893283 ACN 105893283ACN 201510812340 ACN201510812340 ACN 201510812340ACN 105893283 ACN105893283 ACN 105893283A
Authority
CN
China
Prior art keywords
character string
camera parameter
string
type
group
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201510812340.9A
Other languages
Chinese (zh)
Inventor
索金鹏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
LeTV Mobile Intelligent Information Technology Beijing Co Ltd
Original Assignee
LeTV Mobile Intelligent Information Technology Beijing Co 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 LeTV Mobile Intelligent Information Technology Beijing Co LtdfiledCriticalLeTV Mobile Intelligent Information Technology Beijing Co Ltd
Priority to CN201510812340.9ApriorityCriticalpatent/CN105893283A/en
Priority to PCT/CN2016/089027prioritypatent/WO2017084358A1/en
Publication of CN105893283ApublicationCriticalpatent/CN105893283A/en
Pendinglegal-statusCriticalCurrent

Links

Classifications

Landscapes

Abstract

The invention provides a camera parameter reading-writing method and apparatus as well as a terminal device. The method comprises the steps of reading a camera parameter class of a hardware platform by utilizing a software system interface, and obtaining character strings; analyzing the character strings to obtain all groups of the character strings; taking each group of the character strings in all the groups of the character strings as a node, and linking the nodes to obtain a data source queue; and initializing an interface menu by utilizing the data source queue for enabling the interface menu to display options containing camera parameters and camera parameter values, so that a user can perform reading-writing on the camera parameters through the interface menu. Therefore, the technical problem of incapability of performing reading-writing on specific camera parameters of each hardware platform in the prior art is solved.

Description

Camera parameter reading/writing method, device and terminal unit
Technical field
The present invention relates to electronic technology, particularly relate to a kind of camera parameter reading/writing method, device and terminal unit.
Background technology
At present, in camera applications based on software systems such as Androids, user can be by the interface of camera applicationsCamera parameter is written and read by menu or icon etc., thus arranges camera parameter.Such as: user can be by answering at startup cameraWith rear, the parameters such as acutance, saturation and resolution be written and read, thus after camera is restarted, apply these parameters.
Existing camera applications is only capable of the standard camera parameter to software system and is written and read, and this is owing to including threeThough star, Intel and high pass etc. each provide some peculiar camera parameters at interior each hardware platform, but these hardware is put downThe peculiar camera parameter that platform each provides, each other can not be compatible, causes existing camera applications, it is impossible to put down each hardwareThe peculiar camera parameter of platform is directly written and read.
Summary of the invention
The present invention provides a kind of camera parameter reading/writing method, device and terminal unit, and being used for solving cannot in prior artThe technical problem that the peculiar camera parameter of each hardware platform is written and read.
For reaching above-mentioned purpose, embodiments of the invention adopt the following technical scheme that
First aspect, it is provided that a kind of camera parameter reading/writing method, including:
Software system interface is utilized to read the camera parameter class of hardware platform, it is thus achieved that character string, wherein said character string bagInclude the key for describing camera parameter and for describing the key assignments of camera parameter value;
Described character string is resolved, it is thus achieved that respectively organize character string;Wherein it is used for describing phase homophase with the key of group character stringMachine parameter;
Using each group of character string in each group of character string as a node, described each node is linked, it is thus achieved that numberAccording to source queue;
Utilize described data source queue initialization interface menu, so that described interface menu shows comprises camera parameter and phaseThe option of machine parameter value;
Obtain the camera parameter read write command inputted on described option;
According to described camera parameter read write command, the camera parameter value included in described option is written and read.
Second aspect, it is provided that a kind of camera parameter read-write equipment, including:
Read module, for utilizing software system interface to read the camera parameter class of hardware platform, it is thus achieved that character string, whereinDescribed character string includes the key for describing camera parameter and for describing the key assignments of camera parameter value;
Parsing module, for resolving described character string, it is thus achieved that respectively organize character string;Wherein use with the key of group character stringIn describing identical camera parameter;
Link module, is used for each group of character string in each group of character string as a node, enters described each nodeRow link, it is thus achieved that data source queue;
Initialization module, is used for utilizing described data source queue initialization interface menu, so that described interface menu showsComprise camera parameter and the option of camera parameter value;
Input module, for obtaining the camera parameter read write command inputted on described option;
Module for reading and writing, for according to described camera parameter read write command, takes the camera parameter included in described optionValue is written and read.
The third aspect, it is provided that a kind of terminal unit, it is characterised in that include camera parameter as above read-write dressPut.
The embodiment of the present invention, utilizes software system interface to read the camera parameter class of hardware platform, it is thus achieved that after character string,Character string is resolved, it is thus achieved that respectively organize character string, and then using each group of character string in each group of character string as a node,Each node is linked, it is thus achieved that data source queue, to utilize data source queue initialization interface menu so that interface menu showsShow and comprise camera parameter and the option of camera parameter value, thus camera parameter can be read by interface menu by userWrite, solve the technical problem peculiar camera parameter of each hardware platform cannot being written and read in prior art.
Accompanying drawing explanation
The schematic flow sheet of a kind of camera parameter reading/writing method that Fig. 1 provides for the embodiment of the present invention one;
Fig. 2 is the class figure realizing camera parameter reading/writing method;
Fig. 3 is the logic chart realizing camera parameter reading/writing method;
The structural representation of a kind of camera parameter read-write equipment that Fig. 4 provides for the embodiment of the present invention two;
The structural representation of the another kind of camera parameter read-write equipment that Fig. 5 provides for embodiment two;
The structural representation of another camera parameter read-write equipment that Fig. 6 provides for embodiment two.
Detailed description of the invention
The camera parameter reading/writing method, device and the terminal unit that there is provided the embodiment of the present invention below in conjunction with the accompanying drawings are carried out in detailThin description.
Embodiment one
The schematic flow sheet of a kind of camera parameter reading/writing method that Fig. 1 provides for the embodiment of the present invention one, the present embodiment instituteThe method provided can be implemented by the camera applications run on the terminal device, and this terminal equipment configuration has software system, andHardware platform, as it is shown in figure 1, method includes:
Step 101, utilize software system interface read hardware platform camera parameter class, it is thus achieved that character string.
Wherein, character string includes the key for describing camera parameter and for describing the key assignments of camera parameter value.
Step 102, character string is resolved, it is thus achieved that respectively organize character string.
Wherein, it is used for describing identical camera parameter with the key of group character string.
Concrete, confirm the type of current string, wherein, type is enumeration type or wide-style or monodrome type.And then judge whether current string belongs to a group under the corresponding types created in each group character string;If current string belongs toUnder the corresponding types created, a group in each group character string, then be inserted into affiliated one group character string by current stringIn;If current string is not belonging under the corresponding types created respectively organize character string, then create comprise current string one groupCharacter string.
Such as: when the key of current string is including at least suffix "-values ", it is determined that the type of current string is pieceLift type;The key of current string including at least suffix "-min ", suffix "-step ", prefix " max-" and/or time " min-",The type then determining current string is wide-style;If the type of current string is not in enumeration type and wide-styleA kind of, it is determined that the type of character string is monodrome type.
Step 103, using each group of character string in each group of character string as a node, each node is linked, obtainsObtain data source queue.
Step 104, utilize data source queue initialization interface menu, so that interface menu shows comprises camera parameter and phaseThe option of machine parameter value.
The camera parameter read write command that step 105, acquisition are inputted on option.
Wherein, camera parameter read write command includes the camera parameter of required reading, and/or the camera parameter of required amendment takesValue.
Concrete, user can click on the option of the camera parameter of required amendment in the interface menu of camera applications, fromAnd show the camera parameter and the camera parameter value of correspondence that this option comprised.User can be by inputting in this optionCamera parameter is modified by new camera parameter value.
Step 106, according to camera parameter read write command, the camera parameter value included in option is written and read.
In order to understand explanation the present embodiment, the present embodiment additionally provides a kind of concrete software implementation method, by newly-builtOne parameter class realizes interface, and Fig. 2 is the class figure realizing camera parameter reading/writing method, as in figure 2 it is shown, wherein base class includes:
IParamNode
: this type of static bool isNodeType (String) // whether
: static void createNode (String) // establishment ParamNode, key is set
: void setData (String) // value is set
: void prepareValueList () // according to value pretreatment list
: List<String>getValues () // reading list
: int getType () // reading type
: bool contentKey (String)/judge that key is the most identical
: String getDisplayItem () // return display character string
: String setDeviceParam (int) // input list subscript, true key and value is set to settingIn Bei
It addition, three subclasses ParamNode are respectively used to determine enumeration type or wide-style or monodrome type, including:
Enumeration type ParamNode, suffix is "-values " ...;
Wide-style ParamNode, suffix is "-min ", "-step " ..., prefix is " max-", " min-" ...;
Monodrome type ParamNode, isNodeType returns true forever.
Fig. 3 is the logic chart realizing camera parameter reading/writing method, runs above-mentioned code in systems, then can realize such as schemingLogic shown in 3:
First, realize camera by code mDevice=Camera.open and initialize, pass through code
Parameters p=Camera.getParameters ();
String str=p.flatten ();
Read camera parameter class, it is thus achieved that character string.
And then, it may be judged whether a pair parameter in character string, i.e. key and key assignments, the most then order traversal institute can be readHaving subclass ParamNode of type, isNodeType (key) is true time, determines that nCurType class is current type, otherwise, timeGo through chained list node and call prepareValueList class.
Wherein, after determining that nCurType is current type, travel through chained list node, it may be judged whether have contentKey(key) it is genuine node, the most then inserts this node, and then be monodrome type at this node inquired, then node is transferred toThe ParamNode of nCurType, if otherwise calling nCurType class createNode (key), in hinged node to chained list.SoAfter, carry out assignment by code setData (value), and return a pair ginseng performing to judge whether to read in character stringThe step of number.
Thus, after performing the logic shown in Fig. 3, order reads node link, adds in the interface menu of application, mainMenu display list is all nodes display character string getDisplayItem that traversal chained list is found, and arranges main menuOnItemClicked response events, display second-level menu list is the getValues choosing main menu list item node.ArrangeSecond-level menu onItemClicked response events, calls the setDeviceParam of node.
The embodiment of the present invention, utilizes software system interface to read the camera parameter class of hardware platform, it is thus achieved that after character string,Character string is resolved, it is thus achieved that respectively organize character string, and then using each group of character string in each group of character string as a node,Each node is linked, it is thus achieved that data source queue, to utilize data source queue initialization interface menu so that interface menu showsShow and comprise camera parameter and the option of camera parameter value, thus camera parameter can be read by interface menu by userWrite, solve the technical problem peculiar camera parameter of each hardware platform cannot being written and read in prior art.
Embodiment two
The structural representation of a kind of camera parameter read-write equipment that Fig. 4 provides for the embodiment of the present invention two, the present embodiment instituteThe device provided can be arranged in terminal unit, as shown in Figure 4, including: read module 41, parsing module 42, link module43, initialization module 44, input module 45 and module for reading and writing 46.
Read module 41, for utilizing software system interface to read the camera parameter class of hardware platform, it is thus achieved that character string.
Wherein, described character string includes the key for describing camera parameter and for describing the key assignments of camera parameter value.
Parsing module 42, resolves for the character string being read read module 41, it is thus achieved that respectively organize character string.
Wherein, it is used for describing identical camera parameter with the key of group character string.
Link module 43, each group of character string in each group character string obtained by parsing module 42 is as oneNode, links described each node, it is thus achieved that data source queue.
Initialization module 44, for the data source queue initialization interface menu utilizing link module 43 to be obtained, so thatDescribed interface menu shows and comprises camera parameter and the option of camera parameter value.
Input module 45, for obtaining the camera parameter read write command inputted on described option.
Module for reading and writing 46, for according to the camera parameter read write command acquired in input module 45, to institute in described optionThe camera parameter value comprised is written and read.
Further, the present embodiment additionally provides another kind of camera parameter read-write equipment, Fig. 5 provide for embodiment two anotherPlant the structural representation of camera parameter read-write equipment, as it is shown in figure 5, on the basis of the camera parameter read-write equipment shown in Fig. 4,Parsing module 42, including: confirmation unit 421, judging unit 422, insertion unit 423 and creating unit 424.
Confirmation unit 421, for confirming the type of current string.
Wherein, type is enumeration type or wide-style or monodrome type.
Judging unit 422, for judging whether current string belongs to each under the corresponding types created and organize in character stringOne group.
Insert unit 423, if judging that current string belongs to each under the corresponding types created for judging unit 422In group character string one group, then be inserted into current string in affiliated one group character string.
Creating unit 424, if judging under the corresponding types that current string is not belonging to create for judging unit 422Respectively organize character string, then create the one group of character string comprising current string.
Further, the present embodiment additionally provides another kind of camera parameter read-write equipment, Fig. 6 for embodiment two provide anotherPlant the structural representation of camera parameter read-write equipment, as shown in Figure 6, on the basis of the camera parameter read-write equipment shown in Fig. 5,Confirmation unit 421, including: enumerate subelement 4211, scope subelement 4212 and monodrome subelement 4213.
Enumerate subelement 4211, when the key of current string includes at least suffix "-values ", it is determined that current wordThe type of symbol string is enumeration type.
Scope subelement 4212, the key for current string includes at least suffix "-min ", suffix "-step ", prefixTime " max-" and/or " min-", it is determined that the type of current string is wide-style.
Monodrome subelement 4213, if the type for current string is not the one in enumeration type and wide-style,The type then determining character string is monodrome type.
The embodiment of the present invention, utilizes software system interface to read the camera parameter class of hardware platform, it is thus achieved that after character string,Character string is resolved, it is thus achieved that respectively organize character string, and then using each group of character string in each group of character string as a node,Each node is linked, it is thus achieved that data source queue, to utilize data source queue initialization interface menu so that interface menu showsShow and comprise camera parameter and the option of camera parameter value, thus camera parameter can be read by interface menu by userWrite, solve the technical problem peculiar camera parameter of each hardware platform cannot being written and read in prior art.
Embodiment three
Present embodiments provide a kind of terminal unit, including the camera parameter read-write equipment provided in embodiment two.EventuallyEnd equipment is configured with software system, and hardware platform.
Terminal unit, utilizes software system interface to read the camera parameter class of hardware platform, it is thus achieved that character string, wherein saidCharacter string includes the key for describing camera parameter and for describing the key assignments of camera parameter value;Described character string is solvedAnalysis, it is thus achieved that respectively organize character string;Wherein it is used for describing identical camera parameter with the key of group character string;Each by each group of character stringDescribed each node, as a node, is linked, it is thus achieved that data source queue by group character string;Utilize at the beginning of described data source queueBeginningization interface menu, so that described interface menu shows comprises camera parameter and the option of camera parameter value;Obtain describedThe camera parameter read write command inputted on option;According to described camera parameter read write command, included in described optionCamera parameter value is written and read.
Wherein, described character string is resolved by terminal unit, it is thus achieved that respectively organize character string, including: terminal unit confirms to work asThe type of front character string;Described type is enumeration type or wide-style or monodrome type;Judge whether current string belongs toIn each group character string one group under the corresponding types created;If current string belongs to respectively organizes word under the corresponding types createdIn symbol string one group, then be inserted into current string in affiliated one group character string;If current string is not belonging to createCorresponding types under respectively organize character string, then create the one group of character string comprising current string.
Further, terminal unit confirms the type of current string, including: the key of current string including at least suffix "-Values " time, then terminal unit determines that the type of current string is enumeration type;The key of current string includes at least suffix"-min ", suffix "-step ", prefix " max-" and/or time " min-", then terminal unit determines that the type of current string is modelEnclose type;If the type of current string is not the one in enumeration type and wide-style, then terminal unit determines character stringType be monodrome type.
The embodiment of the present invention, utilizes software system interface to read the camera parameter class of hardware platform, it is thus achieved that after character string,Character string is resolved, it is thus achieved that respectively organize character string, and then using each group of character string in each group of character string as a node,Each node is linked, it is thus achieved that data source queue, to utilize data source queue initialization interface menu so that interface menu showsShow and comprise camera parameter and the option of camera parameter value, thus camera parameter can be read by interface menu by userWrite, solve the technical problem peculiar camera parameter of each hardware platform cannot being written and read in prior art.
One of ordinary skill in the art will appreciate that: all or part of step realizing above-mentioned each method embodiment can be led toThe hardware crossing programmed instruction relevant completes.Aforesaid program can be stored in a computer read/write memory medium.This journeySequence upon execution, performs to include the step of above-mentioned each method embodiment;And aforesaid storage medium includes: ROM, RAM, magnetic disc orThe various media that can store program code such as person's CD.
Last it is noted that various embodiments above is only in order to illustrate technical scheme, it is not intended to limit;To the greatest extentThe present invention has been described in detail by pipe with reference to foregoing embodiments, it will be understood by those within the art that: it depends onSo the technical scheme described in foregoing embodiments can be modified, or the most some or all of technical characteristic is enteredRow equivalent;And these amendments or replacement, do not make the essence of appropriate technical solution depart from various embodiments of the present invention technologyThe scope of scheme.

Claims (7)

CN201510812340.9A2015-11-202015-11-20Camera parameter reading-writing method and apparatus as well as terminal devicePendingCN105893283A (en)

Priority Applications (2)

Application NumberPriority DateFiling DateTitle
CN201510812340.9ACN105893283A (en)2015-11-202015-11-20Camera parameter reading-writing method and apparatus as well as terminal device
PCT/CN2016/089027WO2017084358A1 (en)2015-11-202016-07-07Camera parameter read-write method and apparatus, and terminal device

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201510812340.9ACN105893283A (en)2015-11-202015-11-20Camera parameter reading-writing method and apparatus as well as terminal device

Publications (1)

Publication NumberPublication Date
CN105893283Atrue CN105893283A (en)2016-08-24

Family

ID=57002886

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201510812340.9APendingCN105893283A (en)2015-11-202015-11-20Camera parameter reading-writing method and apparatus as well as terminal device

Country Status (2)

CountryLink
CN (1)CN105893283A (en)
WO (1)WO2017084358A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107872668A (en)*2017-10-272018-04-03深圳天珑无线科技有限公司Obtain method, mobile terminal and the device of camera pixel value in mobile terminal

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN112631476B (en)*2020-12-292022-04-12杭州晨安科技股份有限公司SDL library-based camera function menu display method

Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20060061665A1 (en)*2004-09-172006-03-23Ortery Technologies, Inc.Method of remote capture with user interface providing separate inside-and outside-light-box modes
CN102662683A (en)*2011-12-302012-09-12广东东研网络科技有限公司Generating and importing method for communication facility configuration file based on key-value pair format
CN103353835A (en)*2013-01-172013-10-16珠海全志科技股份有限公司Migration processing method and device of Android system SensorHal layer compatible kinds of same Sensor devices
CN103546689A (en)*2013-10-112014-01-29Tcl集团股份有限公司Resolution ratio acquiring method and device of external camera of android system
CN104252342A (en)*2013-06-272014-12-31中兴通讯股份有限公司Method and device for realizing embedding type application with configurable parameters

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US20060061665A1 (en)*2004-09-172006-03-23Ortery Technologies, Inc.Method of remote capture with user interface providing separate inside-and outside-light-box modes
CN102662683A (en)*2011-12-302012-09-12广东东研网络科技有限公司Generating and importing method for communication facility configuration file based on key-value pair format
CN103353835A (en)*2013-01-172013-10-16珠海全志科技股份有限公司Migration processing method and device of Android system SensorHal layer compatible kinds of same Sensor devices
CN104252342A (en)*2013-06-272014-12-31中兴通讯股份有限公司Method and device for realizing embedding type application with configurable parameters
CN103546689A (en)*2013-10-112014-01-29Tcl集团股份有限公司Resolution ratio acquiring method and device of external camera of android system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN107872668A (en)*2017-10-272018-04-03深圳天珑无线科技有限公司Obtain method, mobile terminal and the device of camera pixel value in mobile terminal

Also Published As

Publication numberPublication date
WO2017084358A1 (en)2017-05-26

Similar Documents

PublicationPublication DateTitle
CN101339534B (en)Software test apparatus and test method
CN104268072B (en)Graphical script editor and method for fast developing communication equipment testing script
CN112597033B (en)Automatic interface testing method and device
CN107885499A (en)A kind of interface document generation method and terminal device
US11188498B2 (en)Method and system for processing engineering objects in an industrial automation environment
CN108037941B (en)Based on the application program update method of public plug-in unit, electronic equipment, storage medium
CN105117431A (en)Dynamic configuration method and system for external imported data
US20190087160A1 (en)System and method for creating domain specific language
CN110941614A (en)Form generation method and device, electronic equipment and computer readable storage medium
CN103970659A (en)Android application software automation testing method based on pile pitching technology
CN103488482A (en)Method and device for generating test cases
CN101675415B (en)Program pattern analyzer, pattern appearance status information production method, pattern information generating device, and program
CN104881343A (en)Testing method and testing system
CN110471754A (en)Method for exhibiting data, device, equipment and storage medium in job scheduling
CN105005543A (en)Interface generation apparatus and method
CN104881311A (en)Method and apparatus for judging version compatibility
CN101110024A (en) A unit testing system and method
CN110795091B (en)Modularized route decoupling method, storage medium, electronic equipment and system
CN105808748A (en)MIB (Management Information Base) version contrast method and device
CN112417660A (en)Method and system for automatically coding pipeline support and hanger
CN105893283A (en)Camera parameter reading-writing method and apparatus as well as terminal device
CN104375814A (en)Generation method and device of an interface document
US20180278472A1 (en)System and method for performing mass renaming of list of items at run-time with variable differentiation factor
CN103246605A (en)Method and system for collocating remote controller key values based on xml (extensive markup language)
Arrieta et al.A comparative on variability modelling and management approach in simulink for embedded systems

Legal Events

DateCodeTitleDescription
C06Publication
PB01Publication
C10Entry into substantive examination
SE01Entry into force of request for substantive examination
WD01Invention patent application deemed withdrawn after publication

Application publication date:20160824

WD01Invention patent application deemed withdrawn after publication

[8]ページ先頭

©2009-2025 Movatter.jp