Summary of the invention
The present invention just based on above-mentioned technical problem one of at least, propose a kind of method of measurement, by presetting Interface debond virtual ruler in shooting, making cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Realize above-mentioned purpose, embodiment according to a first aspect of the invention, provide a kind of method of measurement, described method of measurement comprises: in the shooting preview interface display virtual ruler of described terminal, described virtual ruler is for measuring the size of the subject shown in described shooting preview interface; The distance value between described terminal and described subject is determined by described range sensor; According to the corresponding relation between the distance value prestored and engineer's scale, obtain the engineer's scale corresponding with the distance value between described subject with the described terminal determined, wherein, described engineer's scale is the ratio value between the reference dimension of described subject and the actual size of subject; Regulate the display scale value of described virtual ruler according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject.
In this technical scheme, the photographing device by mobile phone or other with the terminal of camera function obtains the picture of testee, make cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Particularly, in mobile phone when starting the measurement size function of mobile phone, automatically the camera of mobile phone is opened, and on display interface of mobile phone, show one virtual ruler, and there are angular surveying and linear measure longimetry two options, the picture of testee is made to appear at the region of virtual ruler appearance by the capture function of camera, make it possible to measure the size of testee at the picture of mobile phone preview interface by virtual ruler, the distance of mobile phone and testee is measured again by range sensor, make it possible to the actual size calculating testee, thus avoid the problem that people need to carry with ruler or compasses, and avoid the error that manual measurement brings, improve the accuracy of measurement.
Wherein, range sensor comprises infrared distance measuring from transducer, optical displacement sensor, linear proximity transducer and ultrasonic displacement sensor etc., particularly, infrared distance measuring is by utilizing emitted light pulse from transducer, and measure this light pulse from being transmitted into the time being reflected by the object, by reaching the measurement of adjusting the distance to the measurement of time; Optical displacement sensor be by the luminous point light beam projecting on respectively detected object object to photo detector time the light of each pixel, and be scaled distance; Linear proximity transducer used the changed measurement of magnetic induction to measure the distance displacement of picture thing; Ultrasonic displacement sensor calculates distance by calculating ultrasonic wave from the time delivered to required for reception.
In technique scheme, preferably, also comprise: receive the touch move of user for described virtual ruler; The display position of described virtual ruler in described shooting preview interface is regulated according to described touch move.
In this technical scheme, by regulating according to the display position of touch move to virtual ruler, improve virtual ruler flexibility in use further, such as, when user finds object to be measured in shooting preview interface, the borderline region of virtual ruler to display interface can be dragged, and after user completes searching of object to be measured, drag the measuring position of virtual ruler to object to be measured, thus read measurement data fast.
In technique scheme, preferably, also comprise: receive the convergent-divergent control command of user for described virtual ruler; The displaying ratio of described virtual ruler in described shooting preview interface is regulated according to described convergent-divergent control command.
In this technical scheme, by regulating according to the displaying ratio of convergent-divergent control command to virtual ruler, improve the accuracy of measurement further, also be that user is when the full scale of virtual ruler is larger, unit scales value is also larger, 50 meters are approximately as carried out measurement to the height of base station, unit scales is 5 meters, when the zero graduation of virtual ruler is aimed at bottom base station, during the scale needing reading top, base station corresponding, virtual ruler can be amplified further by convergent-divergent control command, the unit scales of virtual ruler is made to be accurate to 1 meter further, 0.5 meter, 0.1 meter etc., in the process of convergent-divergent virtual ruler, the relative position of virtual ruler and object to be measured does not change, to ensure the accuracy measured.
In technique scheme, preferably, also comprise: determine the distance value between described terminal and described subject by described range sensor, specifically comprise the following steps: select an object in described shooting preview interface according to user instruction, and be defined as described subject and carry out focusing process; Judge whether the focusing process to described subject; When having judged the focusing process to described subject, controlling described range sensor and the distance between described terminal and described subject has been measured.
In this technical scheme, by first carrying out focusing process to object to be measured, can effectively avoid when mobile phone focusing is unsuccessful, the problem of the not high or measuring error of the certainty of measurement caused, when mobile phone detect the focusing process of testee is completed time, re-use the distance that range sensor measures mobile phone and testee, further increasing the accuracy measuring numerical value.
In technique scheme, preferably, the display scale value of described virtual ruler is regulated according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject, comprise following concrete steps: after the display scale value regulating described virtual ruler according to described engineer's scale, the display parameters of described virtual ruler are regulated, to highlight the display scale value of described virtual ruler in described shooting preview interface according to predetermined display parameter.
In this technical scheme, after completed percentage chi regulates, by regulating the display parameters of virtual ruler according to predetermined display parameter, wherein, engineer's scale regulates and makes the ratio between the size of subject and actual size be 1:1, after completed percentage chi regulates, regulate the display parameters of virtual ruler to highlight to user, such as, improve the brightness value of virtual ruler, colourity and saturation, and/or improve the operation such as contrast of virtual ruler and desktop.
According to a second aspect of the invention, also proposed a kind of measuring system, described measuring system comprises: display unit, and for the shooting preview interface display virtual ruler in described terminal, described virtual ruler is for measuring the size of the subject shown in described shooting preview interface; Determining unit, for determining the distance value between described terminal and described subject by described range sensor; Acquiring unit, corresponding relation between the distance value prestored for basis and engineer's scale, obtain the engineer's scale corresponding with the distance value between described subject with the described terminal determined, wherein, described engineer's scale is the ratio value between the reference dimension of described subject and the actual size of subject; Regulon, for regulating the display scale value of described virtual ruler according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject.
In this technical scheme, the photographing device by mobile phone or other with the terminal of camera function obtains the picture of testee, make cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Particularly, in mobile phone when starting the measurement size function of mobile phone, automatically the camera of mobile phone is opened, and on display interface of mobile phone, show one virtual ruler, and there are angular surveying and linear measure longimetry two options, the picture of testee is made to appear at the region of virtual ruler appearance by the capture function of camera, make it possible to measure the size of testee at the picture of mobile phone preview interface by virtual ruler, the distance of mobile phone and testee is measured again by range sensor, make it possible to the actual size calculating testee, thus avoid the problem that people need to carry with ruler or compasses, and avoid the error that manual measurement brings, improve the accuracy of measurement.
Wherein, range sensor comprises infrared distance measuring from transducer, optical displacement sensor, linear proximity transducer and ultrasonic displacement sensor etc., particularly, infrared distance measuring is by utilizing emitted light pulse from transducer, and measure this light pulse from being transmitted into the time being reflected by the object, by reaching the measurement of adjusting the distance to the measurement of time; Optical displacement sensor be by the luminous point light beam projecting on respectively detected object object to photo detector time the light of each pixel, and be scaled distance; Linear proximity transducer used the changed measurement of magnetic induction to measure the distance displacement of picture thing; Ultrasonic displacement sensor calculates distance by calculating ultrasonic wave from the time delivered to required for reception.
In technique scheme, preferably, also comprise: the first receiving element, for receiving the touch move of user for described virtual ruler; Described regulon also for: regulate the display position of described virtual ruler in described shooting preview interface according to described touch move.
In this technical scheme, by regulating according to the display position of touch move to virtual ruler, improve virtual ruler flexibility in use further, such as, when user finds object to be measured in shooting preview interface, the borderline region of virtual ruler to display interface can be dragged, and after user completes searching of object to be measured, drag the measuring position of virtual ruler to object to be measured, thus read measurement data fast.
In technique scheme, preferably, also comprise: the second receiving element, for receiving the convergent-divergent control command of user for described virtual ruler; Described regulon also for: regulate the displaying ratio of described virtual ruler in described shooting preview interface according to described convergent-divergent control command.
In this technical scheme, by regulating according to the displaying ratio of convergent-divergent control command to virtual ruler, improve the accuracy of measurement further, also be that user is when the full scale of virtual ruler is larger, unit scales value is also larger, 50 meters are approximately as carried out measurement to the height of base station, unit scales is 5 meters, when the zero graduation of virtual ruler is aimed at bottom base station, during the scale needing reading top, base station corresponding, virtual ruler can be amplified further by convergent-divergent control command, the unit scales of virtual ruler is made to be accurate to 1 meter further, 0.5 meter, 0.1 meter etc., in the process of convergent-divergent virtual ruler, the relative position of virtual ruler and object to be measured does not change, to ensure the accuracy measured.
In technique scheme, preferably, also comprise: focusing unit, for selecting an object in described shooting preview interface according to user instruction, and is defined as described subject and carries out focusing process; Judging unit, for having judged whether the focusing process to described subject; Control unit, for when having judged the focusing process to described subject, having controlled described range sensor and having measured the distance between described terminal and described subject.
In this technical scheme, by first carrying out focusing process to object to be measured, can effectively avoid when mobile phone focusing is unsuccessful, the problem of the not high or measuring error of the certainty of measurement caused, when mobile phone detect the focusing process of testee is completed time, re-use the distance that range sensor measures mobile phone and testee, further increasing the accuracy measuring numerical value.
In technique scheme, preferably, described regulon also for: after the display scale value regulating described virtual ruler according to described engineer's scale, the display parameters of described virtual ruler are regulated, to highlight the display scale value of described virtual ruler in described shooting preview interface according to predetermined display parameter.
In this technical scheme, after completed percentage chi regulates, by regulating the display parameters of virtual ruler according to predetermined display parameter, wherein, engineer's scale regulates and makes the ratio between the size of subject and actual size be 1:1, after completed percentage chi regulates, regulate the display parameters of virtual ruler to highlight to user, such as, improve the brightness value of virtual ruler, colourity and saturation, and/or improve the operation such as contrast of virtual ruler and desktop.
By above technical scheme, by presetting Interface debond virtual ruler in shooting, making cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Embodiment
In order to more clearly understand above-mentioned purpose of the present invention, feature and advantage, below in conjunction with the drawings and specific embodiments, the present invention is further described in detail.It should be noted that, when not conflicting, the feature in the embodiment of the application and embodiment can combine mutually.
Set forth a lot of detail in the following description so that fully understand the present invention; but; the present invention can also adopt other to be different from other modes described here and implement, and therefore, protection scope of the present invention is not by the restriction of following public specific embodiment.
Below in conjunction with Fig. 1 to Fig. 5 B, measurement scheme is according to an embodiment of the invention described.
As shown in Figure 1, embodiment according to a first aspect of the invention, provide a kind of method of measurement, described method of measurement comprises: step 102, in the shooting preview interface display virtual ruler of described terminal, described virtual ruler is for measuring the size of the subject shown in described shooting preview interface; Step 104, determines the distance value between described terminal and described subject by described range sensor; Step 106, according to the corresponding relation between the distance value prestored and engineer's scale, obtain the engineer's scale corresponding with the distance value between described subject with the described terminal determined, wherein, described engineer's scale is the ratio value between the reference dimension of described subject and the actual size of subject; Step 108, regulates the display scale value of described virtual ruler according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject.
In this technical scheme, the photographing device by mobile phone or other with the terminal of camera function obtains the picture of testee, make cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Particularly, in mobile phone when starting the measurement size function of mobile phone, automatically the camera of mobile phone is opened, and on display interface of mobile phone, show one virtual ruler, and there are angular surveying and linear measure longimetry two options, the picture of testee is made to appear at the region of virtual ruler appearance by the capture function of camera, make it possible to measure the size of testee at the picture of mobile phone preview interface by virtual ruler, the distance of mobile phone and testee is measured again by range sensor, make it possible to the actual size calculating testee, thus avoid the problem that people need to carry with ruler or compasses, and avoid the error that manual measurement brings, improve the accuracy of measurement.
Wherein, range sensor comprises infrared distance measuring from transducer, optical displacement sensor, linear proximity transducer and ultrasonic displacement sensor etc., particularly, infrared distance measuring is by utilizing emitted light pulse from transducer, and measure this light pulse from being transmitted into the time being reflected by the object, by reaching the measurement of adjusting the distance to the measurement of time; Optical displacement sensor be by the luminous point light beam projecting on respectively detected object object to photo detector time the light of each pixel, and be scaled distance; Linear proximity transducer used the changed measurement of magnetic induction to measure the distance displacement of picture thing; Ultrasonic displacement sensor calculates distance by calculating ultrasonic wave from the time delivered to required for reception.
In technique scheme, preferably, also comprise: receive the touch move of user for described virtual ruler; The display position of described virtual ruler in described shooting preview interface is regulated according to described touch move.
In this technical scheme, by regulating according to the display position of touch move to virtual ruler, improve virtual ruler flexibility in use further, such as, when user finds object to be measured in shooting preview interface, the borderline region of virtual ruler to display interface can be dragged, and after user completes searching of object to be measured, drag the measuring position of virtual ruler to object to be measured, thus read measurement data fast.
In technique scheme, preferably, also comprise: receive the convergent-divergent control command of user for described virtual ruler; The displaying ratio of described virtual ruler in described shooting preview interface is regulated according to described convergent-divergent control command.
In this technical scheme, by regulating according to the displaying ratio of convergent-divergent control command to virtual ruler, improve the accuracy of measurement further, also be that user is when the full scale of virtual ruler is larger, unit scales value is also larger, 50 meters are approximately as carried out measurement to the height of base station, unit scales is 5 meters, when the zero graduation of virtual ruler is aimed at bottom base station, during the scale needing reading top, base station corresponding, virtual ruler can be amplified further by convergent-divergent control command, the unit scales of virtual ruler is made to be accurate to 1 meter further, 0.5 meter, 0.1 meter etc., in the process of convergent-divergent virtual ruler, the relative position of virtual ruler and object to be measured does not change, to ensure the accuracy measured.
As shown in Figure 5A, in shooting preview interface, image ratio is 1000:1, and the reference altitude that virtual ruler measures base station is 5cm, calculates learn that base station height is 50m according to ratio, now unit scales is 10 meters, and user is when amplifying virtual ruler by convergent-divergent control command, now, as shown in Figure 5 B, the unit scales of virtual ruler is 2 meters, and then the height of base station is more accurately 48 meters.
In technique scheme, preferably, also comprise: determine the distance value between described terminal and described subject by described range sensor, specifically comprise the following steps: select an object in described shooting preview interface according to user instruction, and be defined as described subject and carry out focusing process; Judge whether the focusing process to described subject; When having judged the focusing process to described subject, controlling described range sensor and the distance between described terminal and described subject has been measured.
In this technical scheme, by first carrying out focusing process to object to be measured, can effectively avoid when mobile phone focusing is unsuccessful, the problem of the not high or measuring error of the certainty of measurement caused, when mobile phone detect the focusing process of testee is completed time, re-use the distance that range sensor measures mobile phone and testee, further increasing the accuracy measuring numerical value.
In technique scheme, preferably, the display scale value of described virtual ruler is regulated according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject, comprise following concrete steps: after the display scale value regulating described virtual ruler according to described engineer's scale, the display parameters of described virtual ruler are regulated, to highlight the display scale value of described virtual ruler in described shooting preview interface according to predetermined display parameter.
In this technical scheme, after completed percentage chi regulates, by regulating the display parameters of virtual ruler according to predetermined display parameter, wherein, engineer's scale regulates and makes the ratio between the size of subject and actual size be 1:1, after completed percentage chi regulates, regulate the display parameters of virtual ruler to highlight to user, such as, improve the brightness value of virtual ruler, colourity and saturation, and/or improve the operation such as contrast of virtual ruler and desktop.
Fig. 2 shows the schematic block diagram of measuring system according to an embodiment of the invention.
As shown in Figure 2, measuring system 200 according to an embodiment of the invention: display unit 202, for the shooting preview interface display virtual ruler in described terminal, described virtual ruler is for measuring the size of the subject shown in described shooting preview interface; Determining unit 204, for determining the distance value between described terminal and described subject by described range sensor; Acquiring unit 206, corresponding relation between the distance value prestored for basis and engineer's scale, obtain the engineer's scale corresponding with the distance value between described subject with the described terminal determined, wherein, described engineer's scale is the ratio value between the reference dimension of described subject and the actual size of subject; Regulon 208, for regulating the display scale value of described virtual ruler according to described engineer's scale, the described subject that described virtual ruler is shown in described preview interface is of a size of the actual size of described subject.
In this technical scheme, the photographing device by mobile phone or other with the terminal of camera function obtains the picture of testee, make cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
Particularly, in mobile phone when starting the measurement size function of mobile phone, automatically the camera of mobile phone is opened, and on display interface of mobile phone, show one virtual ruler, and there are angular surveying and linear measure longimetry two options, the picture of testee is made to appear at the region of virtual ruler appearance by the capture function of camera, make it possible to measure the size of testee at the picture of mobile phone preview interface by virtual ruler, the distance of mobile phone and testee is measured again by range sensor, make it possible to the actual size calculating testee, thus avoid the problem that people need to carry with ruler or compasses, and avoid the error that manual measurement brings, improve the accuracy of measurement.
Wherein, range sensor comprises infrared distance measuring from transducer, optical displacement sensor, linear proximity transducer and ultrasonic displacement sensor etc., particularly, infrared distance measuring is by utilizing emitted light pulse from transducer, and measure this light pulse from being transmitted into the time being reflected by the object, by reaching the measurement of adjusting the distance to the measurement of time; Optical displacement sensor be by the luminous point light beam projecting on respectively detected object object to photo detector time the light of each pixel, and be scaled distance; Linear proximity transducer used the changed measurement of magnetic induction to measure the distance displacement of picture thing; Ultrasonic displacement sensor calculates distance by calculating ultrasonic wave from the time delivered to required for reception.
In technique scheme, preferably, also comprise: the first receiving element 210, for receiving the touch move of user for described virtual ruler; Described regulon 208 also for: regulate the display position of described virtual ruler in described shooting preview interface according to described touch move.
In this technical scheme, by regulating according to the display position of touch move to virtual ruler, improve virtual ruler flexibility in use further, such as, when user finds object to be measured in shooting preview interface, the borderline region of virtual ruler to display interface can be dragged, and after user completes searching of object to be measured, drag the measuring position of virtual ruler to object to be measured, thus read measurement data fast.
In technique scheme, preferably, also comprise: the second receiving element 212, for receiving the convergent-divergent control command of user for described virtual ruler; Described regulon 208 also for: regulate the displaying ratio of described virtual ruler in described shooting preview interface according to described convergent-divergent control command.
In this technical scheme, by regulating according to the displaying ratio of convergent-divergent control command to virtual ruler, improve the accuracy of measurement further, also be that user is when the full scale of virtual ruler is larger, unit scales value is also larger, 50 meters are approximately as carried out measurement to the height of base station, unit scales is 5 meters, when the zero graduation of virtual ruler is aimed at bottom base station, during the scale needing reading top, base station corresponding, virtual ruler can be amplified further by convergent-divergent control command, the unit scales of virtual ruler is made to be accurate to 1 meter further, 0.5 meter, 0.1 meter etc., in the process of convergent-divergent virtual ruler, the relative position of virtual ruler and object to be measured does not change, to ensure the accuracy measured.
As shown in Figure 5A, in shooting preview interface, image ratio is 1000:1, and the reference altitude that virtual ruler measures base station is 5cm, calculates learn that base station height is 50m according to ratio, now unit scales is 10 meters, and user is when amplifying virtual ruler by convergent-divergent control command, now, as shown in Figure 5 B, the unit scales of virtual ruler is 2 meters, and then the height of base station is more accurately 48 meters.
In technique scheme, preferably, also comprise: focusing unit 214, for selecting an object in described shooting preview interface according to user instruction, and is defined as described subject and carries out focusing process; Judging unit 216, for having judged whether the focusing process to described subject; Control unit 218, for when having judged the focusing process to described subject, having controlled described range sensor and having measured the distance between described terminal and described subject.
In this technical scheme, by first carrying out focusing process to object to be measured, can effectively avoid when mobile phone focusing is unsuccessful, the problem of the not high or measuring error of the certainty of measurement caused, when mobile phone detect the focusing process of testee is completed time, re-use the distance that range sensor measures mobile phone and testee, further increasing the accuracy measuring numerical value.
In technique scheme, preferably, described regulon 208 also for: after the display scale value regulating described virtual ruler according to described engineer's scale, the display parameters of described virtual ruler are regulated, to highlight the display scale value of described virtual ruler in described shooting preview interface according to predetermined display parameter.
In this technical scheme, after completed percentage chi regulates, by regulating the display parameters of virtual ruler according to predetermined display parameter, wherein, engineer's scale regulates and makes the ratio between the size of subject and actual size be 1:1, after completed percentage chi regulates, regulate the display parameters of virtual ruler to highlight to user, such as, improve the brightness value of virtual ruler, colourity and saturation, and/or improve the operation such as contrast of virtual ruler and desktop.
Fig. 3 shows the schematic block diagram of terminal according to an embodiment of the invention.
As shown in Figure 3, according to a third aspect of the invention we, also proposed a kind of terminal 300, comprising: the measuring system 200 described in above-mentioned any one technical scheme.
As shown in Figure 4, in technique scheme, preferably, determine the actual size b of described object to be measured according to described reference dimension a, distance L between described terminal and described object to be measured, specifically comprise the following steps: determine the ratio value between described reference dimension and described actual size b according to described reference dimension a, distance L between described terminal and described object to be measured; Described reference dimension a is multiplied by the product of described ratio value, as described actual size b.
In this technical scheme, the photographing device by mobile phone or other with the terminal of camera function obtains the picture of testee, such as in mobile phone, when starting the measurement size function of mobile phone, automatically the camera of mobile phone is opened, and on display interface of mobile phone, show one virtual ruler, and there are angular surveying and linear measure longimetry two options, particularly, the picture of testee is made to appear at the region of virtual ruler appearance by the capture function of camera, make it possible to measure the size of testee at the picture of mobile phone preview interface by virtual ruler, the reference dimension length supposing the picture that mobile phone preview interface shows is a, the distance being measured mobile phone and testee by range sensor is L, again due to the mapping table determination image distance L1 of mobile phone camera lens can be passed through, therefore the actual size b of testee can be calculated by corresponding mathematical method, i.e. b=aL/L1, make user can by the size of the intrinsic hardware device of mobile phone as ruler measurement object, convenient, fast and accurately measure the size of testee.
More than be described with reference to the accompanying drawings technical scheme of the present invention, how that considers that correlation technique proposes designs a kind of new measurement scheme with the technical problem of the convenience and accuracy that improve measuring process, the present invention proposes a kind of measurement scheme and a kind of terminal, make cellphone subscriber not need to carry with the size that ruler also can measure object fast and accurately, improve accuracy and the convenience of measurement.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.