Summary of the invention
For solving the problems of the technologies described above, the embodiment of the present application provides a kind of method of image and the device of correspondence thereof that represent mobile terminal shooting, to realize correctly representing image.
The method of the image of mobile terminal shooting that what the embodiment of the present application provided represent comprises:
Judge that mobile terminal panel place plane departs from the degree of surface level whether in preset range, if so, then by the direction attribute information of the camera application program prompting reference object of mobile terminal;
Receive the selected results to reference object direction attribute information, represent the image of mobile terminal shooting according to described selected results.
Preferably, whether the described degree judging that mobile terminal panel place plane departs from surface level specifically comprises in preset range:
Obtain X-axis that gravity sensing device records, gravity acceleration value in Y-axis respectively, the plane of described X-axis, Y-axis composition is surface level;
Judge whether the gravity acceleration value on X axis is less than the first predetermined acceleration threshold values, and whether the gravity acceleration value in Y-axis is less than the second predetermined acceleration threshold values, if so, then determine that mobile terminal panel place plane departs from the degree of surface level in preset range.
Preferably, the direction attribute information of the described prompting of the camera application program by mobile terminal reference object specifically comprises:
In the view-finder of mobile terminal to reference object, present the arrow in N number of direction, the arrow angle between any two in described N number of direction is identical or not identical preset angle angle value, then described reception is the selection result in the direction received in described N number of direction to reference object direction attribute information selected results, described N be more than or equal to 4 natural number.
Further preferably, described N is 4, and the arrow in described N number of direction is respectively the arrow in due east, Zheng Xi, due south, 4 directions, positive north.
Preferably, described according to selected results represent mobile terminal shooting image comprise:
The selected results of the direction attribute information corresponding with this image is stored during the image of memory mobile terminal shooting;
Read the image of mobile terminal and the selected results of the direction attribute information corresponding with this image that store, according to described selected results, the image that mobile terminal is taken is represented; Or,
According to the image of the described shooting of the selected results memory mobile terminal to reference object direction attribute information;
Read the image of the mobile terminal shooting stored and represent.
The embodiment of the present application additionally provides a kind of device representing the image of mobile terminal shooting.This device comprises: judging unit, Tip element, receiving element and represent unit, wherein:
Described judging unit, for judging that mobile terminal panel place plane departs from the degree of surface level whether in preset range, if so, then trigger prompts unit;
Described Tip element, for the direction attribute information of the camera application program prompting reference object by mobile terminal;
Described receiving element, for receiving the selected results to reference object direction attribute information;
Describedly represent unit, for representing the image of mobile terminal shooting according to described selected results.
Preferably, described judging unit specifically comprises accekeration and obtains subelement, accekeration judgment sub-unit and departure degree determination subelement, wherein:
Described accekeration obtains subelement, and for obtaining the gravity acceleration value in X-axis that gravity sensing device records, Y-axis respectively, the plane of described X-axis, Y-axis composition is surface level;
Described accekeration judgment sub-unit, for judging whether the gravity acceleration value on X axis is less than the first predetermined acceleration threshold values, and whether the gravity acceleration value in Y-axis is less than the second predetermined acceleration threshold values, if so, then departure degree determination subelement is triggered;
Described departure degree determination subelement, for determining that mobile terminal panel place plane departs from the degree of surface level in preset range.
Preferably, described Tip element specifically comprises arrow and presents subelement, for presenting the arrow in N number of direction in the view-finder that mobile terminal is corresponding to shooting, the arrow angle between any two in described N number of direction is identical or not identical preset angle angle value, described N be more than or equal to 4 natural number;
Described receiving element is specifically for receiving the selected results in a direction in described N number of direction.
Preferably, represent unit described in specifically to comprise:
First storing sub-units, first reads subelement and first and represents subelement, wherein: described first storing sub-units, for take at memory mobile terminal image time the storage direction attribute information corresponding with this image selected results; Described first reads subelement, for the selected results of the image and the direction attribute information corresponding with this image that read the mobile terminal of storage; Described first represents subelement, for representing the image that mobile terminal is taken according to described selected results; Or,
Second storing sub-units and second represents subelement, wherein: described second storing sub-units, for the image according to the described shooting of the selected results memory mobile terminal to reference object direction attribute information; Described second represents subelement, for reading the image of the mobile terminal shooting of storage and representing.
The embodiment of the present application first judges that mobile terminal place plane departs from the degree of surface level whether in preset range, if just by the direction attribute information of camera application program prompting reference object in preset range, then represented the image that mobile terminal is taken the selected results of reference object direction attribute information according to user.Compared with prior art, the image taken mobile terminal represents and is divided into two classifications by the embodiment of the present application: one be mobile terminal place plane and surface level departure degree larger time, namely when mobile terminal is in vertical or substantially vertical, because gravity sensing device can identify the direction of reference object, can represent according to this direction when the image taken mobile terminal represents; Two be mobile terminal place plane and surface level departure degree less time, namely mobile terminal be in horizontality or close to horizontality time, not in the direction by gravity sensing device identification reference object, but the reception user that provides access is to the selected results of reference object direction attribute information, the direction that can show according to this selection result when the image taken mobile terminal represents represents.The shooting image of the mobile terminal taking different ways of presentation to make to show by this foundation different situations meets the needs read or check all the time, thus improves convenience.
Embodiment
Technical scheme in the application is understood better in order to make those skilled in the art person, below in conjunction with the accompanying drawing in the embodiment of the present application, technical scheme in the embodiment of the present application is clearly and completely described, obviously, described embodiment is only some embodiments of the present application, instead of whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not making the every other embodiment obtained under creative work prerequisite, all should belong to the scope of the application's protection.
See Fig. 1, the figure shows the flow process representing an embodiment (basic embodiment) of the method for the image of mobile terminal shooting of the application.This embodiment comprises:
Step S101: judge that mobile terminal panel place plane departs from the degree of surface level whether in preset range, if so, perform step S102; If not, then step S105 is performed;
Mobile terminal is generally rectangular block form, and it has panel and sidewall.According to the relation between panel place plane and surface level, carry out in shooting process utilizing mobile terminal, the spatiality of mobile terminal can divide two kinds of fundamental types, i.e. vertical state and horizontality: mobile terminal is under vertical state, and the angle between the panel place plane of mobile terminal and surface level is 90 °; Mobile terminal is under horizontality, and the angle between the panel place plane of mobile terminal and surface level is 0 °.Except these two kinds basic mobile terminal spatialities, in shooting process, for adapting to the needs of shooting or personal like, the state be between this two states can also be there is, namely there is certain angle between mobile terminal panel place plane and surface level.In order to contain mobile terminal various spatiality in shooting process, the relation between this mobile terminal panel place plane and surface level is called departure degree.After use mobile terminal starts shoot function, first the present embodiment judges that whether mobile terminal panel place plane departs from the departure degree of surface level in preset range, different according to departure degree, different measures is taked to realize representing the image that mobile terminal is taken, here preset range can set according to actual conditions, and it depends on the factor such as hobby of the precision of discriminating direction equipment in the performance of mobile terminal itself, mobile terminal, sensitivity and mobile phone users self.It should be noted that: panel here can be the top panel of mobile terminal, also can be lower panel, the present embodiment provides " panel ", and this term is intended to determine mobile terminal departure degree with respect to the horizontal plane, and is not used in the planform, material composition etc. that limit mobile terminal.
Step S102: by the direction attribute information of the camera application program prompting reference object of mobile terminal;
When the degree departing from surface level by abovementioned steps determination mobile terminal panel place plane is in preset range, the present embodiment provides the entrance receiving reference object direction attribute, is shown the direction attribute information of reference object by camera application program on mobile terminal screen.The entrance of receive direction attribute can be embodied by multiple concrete form: such as, in camera application program, coding makes it on mobile terminal screen, show dialog box, and request user inputs the direction attribute of reference object; Also such as, by software mode, the volume knob on mobile terminal sidewall is set to the triggering control key of direction attribute, by producing the direction attribute information of reference object to the physical operations triggering control key; For another example, in screen, directly show multiple arrow logo, by identifying that the triggering situation of arrow logo obtains the direction attribute information of reference object.For ease of understanding the technical scheme of the present embodiment, brief explanation is done to the concept of the direction attribute of reference object below: the direction attribute of reference object refers to which direction meeting in the image formed after capture apparatus is taken reference object and read or check custom, and the direction attribute information of reference object refers to the set of the directional information at least comprising reference object direction attribute.For the material of character type shown in Fig. 2 (reference object), Fig. 2 does not take front reference object to find a view at mobile terminal the situation in district, what in this character type material, meet reading or check custom is positive east orientation, " positive east orientation " is the direction attribute of this character type material, but need based on practical application, the direction such as due east, positive west can be provided and select to confirm for user as direction attribute information.
Step S103: receive the selected results to reference object direction attribute information;
After the direction attribute information of the reference object tipped out by camera application program, need to determine that one for presenting the direction of picture reference object being taken to rear formation, when the direction attribute information of the reference object of pointing out out comprises multiple directions attribute, direction attribute is therefrom selected (for the camera application program etc. at mobile terminal or mobile terminal place, namely to receive the selected results to reference object direction attribute information) as a result; When the direction attribute information of the reference object of pointing out out comprises a direction attribute, this direction attribute selected can obtain the selected results to reference object direction attribute information.
Step S104: the image representing mobile terminal shooting after completing shooting operation according to described selected results, process ends; When completing shooting action need and representing the picture to the shooting of reference object, the selected results of the direction attribute determined according to abovementioned steps represents shooting image.
Step S105: by the direction attribute of gravity sensing device determination reference object;
When the degree departing from surface level by S101 step determination mobile terminal panel place plane is outside preset range, original mode can be still adopted to determine to take the direction attribute of image.Such as, the direction attribute of gravity sensing device determination reference object is adopted.With mobile terminal, example is shot for front people, when gravity sensing device senses that the gravity acceleration value of in the vertical direction is 9.8, then illustrate that the spatiality of mobile terminal is vertical state, owing to being in the vertical direction shooting people, therefore, namely be vertically " number of people " direction of people upward, this direction is the direction attribute of reference object, and the picture representing shooting according to this direction is the direction meeting and browse or check custom.
Step S106: the direction attribute of the reference object determined according to described gravity sensing device represents the image of mobile terminal shooting, process ends.
The mobile terminal panel place plane that first judges the present embodiment departs from the degree of surface level whether in preset range, if just by the direction attribute information of camera application program prompting reference object in preset range, then represented the image that mobile terminal is taken the selection result of reference object direction attribute information according to user.Compared with prior art, the model split that the image taken mobile terminal represents by the embodiment of the present application is two classifications: one be mobile terminal panel place plane and surface level departure degree larger time, namely when mobile terminal is in vertical or substantially vertical, because gravity sensing device can identify the direction of reference object, can represent according to this direction when the image taken mobile terminal represents; Two be mobile terminal place plane and surface level departure degree less time, namely mobile terminal be in horizontality or close to horizontality time, not in the direction by gravity sensing device identification reference object, but the reception user that provides access is to the selection result of reference object direction attribute information, the direction that can show according to this selection result when the image taken mobile terminal represents represents.The shooting image of the mobile terminal taking different ways of presentation to make to show by this foundation different situations meets the needs read or check all the time, thus improves convenience.
Although said method embodiment can solve the technical matters of the application, realize goal of the invention, each step has multiple concrete implementation.In order to the technical characteristic of definitely the application, provide a kind of embodiment be more preferably below.See Fig. 3, the figure shows the flow process of the preferred embodiment.The preferred embodiment comprises:
Step S301: obtain X-axis that gravity sensing device records, gravity acceleration value in Y-axis respectively, the plane of described X-axis, Y-axis composition is surface level;
For ease of weighing the departure degree of mobile terminal panel place plane and surface level, this preferred embodiment utilizes gravity sensing device to realize.The measurement of gravity sensing device need based on certain coordinate system, and this preferred embodiment is with horizontal direction direction for X-axis, and direction vertical with X-axis is in the horizontal plane Y-axis, and the direction of the plane orthogonal formed with X, Y-axis is Z axis.In such coordinate system, measured the gravity acceleration value obtained in X-axis, Y-axis respectively by gravity sensing device.
Step S302: judge whether the gravity acceleration value on X axis is less than the first predetermined acceleration threshold values, and whether the gravity acceleration value in Y-axis is less than the second predetermined acceleration threshold values, if, then determine that mobile terminal place plane departs from the degree of surface level in preset range, perform step S303; If not, then determine that mobile terminal panel place plane departs from the degree of surface level not in preset range, perform step S307.
After recording the gravity acceleration value in X, Y-axis by abovementioned steps, accekeration in this both direction and the acceleration threshold values preset are compared, if comparative result is all less than predetermined acceleration threshold values, then show that plane departure degree with respect to the horizontal plane in current mobile terminal panel place is in preset range, the current residing spatiality of mobile terminal will make the identification of the direction attribute that cannot be carried out reference object by gravity sensing device; If comparative result has one or two to be all greater than predetermined acceleration threshold values, then show that plane departure degree with respect to the horizontal plane in current mobile terminal panel place is not in preset range, the current residing spatiality of mobile terminal is not affected and is identified by the direction attribute of gravity sensing device to reference object.Such as, 4.9 [9.8 × Math.sin (Math. π/6)] are for first, second predetermined acceleration threshold values, as Math.abs (xAxisValue) < 4.9andMath.abs (yAxisValue) < 4.9, (component of acceleration of gravity in x-axis of xAxisValue representative, yAxisValue represents the component of acceleration of gravity in y-axis.), illustrate that angle between mobile terminal panel place plane and surface level is at positive and negative 30 ° of inclination angles.Within the scope of this, the direction attribute of reference object cannot be determined by gravity sensing device.
Step S303: in the view-finder of mobile terminal to reference object, presents the arrow in N number of direction, and the arrow angle between any two in described N number of direction is identical or not identical preset angle angle value, described N be more than or equal to 4 natural number;
When the spatiality by abovementioned steps determination mobile terminal is within the scope of default departure degree, in mobile terminal camera application program in the view-finder of reference object, present the arrow in N number of direction, a direction is had to meet user's normal browsing or check image request in this N number of arrow, the direction of N number of arrow angle between any two can equal (equidistantly distributing) also can unequal (non-equidistant distribution), N is more than or equal to 4 under normal circumstances.Show N see Fig. 4, Fig. 4 (a) and equal 4, the direction of four arrows is respectively the direction attribute information prompting situation in due east, Zheng Xi, due south, positive north; Fig. 4 (b) shows N and equals 8, and the direction of eight arrows, except due east, Zheng Xi, due south, direct north, also comprises the southeast, southwest, northeast, four, northwest oppositely.Normal conditions, the more many individual demands that more can meet user in direction, such as certain user wishes the picture that shows and represents screen and there is certain drift angle, but, the more areas taken in district of finding a view in direction are larger, may cause the too fat to move of screen-icon, affect shooting of finding a view normally.A kind of good mode is the quantity that the demand of comprehensive these two aspects carries out determining prompting direction as the case may be.Such as, provide inlet porting to arrange before startup shoot function for user by camera application program, quantity is set to 4, and direction is set to the four corners of the world four positive dirction.
Step S304: the selected results receiving a direction in described N number of direction;
Step S305: the selection result storing the direction attribute information corresponding with this image during the image of memory mobile terminal shooting; The direction attribute selected by abovementioned steps is final for representing picture, the direction attribute information that record of can creating a file separately is corresponding with reference object;
Step S306: read the image of mobile terminal and the selection result of the direction attribute information corresponding with this image that store, according to described selection result, the image that mobile terminal is taken is represented, process ends;
After receiving and representing trigger request, read the image of the mobile terminal shooting of storage and direction attribute corresponding to this image simultaneously, then represent according to the figure of this direction attribute to shooting.It is worth emphasizing that: except according to above-mentioned steps S305,306 mode presenting images except, in fact directly can also store according to selected direction attribute when the image of memory mobile terminal shooting, like this receive represent trigger request time, directly can read and represent according to the image of direction property store.Here carry out storage according to selected direction attribute to call setRotation () function by camera application program and rotate according to selected direction (angle) the image photographed, then postrotational image is stored.SetRotation () function belongs to android.hardware.Camera.Parameters bag, for arranging the dextrorotation gyration relative to camera direction, this angle is the angle in relative camera sensor (camerasensor) direction.Such as rearmounted camera sensor is fixed and any direction.
Step S307: by the direction attribute of gravity sensing device determination reference object;
Step S308: the direction attribute of the reference object determined according to described gravity sensing device represents the image of mobile terminal shooting, process ends.
Also it should be noted that: this preferred embodiment each provides and judges that mobile terminal place plane departs from the degree of surface level whether in preset range, point out the directional information of reference object by the camera application program of mobile terminal and represent the optimal way of the image that mobile terminal is taken according to selected results, and these optimal ways are combined into a preferred embodiment, but, this does not show that these preferred modes can not with independently form existence, that is, on the basic embodiment basis of the application, an embodiment can be formed into other steps by the optimal way of certain step wherein or several step.
Foregoing has described the embodiment of the exhibiting method of the auto heterodyne image of the application in detail, correspondingly, present invention also provides a kind of device embodiment representing the image of mobile terminal shooting.See Fig. 5, the figure shows the structured flowchart representing the device embodiment of the image of mobile terminal shooting of the application.This embodiment device comprises: judging unit 501, Tip element 502, receiving element 503 and represent unit 504, wherein:
Judging unit 501, for judging that mobile terminal place plane departs from the degree of surface level whether in preset range, if so, then trigger prompts unit;
Tip element 502, for the direction attribute information of the camera application program prompting reference object by mobile terminal;
Receiving element 503, for receiving the selected results to reference object direction attribute information;
Represent unit 504, for representing the image of mobile terminal shooting according to described selected results.
The course of work of this device embodiment is: first judge that mobile terminal place plane departs from the degree of surface level whether in preset range by judging unit 501, if, then trigger prompts unit 502, is pointed out the direction attribute information of reference object by the camera application program of mobile terminal by Tip element 502; Receiving element 503, after receiving the selection result to reference object direction attribute information, represents unit 504 represents mobile terminal shooting image according to described selection result.
This device embodiment first judges that mobile terminal panel place plane departs from the degree of surface level whether in preset range, if just by the direction attribute information of camera application program prompting reference object in preset range, then represented the image that mobile terminal is taken the selection result of reference object direction attribute information according to user.Compared with prior art, the model split that the image taken mobile terminal represents by this device embodiment is two classifications: one be mobile terminal panel place plane and surface level departure degree larger time, namely when mobile terminal is in vertical or substantially vertical, because gravity sensing device can identify the direction of reference object, can represent according to this direction when the image taken mobile terminal represents; Two be mobile terminal place plane and surface level departure degree less time, namely mobile terminal be in horizontality or close to horizontality time, not in the direction by gravity sensing device identification reference object, but the reception user that provides access is to the selection result of reference object direction attribute information, the direction that can show according to this selection result when the image taken mobile terminal represents represents.The shooting image of the mobile terminal taking different ways of presentation to make to show by this foundation different situations meets the needs read or check all the time, thus improves convenience.
Judging unit in said apparatus embodiment can have different inner structures according to it to the different judgment modes that mobile terminal place plane departs from the degree of surface level.Such as, the preferred judging unit 501 of the application can comprise accekeration and obtain subelement 5011, accekeration judgment sub-unit 5012 and departure degree determination subelement 5013, wherein:
Accekeration obtains subelement 5011, and record gravity acceleration value in X-axis, Y-axis for obtaining gravity sensing device respectively, the plane of described X-axis, Y-axis composition is surface level;
Accekeration judgment sub-unit 5012, for judging whether the gravity acceleration value on X axis is less than the first predetermined acceleration threshold values, and whether the gravity acceleration value in Y-axis is less than the second predetermined acceleration threshold values, if so, then departure degree determination subelement is triggered;
Departure degree determination subelement 5013, for determining that mobile terminal place plane departs from the degree of surface level in preset range.
Based on same reason, the Tip element 502 of said apparatus embodiment also can have different inner structures based on its different prompting mode.Such as, the preferred Tip element 502 of the application can comprise arrow and present subelement 5021, for presenting the arrow in N number of direction in the view-finder that mobile terminal is corresponding to shooting, the arrow angle between any two in described N number of direction is identical or not identical preset angle angle value, described N be more than or equal to 4 natural number, as a kind of prompting mode of practicality, N can get 4, and the arrow in 4 directions can be due east, Zheng Xi, Zheng Bei, due south.In this case, receiving element 503 is specifically for receiving the selection result in a direction in described N number of direction.
The unit that represents of said apparatus embodiment also has different internal structure based on different exhibition methods.Such as, a kind of structure composition representing unit 504 can be comprise: the first storing sub-units 5041, first reads subelement 5042 and first and represents subelement 5043, wherein: the first storing sub-units 5041, for take at memory mobile terminal image time store the selection result of the direction attribute information corresponding with this image; First reads subelement 5042, for the selection result of the image and the direction attribute information corresponding with this image that read the mobile terminal of storage; First represents subelement 5043, for representing the image that mobile terminal is taken according to described selection result.Also such as, the another kind of structure composition representing unit 504 can be comprise: the second storing sub-units and second represents subelement, wherein: described second storing sub-units, for the image according to the described shooting of the selection result memory mobile terminal to reference object direction attribute information; Described second represents subelement, for reading the image of the mobile terminal shooting of storage and representing.Above-mentioned two kinds of building forms representing unit respectively have relative merits, for the first building form, owing to directly can store without any process the image of mobile terminal shooting when storing, be conducive to saving storage time, but need the selection result of the direction attribute information simultaneously reading the image of shooting and the corresponding with this image of reception when specifically representing, thus slow down displaying speed; For the second building form, owing to needing suitably to process the image of shooting before storing, add storage time, but the shooting image that can directly read when specifically representing after process operation represents.In actual application, the structure composition form of appropriate display unit can be selected according to the difference applying needs and focus.
It should be noted that: easy in order to what describe, the difference that what above-described embodiment of this instructions and the various modes of texturing of embodiment stressed is all with other embodiments or mode of texturing, between each situation identical similar part mutually see.Especially, for several improved procedures of device embodiment, because it is substantially similar to embodiment of the method, so describe fairly simple, relevant part illustrates see the part of embodiment of the method.Each unit of device embodiment described above or can may not be and physically separates, and both can be positioned at a place, or under also can being distributed to multiple network environment.In actual application, some or all of unit wherein can be selected according to the actual needs to realize the object of the present embodiment scheme, and those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
The above is only the embodiment of the application; it should be pointed out that for those skilled in the art, under the prerequisite not departing from the application's principle; can also make some improvements and modifications, these improvements and modifications also should be considered as the protection domain of the application.