CN109974658A - Measurement method, device, storage medium and mobile terminal - Google Patents

Measurement method, device, storage medium and mobile terminal Download PDF

Info

Publication number
CN109974658A
CN109974658A CN201711446867.XA CN201711446867A CN109974658A CN 109974658 A CN109974658 A CN 109974658A CN 201711446867 A CN201711446867 A CN 201711446867A CN 109974658 A CN109974658 A CN 109974658A
Authority
CN
China
Prior art keywords
camera
plane
testee
information
distance
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201711446867.XA
Other languages
Chinese (zh)
Inventor
陈岩
刘耀勇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201711446867.XA priority Critical patent/CN109974658A/en
Publication of CN109974658A publication Critical patent/CN109974658A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C3/00Measuring distances in line of sight; Optical rangefinders

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The embodiment of the present application discloses measurement method, device, storage medium and mobile terminal.The measurement method includes: to open 3D camera when detecting that object measurement event is triggered;In the case where testee is in preset state, the distance between the 3D camera and plane of reference information is obtained based on the 3D camera;Wherein, the preset state includes that the first end of the testee is placed on the plane of reference, and the surface that the 3D camera is arranged in the second end and mobile terminal of the testee contacts;Using the range information as the dimension measurement result between the first end of the testee and second end, and the dimension measurement result is fed back into user.By using above-mentioned technical proposal, the object that can be measured whenever and wherever possible needs measures the embodiment of the present application, convenient, practical, carries measuring tool at any time without user, can meet user demand well.

Description

Measurement method, device, storage medium and mobile terminal
Technical field
The invention relates to field of computer technology more particularly to measurement method, device, storage medium and movements eventually End.
Background technique
In daily life, measurement becomes increasingly common, and user is frequently necessary to measure some objects.But ruler or The measuring tools such as tape measure will not be carried by user, bring inconvenience for the measurement demand of user.It therefore, can be at any time The object measured everywhere needs measures, and becomes most important.
Summary of the invention
The embodiment of the present application provides measurement method, device, storage medium and mobile terminal, can be whenever and wherever possible to needing to survey The object of amount measures, and meets user demand.
In a first aspect, the embodiment of the present application provides a kind of measurement method, comprising:
When detecting that object measurement event is triggered, 3D camera is opened;
In the case where testee is in preset state, the 3D camera and reference are obtained based on the 3D camera The distance between face information;Wherein, the preset state includes that the first end of the testee is placed on the plane of reference On, the surface that the 3D camera is arranged in the second end and mobile terminal of the testee contacts;
Using the range information as the dimension measurement result between the first end of the testee and second end, and by institute It states dimension measurement result and feeds back to user.
Second aspect, the embodiment of the present application provide a kind of measuring device, comprising:
Camera opening module when for detecting that object measurement event is triggered, opens 3D camera;
Distance obtains module, for being obtained based on the 3D camera in the case where testee is in preset state The distance between the 3D camera and the plane of reference information;Wherein, the preset state includes the first end of the testee It is placed on the plane of reference, the surface that the 3D camera is arranged in the second end and mobile terminal of the testee connects Touching;
Dimension feedback module, for using the range information as the ruler between the first end of the testee and second end Very little measurement result, and the dimension measurement result is fed back into user.
The third aspect, the embodiment of the present application provide a kind of computer readable storage medium, are stored thereon with computer journey Sequence realizes the measurement method as described in the embodiment of the present application when the program is executed by processor.
Fourth aspect, the embodiment of the present application provide a kind of mobile terminal, including memory, processor and are stored in storage It can realize on device and when the computer program of processor operation, the processor execute the computer program as the application is real Apply measurement method described in example.
The measurement scheme provided in the embodiment of the present application when detecting that object measurement event is triggered, opens 3D camera, In the case where testee is in preset state, the distance between 3D camera and the plane of reference letter are obtained based on 3D camera Breath, wherein preset state includes that the first end of testee is placed on the plane of reference, and the second end of testee and movement are eventually The surface contact of 3D camera is set in end, and range information is as the dimensional measurement knot between the first end and second end of testee Fruit, and dimension measurement result is fed back into user.By using above-mentioned technical proposal, the object that needs can be measured whenever and wherever possible Body measures, convenient, practical, carries measuring tool at any time without user, can meet user demand well.
Detailed description of the invention
Fig. 1 is a kind of flow diagram of measurement method provided by the embodiments of the present application;
Fig. 2 is the flow diagram of another measurement method provided by the embodiments of the present application;
Fig. 3 is the flow diagram of measurement method provided by the embodiments of the present application;
Fig. 4 is the flow diagram of measurement method provided by the embodiments of the present application;
Fig. 5 is a kind of structural schematic diagram of measuring device provided by the embodiments of the present application;
Fig. 6 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application;
Fig. 7 is the structural schematic diagram of another mobile terminal provided by the embodiments of the present application.
Specific embodiment
Further illustrate the technical solution of the application below with reference to the accompanying drawings and specific embodiments.It is understood that It is that specific embodiment described herein is used only for explaining the application, rather than the restriction to the application.It further needs exist for illustrating , part relevant to the application is illustrated only for ease of description, in attached drawing rather than entire infrastructure.
It should be mentioned that some exemplary embodiments are described as before exemplary embodiment is discussed in greater detail The processing or method described as flow chart.Although each step is described as the processing of sequence by flow chart, many of these Step can be implemented concurrently, concomitantly or simultaneously.In addition, the sequence of each step can be rearranged.When its operation The processing can be terminated when completion, it is also possible to have the additional step being not included in attached drawing.The processing can be with Corresponding to method, function, regulation, subroutine, subprogram etc..
Fig. 1 is a kind of flow diagram of measurement method provided by the embodiments of the present application, and this method can be by measuring device It executes, wherein the device can be implemented by software and/or hardware, and can generally integrate in the terminal.As shown in Figure 1, this method Include:
Step 101 when detecting that object measurement event is triggered, opens 3D camera.
Wherein, when detecting that object measurement event is triggered, the 3D camera of mobile terminal is opened, so that starting is to object The measurement event of body.
It illustratively, can be with trigger bulk measurement event when detecting that mobile terminal and object contact;When with householder When object measurement permission is opened in dynamic click, object measurement event can be characterized and be triggered.It should be noted that the embodiment of the present application The specific manifestation form being triggered to object measurement event is without limitation.
In the embodiment of the present application, when detecting that object measurement event is triggered, the 3D camera shooting in mobile terminal is opened Head, i.e. 3D camera in control mobile terminal are in running order.Wherein, 3D camera is properly termed as 3D sensor again.3D The difference of camera and common camera is, 3D camera not only available flat image can also obtain reference object Depth information, that is, three-dimensional positions and dimensions information.
Step 102, in the case where testee is in preset state, based on 3D camera obtain 3D camera and reference The distance between face information.
Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end of testee with The surface contact of 3D camera is set in mobile terminal.
In the embodiment of the present application, the state determine instruction that can be inputted by user, determines that testee is currently at Preset state.Illustratively, when the first end of testee is placed on the plane of reference by user, the second end and shifting of testee When the surface contact of 3D camera being arranged in dynamic terminal, i.e., user determines the case where testee is currently in preset state Under, by button input state determine instruction preset in mobile terminal, to notify mobile terminal testee to be currently in Preset state.Wherein, the plane of reference may include the more smooth plane of reference such as desktop, ground, metope and palm.Preset button It can be mechanical button, touch button, be also possible to fingerprint recognition button.The embodiment of the present application is to preset button mobile whole The setting form of setting position and button on end is without limitation.It is of course also possible to which input state is true by way of voice Fixed instruction.The embodiment of the present application to the concrete form of state determine instruction also without limitation.
In the case where testee is in preset state, obtained between 3D camera and the plane of reference based on 3D camera Range information.Wherein, obtaining the distance between 3D camera and the plane of reference information approach based on 3D camera may include: structure Any one in light method, time flight method and binocular visible light measurement method, the embodiment of the present application obtain 3D to 3D camera The specific method of the distance between camera and the plane of reference information is without limitation.
Optionally, the distance between the 3D camera and plane of reference information is obtained based on the 3D camera, can wrap It includes: the plane of reference being shot based on the 3D camera, obtain the first 3D rendering of the plane of reference;According to the first 3D The corresponding image depth information of image extracts the distance between the 3D camera and the plane of reference information.It is arranged in this way It is advantageous in that, can accurately be extracted between 3D camera and the plane of reference according to the image depth information of the reference planes of shooting Distance.
In the embodiment of the present application, reference planes are shot by the 3D camera in mobile terminal, obtains reference The 3D rendering of plane, as the first 3D rendering.Wherein, in the first 3D rendering include the image depth information of the plane of reference, and scheming Between actual range namely 3D camera and reference planes as further comprising 3D camera distance reference face in depth of view information Vertical range.Therefore, can according to the corresponding image depth information of the first 3D rendering, extract 3D camera and reference planes it Between range information namely 3D camera to the plane of reference vertical range.Wherein, between 3D camera and the plane of reference away from It may include the distance between each photosensitive element or each photosensitive sensor distance reference face in 3D camera from information.
Illustratively, it according to the corresponding image depth information of the first 3D rendering, extracts between 3D camera and the plane of reference The method of range information may include the monocular estimation technique.Wherein, the monocular estimation technique is realized based on a camera lens, monocular estimation Method can be understood as the piece image based on the plane of reference to estimate its depth information, can specifically include based on focusing, base In defocusness method and based on any one in the estimation methods such as light and shade variation.For example, the depth based on the focusing estimation plane of reference During information, the distance between 3D camera and the plane of reference information can be determined.Determine 3D camera and the plane of reference it Between range information when, can make 3D camera relative to the plane of reference perpendicular intersection be in focus position, then according to lens at As formula can distance namely the distance between 3D camera and the plane of reference in the hope of 3D camera relative to the perpendicular intersection.
Optionally, the distance between the 3D camera and plane of reference information is obtained based on the 3D camera, can wrap It includes: obtaining the 3D shooting preview image of the plane of reference based on the 3D camera;It is corresponding pre- according to the 3D shooting preview image It lookes at depth of view information, extracts the distance between the 3D camera and the plane of reference information.The advantages of this arrangement are as follows not only 3D camera can be determined in real time directly according to the analysis of the corresponding preview depth of view information of 3D shooting preview image to the plane of reference The distance between plane of reference, and may be omitted with the shooting to the 3D rendering of the plane of reference, the memory for reducing mobile terminal accounts for With rate.
In the embodiment of the present application, when opening 3D camera, and determine that the first end of testee is placed on reference On face, when the surface of setting 3D camera contacts in the second end and mobile terminal of testee, take the photograph the plane of reference in 3D As the shooting preview interface of head, 3D rendering namely 3D shooting preview image in shooting preview interface are obtained.In 3D shooting preview The preview depth of view information of the plane of reference is contained in image, and 3D camera distance is also further comprised in preview depth of view information Vertical range between the actual range namely 3D camera and reference planes of the plane of reference.It therefore, can be according to 3D shooting preview figure As corresponding preview depth of view information, the distance between 3D camera and reference planes information namely 3D camera are extracted to reference The vertical range in face.Wherein, the distance between 3D camera and the plane of reference information may include each in 3D camera The distance between photosensitive element or each photosensitive sensor distance reference face.
Illustratively, according to the corresponding preview depth of view information of 3D shooting preview image, extract 3D camera and the plane of reference it Between the method for range information may include the monocular estimation technique.According to the corresponding preview depth of view information of 3D shooting preview image, During extracting the distance between 3D camera and the plane of reference information, the surface of 3D camera is set in mobile terminal and is tested , may be unstable due to contacting when the second end in contact of object, the 3D camera that causes extract real-time show and the plane of reference it Between distance can have fluctuation up and down, at this time can using the mean value of the distance value fluctuated up and down or intermediate value as 3D camera with join Examine the distance between face information.
Step 103, using range information as the dimension measurement result between the first end of testee and second end, and by ruler Very little measurement feedback is to user.
In the embodiment of the present application, the distance between the 3D camera and the plane of reference that step 102 are obtained information, as quilt Survey the dimension measurement result between the first end and second end of object.It is understood that one end due to testee is placed On the plane of reference, the second end of testee is contacted with the surface that 3D camera is arranged in mobile terminal, therefore, is imaged based on 3D The distance between 3D camera and the plane of reference that head obtains information can be indicated directly between the first end of testee and second end Size.It can be by the dimension measurement result between the first end and second end of testee with text or voice broadcast Form feeds back to user.
Measurement method provided by the embodiments of the present application when detecting that object measurement event is triggered, opens 3D camera, In the case that testee is in preset state, the distance between 3D camera and the plane of reference information are obtained based on 3D camera, Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end and mobile terminal of testee The surface contact of middle setting 3D camera, range information is as the dimensional measurement knot between the first end and second end of testee Fruit, and dimension measurement result is fed back into user.It, can be whenever and wherever possible to need by technical solution provided by the embodiments of the present application The object to be measured measures, convenient, practical, carries measuring tool at any time without user, can meet user well Demand.
It in some embodiments, can also include: to prompt user by measured object when detecting that object measurement event is triggered Body is adjusted to preset state.The advantages of this arrangement are as follows testee, which can be effectively ensured, is in preset state, meet tested The measuring condition of object.
In the embodiment of the present application, when detecting that object measurement event is triggered, user is prompted to adjust testee To preset state.It is understood that opening object survey as user actively clicks when detecting that object measurement event is triggered When measuring permission, show that user needs to measure some object, but for using the use of mobile terminal measurement function for the first time Family, how to complete the operating procedure of the measurement of measuring targets for mobile terminal in other words is not the user being very familiar with, can be with Testee is adjusted to preset state prompt user, makes testee in when measuring to testee State.
Illustratively, when user needs the height to a cup to measure, user can be prompted the cup of cup Bottom (first end) is placed on this plane of reference of desktop, will be arranged in the upper surface (second end) of the cup lid of cup and mobile terminal The surface of 3D camera contacts, and cup is made to be in the preset state to the elevation carrection of cup, that is, meets to cup elevation carrection Primary condition.
Again illustrative, when user, which is intended for father, buys a pair of shoes, he knows the size for the shoes that father wears, such as father Parent wears the shoes of long 40cm, but in purchase, it is not known that the number for the shoes that businessman provides whether standard, at this point it is possible to pass through shifting 3D camera in dynamic terminal obtains the length for wanting the shoes of purchase.For example, heel of a shoe is placed in the left-hand palm of user, Toe cap is contacted with the surface that 3D camera is arranged in mobile terminal, thus the default shape for the linear measure longimetry for being in shoes to shoes State meets the primary condition of the linear measure longimetry to shoes.
It, can also be with it should be noted that user can be prompted to adjust testee to preset state in the form of text User is prompted to adjust testee to preset state in the form of voice broadcast, the embodiment of the present application will be tested prompt user Object is adjusted to the prompt form of preset state and is not especially limited.
In some embodiments, obtained based on 3D camera 3D camera between the plane of reference at a distance from before information, It can also include: the flatness for obtaining the plane of reference;When the flatness of the plane of reference meets the first preset condition, mobile terminal is judged It is whether parallel with the plane of reference;The distance between 3D camera and the plane of reference information are obtained based on 3D camera, may include: when shifting When dynamic terminal is parallel with the plane of reference, based on 3D camera acquisition the distance between 3D camera and the plane of reference information.It is arranged in this way It is advantageous in that, it is possible to prevente effectively from there is no keeping parallelism state since the plane of reference is not smooth enough and/the plane of reference is with mobile terminal, The situation of the dimension measurement result inaccuracy between the first end and second end of the testee obtained is caused to occur, it can be further Improve the accuracy of measuring targets measurement.
In the embodiment of the present application, if the plane of reference chosen is not smooth enough, the plane of reference chosen in other words exists certain Gradient is easy to keep the measurement result of the testee obtained not accurate enough, therefore the flatness of the available plane of reference, judges to join Whether the flatness for examining face meets the first preset condition.Illustratively, image can be based on by the 3D rendering of the acquisition plane of reference Processing technique analyzes the 3D rendering of the plane of reference of acquisition, determines the flatness of the plane of reference.Wherein, the 3D rendering of the plane of reference It may include the first 3D rendering of the plane of reference shot by 3D camera, also may include the reference obtained based on 3D camera The 3D shooting preview image in face.It is of course also possible to include the 3D camera or other 3D filming apparatus in other mobile terminals The 3D rendering of the plane of reference of acquisition.When the flatness of the plane of reference meets the first preset condition, such as when the flatness of the plane of reference is big When the first preset threshold, it may indicate that the plane of reference is more smooth, plane of reference gradient is smaller in other words, to the measurement essence of testee Degree influences smaller.
During the surface of 3D camera and the second end in contact of testee are arranged in mobile terminal, if mobile terminal It is not parallel with the plane of reference, also it is easy to cause the measurement result of testee not accurate enough.Therefore, meet in the flatness of the plane of reference When the first preset condition, can further judge whether mobile terminal is parallel with the plane of reference.Illustratively, it can be passed by distance Sensor measures four angle points of mobile terminal to the distance of the plane of reference respectively, when four angle points are to the plane of reference when being equidistant, It may indicate that mobile terminal is parallel with the plane of reference.When the plane of reference flatness meet the first preset condition, while mobile terminal with When the plane of reference is parallel, the distance between 3D camera and the plane of reference information are obtained based on 3D camera.
In some embodiments, obtained based on 3D camera 3D camera between the plane of reference at a distance from before information, It can also include: to obtain current environmental light brightness information;Based on 3D camera obtain between 3D camera and the plane of reference away from From information, comprising: when environmental light brightness information meets the second preset condition, obtain 3D camera and reference based on 3D camera The distance between face information.The benefit being arranged in this way exists, it is possible to prevente effectively from causing to be taken the photograph according to 3D since environmental light brightness is inadequate The 3D rendering or 3D preview image clarity obtained as head is inadequate, so that testee can not be obtained accurately or even can not be obtained The case where dimension measurement result, occurs, and can further increase the accuracy of measuring targets measurement.
In the embodiment of the present application, it if obtain the first 3D rendering of the plane of reference by 3D camera, or is taken the photograph by 3D When obtaining the 3D shooting preview image of the plane of reference as head, the brightness of current environment light is inadequate, such as measures ring in a dark Under border, the height of cup is measured, if what is chosen at this time is just when being shown to be the plane of reference of dark system, it is easy to ginseng can not be passed through The corresponding image depth information of 3D rendering or the corresponding preview depth of view information of 3D shooting preview image in face are examined, 3D is obtained and takes the photograph As the distance between head and the plane of reference information.Therefore, based on 3D camera obtain 3D camera between the plane of reference at a distance from Before information, available current environmental light brightness information, and judge whether environmental light brightness information meets the second default item Part.Wherein it is possible to obtain current environmental light brightness information by optical sensor, and it is pre- to judge whether environment bright angle value is greater than If ambient light threshold.When environmental light brightness information meets the second preset condition, as environment bright angle value is greater than default environment light When threshold value, the distance between the 3D camera and plane of reference information is obtained based on 3D camera.
Optionally, when environmental light brightness information is unsatisfactory for the second preset condition, show that current environmental light brightness is insufficient. At this point it is possible to carry out light filling by way of mending light, namely current environmental light brightness is adjusted by way of mending light, In the state of light filling, the distance between 3D camera and the plane of reference information are obtained based on 3D camera.
In some embodiments, obtained based on 3D camera 3D camera between the plane of reference at a distance from after information, It can also include: the second 3D rendering that testee is obtained based on 3D camera;According to the second 3D rendering and dimension measurement result, It is scanned in online shopping site;Corresponding with testee merchandise news is determined according to search result, and by merchandise news Feed back to user.The advantages of this arrangement are as follows merchandise news corresponding with testee can be accurately supplied to user, it is full Sufficient user demand.
In the embodiment of the present application, when user needs measuring targets to carry out dimensional measurement, usually measuring targets There is purchasing demand, but need to further appreciate that dimension information relevant to object under test before purchase, to determine whether to meet User requires.Therefore, obtained based on 3D camera 3D camera between the plane of reference at a distance from after information, can also wrap Include: based on 3D camera obtain testee the second 3D rendering, and according to the first end of the second 3D rendering and testee with Dimension measurement result between second end is scanned in online shopping site.Illustratively, user A sees the cup that user B is used Son is very beautiful, it is desirable to buy a cup with user B with money, when purchase, not require nothing more than the appearance and user B use of cup Cup it is identical, and it is desirable that buy the identical cup of a size.Therefore, it can be shot by the 3D camera of mobile terminal User B uses the 3D rendering of cup, and the height of cup is measured by 3D camera, is being washed in a pan according to the 3D rendering of cup and height It is scanned on precious website.Merchandise news corresponding with testee is determined according to search result, and the merchandise news is fed back To user.Wherein, merchandise news not only may include the appearance informations such as the color, size and shape of commodity, can also include quotient The network address of product information.The embodiment of the present application to the particular content of merchandise news without limitation.
Optionally, the second 3D rendering of testee can also be by the 3D camera of other mobile terminals or other 3D filming apparatus carries out shooting acquisition, and the second 3D rendering of the testee of shooting is transmitted in the mobile terminal.
Fig. 2 is the flow diagram of measurement method provided by the embodiments of the present application, and this method comprises the following steps:
Step 201 when detecting that object measurement event is triggered, opens 3D camera.
Step 202, prompt user adjust testee to preset state.
Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end of testee with The surface contact of 3D camera is set in mobile terminal.
It should be noted that the embodiment of the present application to the execution sequence of step 201 and step 202 without limitation, Ke Yixian Step 201 is executed, then executes step 202, step 202 can also be first carried out, then execute step 201, that is, detects that object measures When event is triggered, prompts user to adjust testee to preset state, be then then turned on 3D camera, can also hold simultaneously Row step 201 and step 202.
Step 203, in the case where testee is in preset state, the plane of reference is shot based on 3D camera, Obtain the first 3D rendering of the plane of reference.
Step 204, according to the corresponding image depth information of the first 3D rendering, extract between 3D camera and the plane of reference away from From information.
Step 205, in the case where testee is in preset state, based on 3D camera obtain the plane of reference 3D shooting Preview image.
Step 206, according to the corresponding preview depth of view information of 3D shooting preview image, extract between 3D camera and the plane of reference Range information.
Step 207, using range information as the dimension measurement result between the first end of testee and second end, and by ruler Very little measurement feedback is to user.
It should be noted that step 203- step 204 and step 205- step 206 can regard as determining 3D camera with Two concomitant regimens of the distance between plane of reference information, can select the one of scheme of an execution, that is, only carry out step 203- Step 204, without executing step 205- step 206, or step 205- step 206 is only carried out, without executing step 203- step Rapid 204.
Measurement method provided by the embodiments of the present application when detecting that object measurement event is triggered, prompts user that will be tested Object is adjusted to preset state, and testee can be effectively ensured and be in preset state, meet the measuring condition of testee.This Outside, the plane of reference is shot based on 3D camera, obtains the first 3D rendering of the plane of reference, and corresponding according to the first 3D rendering Image depth information extracts the distance between 3D camera and the plane of reference information, can be according to the image of the reference planes of shooting Depth of view information accurately extracts the distance between 3D camera and the plane of reference.Alternatively, obtaining the 3D of the plane of reference based on 3D camera Shooting preview image, and according to the corresponding preview depth of view information of 3D shooting preview image, it extracts between 3D camera and the plane of reference Range information, not only can directly according to the analysis to the corresponding preview depth of view information of 3D shooting preview image of the plane of reference, The distance between 3D camera and the plane of reference are determined in real time, and may be omitted with the shooting to the 3D rendering of the plane of reference, are reduced The memory usage of mobile terminal.
Fig. 3 is the flow diagram of measurement method provided by the embodiments of the present application, and this method comprises the following steps:
Step 301 when detecting that object measurement event is triggered, opens 3D camera.
Step 302, in the case where testee is in preset state, obtain the flatness of the plane of reference.
Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end of testee with The surface contact of 3D camera is set in mobile terminal.
Step 303 judges whether the flatness of the plane of reference meets the first preset condition, if so, 305 are thened follow the steps, it is no Then, step 304 is executed.
Step 304, prompt user reselect the plane of reference, until the flatness of the plane of reference meets the first preset condition, and Execute step 305.
Whether step 305, to judge mobile terminal parallel with the plane of reference, if so, thening follow the steps 307, otherwise, executes step 306。
Step 306, prompt user adjust mobile terminal, until mobile terminal is parallel with the plane of reference, and execute step 307.
Step 307 obtains the distance between 3D camera and the plane of reference information based on 3D camera.
Step 308, using range information as the dimension measurement result between the first end of testee and second end, and by ruler Very little measurement feedback is to user.
Measurement method provided by the embodiments of the present application, it is possible to prevente effectively from due to the plane of reference is not smooth enough and/the plane of reference with Mobile terminal does not have keeping parallelism state, cause obtain testee first end and second end between dimension measurement result not It accurately happens, the accuracy of measuring targets measurement can be further increased.
Fig. 4 is the flow diagram of measurement method provided by the embodiments of the present application, and this method comprises the following steps:
Step 401 when detecting that object measurement event is triggered, opens 3D camera.
Step 402, in the case where testee is in preset state, obtain current environmental light brightness information.
Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end of testee with The surface contact of 3D camera is set in mobile terminal.
Step 403, when environmental light brightness information meet the second preset condition when, based on 3D camera obtain 3D camera with The distance between plane of reference information.
Step 404, using range information as the dimension measurement result between the first end of testee and second end, and by ruler Very little measurement feedback is to user.
Step 405, the second 3D rendering that testee is obtained based on 3D camera.
Step 406, according to the second 3D rendering and dimension measurement result, scanned in online shopping site.
Step 407 determines merchandise news corresponding with testee according to search result, and merchandise news is fed back to use Family.
Measurement method provided by the embodiments of the present application, it is possible to prevente effectively from causing since environmental light brightness is inadequate according to 3D The 3D rendering or 3D preview image clarity that camera obtains are inadequate, so that testee can not be obtained accurately or even can not be obtained Dimension measurement result the case where occur, can further increase measuring targets measurement accuracy.In addition, being imaged based on 3D Head obtains the second 3D rendering of testee, and according to the second 3D rendering and dimension measurement result, carries out in online shopping site Then search determines corresponding with testee merchandise news according to search result, and merchandise news fed back to user, can be with Merchandise news corresponding with testee is accurately supplied to user, meets user demand.
Fig. 5 is the structural schematic diagram of measuring device provided by the embodiments of the present application, which can be by software and/or hardware reality It is existing, it is typically integrated in mobile terminal, can determine the dimension information of testee by executing measurement method.As shown in figure 5, The device includes:
Camera opening module 501 when for detecting that object measurement event is triggered, opens 3D camera;
Distance obtains module 502, for being obtained based on the 3D camera in the case where testee is in preset state Take the distance between the 3D camera and plane of reference information;Wherein, the preset state includes the first of the testee End is placed on the plane of reference, and the surface of the 3D camera is arranged in the second end and mobile terminal of the testee Contact;
Dimension feedback module 503, for using the range information as between the first end of the testee and second end Dimension measurement result, and the dimension measurement result is fed back into user.
Measuring device provided by the embodiments of the present application when detecting that object measurement event is triggered, opens 3D camera, In the case that testee is in preset state, the distance between 3D camera and the plane of reference information are obtained based on 3D camera, Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end and mobile terminal of testee The surface contact of middle setting 3D camera, range information is as the dimensional measurement knot between the first end and second end of testee Fruit, and dimension measurement result is fed back into user.It, can be whenever and wherever possible to need by technical solution provided by the embodiments of the present application The object to be measured measures, convenient, practical, carries measuring tool at any time without user, can meet user well Demand.
Optionally, the device further include:
Cue module, for it is described detect that object measurement event is triggered when, prompt user by the testee tune The preset state.
Optionally, the distance obtains module, is used for:
The plane of reference is shot based on the 3D camera, obtains the first 3D rendering of the plane of reference;
According to the corresponding image depth information of first 3D rendering, extract between the 3D camera and the plane of reference Range information.
Optionally, the distance obtains module, is used for:
The 3D shooting preview image of the plane of reference is obtained based on the 3D camera;
According to the corresponding preview depth of view information of the 3D shooting preview image, the 3D camera and the plane of reference are extracted The distance between information.
Optionally, the device further include:
Flatness obtain module, for based on the 3D camera obtain between the 3D camera and the plane of reference away from Before information, the flatness of the plane of reference is obtained;
Parallel judgment module, for judging the movement when the flatness of the plane of reference meets the first preset condition Whether terminal is parallel with the plane of reference;
The distance obtains module, is used for:
When the mobile terminal is parallel with the plane of reference, the 3D camera and ginseng are obtained based on the 3D camera Examine the distance between face information.
Optionally, the device further include:
Luminance acquisition module, for obtained based on the 3D camera 3D camera between the plane of reference at a distance from Before information, current environmental light brightness information is obtained;
The distance obtains module, is used for:
When the environmental light brightness information meets the second preset condition, the 3D camera shooting is obtained based on the 3D camera The distance between head and the plane of reference information.
Optionally, the device further include:
Image collection module, for being obtained between the 3D camera and the plane of reference described based on the 3D camera After range information, the second 3D rendering of the testee is obtained based on the 3D camera;
Search module, for being carried out in online shopping site according to second 3D rendering and the dimension measurement result Search;
Merchandise news determining module, for determining merchandise news corresponding with the testee according to search result, and The merchandise news is fed back into user.
The embodiment of the present application also provides a kind of storage medium comprising computer executable instructions, and the computer is executable Instruction is used to execute measurement method when being executed by computer processor, this method comprises:
When detecting that object measurement event is triggered, 3D camera is opened;
In the case where testee is in preset state, the 3D camera and reference are obtained based on the 3D camera The distance between face information;Wherein, the preset state includes that the first end of the testee is placed on the plane of reference On, the surface that the 3D camera is arranged in the second end and mobile terminal of the testee contacts;
Using the range information as the dimension measurement result between the first end of the testee and second end, and by institute It states dimension measurement result and feeds back to user.
Storage medium --- any various types of memory devices or storage equipment.Term " storage medium " is intended to wrap It includes: install medium, such as CD-ROM, floppy disk or magnetic tape equipment;Computer system memory or random access memory, such as DRAM, DDRRAM, SRAM, EDORAM, Lan Basi (Rambus) RAM etc.;Nonvolatile memory, such as flash memory, magnetic medium (example Such as hard disk or optical storage);Register or the memory component of other similar types etc..Storage medium can further include other types Memory or combinations thereof.In addition, storage medium can be located at program in the first computer system being wherein performed, or It can be located in different second computer systems, second computer system is connected to the first meter by network (such as internet) Calculation machine system.Second computer system can provide program instruction to the first computer for executing.Term " storage medium " can To include two or more that may reside in different location (such as in the different computer systems by network connection) Storage medium.Storage medium can store the program instruction that can be performed by one or more processors and (such as be implemented as counting Calculation machine program).
Certainly, a kind of storage medium comprising computer executable instructions, computer provided by the embodiment of the present application The measurement operation that executable instruction is not limited to the described above, can also be performed measurement method provided by the application any embodiment In relevant operation.
The embodiment of the present application provides a kind of mobile terminal, and survey provided by the embodiments of the present application can be integrated in the mobile terminal Measure device.Fig. 6 is a kind of structural schematic diagram of mobile terminal provided by the embodiments of the present application.Mobile terminal 600 may include: to deposit On a memory and can be in the computer program of processor operation, the processor 602 hold for reservoir 601, processor 602 and storage The measurement method as described in the embodiment of the present application is realized when the row computer program.
Mobile terminal provided by the embodiments of the present application when detecting that object measurement event is triggered, opens 3D camera, In the case that testee is in preset state, the distance between 3D camera and the plane of reference information are obtained based on 3D camera, Wherein, preset state includes that the first end of testee is placed on the plane of reference, the second end and mobile terminal of testee The surface contact of middle setting 3D camera, range information is as the dimensional measurement knot between the first end and second end of testee Fruit, and dimension measurement result is fed back into user.By using above-mentioned technical proposal, the object that needs can be measured whenever and wherever possible Body measures, convenient, practical, carries measuring tool at any time without user, can meet user demand well.
Fig. 7 is the structural schematic diagram of another mobile terminal provided by the embodiments of the present application, which may include: Shell (not shown), memory 701, central processing unit (central processing unit, CPU) 702 (are also known as located Manage device, hereinafter referred to as CPU), circuit board (not shown) and power circuit (not shown).The circuit board is placed in institute State the space interior that shell surrounds;The CPU702 and the memory 701 are arranged on the circuit board;The power supply electricity Road, for each circuit or the device power supply for the mobile terminal;The memory 701, for storing executable program generation Code;The CPU702 is run and the executable journey by reading the executable program code stored in the memory 701 The corresponding computer program of sequence code, to perform the steps of
When detecting that object measurement event is triggered, 3D camera is opened;
In the case where testee is in preset state, the 3D camera and reference are obtained based on the 3D camera The distance between face information;Wherein, the preset state includes that the first end of the testee is placed on the plane of reference On, the surface that the 3D camera is arranged in the second end and mobile terminal of the testee contacts;
Using the range information as the dimension measurement result between the first end of the testee and second end, and by institute It states dimension measurement result and feeds back to user.
The mobile terminal further include: Peripheral Interface 703, RF (Radio Frequency, radio frequency) circuit 705, audio-frequency electric Road 706, loudspeaker 711, power management chip 708, input/output (I/O) subsystem 709, other input/control devicess 710, Touch screen 712, other input/control devicess 710 and outside port 704, these components pass through one or more communication bus Or signal wire 707 communicates.
It should be understood that illustrating the example that mobile terminal 700 is only mobile terminal, and mobile terminal 700 It can have than shown in the drawings more or less component, can combine two or more components, or can be with It is configured with different components.Various parts shown in the drawings can include one or more signal processings and/or dedicated It is realized in the combination of hardware, software or hardware and software including integrated circuit.
Just the mobile terminal provided in this embodiment for measurement is described in detail below, and the mobile terminal is with mobile phone For.
Memory 701, the memory 701 can be accessed by CPU702, Peripheral Interface 703 etc., and the memory 701 can It can also include nonvolatile memory to include high-speed random access memory, such as one or more disk memory, Flush memory device or other volatile solid-state parts.
The peripheral hardware that outputs and inputs of equipment can be connected to CPU702 and deposited by Peripheral Interface 703, the Peripheral Interface 703 Reservoir 701.
I/O subsystem 709, the I/O subsystem 709 can be by the input/output peripherals in equipment, such as touch screen 712 With other input/control devicess 710, it is connected to Peripheral Interface 703.I/O subsystem 709 may include 7091 He of display controller For controlling one or more input controllers 7092 of other input/control devicess 710.Wherein, one or more input controls Device 7092 processed receives electric signal from other input/control devicess 710 or sends electric signal to other input/control devicess 710, Other input/control devicess 710 may include physical button (push button, rocker buttons etc.), dial, slide switch, behaviour Vertical pole clicks idler wheel.It is worth noting that input controller 7092 can with it is following any one connect: keyboard, infrared port, The indicating equipment of USB interface and such as mouse.
Touch screen 712, the touch screen 712 are the input interface and output interface between customer mobile terminal and user, Visual output is shown to user, visual output may include figure, text, icon, video etc..
Display controller 7091 in I/O subsystem 709 receives electric signal from touch screen 712 or sends out to touch screen 712 Electric signals.Touch screen 712 detects the contact on touch screen, and the contact that display controller 7091 will test is converted to and is shown The interaction of user interface object on touch screen 712, i.e. realization human-computer interaction, the user interface being shown on touch screen 712 Object can be the icon of running game, the icon for being networked to corresponding network etc..It is worth noting that equipment can also include light Mouse, light mouse are the extensions for the touch sensitive surface for not showing the touch sensitive surface visually exported, or formed by touch screen.
RF circuit 705 is mainly used for establishing the communication of mobile phone Yu wireless network (i.e. network side), realizes mobile phone and wireless network The data receiver of network and transmission.Such as transmitting-receiving short message, Email etc..Specifically, RF circuit 705 receives and sends RF letter Number, RF signal is also referred to as electromagnetic signal, and RF circuit 705 converts electrical signals to electromagnetic signal or electromagnetic signal is converted to telecommunications Number, and communicated by the electromagnetic signal with communication network and other equipment.RF circuit 705 may include for executing The known circuit of these functions comprising but it is not limited to antenna system, RF transceiver, one or more amplifiers, tuner, one A or multiple oscillators, digital signal processor, CODEC (COder-DECoder, coder) chipset, user identifier mould Block (Subscriber Identity Module, SIM) etc..
Voicefrequency circuit 706 is mainly used for receiving audio data from Peripheral Interface 703, which is converted to telecommunications Number, and the electric signal is sent to loudspeaker 711.
Loudspeaker 711 is reduced to sound for mobile phone to be passed through RF circuit 705 from the received voice signal of wireless network And the sound is played to user.
Power management chip 708, the hardware for being connected by CPU702, I/O subsystem and Peripheral Interface are powered And power management.
The application any embodiment institute can be performed in measuring device, storage medium and the mobile terminal provided in above-described embodiment The measurement method of offer has and executes the corresponding functional module of this method and beneficial effect.It is not detailed in the above-described embodiments to retouch The technical detail stated, reference can be made to measurement method provided by the application any embodiment.
Note that above are only the preferred embodiment and institute's application technology principle of the application.It will be appreciated by those skilled in the art that The application is not limited to specific embodiment described here, be able to carry out for a person skilled in the art it is various it is apparent variation, The protection scope readjusted and substituted without departing from the application.Therefore, although being carried out by above embodiments to the application It is described in further detail, but the application is not limited only to above embodiments, in the case where not departing from the application design, also It may include more other equivalent embodiments, and scope of the present application is determined by the scope of the appended claims.

Claims (10)

1. a kind of measurement method characterized by comprising
When detecting that object measurement event is triggered, 3D camera is opened;
In the case where testee is in preset state, based on the 3D camera obtain the 3D camera and the plane of reference it Between range information;Wherein, the preset state includes that the first end of the testee is placed on the plane of reference, institute It states and the surface of the 3D camera is set in the second end and mobile terminal of testee contacts;
Using the range information as the dimension measurement result between the first end of the testee and second end, and by the ruler Very little measurement feedback is to user.
2. also wrapping the method according to claim 1, wherein described when detecting that object measurement event is triggered It includes:
Prompt user adjusts the testee to the preset state.
3. the method according to claim 1, wherein obtaining the 3D camera and ginseng based on the 3D camera Examine the distance between face information, comprising:
The plane of reference is shot based on the 3D camera, obtains the first 3D rendering of the plane of reference;
According to the corresponding image depth information of first 3D rendering, extract between the 3D camera and the plane of reference away from From information.
4. the method according to claim 1, wherein obtaining the 3D camera and ginseng based on the 3D camera Examine the distance between face information, comprising:
The 3D shooting preview image of the plane of reference is obtained based on the 3D camera;
According to the corresponding preview depth of view information of the 3D shooting preview image, extract between the 3D camera and the plane of reference Range information.
5. the method according to claim 1, wherein based on the 3D camera obtain the 3D camera with Before the distance between plane of reference information, further includes:
Obtain the flatness of the plane of reference;
When the flatness of the plane of reference meets the first preset condition, judge whether the mobile terminal puts down with the plane of reference Row;
The distance between the 3D camera and plane of reference information is obtained based on the 3D camera, comprising:
When the mobile terminal is parallel with the plane of reference, the 3D camera and the plane of reference are obtained based on the 3D camera The distance between information.
6. -5 any method according to claim 1, which is characterized in that taken the photograph obtaining the 3D based on the 3D camera As before the distance between head and the plane of reference information, further includes:
Obtain current environmental light brightness information;
The distance between the 3D camera and plane of reference information is obtained based on the 3D camera, comprising:
When the environmental light brightness information meets the second preset condition, based on the 3D camera obtain the 3D camera with The distance between plane of reference information.
7. the method according to claim 1, wherein obtaining the 3D camera shooting based on the 3D camera described After the distance between head and the plane of reference information, further includes:
The second 3D rendering of the testee is obtained based on the 3D camera;
According to second 3D rendering and the dimension measurement result, scanned in online shopping site;
Merchandise news corresponding with the testee is determined according to search result, and the merchandise news is fed back into user.
8. a kind of measuring device characterized by comprising
Camera opening module when for detecting that object measurement event is triggered, opens 3D camera;
Distance obtains module, in the case where testee is in preset state, being based on described in 3D camera acquisition The distance between 3D camera and the plane of reference information;Wherein, the preset state includes that the first end of the testee is put It sets on the plane of reference, the surface that the 3D camera is arranged in the second end and mobile terminal of the testee contacts;
Dimension feedback module, for being surveyed the range information as the size between the first end of the testee and second end Amount is as a result, and feed back to user for the dimension measurement result.
9. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is held by processor The measurement method as described in any in claim 1-7 is realized when row.
10. a kind of mobile terminal, which is characterized in that including memory, processor and storage are on a memory and can be in processor The computer program of operation, the processor realize survey as claimed in claim 1 when executing the computer program Amount method.
CN201711446867.XA 2017-12-27 2017-12-27 Measurement method, device, storage medium and mobile terminal Pending CN109974658A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711446867.XA CN109974658A (en) 2017-12-27 2017-12-27 Measurement method, device, storage medium and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711446867.XA CN109974658A (en) 2017-12-27 2017-12-27 Measurement method, device, storage medium and mobile terminal

Publications (1)

Publication Number Publication Date
CN109974658A true CN109974658A (en) 2019-07-05

Family

ID=67071129

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711446867.XA Pending CN109974658A (en) 2017-12-27 2017-12-27 Measurement method, device, storage medium and mobile terminal

Country Status (1)

Country Link
CN (1) CN109974658A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110763213A (en) * 2019-11-13 2020-02-07 刘洁 Movable surgical ward acceptance platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624954A (en) * 2012-03-07 2012-08-01 苏州佳世达电通有限公司 Mobile phone with length measuring function and measuring method of mobile phone
CN206039632U (en) * 2016-07-29 2017-03-22 上海爱网特实业(集团)有限公司 System convenient to select shoes size on net
CN106780589A (en) * 2016-12-09 2017-05-31 深圳奥比中光科技有限公司 A kind of method for obtaining target depth image
CN107255813A (en) * 2017-06-30 2017-10-17 努比亚技术有限公司 Distance-finding method, mobile terminal and storage medium based on 3D technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102624954A (en) * 2012-03-07 2012-08-01 苏州佳世达电通有限公司 Mobile phone with length measuring function and measuring method of mobile phone
CN206039632U (en) * 2016-07-29 2017-03-22 上海爱网特实业(集团)有限公司 System convenient to select shoes size on net
CN106780589A (en) * 2016-12-09 2017-05-31 深圳奥比中光科技有限公司 A kind of method for obtaining target depth image
CN107255813A (en) * 2017-06-30 2017-10-17 努比亚技术有限公司 Distance-finding method, mobile terminal and storage medium based on 3D technology

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110763213A (en) * 2019-11-13 2020-02-07 刘洁 Movable surgical ward acceptance platform

Similar Documents

Publication Publication Date Title
CN113454974B (en) Method for determining dial image and electronic device thereof
CN108712606B (en) Reminding method, device, storage medium and mobile terminal
CN109324749B (en) Drawing method, drawing device, storage medium and electronic equipment
CN109348135A (en) Photographic method, device, storage medium and terminal device
CN108566516A (en) Image processing method, device, storage medium and mobile terminal
CN108668086A (en) Atomatic focusing method, device, storage medium and terminal
CN112256181B (en) Interaction processing method and device, computer equipment and storage medium
CN108765380A (en) Image processing method, device, storage medium and mobile terminal
CN108881875A (en) Image white balancing treatment method, device, storage medium and terminal
CN109029252B (en) Object detection method, object detection device, storage medium, and electronic apparatus
CN111782950A (en) Sample data set acquisition method, device, equipment and storage medium
CN108683845A (en) Image processing method, device, storage medium and mobile terminal
CN110765182B (en) Data statistical method and device, electronic equipment and storage medium
CN110738185B (en) Form object identification method, form object identification device and storage medium
CN112989198B (en) Push content determination method, device, equipment and computer-readable storage medium
CN108960213A (en) Method for tracking target, device, storage medium and terminal
CN110909184A (en) Multimedia resource display method, device, equipment and medium
WO2021218634A1 (en) Content pushing
CN106679691B (en) A kind of method of adjustment, device and the mobile terminal of pedometer data
CN113469779A (en) Information display method and device
CN109190316A (en) A kind of recommended method, device, storage medium and mobile terminal for laying article
CN109974658A (en) Measurement method, device, storage medium and mobile terminal
CN109088982A (en) Terminal security improvement method, device, storage medium and terminal device
US9582141B2 (en) Three dimensional user interface for watch device
CN108966010A (en) Adjusting method, device, storage medium and the terminal of Online Video resolution ratio

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20190705

RJ01 Rejection of invention patent application after publication