Distance-finding method in a kind of terminal, device and terminal
Technical field
The present invention relates to field of terminal, particularly relate to the distance-finding method in a kind of terminal, device and terminal.
Background technology
Along with the development of terminal technology, increasing terminal adds filming apparatus, can carry out whenever and wherever possible taking pictures and photographing by this device users.
At present, by the device arranged in terminal, so that the function of the distance (abbreviation object distance) between taking lens and reference object can be realized in the process of shooting. In the prior art, distance measurement function is realized typically via following two mode:
The first distance measuring method, is specifically designed to the terminal of shooting, for instance slr camera, by the phase place focusing system (i.e. optical system) arranged therein such that it is able to calculate object distance according to optical characteristics.
The second distance measuring method, image sensing unit and displacement driver it is provided with due to some terminals, therefore, in shooting process, image sensing unit and taking lens relative movement can be made to obtain image clearly by displacement driver, and then obtain image distance and the object distance of this picture rich in detail.
But, in the first distance measuring method above-mentioned, the extra optical distance measurement apparatus such as the phase place focusing system of setting is not only relatively costly, and volume is relatively big, makes terminal structure complicated; In above-mentioned the second distance measuring method, it is necessary to realize distance measurement function by displacement driver and image sensing unit.
Summary of the invention
The present invention provides the distance-finding method in a kind of terminal, device and terminal, is different from the technical scheme of above two prior art, moreover it is possible to obtain measurement data exactly.
A first aspect of the present invention, it is provided that the distance-finding method in a kind of terminal, described terminal is provided with shooting unit and voice coil motor, and the method includes: obtain the current value controlling described voice coil motor;
According to the described described current value got, obtaining the positional information of described shooting unit, the positional information of described shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject;
The positional information of the shooting unit according to described acquisition, and the corresponding relation of described positional information and range information, obtain the range information that described positional information is corresponding, and described range information refers to the distance between the minute surface of subject and described shooting unit.
In the first possible implementation of first aspect, before the positional information of the described shooting unit of described acquisition, described method also comprises determining that the shooting attitude of described terminal; After the described current value obtaining and controlling described voice coil motor, the positional information of described acquisition described shooting unit is particularly as follows: according to the described described current value got and the described shooting attitude determined, obtain the positional information of described shooting unit.
The first possible implementation in conjunction with first aspect, in the implementation that the second of first aspect is possible, the described shooting attitude determining described terminal includes: user selects the shooting attitude of described terminal voluntarily, or is determined the shooting attitude of described terminal by sensor.
In conjunction with any one in the implementation that the second of first aspect, the first possible implementation of first aspect and first aspect is possible, in the third possible implementation of first aspect, described method also includes: the corresponding relation of described positional information and range information is particularly as follows: when the focal length of described terminal is known, according to 1/ focal length=1/ positional information+1/ range information, the positional information calculation of the described shooting unit by obtaining goes out described range information.
The 4th kind of possible implementation in conjunction with first aspect, first aspect is: determine the positional information of described shooting unit and the corresponding relation of current value; Store the positional information of the described described shooting unit determined and the corresponding relation of described current value; The described current value got described in described basis, obtain the positional information of described shooting unit particularly as follows: according to the described described current value got, and the described positional information of described storage and the corresponding relation of described current value, obtain the positional information of described shooting unit.
A second aspect of the present invention, it is provided that the distance-finding method in a kind of terminal, described terminal is provided with shooting unit and voice coil motor, including: obtain the current value controlling described voice coil motor;
According to the described current value got, and the corresponding relation of described current value and range information, obtaining the range information that described current value is corresponding, described range information refers to the distance between the minute surface of subject and described shooting unit.
In the first possible implementation of second aspect, at the current value got described in described basis, and the corresponding relation of described current value and range information, before obtaining the range information that described current value is corresponding, described method also includes:
Determine the shooting attitude of described terminal;
The current value got described in described basis, and the corresponding relation of described current value and range information, obtain range information corresponding to described current value particularly as follows: the described current value got according to described, the described shooting attitude determined, and described current value, described shooting attitude and the corresponding relation of range information, obtain described range information.
A third aspect of the present invention, it is provided that the range unit in a kind of terminal, described terminal is provided with shooting unit and voice coil motor, and described device includes:
Current value acquiring unit, for obtaining the current value controlling described voice coil motor;
Location information acquiring unit, for the described current value got according to described current value acquiring unit, obtains the positional information of described shooting unit, and the positional information of described shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject;
Range information acquiring unit, the positional information of the shooting unit for obtaining according to described location information acquiring unit, and the corresponding relation of described positional information and range information, obtaining the range information that described positional information is corresponding, described range information refers to the distance between the minute surface of subject and described shooting unit.
In the first possible implementation of the third aspect, described device also includes: shooting attitude determines unit, for determining the shooting attitude of described terminal; Described location information acquiring unit specifically for: the described current value got according to described current value acquiring unit and described shooting attitude determine the shooting attitude that unit is determined, obtain the positional information of described shooting unit.
A fourth aspect of the present invention, it is provided that the range unit in a kind of terminal, described terminal is provided with shooting unit and voice coil motor, and described device includes: current value acquiring unit, for obtaining the current value controlling described voice coil motor; Range information acquiring unit, the current value of the described voice coil motor for getting according to described current value acquiring unit, and described current value and the corresponding relation of range information, obtain the range information that described current value is corresponding.
In the first possible implementation of fourth aspect, described device also includes: shooting attitude determines unit, for determining the shooting attitude of described terminal;
Described range information acquiring unit is specifically for the described current value got according to described, the described shooting attitude determined, and described current value, described shooting attitude and the corresponding relation of range information, obtains described range information.
A fifth aspect of the present invention, a kind of terminal is provided, described terminal includes: the range unit described in arbitrary possible implementation in shooting unit, voice coil motor and third aspect present invention, or, the range unit described in arbitrary possible implementation in shooting unit, voice coil motor and fourth aspect present invention.
The distance-finding method in terminal provided by the invention, device and terminal, described terminal is adopted to be provided with shooting unit and voice coil motor. First, obtaining the current value controlling voice coil motor, and according to the described current value got, obtain the positional information of described shooting unit, the positional information of described shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject; Then the positional information according to the shooting unit of described acquisition, and the corresponding relation of described positional information and range information, obtains the range information that positional information is corresponding, and described range information refers to the distance between the minute surface of subject and described shooting unit. Or, first, obtain the current value controlling described voice coil motor, then according to the current value got, and the corresponding relation of described current value and range information, obtaining the range information that described current value is corresponding, described range information refers to the distance between the minute surface of subject and described shooting unit. From the aforegoing it can be seen that this mode utilizing the method surveying electric current to realize distance measurement function, it is not only different from the embodiment of prior art, but also measurement data can be obtained exactly.
Accompanying drawing explanation
In order to be illustrated more clearly that the technical scheme of the embodiment of the present invention, below the accompanying drawing used required during embodiment is described is briefly described, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the premise not paying creative work, it is also possible to obtain other accompanying drawing according to these accompanying drawings.
A kind of schematic flow sheet of distance-finding method in the terminal that Fig. 1 provides for the embodiment of the present invention one;
A kind of illustrative diagram of corresponding relation between current value and the positional information of distance-finding method in the terminal that Fig. 2 provides for the embodiment of the present invention one;
A kind of illustrative diagram of the corresponding relation of the positional information of distance-finding method and range information in the terminal that Fig. 3 provides for the embodiment of the present invention one;
A kind of illustrative diagram of distance-finding method in the terminal that Fig. 4 provides for the embodiment of the present invention one;
A kind of schematic flow sheet of distance-finding method in the terminal that Fig. 5 provides for the embodiment of the present invention two;
A kind of structural representation of range unit in the terminal that Fig. 6 provides for the embodiment of the present invention three;
The another kind of structural representation of range unit in the terminal that Fig. 7 provides for the embodiment of the present invention three;
The another kind of structural representation of range unit in the terminal that Fig. 8 provides for the embodiment of the present invention three;
The another kind of structural representation of range unit in the terminal that Fig. 9 provides for the embodiment of the present invention three;
The another kind of structural representation of range unit in the terminal that Figure 10 provides for the embodiment of the present invention three;
A kind of structural representation of range unit in the terminal that Figure 11 provides for the embodiment of the present invention four;
The another kind of structural representation of range unit in the terminal that Figure 12 provides for the embodiment of the present invention four;
The another kind of structural representation of range unit in the terminal that Figure 13 provides for the embodiment of the present invention four;
The another kind of structural representation of range unit in the terminal that Figure 14 provides for the embodiment of the present invention four;
A kind of structural representation of range unit in the terminal that Figure 15 provides for the embodiment of the present invention five;
Detailed description of the invention
Below in conjunction with the accompanying drawing in the embodiment of the present invention, the technical scheme in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is only a part of embodiment of the present invention, rather than whole embodiments. Based on the embodiment in the present invention, the every other embodiment that those of ordinary skill in the art obtain under not making creative work premise, broadly fall into the scope of protection of the invention.
Embodiment one
The embodiment of the present invention one provides the distance-finding method in a kind of terminal, this terminal is provided with shooting unit and voice coil motor, wherein the terminal in the present invention can be arbitrary mobile equipment such as mobile phone, PAD, panel computer, and shooting unit can be the filming apparatus with minute surface, the minute surface of shooting unit can be fixed on voice coil motor. As it is shown in figure 1, comprise the following steps:
S11, obtains the current value controlling voice coil motor.
Described voice coil motor at least includes magnet, coil, spring etc., described voice coil motor is by being converted to mechanical energy by the electric energy of inflow, thus changing the position of voice coil motor, it is possible to understand that, the position of described voice coil motor typically refers in voice coil motor determined position after spring deformation.
The current value of described voice coil motor is by drive circuit control, and optionally, drive circuit can be a part for processor. When shooting unit and gathering image, processor can control the current value of voice coil motor according to focus algorithm, thus changing the deformation quantity of spring in voice coil motor. Concrete, processor controls a current source, this current source different instruction according to processor, exports different current values to voice coil motor, so that voice coil motor obtains different electric energy, different electric energy is converted to again the mechanical energy of correspondence by voice coil motor, it should be understood that different mechanical energy correspond to different spring deformation amounts, along with the change of current value, voice coil motor can travel through all of camera site, and therefrom determines the position that image definition (that is: acutance) is the highest. When determining the camera site that acutance is the highest, processor obtains the now corresponding current value controlling voice coil motor.
S12, according to the current value got, obtains the positional information of shooting unit, and the positional information of described shooting unit refers to the distance between minute surface and the picture of subject of shooting unit.
By defining it can be seen that the positional information of shooting unit is equivalent to the image distance in optics the positional information of shooting unit in S12 step. Wherein this distance values can be 2mm, 4mm etc. Optionally, the minute surface of shooting unit can be the center of convex lens, and the picture of subject can be formed on the photosensitive sensors such as CCD, CMOS, this present invention is not specifically limited.
Optionally, voice coil motor includes inner chamber, the minute surface of shooting unit is arranged in the inner chamber of voice coil motor, and the movement (that is: the deformation of spring) along with voice coil motor, the position of minute surface can synchronize to be moved, that is: the distance between minute surface and the picture of subject changes, so the displacement of voice coil motor generally can be regarded as the positional information of shooting unit.
It addition, mentioned in S11, the driver element controlling voice coil motor has the function controlling voice coil motor place current values size. And the size of this current values and the displacement of voice coil motor are in dull serial relation. This dullness serial relation can calculate as follows:
I=aS+b;
Wherein,
I represents the current value controlling voice coil motor;
S represents the displacement of voice coil motor, and this displacement represents the offset distance between position and its position when no power that the coil of voice coil motor is currently located at.
A represents proportionality coefficient, it is common that a fixed numbers, and the size of this numerical value is to be together decided on by factors such as the number of turns of voice coil motor, diameter, materials;
B represents offset parameter, is a fixed numbers, and this offset parameter represents the coil of the voice coil motor position when no power. Such as, when setting the position when coil of voice coil motor is positioned at no power, the numerical value of b corresponds to 0.
In sum, control the current value I at voice coil motor place and the displacement S of voice coil motor in dull serial relation, and the displacement S of voice coil motor generally can be regarded as the positional information of shooting unit, so, control the current value I at voice coil motor place and the positional information of shooting unit in dullness serial relation, in other words, according to the current value got, it is possible to get the positional information of shooting unit. For example, shown in the curve 1 in Fig. 2, when getting the current values controlling voice coil motor place and being 70mA to 100mA, the positional information that can obtain shooting unit is 0.35mm; When getting the current values controlling voice coil motor place and being 40mA, the positional information that can obtain shooting unit is about 0.15mm.
Consider that shooting unit and voice coil motor itself have constant weight, when terminal is in different shooting attitude, the shooting attitude of such as terminal is vertical placement, horizontal positioned, slant setting etc., the dull serial relation between the positional information of the current values size controlling voice coil motor place and shooting unit can be produced certain impact. Therefore, the dull serial relation controlled between the current values size at voice coil motor place and the positional information of shooting unit can be different and different along with the shooting attitude of terminal.
Thus, in order to get a more accurate measurement data, in one particular embodiment of the present invention, before the positional information obtaining shooting unit, the shooting attitude determining described terminal is further comprised the steps of:. In such cases, after obtaining the current value controlling voice coil motor, the positional information obtaining shooting unit can particularly as follows: according to the current value got and the shooting attitude determined, obtain the positional information of shooting unit.
Specifically, when the taking lens of terminal keeps flat, now controlling the dull serial relation between the current values size at voice coil motor place and the positional information of shooting unit can shown in the curve 1 in Fig. 2;Again such as, when terminal taking lens upward time, now controlling the dull serial relation between the current values size at voice coil motor place and the positional information of shooting unit can shown in the curve 2 in Fig. 2; Again such as, when terminal taking lens down time, now controlling the dull serial relation between the current values size at voice coil motor place and the positional information of shooting unit can shown in the curve 3 in Fig. 2.
It should be understood that above-mentioned different dull serial relation can calculate out by taking lens weight, angle of inclination, thus the measurement data obtained is more accurate.
Wherein, in one particular embodiment of the present invention, it is determined that the shooting attitude of terminal includes: user selects the shooting attitude of terminal voluntarily, or is determined the shooting attitude of terminal by sensor.
Specifically, user selects the shooting attitude of described terminal to may particularly include following steps voluntarily: first, receive user's shooting attitude command to terminal, next, according to this instruction, the shooting attitude option of display terminal, this option includes the shooting angle option of terminal, for instance 0 degree, 90 degree, 180 degree etc. Wherein, the shooting angle of terminal can being defined as follows: the shooting angle of terminal is the face, the taking lens place angle clockwise to horizontal plane of described terminal, its numerical range could dictate that as be more than or equal to 0 degree, less than 360 degree. For example, when the shooting angle of terminal is be more than or equal to 0 degree and less than 45 degree, or, during be more than or equal to 315 degree and less than 360 degree, it is believed that the shooting attitude of terminal is: the pick-up lens of terminal is down; When the shooting angle of terminal is be more than or equal to 45 degree and less than 135 degree, or, during be more than or equal to 225 degree and less than 315 degree, it is believed that the shooting attitude of terminal is: the pick-up lens of terminal keeps flat; When the shooting angle of terminal is be more than or equal to 135 degree and less than 225 degree, it is believed that the shooting attitude of terminal is: the pick-up lens of terminal is upward. Then, user's option to this shooting angle is received, for instance receive " 30 degree " that user selects, now just can determine that the shooting attitude of terminal is: the pick-up lens of terminal is down.
Additionally, determine the shooting attitude of described terminal also by sensor, gravity sensor is such as adopted to determine the shooting attitude of terminal.
Further, in one particular embodiment of the present invention, the method is further comprising the steps of: first determine the positional information of shooting unit and the corresponding relation of the shooting attitude of terminal and current value; Then the corresponding relation of the described positional information of shooting unit determined and the shooting attitude of described terminal and described current value is stored;
In this case, according to the current value got and the shooting attitude determined, obtain the positional information of shooting unit particularly as follows: according to the current value got and the shooting attitude determined, and the corresponding relation of the positional information of described shooting unit of storage and the shooting attitude of terminal and current value, obtain the positional information of shooting unit.
So, storage shooting the positional information of unit, terminal shooting attitude and control voice coil motor current value corresponding relation after, for example, when the shooting unit being got terminal by gravity sensor is kept flat, after getting the size of current value, now, can jointly determine the positional information of shooting unit with current value according to the shooting attitude of shooting unit.
S13, the positional information according to the shooting unit obtained, and the corresponding relation of positional information and range information, obtain the range information that positional information is corresponding, described range information refers to the distance between the minute surface of subject and shooting unit.
By the definition of information of adjusting the distance in S13 step it can be seen that this range information is equivalent to the object distance in optics.Wherein this distance values can be 100mm, 300mm, 500mm etc. In a particular application, for example, when shooting unit and being camera lens, the range information between subject and shooting unit is the range information between subject and camera lens.
Optionally, in one particular embodiment of the present invention, the corresponding relation of positional information and range information can particularly as follows: when the focal length of terminal is known, according to Gaussian imaging equation, go out range information by the positional information calculation of described shooting unit.
Specifically, as mentioned before, the positional information of shooting unit is equivalent to the image distance in optics, range information between shooting unit and subject is equivalent to the object distance in optics, and owing to the focal length in terminal is typically found in a numerical range, therefore can preset focal length is any number of numerical value in a certain numerical range, numerical range such as focal length is be more than or equal to 2mm, during less than or equal to 4mm, presetting focal length is 2mm, 2.1mm, 2.2mm ... 3.9mm, 4mm etc., about setting the numerical range of focal length and the multiple numerical values recited within the scope of it, the present invention is not specifically limited. it should be understood that when the numerical value of focal length is known, then can according to Gaussian imaging equation: 1/ focal length=1/ object distance (that is: range information)+1/ image distance (that is: positional information), the concrete numerical value of object distance is calculated by the concrete numerical value of image distance. for example, as shown in Figure 3, if the focal length of setting terminal is 4mm, the range information that then may determine that between shooting unit location information and subject and shooting unit has following corresponding relation: when the positional information shooting unit is 4mm, and the range information between shooting unit and subject is infinitely great, when the positional information shooting unit is 4.05mm, the range information between shooting unit and subject is 324mm.
After the corresponding relation of the range information determined between above-mentioned shooting unit location information and subject and shooting unit, this corresponding relation can be stored in the terminal in a tabular form.
Distance-finding method in the terminal that the embodiment of the present invention one provides, first, obtains the current value controlling voice coil motor; Further, according to the described described current value got, obtaining the positional information of described shooting unit, the positional information of described shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject; Then the positional information according to the shooting unit of described acquisition, and the corresponding relation of described positional information and range information, obtains the range information that positional information is corresponding, and described range information refers to the distance between the minute surface of subject and described shooting unit. From the aforegoing it can be seen that this mode utilizing the method surveying electric current to realize distance measurement function, it is not only different from the embodiment of prior art, but also measurement data can be obtained exactly.
Optionally, in one particular embodiment of the present invention, the method is further comprising the steps of: can first determine the positional information of shooting unit and the corresponding relation of the current value controlling voice coil motor, and store the positional information of the shooting unit determined and the corresponding relation of the current value controlling voice coil motor.
Specifically, the one-to-one relationship between the positional information of shooting unit and the current value of control voice coil motor can be drawn by dull serial relation as above, then, this corresponding relation determined is stored in the terminal in a tabular form, when getting the current value controlling voice coil motor, the positional information of shooting unit can be recalled fast and accurately from the corresponding relation prestored, thus improve the data-handling capacity of terminal further.
Optionally, in one particular embodiment of the present invention, after step s 13, the method is further comprising the steps of: show the range information of acquisition on a display screen.
Specifically, as shown in Figure 4, when terminal is in focusing state, the range information that the display screen display in terminal obtains. Wherein the display position of this range information may be located at the upper right corner of display screen, shows with data mode, for instance " 35cm ". The display position of range information can also be positioned at the lower right corner of display screen, shows with the compound mode of histogram and data, and about display position or the display mode of range information, the present invention is not specifically limited.
As can be seen from above, user is in the process of shooting, it is possible to directly display range information on the display screen of terminal. This mode, it is possible to instruct user better focus in the process of shooting and shoot better image or picture, thus improving shooting enjoyment and the experience of user. Additionally, this mode can also provide a user with a kind of method far and near for Measuring Object.
Embodiment two
It should be understood that on the basis of the technical scheme of the embodiment of the present invention one, go back changeable type and obtain another embodiment, i.e. embodiment two. It is described in detail below by the distance-finding method in the terminal that the embodiment of the present invention two is provided by specific embodiment.
The embodiment of the present invention two provides the distance-finding method in a kind of terminal, terminal is provided with voice coil motor and shooting unit, wherein terminal can be arbitrary mobile equipment such as mobile phone, PAD, panel computer, and shooting unit can be the filming apparatus such as camera lens (can taking pictures or image). As it is shown in figure 5, the method comprises the following steps:
S51, obtains the current value controlling voice coil motor.
This step is referred to S11, repeats no more.
S52, according to the current value got, and the corresponding relation of current value and range information, obtaining the range information that current value is corresponding, described range information refers to the distance between the minute surface of subject and shooting unit.
In this step, current value is corresponding with range information. Specifically, it is camera lens to shoot unit. Owing to the current values size of voice coil motor position and the positional information of shooting unit are previously described dull serial relation, i.e. current value and positional information one_to_one corresponding. In addition, positional information (being equivalent to image distance) and the range information (being equivalent to object distance) of camera lens can according to Gaussian imaging equations: 1/ focal length=1/ object distance+1/ image distance, when focal length in the terminal is known, the concrete numerical value of object distance, i.e. positional information and range information one_to_one corresponding can be calculated by the concrete numerical value of image distance. Therefore in summary, there is corresponding relation between current value and range information, it is possible to calculated the concrete numerical value of range information by current values.
Distance-finding method in the terminal that the embodiment of the present invention two provides, first, obtains the current value controlling described voice coil motor; Then the current value got described in basis, and the corresponding relation of described current value and range information, obtain the range information that described current value is corresponding, and described range information refers to the distance between the minute surface of subject and described shooting unit. From the aforegoing it can be seen that directly obtain range information by the corresponding relation of current value and storage, measurement data can not only be obtained exactly, and ranging step is also simplified.
Owing to the shooting state of terminal can affect the dull serial relation between current value and positional information, in order to get a more accurate measurement data, optionally, in one particular embodiment of the present invention, according to the current value got, and the corresponding relation of current value and range information, before obtaining the range information that current value is corresponding, this distance-finding method is further comprising the steps of:
521, it is determined that the shooting attitude of terminal;
522, according to the current value got, and the corresponding relation of current value and range information, obtain range information corresponding to current value particularly as follows: according to the current value got, the shooting attitude determined, and the corresponding relation of current value, shooting attitude and range information, obtain range information.
Further, in one particular embodiment of the present invention, it is determined that the shooting attitude of terminal includes: user selects the shooting attitude of terminal voluntarily, or is determined the shooting attitude of terminal by sensor. Intelligible, this implement process with embodiment one above is determined terminal shooting attitude to implement process similar, therefore not to repeat here.
Optionally, in one particular embodiment of the present invention, before obtaining the current value controlling voice coil motor, the method is further comprising the steps of: it is then determined that the corresponding relation of current value and range information; It follows that the corresponding relation of storaging current value and range information; In this case, after obtaining the current value controlling voice coil motor, obtain range information corresponding to current value particularly as follows: according to the current value got, and the corresponding relation of storage, obtain the range information that current value is corresponding.
So, after the corresponding relation of the range information determined between the current value controlling voice coil motor and shooting unit and subject, this corresponding relation can be stored in the terminal in a tabular form, in order to the current value according to obtaining directly calculates range information.
Optionally, in one particular embodiment of the present invention, after step S52, the method is further comprising the steps of: show the range information of acquisition on a display screen.
Specifically, referring now still to Fig. 4, the range information that the display screen display in terminal obtains. Wherein the display position of this range information may be located at the upper right corner of display screen, shows with data mode, for instance " 35cm ". The display position of range information can also be positioned at the lower right corner of display screen, shows with the compound mode of histogram and data, and about display position or the display mode of range information, the present invention is not specifically limited.
As can be seen from above, user is in the process of shooting, namely when terminal is in focusing state, it is possible to directly display range information on the display screen of terminal. This mode, it is possible to instruct user better focus in the process of shooting and shoot better image or picture, thus improving shooting enjoyment and the experience of user. Additionally, this mode can also provide a user with a kind of method far and near for Measuring Object.
Embodiment three
Corresponding with embodiment one, embodiments of the invention three additionally provide the range unit 600 in a kind of terminal, and wherein this terminal is provided with shooting unit and voice coil motor, as shown in Figure 6, and including:
Current value acquiring unit 601, for obtaining the current value controlling voice coil motor;
Location information acquiring unit 602, for the current value got according to current value acquiring unit 601, obtains the positional information of shooting unit, and the positional information of shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject;
Range information acquiring unit 603, the positional information of the shooting unit for obtaining according to location information acquiring unit 602, and the corresponding relation of positional information and range information, obtaining the range information that positional information is corresponding, range information refers to the distance between the minute surface of subject and described shooting unit.
Range unit 600 in the terminal that the embodiment of the present invention three provides, wherein this terminal is provided with shooting unit and voice coil motor, and current value acquiring unit 601 controls the current value of voice coil motor for obtaining;The location information acquiring unit 602 current value for getting according to current value acquiring unit 601, obtains the positional information of shooting unit, and the positional information of shooting unit refers to the distance between the minute surface of described shooting unit and the picture of subject; The positional information of the range information acquiring unit 603 shooting unit for obtaining according to location information acquiring unit 602, and the corresponding relation of positional information and range information, obtain the range information that positional information is corresponding. By this device, it is possible to obtain measurement data exactly.
Optionally, in one particular embodiment of the present invention, as it is shown in fig. 7, this device 600 also includes: shooting attitude determines unit 604, for determining the shooting attitude of terminal;
In such cases, location information acquiring unit 602 specifically for: the current value got according to current value acquiring unit 601 determines, with shooting attitude, the shooting attitude that unit 604 is determined, obtains the positional information of shooting unit.
Further, in one particular embodiment of the present invention, as shown in Figure 8, device 600 also includes: first determines unit 605, for determining the shooting attitude of positional information and the terminal shooting unit, controlling the corresponding relation of the current value of described voice coil motor; Memory element 606, for storing the corresponding relation of the first positional information determining shooting unit that unit 605 determines and the shooting attitude of terminal, current value;
In such cases, location information acquiring unit tool 602 specifically for: the current value got according to current value acquiring unit 601 determines, with shooting attitude, the shooting attitude that unit 604 is determined, and the corresponding relation of the positional information of the shooting unit of memory element 606 storage and the shooting attitude of terminal, current value, obtain the positional information of shooting unit.
Optionally, in one particular embodiment of the present invention, as it is shown in figure 9, device 600 also includes: second determines unit 607, the corresponding relation of positional information with current value for determining shooting unit;
In such cases, memory element 606 is additionally operable to, and the positional information of the shooting unit that unit 607 determines and the corresponding relation of current value are determined in storage second;
Location information acquiring unit 602 is specifically for the current value got according to current value acquiring unit 601, and the positional information of memory element 606 storage and the corresponding relation of current value, obtains the positional information of shooting unit.
Optionally, in one particular embodiment of the present invention, as shown in Figure 10, device 600 also includes: display unit 608, for the range information that display distance information acquisition unit 603 on a display screen obtains. .
It should be noted that the concrete function of each construction unit of the range unit 600 in the terminal that provides of the embodiment of the present invention three refers to embodiment of the method one above.
Embodiment four
Corresponding with embodiment two, the embodiment of the present invention four additionally provides the range unit 110 in a kind of terminal, and this terminal is provided with shooting unit and voice coil motor, and as shown in figure 11, device 110 includes:
Current value acquiring unit 111, for obtaining the current value controlling voice coil motor;
Range information acquiring unit 112, the current value of the voice coil motor for getting according to current value acquiring unit 111, and the corresponding relation of current value and range information, obtain the range information that current value is corresponding.
Range unit 110 in the terminal that the embodiment of the present invention four provides, wherein terminal is provided with shooting unit and voice coil motor. Current value acquiring unit 111, for obtaining the current value controlling voice coil motor;Range information acquiring unit 112, the current value of the voice coil motor for getting according to current value acquiring unit 111, and the corresponding relation of current value and range information, obtain the range information that current value is corresponding. By this range unit 110, directly obtain range information by the corresponding relation of current value and storage, measurement data can not only be obtained exactly, and ranging step is also simplified.
Optionally, in one particular embodiment of the present invention, as shown in figure 12, device 110 also includes: shooting attitude determines unit 113, for determining the shooting attitude of described terminal;
In such cases, range information acquiring unit 112 specifically for: according to the current value got, the shooting attitude determined, and current value, shooting attitude and the corresponding relation of range information, obtain range information.
Optionally, in one particular embodiment of the present invention, as shown in figure 13, device 110 also comprises determining that unit 114, for determining the corresponding relation of current value and range information; Memory element 115, for the corresponding relation of storaging current value and range information;
In such cases, range information acquiring unit 112 specifically for, according to the current value that current value acquiring unit 111 gets, and the corresponding relation of described memory element 115 storage, obtain the range information that current value is corresponding.
Optionally, in one particular embodiment of the present invention, as shown in figure 14, device 110 also includes: display unit 116, for the range information that display distance information acquisition unit 112 on a display screen obtains.
It should be noted that the concrete function of each construction unit of the range unit 110 in the terminal that provides of the embodiment of the present invention four refers to embodiment of the method two above.
Embodiment five
The another kind of embodiment of the range unit that Figure 15 show in the terminal that the embodiment of the present invention five provides, as shown in figure 15, range unit 140 in the terminal that the present embodiment provides, includes voice coil motor 145, current source 147, photosensitive sensor 148, minute surface 149 including processor 141, memorizer 142, camera lens module 146, camera lens module 146.
Processor 141, memorizer 142, camera lens module 146 etc. connect and complete mutual communication by bus, are connected to transmit electric current by control line between current source 147 with voice coil motor 145. Bus can be industry standard architecture (IndustryStandardArchitecture, referred to as ISA) bus, external equipment interconnection (PeripheralComponent, referred to as PCI) bus or extended industry-standard architecture (ExtendedIndustryStandardArchitecture, referred to as EISA) bus etc. Bus can be divided into address bus, data/address bus, control bus etc. For ease of representing, Figure 15 only represents with a line, it is not intended that only have a bus or a type of bus.
Memorizer 142 is used for storing executable program code, and this program code includes computer-managed instruction. Memorizer 142 is likely to comprise high-speed RAM memorizer, it is also possible to also include nonvolatile memory (non-volatilememory), for instance at least one disk memory. In embodiments of the present invention, the corresponding relation of the memorizer 142 positional information with the current value controlling voice coil motor 145 specifically for storing camera lens module 146.
Processor 141 runs the program corresponding with executable program code by reading the executable program code of storage in memorizer 142, for:
Obtain the current value controlling voice coil motor 145;
According to the current value got, obtaining the positional information of camera lens module 146, the positional information of this camera lens module 146 refers to the distance between the minute surface 149 of camera lens module 146 and the picture of subject;
Positional information according to the camera lens module 146 obtained, and the corresponding relation of positional information and range information, obtain the range information that positional information is corresponding, and this range information refers to the distance between the minute surface 149 of subject and camera lens module 146.
Wherein, processor 141 is probably a central processing unit (CentralProcessingUnit, referred to as CPU), or specific integrated circuit (ApplicationSpecificIntegratedCircuit, referred to as ASIC), or it is configured to implement one or more integrated circuits of the embodiment of the present invention.
It should be noted that, described voice coil motor 145 includes magnet, coil, spring (not shown) etc., described voice coil motor 145 is by being converted to mechanical energy by the electric energy of inflow, thus changing the position of voice coil motor 145, it should be understood that the position of described voice coil motor 145 typically refers in voice coil motor 145 determined position after spring deformation.
The current value of described voice coil motor 145 is by drive circuit control, and optionally, drive circuit can be a part for processor 141. When camera lens module 146 gathers image, processor 141 can control the current value of voice coil motor 145 according to focus algorithm, thus changing the deformation quantity of spring in voice coil motor 145. Concrete, processor 141 controls current source 147, make this current source 147 different instruction according to processor 141, export different current values to voice coil motor 145, so that voice coil motor 145 obtains different electric energy, different electric energy is converted to again the mechanical energy of correspondence by voice coil motor 145, understandable, different mechanical energy correspond to different spring deformation amounts, change along with current value, voice coil motor 145 can travel through all of camera site, and therefrom determines the position that image definition (that is: acutance) is the highest. When determining the camera site that acutance is the highest, processor 141 obtains the now corresponding current value controlling voice coil motor 145.
The positional information of camera lens module 146 is equivalent to the image distance in optics. Wherein this distance values can be 2mm, 4mm etc. Optionally, the minute surface 149 of camera lens module 146 can be the center of convex lens, the picture of subject can be formed on the photosensitive sensors such as CCD, CMOS 148, it is to say, the positional information of camera lens module 146 can be understood as the distance referred between the minute surface 149 of camera lens module 146 and photosensitive sensor 148. Optionally, voice coil motor 145 includes inner chamber, the minute surface 149 of camera lens module 146 is arranged in the inner chamber of voice coil motor 145, and the movement (that is: the deformation of spring) along with voice coil motor 145, the position of minute surface 149 can synchronize to be moved, that is: the distance between minute surface 149 and photosensitive sensor 148 changes, so the displacement of voice coil motor 145 generally can be regarded as the positional information of camera lens module 146. In sum, it is possible to according to obtaining the current value controlling voice coil motor 145, it is thus achieved that the positional information of camera lens module 146.
It should be noted that, above-mentioned processor 141 is except having above-mentioned functions, it may also be used for performs other flow processs in said method embodiment one, does not repeat them here.
It should be noted that, in processor 141, the division of each functional unit may refer to the embodiment three of aforesaid range unit 600, does not repeat them here.
Optionally, utilizing the device described in embodiment five, wherein, processor 141 may be used for other flow processs for performing in said method embodiment two, and the division of each functional unit may refer to the embodiment four of aforesaid range unit 110 in processor 141, do not repeat them here.
Wherein, terminal 160 can be mobile phone, panel computer, personal digital assistant, naturally it is also possible to for the other kinds of terminal including camera head, this is not limited by the present invention.
Each embodiment in this specification all adopts the mode gone forward one by one to describe, between each embodiment identical similar part mutually referring to, what each embodiment stressed is the difference with other embodiments. Especially for device embodiment, owing to it is substantially similar to embodiment of the method, so describing fairly simple, relevant part illustrates referring to the part of embodiment of the method.
It should be noted that, device embodiment described above is merely schematic, the unit wherein illustrated as separating component can be or may not be physically separate, the parts shown as unit can be or may not be physical location, namely may be located at a place, or can also be distributed on multiple NE. Some or all of module therein can be selected according to the actual needs to realize the purpose of the present embodiment scheme. It addition, in device embodiment accompanying drawing provided by the invention, the annexation between module represents have communication connection between them, specifically can be implemented as one or more communication bus or holding wire. Those of ordinary skill in the art, when not paying creative work, are namely appreciated that and implement.
Through the above description of the embodiments, those skilled in the art is it can be understood that can add the mode of required common hardware by software to the present invention and realize, naturally it is also possible to includes special IC, dedicated cpu, private memory, special components and parts etc. by specialized hardware and realizes. generally, all functions completed by computer program can realize with corresponding hardware easily, and, the particular hardware structure being used for realizing same function can also be diversified, for instance analog circuit, digital circuit or special circuit etc. but, in more for the purpose of the present invention situations, software program realizes being embodiment more preferably. based on such understanding, the part that prior art is contributed by technical scheme substantially in other words can embody with the form of software product, this computer software product is stored in the storage medium that can read, floppy disk such as computer, USB flash disk, portable hard drive, read only memory (ROM, Read-OnlyMemory), random access memory (RAM, RandomAccessMemory), magnetic disc or CD etc., including some instructions with so that a computer equipment (can be personal computer, server, or the network equipment etc.) perform each embodiment of the present invention method.
Above; being only the specific embodiment of the present invention, but protection scope of the present invention is not limited thereto, any those familiar with the art is in the technical scope that the invention discloses; change can be readily occurred in or replace, all should be encompassed within protection scope of the present invention. Therefore, protection scope of the present invention should be as the criterion with scope of the claims.