WO2022188691A1 - 一种测量长度的方法、电子设备以及移动设备 - Google Patents

一种测量长度的方法、电子设备以及移动设备 Download PDF

Info

Publication number
WO2022188691A1
WO2022188691A1 PCT/CN2022/079102 CN2022079102W WO2022188691A1 WO 2022188691 A1 WO2022188691 A1 WO 2022188691A1 CN 2022079102 W CN2022079102 W CN 2022079102W WO 2022188691 A1 WO2022188691 A1 WO 2022188691A1
Authority
WO
WIPO (PCT)
Prior art keywords
electronic device
measured
image
plane
measurement
Prior art date
Application number
PCT/CN2022/079102
Other languages
English (en)
French (fr)
Inventor
薛清风
徐学军
Original Assignee
华为技术有限公司
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 华为技术有限公司 filed Critical 华为技术有限公司
Publication of WO2022188691A1 publication Critical patent/WO2022188691A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/02Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness
    • G01B11/022Measuring arrangements characterised by the use of optical techniques for measuring length, width or thickness by means of tv-camera scanning
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/14Measuring arrangements characterised by the use of optical techniques for measuring distance or clearance between spaced objects or spaced apertures
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01SRADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
    • G01S17/00Systems using the reflection or reradiation of electromagnetic waves other than radio waves, e.g. lidar systems
    • G01S17/02Systems using the reflection of electromagnetic waves other than radio waves
    • G01S17/06Systems determining position data of a target
    • G01S17/08Systems determining position data of a target for measuring distance only
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume

Definitions

  • the present application relates to the field of communications, and more particularly, to a method for measuring length, an electronic device and a mobile device.
  • AR augmented reality
  • Electronic equipment with a display screen and a camera some are fixedly installed on the wall, on the car, etc., some are due to the large size of the display screen (for example, the size of the display screen is more than 14 inches), and some are both of the above.
  • Even if the electronic device is installed with an AR measurement application or integrates the AR measurement function because the electronic device or the camera on the electronic device is not easy to rotate or even cannot be rotated (for example, the camera on some electronic devices can only be raised and lowered), which makes the electronic device
  • the AR measurement application or the AR measurement function cannot accurately identify the reference measurement plane, which results in low accuracy of the AR measurement results of the electronic device and poor user experience.
  • the present application provides a method for measuring length, an electronic device and a mobile device.
  • the technical solution provided by the present application through the assistance of the mobile device, accurately identifies the reference measurement plane, and then accurately completes the measurement, which is especially convenient for measuring the height of the object, etc., and improves user experience.
  • an electronic device communicates wirelessly with the mobile device and both are in the same space (eg, the same room).
  • the electronic device includes: a processor, a memory, a camera, and a computer program; the computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device executes: a notification message from the mobile device is received, and the notification message includes the first image
  • Obtain the first reference measurement plane on which the object to be measured is based in the first image; scan or shoot the second image by itself; the second image includes the object to be measured and the plane on which the object to be measured is based; measure the plane according to the first reference and The plane on which the object to be measured is based, and the plane on which the object to be measured is obtained is the second reference measurement plane in the second image; the measurement end point of the object to be measured in the second image is automatically obtained, and the measurement is performed according to the second reference in the second image.
  • Plane and measurement end point obtain the length of the object to be measured; output the length of the object to be measured, or output the adjusted length of the object to be measured.
  • the electronic equipment with a display screen and a camera is fixedly installed on the wall, on the car, etc., or the size of the display screen is large (for example, the size of the display screen is more than 14 inches), it is not easy to rotate or cannot be rotated.
  • the easy-to-turn nature of mobile devices enables electronic devices to accurately measure AR. User experience is also improved.
  • an electronic device communicates wirelessly with the mobile device and both are in the same space (eg, the same room).
  • the electronic device includes: a processor, a memory, a camera, and a computer program; the computer program is stored in the memory, and when the computer program is executed by the processor, the electronic device executes: self-scanning or self-shooting a second image; the second image includes the to-be-measured The object and the plane on which the object to be measured is based; a notification message from the mobile device is received, and the notification message includes a first image; the first reference measurement plane on which the object to be measured is based in the first image is acquired; the measurement plane is based on the first reference and The plane on which the object to be measured is based, and the plane on which the object to be measured is obtained is the second reference measurement plane in the second image; the measurement end point of the object to be measured in the second image is automatically obtained, and the measurement is performed according to the second reference in the second image. Plane and measurement end
  • the camera on the electronic device is a time of flight (ToF) camera (also referred to as a depth camera).
  • ToF time of flight
  • an AR measurement APP is installed on the electronic device, or an AR measurement function is integrated.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • the first image in the notification message may be a first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the first three-dimensional point cloud image includes a reference measurement plane on which the object to be measured is based.
  • the first reference measurement plane in the first image may be the reference measurement plane on which the object to be measured included in the first three-dimensional point cloud image is based.
  • the electronic device further performs: generating a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image according to the self-scanned or self-photographed image; the second three-dimensional The point cloud map includes the object to be measured and the plane on which the object to be measured is based; according to the first reference measurement plane and the plane on which the object to be measured is based, it is obtained that the plane on which the object to be measured is based is the second reference measurement plane in the second three-dimensional point cloud map; Automatically obtain the measurement end point of the object to be measured in the second 3D point cloud, obtain the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second 3D point cloud; output the length of the object to be measured, or output the adjustment The length of the object to be measured after.
  • the electronic device further performs: according to the self-scanned or self-photographed image, generating a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image, the second three-dimensional
  • the point cloud map includes the object to be measured and the plane on which the object to be measured is based; according to the first three-dimensional point cloud map and the second three-dimensional point cloud map, determine the reference measurement plane of the object to be measured in the second three-dimensional point cloud map, and in the second three-dimensional point cloud map Determine the measurement starting point in the reference measurement plane in the second three-dimensional point cloud image; determine the measurement end point of the object to be measured in the second three-dimensional point cloud image; determine the length of the object to be measured according to the measurement starting point and the measurement end point in the second three-dimensional point cloud image.
  • the electronic device further performs: sending a request message to the mobile device, where the request message is used to request to obtain a first three-dimensional point cloud image of the surrounding environment of the electronic device; The first 3D point cloud image.
  • the electronic device further includes a display screen; the electronic device further performs: displaying the self-scanned or self-shot image in the display screen.
  • the object to be measured is a person to be measured
  • the electronic device further performs: determining a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement plane is The ground plane on which the person to be measured stands; the eye position of the person to be measured in the self-scanned or self-shot image is identified; the distance between the reference measurement plane and the eye position is determined in the second three-dimensional point cloud image; according to the reference measurement plane and The position coordinates of the eye position in the second three-dimensional point cloud image, determine the distance between the reference measurement plane and the eye position; according to the distance between the reference measurement plane and the eye position and the preset distance value, determine the height of the person to be measured,
  • the preset distance value is the distance value from the eyes to the top of the head.
  • the object to be measured is a person to be measured
  • the electronic device further performs: determining a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement plane is The ground plane on which the person to be measured stands; identify the position of the head of the person to be measured in the self-scanned or self-shot image; determine the distance between the reference measurement plane and the head position in the second three-dimensional point cloud image; according to the reference measurement plane and The position coordinates of the head position in the second three-dimensional point cloud image determine the height of the person to be measured.
  • the electronic device further performs: acquiring the length of the measurement object according to the vertical distance from the measurement end point in the second image to the second reference measurement plane; or, acquiring the first
  • the measurement starting point in the second image is the intersection of the second reference measurement plane and the object to be measured; the length of the object to be measured is obtained according to the measurement starting point and the measurement end point in the second image.
  • the object to be measured is the person to be measured, and the measurement end point is the eye position of the person; the electronic device further performs: acquiring the vertical distance from the measurement end point to the second reference measurement plane, Output the sum of the vertical distance and the first distance; the first distance is the average distance between the person's eye position and the person's head position obtained by statistics; or, obtain the length between the measurement start point and the measurement end point, and output the sum of the length and the first distance. and; the first distance is the average distance between the position of a person's eyes and the position of the top of a person's head obtained by statistics.
  • the object to be measured is the person to be measured, and the measurement end point is the top of the person's head; the electronic device further performs the following steps: outputting the measurement end point to the vertical plane of the second reference measurement plane Distance; alternatively, output the length between the start of the measurement and the end of the measurement.
  • the electronic device after receiving the first three-dimensional point cloud image sent by the mobile device, the electronic device further performs the following steps: receiving a first operation from the user, and the first operation is used to start Measure the length of the object to be measured.
  • the first three-dimensional point cloud map includes ground information in an environment where the electronic device is located.
  • the first reference measurement plane and the plane on which the object to be measured is based are the same plane.
  • a mobile device communicates wirelessly with the electronic device; the mobile device and the electronic device are in the same space (eg, the same room).
  • the mobile device includes: a processor, a memory, a ToF camera, and a computer program.
  • the computer program is stored in the memory.
  • the mobile device executes: a request message from the electronic device is received; the request message is used for requesting to acquire a first image; the first image is a first three-dimensional point cloud image of the surrounding environment of the electronic device; a user input is received; the user input is used to instruct the acquisition of the first three-dimensional point cloud image of the surrounding environment of the electronic device; in response to the user input , and use the ToF camera to scan the surrounding environment of the electronic device to obtain a first three-dimensional point cloud image; and send the first three-dimensional point cloud image to the electronic device.
  • a mobile device communicates wirelessly with the electronic device; the mobile device and the electronic device are in the same space (eg, the same room).
  • the mobile device includes: a processor, a memory, a ToF camera, and a computer program.
  • the computer program is stored in the memory.
  • the mobile device executes: receiving a user Input; user input is used to instruct to obtain a first three-dimensional point cloud image of the surrounding environment of the electronic device; in response to the user input, use the ToF camera to scan the surrounding environment of the electronic device to obtain the first three-dimensional point cloud image; send the first three-dimensional point cloud to the electronic device Cloud map.
  • the mobile device may include at least one of the following: a smart phone, a tablet computer.
  • the mobile device provided in the second aspect generates a first three-dimensional point cloud image of the surrounding environment of the electronic device by scanning the environment image around the electronic device, and sends the first three-dimensional point cloud image to the electronic device, so that the electronic device can scan the surrounding environment by itself.
  • self-photographed images determine the plane of the object to be measured in the first 3D point cloud image in the self-scanned or self-photographed images, that is, determine the reference measurement plane, so as to solve the problem that the camera on the electronic device cannot recognize the object being measured.
  • the problem of measuring the plane where the object is located in the 3D point cloud image realizes the use of electronic equipment to measure the length of the object, etc., and improves the user experience.
  • the first three-dimensional point cloud map includes ground information in an environment where the electronic device is located.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • the mobile device further includes a display screen; the mobile device performs: displaying an image of the environment around the electronic device on the display screen.
  • an AR measurement APP is installed on the mobile device, or an AR measurement function is integrated.
  • the camera on the mobile device is a ToF (time of flight) camera.
  • a method for measuring length is provided, which is applied to an electronic device.
  • the electronic device communicates wirelessly with the mobile device, and both are in the same space.
  • Electronic devices include cameras.
  • the method includes: the electronic device receives a notification message from the mobile device; the notification message includes a first image; the electronic device acquires a first reference measurement plane on which the object to be measured is based in the first image; Two images; the second image includes the object to be measured and the plane on which the object to be measured is based; the electronic device obtains the plane on which the object to be measured is based according to the first reference measurement plane and the plane on which the object to be measured is based, and the plane on which the object to be measured is based is the second image in the second image
  • the reference measurement plane the electronic device automatically obtains the measurement end point of the object to be measured in the second image, and the electronic device obtains the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second image; the electronic device outputs the length of the object
  • a method of measuring length is provided, applied to an electronic device.
  • the electronic device communicates wirelessly with the mobile device, and both are in the same space.
  • Electronic devices include cameras.
  • the method includes: self-scanning or self-photographing a second image; the second image includes the object to be measured and the plane on which the object to be measured is based; receiving a notification message from a mobile device, the notification message includes the first image;
  • the first reference measurement plane based on the first image; according to the first reference measurement plane and the plane on which the object to be measured is based, the obtained plane on which the object to be measured is based is the second reference measurement plane in the second image; the second reference measurement plane is automatically obtained.
  • obtain the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second image output the length of the object to be measured, or output the adjusted length of the object to be measured.
  • the camera on the electronic device is a ToF (time of flight) camera.
  • ToF time of flight
  • an AR measurement APP is installed on the electronic device, or an AR measurement function is integrated.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • the first image in the notification message may be the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the first three-dimensional point cloud image includes a reference measurement plane on which the object to be measured is based.
  • the first reference measurement plane in the first image may be the reference measurement plane on which the object to be measured included in the first three-dimensional point cloud image is based.
  • the method further includes: the electronic device generates a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image according to the self-scanned or self-photographed image;
  • the two-dimensional point cloud map includes the object to be measured and the plane on which the object to be measured is based; the electronic device obtains the plane on which the object to be measured is based according to the first reference measurement plane and the plane on which the object to be measured is based as the second plane in the second three-dimensional point cloud map.
  • the electronic device automatically obtains the measurement end point of the object to be measured in the second three-dimensional point cloud; the electronic device obtains the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second three-dimensional point cloud; the electronic device outputs The length of the object to be measured, or the adjusted length of the object to be measured is output.
  • the method further includes: the electronic device generates a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image according to the self-scanned or self-photographed image;
  • the two-dimensional point cloud map includes the object to be measured and the plane on which the object to be measured is based; the electronic device determines the reference measurement plane of the object to be measured in the second three-dimensional point cloud map according to the first three-dimensional point cloud map and the second three-dimensional point cloud map; the electronic device The measurement starting point is determined in the reference measurement plane in the second three-dimensional point cloud image; the electronic device determines the measurement end point of the object to be measured in the second three-dimensional point cloud image; the electronic device determines the measurement starting point and the measurement end point in the second three-dimensional point cloud image.
  • the length of the object to be measured is determined.
  • the method further includes: the electronic device sends a request message to the mobile device, where the request message is used to request to obtain a first three-dimensional point cloud image of the surrounding environment of the electronic device; the electronic device A first three-dimensional point cloud image sent by the mobile device is received.
  • the electronic device further includes a display screen
  • the method further includes: the electronic device displays a self-scanned or self-photographed image on the display screen.
  • the object to be measured is a person to be measured
  • the method further includes: the electronic device determines a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement plane The ground plane on which the person to be measured stands; the electronic device identifies the eye position of the person to be measured in the self-scanned or self-shot image; the electronic device determines the distance between the reference measurement plane and the eye position in the second three-dimensional point cloud image; The electronic device determines the distance between the reference measurement plane and the eye position according to the position coordinates of the reference measurement plane and the eye position in the second three-dimensional point cloud map; the electronic device measures the distance between the reference measurement plane and the eye position and the preset distance according to the reference measurement plane value, determine the height of the person to be measured, and the preset distance value is the distance value from the eyes to the top of the head.
  • the object to be measured is a person to be measured
  • the method further includes: the electronic device determines a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement plane The ground plane on which the person to be measured stands; the electronic device identifies the position of the head of the person to be measured in the self-scanned or self-shot image; the electronic device determines the distance between the reference measurement plane and the overhead position in the second three-dimensional point cloud image; The electronic device determines the height of the person to be measured according to the reference measurement plane and the position coordinates of the top position in the second three-dimensional point cloud image.
  • the method further includes: the electronic device obtains the length of the object to be measured according to the vertical distance from the measurement end point in the second image to the second reference measurement plane; or , obtain the measurement starting point in the second image, where the measurement starting point is the intersection of the second reference measurement plane and the object to be measured; the electronic device obtains the length of the object to be measured according to the measurement starting point and the measurement end point in the second image.
  • the object to be measured is a person to be measured, and the measurement end point is the position of the person's eyes; the method further includes: the electronic device obtains the distance from the measurement end point to the second reference measurement plane. Vertical distance, output the sum of the vertical distance and the first distance; the first distance is the average distance between the person's eye position and the person's head position obtained by statistics; or, the electronic device obtains the length between the measurement start point and the measurement end point, and outputs the The sum of the length and the first distance; the first distance is the average distance between the person's eye position and the person's head position obtained by statistics.
  • the object to be measured is the person to be measured, and the measurement end point is the head position of the person; the method further includes: the electronic device outputs the measurement end point to the vertical measurement plane of the second reference measurement plane distance; alternatively, the electronics output the length between the start of the measurement and the end of the measurement.
  • the method further includes: the electronic device receives the first operation of the user, and the first operation uses To start measuring the length of the object to be measured.
  • the first three-dimensional point cloud map includes ground information in an environment where the electronic device is located.
  • a method for measuring length is provided, and the method is applied to a mobile device.
  • the mobile device and the electronic device communicate wirelessly and both are in the same space (eg, the same room).
  • the mobile device includes a display screen and a ToF camera; the method includes: the mobile device receives a request message from the electronic device; the request message is used to request to obtain a first image; the first image is a first three-dimensional point cloud image of the surrounding environment of the electronic device;
  • the mobile device receives a user input; the user input is used to instruct the acquisition of a first three-dimensional point cloud image of the surrounding environment of the electronic device; the mobile device responds to the user input and scans the surrounding environment of the electronic device with a ToF camera to obtain the first three-dimensional point cloud image ;
  • the mobile device sends the first three-dimensional point cloud image to the electronic device.
  • a method of measuring length is provided, the method being applied to a mobile device.
  • the mobile device and the electronic device communicate wirelessly and both are in the same space (eg, the same room).
  • Mobile devices include displays and ToF cameras.
  • the method includes: receiving a user input; the user input is used for instructing to obtain a first three-dimensional point cloud image of the surrounding environment of the electronic device; in response to the user input, scanning the surrounding environment of the electronic device with a ToF camera to obtain the first three-dimensional point cloud image; The first three-dimensional point cloud image is sent to the electronic device.
  • the mobile device includes at least one of the following: a smart phone and a tablet computer.
  • the first three-dimensional point cloud map includes ground information in an environment in which the electronic device is located.
  • the method further includes: the mobile device displays an image of the environment around the electronic device on the display screen.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • a method for measuring length is provided, the method being applied to a measuring system.
  • the measurement system includes a mobile device and an electronic device, the electronic device communicates wirelessly with the mobile device, and both are in the same space.
  • the mobile device includes a first display screen and a ToF camera; the electronic device includes a second display screen and a second camera; the method includes: the mobile device receives a request message from the electronic device; the request message is used for requesting to obtain a first image;
  • the image is a first three-dimensional point cloud image of the surrounding environment of the electronic device; the mobile device receives a user input; the user input is used to instruct the acquisition of the first three-dimensional point cloud image of the surrounding environment of the electronic device; in response to the user input, use the ToF camera to scan the electronic device.
  • the surrounding environment of the device is used to obtain the first three-dimensional point cloud image; the mobile device sends the first three-dimensional point cloud image to the electronic device.
  • the electronic device obtains the first reference measurement plane on which the object to be measured is based in the first image; the electronic device uses the second camera to shoot a self-scanning or self-shooting second image, and the self-scanning or self-shooting second image includes the object to be measured and the second image.
  • the plane on which the object to be measured is based The plane on which the object to be measured is based; the electronic device obtains, according to the first reference measurement plane and the plane on which the object to be measured is based, that the plane on which the object to be measured is based is the second reference measurement plane in the second image; the electronic device automatically obtains the second image In the measurement end point of the object to be measured, the electronic device obtains the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second image; the electronic device outputs the length of the object to be measured, or outputs the adjusted object to be measured length.
  • the second camera on the electronic device is a ToF (time of flight) camera.
  • an AR measurement APP is installed on the electronic device, or an AR measurement function is integrated.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • the mobile device includes at least one of the following: a smart phone and a tablet computer.
  • the method further includes: the electronic device generates a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image according to the self-scanned or self-photographed image;
  • the two-dimensional point cloud map includes the object to be measured and the plane on which the object to be measured is based; the electronic device obtains the plane on which the object to be measured is based according to the first reference measurement plane and the plane on which the object to be measured is based as the second plane in the second three-dimensional point cloud map.
  • the electronic device automatically obtains the measurement end point of the object to be measured in the second three-dimensional point cloud; the electronic device obtains the length of the object to be measured according to the second reference measurement plane and the measurement end point in the second three-dimensional point cloud; the electronic device outputs The length of the object to be measured, or the adjusted length of the object to be measured is output.
  • the method further includes: the electronic device generates a second three-dimensional point cloud corresponding to the self-scanned or self-photographed image according to the self-scanned or self-photographed image;
  • the two-dimensional point cloud map includes the object to be measured and the plane on which the object to be measured is based; the electronic device determines the reference measurement plane of the object to be measured in the second three-dimensional point cloud map according to the first three-dimensional point cloud map and the second three-dimensional point cloud map; the electronic device The measurement starting point is determined in the reference measurement plane in the second three-dimensional point cloud image; the electronic device determines the measurement end point of the object to be measured in the second three-dimensional point cloud image; the electronic device determines the measurement starting point and the measurement end point in the second three-dimensional point cloud image.
  • the length of the object to be measured is determined in the reference measurement plane in the second three-dimensional point cloud image.
  • the method further includes: the electronic device displays the self-scanned or self-shot image in the second display screen.
  • the object to be measured is a person to be measured
  • the method further includes: the electronic device determines a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement The plane is the ground plane where the person to be measured stands; the electronic device identifies the eye position of the person to be measured in the self-scanned or self-shot image; the electronic device determines the distance between the reference measurement plane and the eye position in the second three-dimensional point cloud image The electronic device determines the distance between the reference measurement plane and the eye position according to the position coordinates of the reference measurement plane and the eye position in the second three-dimensional point cloud map; the electronic device determines the distance between the reference measurement plane and the eye position according to the distance between the reference measurement plane and the eye position and the preset The distance value determines the height of the person to be measured.
  • the preset distance value is the distance value from the eyes to the top of the head.
  • the object to be measured is a person to be measured
  • the method further includes: the electronic device determines a reference measurement plane of the person to be measured in the second three-dimensional point cloud image, and the reference measurement The plane is the ground plane on which the person to be measured stands; the electronic device recognizes the head position of the person to be measured in the self-scanned or self-shot image; the electronic device determines the distance between the reference measurement plane and the overhead position in the second three-dimensional point cloud image ; The electronic device determines the height of the person to be measured according to the position coordinates of the reference measurement plane and the position of the top of the head in the second three-dimensional point cloud image.
  • the method further includes: the electronic device obtains the length of the object to be measured according to the vertical distance from the measurement end point in the second image to the second reference measurement plane; or , obtain the measurement starting point in the second image, where the measurement starting point is the intersection of the second reference measurement plane and the object to be measured; the electronic device obtains the length of the object to be measured according to the measurement starting point and the measurement end point in the second image.
  • the object to be measured is a person to be measured, and the measurement end point is the eye position of the person; the method further includes: the electronic device obtains the distance from the measurement end point to the second reference measurement plane. Vertical distance, output the sum of the vertical distance and the first distance; the first distance is the average distance between the person's eye position and the person's head position obtained by statistics; or, the electronic device obtains the length between the measurement start point and the measurement end point, and outputs the The sum of the length and the first distance; the first distance is the average distance between the person's eye position and the person's head position obtained by statistics.
  • the object to be measured is the person to be measured, and the measurement end point is the position of the top of the person's head; the method further includes: the electronic device outputs the measurement end point to the vertical measurement plane of the second reference measurement plane distance; alternatively, the electronics output the length between the start of the measurement and the end of the measurement.
  • the method further includes: the electronic device receives the first operation of the user, and the first operation uses a To start measuring the length of the object to be measured.
  • the first three-dimensional point cloud map includes ground information in an environment where the electronic device is located.
  • the method further includes: displaying, on the first display screen, an image of an environment around the electronic device by the mobile device.
  • the surrounding environment of the electronic device includes: ground information of the environment where the electronic device is located, various objects existing in the surrounding environment of the electronic device, the relative positional relationship of each object, and the like.
  • a system for measuring length includes an electronic device and a mobile device, the electronic device and the mobile device are in wireless communication, and both are in the same space (eg, the same room).
  • the mobile device includes a first display screen and a ToF camera; the electronic device includes a second display screen and a second camera; the electronic device is configured to execute the above fifth aspect, or the electronic device in any implementation manner of the above fifth aspect. step.
  • the mobile device is configured to perform the above fifth aspect, or the steps performed by the mobile device in any implementation manner of the above fifth aspect.
  • a computer-readable storage medium stores a computer program (also referred to as instructions or codes), and when the computer program is executed by the electronic device, causes the electronic device to perform the method of the third aspect and any one of the embodiments of the third aspect.
  • a computer program also referred to as instructions or codes
  • a computer-readable storage medium stores a computer program (also referred to as instructions or codes), and when the computer program is executed by the mobile device, causes the mobile device to perform the method of the fourth aspect and any one of the embodiments of the fourth aspect.
  • a computer program also referred to as instructions or codes
  • a chip in a ninth aspect, includes a processor and a memory, and the processor is configured to read and execute the computer program stored in the memory, so as to execute the third aspect and the method of any one of the implementation manners of the third aspect.
  • a tenth aspect provides a chip.
  • the chip includes a processor and a memory, and the processor is configured to read and execute the computer program stored in the memory, so as to execute the fourth aspect and the method of any one of the implementation manners of the fourth aspect.
  • a computer program product is provided, when the computer program product is executed by an electronic device, the electronic device is made to execute the third aspect and the method of any one of the implementation manners of the third aspect.
  • a twelfth aspect provides a computer program product that, when the computer program product is executed by an electronic device, causes the mobile device to execute the fourth aspect and the method of any one of the implementations of the fourth aspect.
  • the camera of the mobile device is used to scan and establish a first three-dimensional point cloud image of the surrounding environment of the electronic device (the surrounding environment of the electronic device includes the reference measurement plane on which the object to be measured is based), and the mobile device converts the first
  • the 3D point cloud image is sent to the electronic device (for example, Huawei Smart Screen).
  • the electronic device uses its own camera to acquire the image of the object to be measured and the plane on which the object to be measured is based
  • the benchmark of the object to be measured in the self-scanned or self-shot image can be determined Measure planes so that dimensions such as the height of the object to be measured can be accurately measured.
  • the electronic equipment with a display screen and a camera is fixedly installed on the wall, on the car, etc., or the size of the display screen is large (for example, the size of the display screen is more than 14 inches), it is not easy to rotate or cannot be rotated.
  • the easy-to-turn nature of mobile devices enables electronic devices to accurately measure AR. User experience is also improved.
  • FIG. 1 is a schematic diagram of a user interface during measurement by a mobile device according to an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a scenario of a method for measuring a length provided by an embodiment of the present application.
  • FIG. 3 is a schematic flowchart of a method for measuring a length provided by an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a user interface for measuring by an electronic device according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a hardware architecture of an electronic device provided by an embodiment of the present application.
  • FIG. 6 is a schematic diagram of a hardware architecture of a mobile device according to an embodiment of the present application.
  • references in this specification to "one embodiment” or “some embodiments” and the like mean that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application.
  • appearances of the phrases “in one embodiment,” “in some embodiments,” “in other embodiments,” “in other embodiments,” etc. in various places in this specification are not necessarily All refer to the same embodiment, but mean “one or more but not all embodiments” unless specifically emphasized otherwise.
  • the terms “including”, “including”, “having” and their variants mean “including but not limited to” unless specifically emphasized otherwise.
  • AR augmented reality
  • Electronic equipment with a display screen and a camera some are fixedly installed on the wall, on the car, etc., some are due to the large size of the display screen (for example, the size of the display screen is more than 14 inches), and some are both of the above.
  • Even if the electronic device is installed with an AR measurement application or integrates the AR measurement function because the electronic device or the camera on the electronic device is not easy to rotate or even cannot be rotated (for example, the camera on some electronic devices can only be raised and lowered), which makes the electronic device
  • the AR measurement application or the AR measurement function cannot accurately identify the reference measurement plane, which results in low accuracy of the AR measurement results of the electronic device and poor user experience.
  • FIG. 1 is a schematic diagram of a user interface when a mobile device is measured according to an embodiment of the present application.
  • a user measures the length of an object to be measured with AR on a mobile device (take Huawei mate series smartphones as an example)
  • the user first opens “Utilities”, selects “AR Measurement” in “Utilities”, and then clicks “AR Measurement” in “Utilities”.
  • the mobile device After selecting "Length” in “, the mobile device will automatically turn on the camera; the user points the camera at the datum measurement plane (such as the ground) on which the object to be measured is based, and slowly moves the smartphone to find the plane, until the display screen of the smartphone shows as The indicator shown in a in Figure 1 (a circle with a dot in the middle); the user moves the smartphone slowly so that one end of the object to be measured is at the indicator, as shown in b in Figure 1, the user clicks " The "Add starting point” icon determines the starting point of measurement; the user moves the smartphone slowly, as shown in c in Figure 1, when the indicator moves to the other end of the object to be measured, the object to be measured will be displayed on the smartphone When the indicator moves to the other end of the object to be measured, the length displayed at this time is the length of the object to be measured.
  • the "Add starting point” icon determines the starting point of measurement
  • the smartphone will automatically turn on the camera; the user points the camera at the plane under the person's feet , slowly move the smartphone positioning plane until the indicator (circle with a dot in the middle) appears on the display; the user moves the smartphone slowly so that the human foot is at the indicator; the user clicks the "Add starting point” icon to fix the measurement Starting point; move the smartphone up slowly, when the indicator moves to the top of the person's head, the length displayed by the smartphone is the person's height.
  • an electronic device with a camera and a display screen is not easy to rotate or even cannot be rotated due to the fixed installation or the large size of the display screen, even if the electronic device is equipped with a ToF (time of flight) camera, It is also impossible to accurately identify the reference measurement plane, and still cannot solve the problem of inaccurate measurement; considering that the mobile device or the ToF (time of flight) camera on the mobile device is easy to rotate, it can be achieved through the cooperation of the above electronic device and the above mobile device. Solve the above technical problems, thereby improving user experience.
  • the present application provides a method for measuring length, an electronic device and a mobile device.
  • Electronic devices and mobile devices communicate wirelessly. Alternatively, both can be in the same local area network.
  • the camera of the mobile device is used to scan and establish a first three-dimensional point cloud image of the surrounding environment of the electronic device (the surrounding environment of the electronic device includes the reference measurement plane on which the object to be measured is based), and the first three-dimensional point is determined.
  • the mobile device sends the first 3D point cloud image and the position of the reference measurement plane in the first 3D point cloud image to the electronic device (for example, a Huawei smart screen).
  • the electronic device After the electronic device scans or self-shoots the image of the object to be measured and the plane on which the object to be measured is based, the electronic device scans or shoots itself based on the first three-dimensional point cloud image, the reference measurement plane in the first three-dimensional point cloud image, and the above-mentioned self-scanning or self-shooting. It can determine the reference measurement plane in the self-scanned or self-shot image, so as to determine the reference measurement plane of the object to be measured in the self-scanned or self-shot image; the electronic device can determine the reference measurement plane from the self-scanned or self-shot image.
  • the electronic device determines that the contact end of the object to be measured and the reference measurement plane is one end of the object to be measured; the electronic device automatically identifies the other end of the object to be measured; and gives the length between the two ends of the object to be measured. In this way, the electronic device can accurately measure the length of the object to be measured. In this way, even if the electronic device with display and camera is fixed on the wall, on the car, etc., or the size of the display is large (for example, the size of the display is more than 14 inches), it can be measured by AR installed on the electronic device App or integrated AR measurement function for accurate AR measurement. User experience is also improved.
  • FIG. 2 is a schematic diagram of a scenario of a method for measuring a length provided by an embodiment of the present application.
  • the mobile device 100 communicates with the electronic device 200 wirelessly.
  • the manner of wireless communication includes, but is not limited to, at least one of the following: Bluetooth, Wi-Fi, and so on.
  • the wireless communication mode of Wi-Fi can be Wi-Fi P2P (peer to peer), or it can be Wi-Fi connection under the same local area network.
  • the mobile device 100 includes a ToF (time of flight) camera 110 and a display screen 120, and the mobile device 100 is installed with an AR measurement application program or integrated with an AR measurement function.
  • the camera 110 includes a ToF (time of flight) camera.
  • the electronic device 200 includes a camera 220 and a display screen 210 , and the electronic device 200 is also installed with an AR measurement application program, or integrates an AR measurement function.
  • the camera 220 may be installed on the upper edge of the display screen 210 of the electronic device.
  • the electronic device 200 and the mobile device 100 are located in the same area (eg, the same room).
  • both the camera 220 of the electronic device 200 and the camera 110 on the mobile device 100 are ToF (time of flight) cameras; or, the camera on the electronic device 200 may also be other cameras, not ToF (time of flight) cameras )Camera.
  • the position of the camera 220 on the display screen 210 is not limited.
  • the camera 220 may also be installed at a position such as the left edge or the right edge of the display screen 210 .
  • the electronic device 200 in FIG. 2 is an electronic device with a camera and a larger display screen as an example, it is well known to those skilled in the art that the electronic device 200 may also be a fixed electronic device, such as a car computer.
  • the electronic device 200 can be mounted Windows, Linux or other operating systems.
  • the electronic device 200 installs an AR measurement APP, or integrates an AR measurement function.
  • the electronic device 200 includes, but is not limited to, a smart TV, a desktop computer, an in-vehicle device, and the like. This embodiment of the present application does not limit this.
  • Electronic device 200 includes a camera.
  • the camera is not easily or cannot be rotated.
  • the above-mentioned electronic device is not easily or cannot be rotated.
  • mobile device 100 includes a camera.
  • the mobile device 100 is installed with an AR measurement APP, or is integrated with an AR measurement function.
  • the mobile device 100 includes, but is not limited to, one of the following: a smart phone, a smart headset, a tablet computer, a wearable electronic device with wireless communication functions (such as a smart watch, a smart bracelet, a smart ring, and smart glasses), Laptop, etc.
  • Exemplary embodiments of mobile devices include, but are not limited to, piggybacks Portable electronic devices with Windows, Linux, or other operating systems.
  • the AR measurement APPs installed on the mobile device 200 and the electronic device 100 may be the same APP, or may be different AR measurement APPs.
  • the AR measurement APP or AR measurement function of the mobile device or electronic device may be pre-installed on the device when the mobile device or electronic device leaves the factory, or integrated on the device when it leaves the factory.
  • FIG. 3 is a schematic flowchart of a method for measuring a length provided by an embodiment of the present application.
  • the method shown in FIG. 3 can be applied to the scenario shown in FIG. 2 .
  • the camera on the mobile device is not limited to whether it can be raised or lowered, nor is it limited to whether it can be rotated.
  • Mobile devices communicate wirelessly with electronic devices. Ways of wireless communication include, but are not limited to, Wi-Fi, Bluetooth, ZigBee, and the like.
  • the method 300 includes:
  • the electronic device sends a request message to the mobile device, where the request message is used to request to acquire a first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the user triggers the electronic device to send a request message to the mobile device in the process of initializing the electronic device for the first time; the request message is used to request the acquisition of a three-dimensional point cloud of the surrounding environment of the electronic device (hereinafter, for the convenience of distinction, called is the first three-dimensional point cloud image).
  • the request message is used to request the acquisition of a three-dimensional point cloud of the surrounding environment of the electronic device (hereinafter, for the convenience of distinction, called is the first three-dimensional point cloud image).
  • the user only needs to turn on the electronic device.
  • the user can open the AR measurement application of the electronic device, which triggers the electronic device to move to the empty space.
  • the device sends a request message, where the request message is used to request to acquire a first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the user when the user needs to use the electronic device to measure the height of a person, the user clicks to open an application of the AR measurement type on the electronic device.
  • the electronic device is triggered to send a request message to the mobile device, and the request message is used to request to obtain the electronic device.
  • the mobile device determines, according to the user input, whether to acquire the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the mobile device may prompt the user on the display interface whether to acquire the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the user can click the "Yes” option to indicate the user's consent.
  • the user can also click the "No” option to indicate that the user refuses.
  • the “Yes” option above can be replaced with the “Agree” option and other options with the same or similar meaning.
  • the “No” option above can be replaced with the "Reject” option and other options with the same or similar meaning.
  • the mobile device may perform S303.
  • the mobile device may also send a response message to the electronic device; the response message is used to indicate that the mobile device agrees to acquire the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the mobile device may not send a response message to the electronic device.
  • the mobile device can also send a response message to the electronic device; the response message is used to indicate that the mobile device does not agree to acquire the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the mobile device may not send a response message to the electronic device.
  • the mobile device scans through the camera to obtain a first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the mobile device displays a scan interface.
  • the user can pick up the mobile device and move left and right, and use the ToF camera of the mobile device to scan the surrounding environment of the electronic device. After scanning, the mobile device generates a first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • the user input may be touch input or voice input.
  • the surrounding environment of the electronic device includes a reference measurement plane on which the object to be measured is based.
  • the surrounding environment of the electronic device may also include the object to be measured.
  • the first three-dimensional point cloud image includes a reference measurement plane on which the object to be measured is based, and an image of the object to be measured.
  • the first three-dimensional point cloud map may further include an image of the electronic device.
  • a point cloud image refers to a collection of point data on the surface of an object obtained by photographing or scanning an object with a measuring instrument (such as a 3D camera, a laser scanner, etc.).
  • a measuring instrument such as a 3D camera, a laser scanner, etc.
  • the user uses the ToF camera on the mobile device to scan or shoot to obtain an image, and the mobile device can generate a 3D point cloud corresponding to the image according to the image.
  • the ToF camera can actively emit infrared light and receive the returned infrared light through the principle of infrared light and time-of-flight, so that the distance between each object in the surrounding environment and the camera can be measured. Therefore, the ToF camera can directly scan or shoot images of each object, and can measure the distance between each object and the camera, so as to restore the three-dimensional structure of each object scanned or captured on the captured image.
  • Mobile devices can scan the surrounding environment of electronic devices through ToF cameras.
  • the surrounding environment of the electronic device includes the reference measurement plane on which the object to be measured is based, and further includes the object to be measured and the electronic device.
  • the surrounding environment of the electronic device may also include other objects and the like. This application does not limit this.
  • the mobile device can be moved back and forth left and right during the scan. After scanning, the mobile device can obtain the first three-dimensional point cloud image using the simultaneous visual localization and mapping (SLAM) technology.
  • the first three-dimensional point cloud image can accurately reflect the three-dimensional shape of each object, and the spatial coordinates of each point in the first three-dimensional point cloud image are determined.
  • SLAM simultaneous visual localization and mapping
  • the reference measurement plane can be determined in the first three-dimensional point cloud image.
  • the reference measurement plane is the plane on which the person stands. For example, the ground, etc.
  • S301 may not be executed, so that the mobile device may not need to execute S302 and S303. Instead, move the mobile device to scan through the camera to obtain the first three-dimensional point cloud image of the surrounding environment of the electronic device.
  • This step may be set and activated periodically by the user on the mobile device, for example, in sequence every six months, or the user may perform a corresponding operation on the mobile device and then activate according to his own needs.
  • S304 may then be performed.
  • the mobile device sends the first three-dimensional point cloud image to the electronic device.
  • the mobile device may send the first three-dimensional point cloud image to the electronic device through the previously established wireless communication method.
  • a Wi-Fi direct connection is established between the mobile device and the electronic device.
  • the mobile device shares the first three-dimensional point cloud image with the electronic device through the Wi-Fi direct connection.
  • S301, S302, S303 and S304 may be performed when the electronic device is initialized.
  • the mobile device may send the first three-dimensional point cloud image of the surrounding environment of the electronic device to the electronic device. That is, S301, S302, S303 and S304 may be performed only once.
  • S301, S302, S303, and S304 may be re-executed in the case where the surrounding environment of the electronic device changes. For example, after the user changes the electronic device from one room to another, S303 and S304 may be re-executed.
  • S305 use the self-camera to scan or capture images by itself, and the self-scanned or self-photographed images include the object to be measured and the plane on which the object to be measured is based.
  • the self-scanned or self-taken image includes the other end of the object to be measured and the plane on which one end of the object to be measured is based.
  • the self-scanned or self-photographed image may only include the person's head or face, and the ground. At this time, the self-scanned or self-photographed image may not include the person's foot. This is based on the assumption that people must be standing on the ground.
  • the camera of the electronic device may or may not be a ToF camera.
  • the electronic device can generate the second three-dimensional point cloud image according to the self-scanned or self-shot image.
  • the self-scanned or self-photographed images may include all images of the object to be measured.
  • the object to be measured is a person
  • the self-scanned or self-shot image may include all images of the person (ie, a full-body photograph).
  • the electronic device determines, according to the self-scanned or self-photographed image and the first three-dimensional point cloud image, the reference measurement plane of the object to be measured in the self-scanned or self-photographed image.
  • the electronic device Since the electronic device is not easy to rotate or cannot be rotated, or the camera of the electronic device is not easy to rotate or cannot be rotated, the information in the self-scanned or self-photographed images is limited, and the electronic device cannot only determine the benchmark from the self-scanned or self-photographed images. Measurement plane. However, since the first three-dimensional point cloud image includes the reference measurement plane on which the object to be measured is based, the electronic device can determine the reference measurement plane in the self-scanned or self-shot image based on the reference measurement plane in the first three-dimensional point cloud image.
  • the electronic device may determine the intersection point (ie, the measurement starting point) of one end of the object to be measured and the reference measurement plane in the self-scanning or self-photographing image.
  • the electronic device after the electronic device generates the second three-dimensional point cloud image according to the self-scanned or self-photographed image, since the electronic device is not easy to rotate or cannot be rotated, or the camera of the electronic device is not easy to rotate or cannot be rotated, it scans or cannot be rotated by itself.
  • the information in the captured image is limited, so the information in the second three-dimensional point cloud image is limited, and the electronic device cannot determine the reference measurement plane only from the second three-dimensional point cloud image.
  • the electronic device since the first three-dimensional point cloud image includes the reference measurement plane on which the object to be measured is based, the electronic device may determine the reference measurement plane in the second three-dimensional point cloud image based on the reference measurement plane in the first three-dimensional point cloud image.
  • the first three-dimensional point cloud image can be understood as a complete set.
  • the second three-dimensional point cloud image can be understood as a subset of the full set of the first three-dimensional point cloud image.
  • the electronic device fuses and matches the first three-dimensional point cloud image and the second three-dimensional point cloud image, and determines the baseline measurement plane in the second three-dimensional point cloud image according to the baseline measurement plane in the first three-dimensional point cloud image.
  • the electronic device can identify the reference measurement plane in the second 3D point cloud image accordingly.
  • the electronic device may identify the measurement starting point in the reference measurement plane of the second three-dimensional point cloud image.
  • FIG. 4 shows a user interface for measuring the height of a person by an electronic device. As shown in Figure 4, the position of the indicator is the starting point of measurement.
  • the electronic device may determine the intersection point (ie, the measurement starting point) of one end of the object to be measured and the reference measurement plane.
  • the object to be measured must stand on the reference measurement plane, it is also not necessary to determine the intersection point between one end of the object to be measured and the reference measurement plane.
  • the reference measurement plane may be the ground plane.
  • the ground plane can be the ground plane of any floor, such as the ground plane of the first floor, the ground plane of the second floor, and the ground plane of the third floor.
  • the electronic device automatically obtains the measurement end point of the object to be measured, and determines the length of the object to be measured according to the measurement reference plane and the measurement end point in the self-scanning or self-photographed image.
  • the self-scanned or self-photographed image may include the measurement end point of the object to be measured.
  • the electronic device obtains the measurement end point of the object to be measured from the self-scanned or self-shot image.
  • the second three-dimensional point cloud map may include the measurement end point of the object to be measured.
  • the electronic device acquires the measurement end point of the object to be measured from the second three-dimensional point cloud image.
  • the object to be measured is a person
  • the measurement end point is the position of the top of the person's head or the position of the person's eyes.
  • the height of the object to be measured can be obtained from the self-scanned or self-photographed image, according to the measurement start point and measurement end point, using AR measurement.
  • the height of the person to be measured can be estimated according to the average distance between the human eye and the top of the head obtained by statistics. Specifically, the statistically obtained average distance from the human eye to the top of the head is generally between 10cm-12cm. In the embodiment of the present application, the average distance from the human eye to the top of the head may be 10 cm, 11 cm or 12 cm.
  • the height of the person to be measured can be obtained by adding the average distance from the human eye to the top of the head and the distance between the reference measurement plane and the human eye. Electronic devices can then display a person's height. Alternatively, the electronic device can also play the height of the person by voice.
  • the electronic device automatically obtains the measurement end point of the object to be measured, and determines the length of the object to be measured according to the measurement reference plane and the measurement end point in the second three-dimensional point cloud image.
  • the object to be measured is a person
  • the measurement end point is the position of the top of the person's head or the position of the person's eyes.
  • the height of the object to be measured can be obtained from the second three-dimensional point cloud image, according to the measurement start point and the measurement end point, using AR measurement.
  • the height of the person to be measured can be estimated according to the average distance between the human eye and the top of the head obtained by statistics. Specifically, the statistically obtained average distance from the human eye to the top of the head is generally between 10cm-12cm. In the embodiment of the present application, the average distance from the human eye to the top of the head may be 10 cm, 11 cm or 12 cm.
  • the height of the person to be measured can be obtained by adding the average distance from the human eye to the top of the head and the distance between the reference measurement plane and the human eye. Electronic devices can then display a person's height. Alternatively, the electronic device can also play the height of the person by voice.
  • the value of the average distance from the human eye to the top of the head may also be other values, which is not limited in the embodiment of the present application.
  • the electronic device may, through self-scanning or self-photographed images, decide on its own that the measurement end point is the position of the top of the person's head or the position of the person's eyes. Specifically, if the person is close to the electronic device and the electronic device fails to scan or photograph the top of the person's head, but scans or photographs the person's eyes, the position of the person's eyes is used as the measurement end point. If the person is far away from the electronic device, and the electronic device scans or captures the top of the person's head, the position of the top of the person's head is used as the measurement end point.
  • the electronic device can remind the person to adjust the distance between the electronic device and the camera of the electronic device until the electronic device can scan or photograph the top of the person's head or the person's eyes; In another way, the electronic device can lift its own camera to look for the top of the person's head or the person's eyes. If it is found within the preset time period, it will be processed according to the above method; if it cannot be found within the preset time period, Then the electronic device can remind the person to adjust the distance between it and the camera of the electronic device until the electronic device can scan or photograph the top of the person's head or the person's eyes. If the electronic device scans or photographs the top of a person's head and eyes, the position of the top of the person's head may be selected as the measurement end point, and the position of the person's eyes may also be selected as the measurement end point.
  • S301-S304 do not have to be executed every time, but only need to be executed once at the beginning. Subsequently, as long as the reference measurement plane (eg, the ground plane) of the space in which the electronic device is located does not change, there is no need to perform it. For example, if the electronic device is fixed on the wall of the living room, after executing S301-S304 once, the electronic device is still fixed on the wall in the living room. As long as the ground plane of the living room does not change, there is no need to execute S301-S304 again next time, and execute directly S305-S307 can be used.
  • the reference measurement plane eg, the ground plane
  • S301-S304 need to be re-executed.
  • S303 can also be replaced with: after receiving a user input, the mobile device acquires the first three-dimensional point cloud image of the surrounding environment of the electronic device; and then executes S304-S307. At this time, before S304, there is no need to execute S301-S303. That is, the replaced method provided by this embodiment does not include S301-S303, but only includes S304 after replacement and S305-S307 shown in FIG. 3 . Likewise, the replaced S303 does not need to be executed every time. Only execute it once at the beginning. Subsequently, as long as the reference measurement plane (eg, the ground plane) of the space in which the electronic device is located does not change, there is no need to perform it.
  • the reference measurement plane eg, the ground plane
  • the electronic device can also send information such as the length of the object to be measured (for example, at least one of the current time, self-scanned or self-photographed images, etc.) to the electronic device.
  • information such as the length of the object to be measured (for example, at least one of the current time, self-scanned or self-photographed images, etc.) to the electronic device.
  • Mobile device or other remote device Other remote devices and electronic devices can be pre-bound. In this way, the above-mentioned information can also be viewed or stored by other remote devices.
  • Other remote devices can be servers or smart devices.
  • the present application provides a method for measuring length, an electronic device and a mobile device.
  • Electronic devices and mobile devices communicate wirelessly. Alternatively, both can be in the same local area network.
  • the camera of the mobile device is used to scan and establish a first three-dimensional point cloud image of the surrounding environment of the electronic device (the surrounding environment of the electronic device includes the reference measurement plane on which the object to be measured is based; optionally, it may also include object to be measured and/or electronic device); and determine the reference measurement plane in the first 3D point cloud, and the mobile device sends the first 3D point cloud and the position of the reference measurement plane in the first 3D point cloud to the electronic device.
  • the electronic device After the electronic device scans or self-shoots the image of the object to be measured and the plane on which the object to be measured is based, the electronic device scans or shoots itself based on the first three-dimensional point cloud image, the reference measurement plane in the first three-dimensional point cloud image, and the above-mentioned self-scanning or self-shooting. It can determine the reference measurement plane in the self-scanned or self-shot image, so as to determine the reference measurement plane of the object to be measured in the self-scanned or self-shot image; the electronic device can determine the reference measurement plane from the self-scanned or self-shot image.
  • the electronic device determines that the contact end of the object to be measured and the reference measurement plane is one end of the object to be measured; the electronic device automatically identifies the other end of the object to be measured; and gives the length between the two ends of the object to be measured. In this way, the electronic device can accurately measure the length of the object to be measured. In this way, even if the electronic device with display and camera is fixed on the wall, on the car, etc., or the size of the display is large (for example, the size of the display is more than 14 inches), it can be measured by AR installed on the electronic device App or integrated AR measurement function for accurate AR measurement. User experience is also improved.
  • the method provided in the embodiment of the present application can not only measure a single size of the object to be measured, but also further measure the area, volume, etc. of the object to be measured based on the measured single size, which is not limited in this embodiment of the present application.
  • Embodiments of the method for measuring length provided by the embodiments of the present application are described above with reference to FIGS. 1 to 4 .
  • the hardware structures of the electronic device and the mobile device provided by the embodiments of the present application are described below.
  • the electronic device provided by the embodiments of the present application includes a display screen and a camera.
  • the camera may be a ToF camera or a camera other than the ToF camera.
  • the electronic device can be divided into functional modules according to the above method.
  • each function may be divided into various function modules, or two or more functions may be integrated into one processing module.
  • the above-mentioned integrated modules can be implemented in the form of hardware. It should be noted that the division of modules in this embodiment is schematic, and is only a logical function division, and other division methods may be used in actual implementation. It should be noted that, the relevant content of each step involved in the above method embodiments can be cited in the functional description of the corresponding functional module, and details are not repeated here.
  • the electronic device provided in this embodiment is used to execute the above-mentioned method for measuring length, and thus can achieve the same effect as the above-mentioned implementation method.
  • the electronic device may include a processing module, a memory module and a communication module.
  • the processing module may be used to control and manage the actions of the electronic device. For example, it may be used to support the electronic device to perform the steps performed by the processing unit.
  • a memory module may be used to support the execution of stored program code and data, among others.
  • the communication module can be used for the communication between the electronic device and other devices (eg, with the mobile device).
  • the processing module may be a processor or a controller. It may implement or execute the various exemplary logical blocks, modules and circuits described in connection with this disclosure.
  • the processor may also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of digital signal processing (DSP) and a microprocessor, and the like.
  • the storage module may be a memory.
  • the communication module may specifically be a device that interacts with other electronic devices, such as a radio frequency circuit, a Bluetooth chip, and a Wi-Fi chip.
  • FIG. 5 shows the hardware architecture of the electronic device provided by the embodiment of the present application.
  • the electronic device 400 may include a processor 410 , an external memory interface 420 , an internal memory 430 , a universal serial bus (USB) interface 440 , a charge management module 450 , a power management module 451 , and a battery 452 , Antenna 1, Antenna 2 (optional), wireless communication module 460, sensor module 470, display screen 480, camera 490.
  • the camera 490 may be a ToF camera, or may be other cameras than the ToF camera.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the electronic device 400 .
  • the electronic device 400 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • Processor 410 may include one or more processing units.
  • the processor 410 may include an application processor (application processor, AP), a modem processor, a graphics processor (graphics processing unit, GPU), an image signal processor (image signal processor, ISP), a controller, a video Codec, digital signal processor (digital signal processor, DSP), baseband processor, and/or neural-network processing unit (neural-network processing unit, NPU), etc.
  • application processor application processor
  • AP application processor
  • modem processor graphics processor
  • image signal processor image signal processor
  • ISP image signal processor
  • controller a video Codec
  • digital signal processor digital signal processor
  • DSP digital signal processor
  • baseband processor baseband processor
  • neural-network processing unit neural-network processing unit
  • NPU neural-network processing unit
  • different processing units may be independent components, or may be integrated in one or more processors.
  • electronic device 400 may also include one or more processors 410 .
  • the controller can generate an operation control signal according to the instruction operation code and
  • processor 410 may include one or more interfaces.
  • the interface may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (pulse code modulation, PCM) interface, a universal asynchronous receiver (universal asynchronous receiver) /transmitter, UART) interface, mobile industry processor interface (MIPI), general-purpose input/output (GPIO) interface, SIM card interface, and/or USB interface, etc.
  • the USB interface 440 is an interface that conforms to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, and the like. The USB interface 440 may be used to transfer data between the electronic device 400 and peripheral devices.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the electronic device 400 .
  • the electronic device 400 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the wireless communication function of the electronic device 400 may be implemented by the antenna 1, the antenna 2, the wireless communication module 460, and the like.
  • the wireless communication module 460 can provide Wi-Fi (including Wi-Fi perception and Wi-Fi AP), Bluetooth (Bluetooth, BT), and wireless data transmission modules (for example, 433MHz, 868MHz, 915MHz) applied on the electronic device 400 and other wireless communication solutions.
  • the wireless communication module 460 may be one or more devices integrating at least one communication processing module.
  • the wireless communication module 460 receives the electromagnetic wave via the antenna 1 or the antenna 2 (or, the antenna 1 and the antenna 2 ), filters and frequency modulates the electromagnetic wave signal, and sends the processed signal to the processor 410 .
  • the wireless communication module 460 can also receive the signal to be sent from the processor 410, perform frequency modulation on it, amplify it, and convert it into electromagnetic waves for radiation through the antenna 1 or the antenna 2.
  • the external memory interface 420 can be used to connect an external memory card, such as a Micro SD card, to expand the storage capacity of the electronic device 400.
  • the external memory card communicates with the processor 410 through the external memory interface 420 to realize the data storage function. For example to save files like music, video etc in external memory card.
  • Internal memory 430 may be used to store one or more computer programs including instructions.
  • the processor 410 may execute the above-mentioned instructions stored in the internal memory 430, thereby causing the electronic device 400 to execute the methods provided in some embodiments of the present application, as well as various applications and data processing.
  • Internal memory 430 may include code storage areas and data storage areas. Among them, the code storage area can store the operating system.
  • the data storage area may store data and the like created during the use of the electronic device 400 .
  • the internal memory 430 may include high-speed random access memory, and may also include non-volatile memory, such as one or more disk storage components, flash memory components, universal flash storage (UFS), and the like.
  • the processor 410 may cause the electronic device 400 to execute the instructions provided in the embodiments of the present application by executing the instructions stored in the internal memory 430 and/or the instructions stored in the memory provided in the processor 410 methods, and other applications and data processing.
  • the camera 490 can capture pictures or images in real time, and the camera 490 can also be raised and lowered on the electronic device 400 , that is, the position of the camera 490 can be changed.
  • FIG. 6 shows the hardware architecture of the mobile device provided by the embodiment of the present application.
  • the mobile device 500 may include a processor 510, an external memory interface 520, an internal memory 530, a USB interface 540, a charging management module 550, a power management module 551, a battery 552, a wireless communication module 560, a sensor module 570, Display screen 580, camera 590, etc.
  • the camera 590 is a ToF camera.
  • the user can use the mobile device 500 to complete the measurement of the length of the object to be measured.
  • the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the mobile device 500 .
  • the mobile device 500 may include more or less components than shown, or combine some components, or separate some components, or arrange different components.
  • the illustrated components may be implemented in hardware, software, or a combination of software and hardware.
  • the interface connection relationship between the modules illustrated in the embodiments of the present application is only a schematic illustration, and does not constitute a structural limitation of the mobile device 500 .
  • the mobile device 500 may also adopt different interface connection manners in the foregoing embodiments, or a combination of multiple interface connection manners.
  • the mobile device provided by the embodiment of the present application is used to execute the above-mentioned method for measuring length, and thus can achieve the same effect as the above-mentioned implementation method.
  • the mobile device may include a processing module, a storage module and a communication module.
  • the processing module may be used to control and manage the actions of the mobile device. For example, it may be used to enable a mobile device to perform steps performed by a processing unit.
  • a memory module may be used to support the execution of stored program code and data, among others.
  • the communication module can be used for communication between the mobile device and other devices (eg, with electronic devices).
  • the embodiments of the present application also provide a system for measuring length, the system including: the electronic device and the mobile device in the above method example.
  • the embodiment of the present application further provides a computer-readable storage medium for storing a computer program, where the computer program is used to execute the length measurement method provided by the above-mentioned embodiment of the present application.
  • the computer-readable medium may be a read-only memory (read-only memory, ROM) or a random access memory (random access memory, RAM), which is not limited in this embodiment of the present application.
  • the present application also provides a computer program product, which, when executed, causes the electronic device and the mobile device to perform corresponding operations corresponding to the above methods.
  • Embodiments of the present application also provide a chip in a communication device, the chip includes: a processing unit and a communication unit, where the processing unit may be, for example, a processor; the communication unit may be, for example, an input/output interface, a pin, or a circuit.
  • the processing unit can execute a computer program, so that the communication device executes the length measurement method provided by the above embodiments of the present application.
  • the computer program is stored in the storage unit.
  • the storage unit is a storage unit in the chip, such as a register, a cache, etc.
  • the storage unit can also be a storage unit in the terminal located outside the chip, such as a read-only memory (read-only memory, ROM) or can store static Other types of static storage devices for information and instructions, random access memory (RAM), etc.
  • the processor mentioned in any one of the above may be a CPU, a microprocessor, an ASIC, or one or more integrated circuits for controlling the program execution of the above-mentioned transmission method of feedback information.
  • the processing unit and the storage unit can be decoupled and set on different physical devices respectively, and the respective functions of the processing unit and the storage unit can be realized through wired or wireless connection, so as to support the system chip to realize the various functions in the above embodiments .
  • the processing unit and the memory may be coupled on the same device.
  • Units described as separate components may or may not be physically separate.
  • a component shown as a unit can be one physical unit or multiple physical units. That is, it can be located in one place, or it can be distributed in many different places. According to actual needs, some or all of the units can be selected to achieve the purpose of this scheme.
  • each functional unit in the various embodiments of the present application may be integrated in a processing unit; may also exist physically independently; or some units may be integrated in one unit, and some units may physically exist independently.
  • the above-mentioned integrated units may be implemented in the form of hardware, or may be implemented in the form of software functional units.
  • the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it may be stored in a readable storage medium. Based on such understanding, all or part of the technical solutions of the embodiments of the present application may be embodied in the form of software products.
  • the software product is stored on a storage medium.
  • the software product includes several instructions for causing a device (which may be a single chip microcomputer, a chip, etc.) or a processor (processor) to execute all or part of the steps of the methods of the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, removable hard disk, ROM, RAM, magnetic disk or optical disk and other media that can store program codes.

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Electromagnetism (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Remote Sensing (AREA)
  • Geometry (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

一种电子设备包括:处理器,存储器,摄像头及存储在存储器上的计算机程序。当计算机程序被处理器执行时,使得电子设备执行:向移动设备发送请求消息,用于请求获取电子设备周围环境的第一三维点云图(S301),移动设备接收到该请求消息后,根据用户输入确定是否获取电子设备周围环境的第一三维点云图(S302),在用户输入指示同意后,通过摄像头扫描获取电子设备周围环境的第一三维点云图(S303),将第一三维点云图发送给电子设备(S304),电子设备利用自身摄像头自行扫描或拍摄图像,自行扫描或拍摄的图像包括待测量对象和待测量对象基于的平面(S305),根据自行扫描或拍摄的图像、第一三维点云图,获取待测量对象在自行扫描或拍摄的图像中的基准测量平面(S306),自动获取待测量对象的测量终点,根据自行扫描或拍摄图像中的测量基准平面和测量终点,获取待测量对象的长度(S307)。还提供一种测量长度的方法、一种计算机可读存储介质以及一种计算机程序产品。

Description

一种测量长度的方法、电子设备以及移动设备
本申请要求于2021年3月9日提交国家知识产权局、申请号为202110255036.4、申请名称为“一种测量长度的方法、电子设备以及移动设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及通信领域,更为具体的,涉及一种测量长度的方法、电子设备以及移动设备。
背景技术
随着电子设备的智能化程度提高,增强现实(augmented reality,AR)类型的应用越来越广泛。具有显示屏和摄像头的电子设备,有些固定安装在墙上、车上等,有些由于显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上),有些是上述两者兼具。即使该电子设备安装AR测量应用,或者集成AR测量功能,由于该电子设备或该电子设备上的摄像头不易转动甚至不能转动(比如,有些电子设备上的摄像头只能升降),进而使得电子设备的AR测量应用或AR测量功能无法准确识别出基准测量平面,进而使得电子设备的AR测量结果的准确率低,用户体验较差。
发明内容
为了解决上述的技术问题,本申请提供了一种测量长度的方法、电子设备以及移动设备。本申请提供的技术方案,通过移动设备的辅助,准确识别出基准测量平面,进而准确地完成测量,尤其便于测量对象的高度等,提高用户体验。
第一方面,提供一种电子设备。电子设备与移动设备无线通信,且两者处于同一空间(例如,同一房间)。电子设备包括:处理器,存储器,摄像头及计算机程序;计算机程序存储在存储器上,当计算机程序被处理器执行时,使得电子设备执行:接收到来自移动设备的告知消息,告知消息包括第一图像;获取到待测量对象在第一图像中基于的第一基准测量平面;自行扫描或自行拍摄第二图像;第二图像包括待测量对象和待测量对象基于的平面;根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二图像中的第二基准测量平面;自动获取第二图像中待测量对象的测量终点,根据第二图像中的第二基准测量平面和测量终点,获取待测量对象的长度;输出待测量对象的长度,或者,输出调整后的待测量对象的长度。这样,即使具有显示屏和摄像头的电子设备,固定安装在墙上、车上等,或者显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上)不易转动或不能转动,也能通过借助移动设备易于转动的特性,使得电子设备准确地进行AR测量。用户体验也得以改善。
可替换地,提供一种电子设备。电子设备与移动设备无线通信,且两者处于同一空间(例如,同一房间)。电子设备包括:处理器,存储器,摄像头及计算机程序;计 算机程序存储在存储器上,当计算机程序被处理器执行时,使得电子设备执行:自行扫描或自行拍摄第二图像;第二图像包括待测量对象和待测量对象基于的平面;接收到来自移动设备的告知消息,告知消息包括第一图像;获取到待测量对象在第一图像中基于的第一基准测量平面;根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二图像中的第二基准测量平面;自动获取第二图像中待测量对象的测量终点,根据第二图像中的第二基准测量平面和测量终点,获取待测量对象的长度;输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
示例性地,电子设备上的摄像头为飞行时间(time of flight,ToF)摄像头(也称深度摄像头)。
示例性地,电子设备上安装有AR测量类的APP,或者,集成有AR测量功能。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
根据第一方面,或者以上第一方面的任意一种实现方式,告知消息中的第一图像可以为电子设备周围环境的第一三维点云图。第一三维点云图包括待测量对象基于的基准测量平面。第一图像中的第一基准测量平面可以为第一三维点云图包括的待测量对象基于的基准测量平面。
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备还执行:根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图;第二三维点云图包括待测量对象和待测量对象基于的平面;根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二三维点云图中的第二基准测量平面;自动获取第二三维点云图中待测量对象的测量终点,根据第二三维点云图中的第二基准测量平面和测量终点,获取待测量对象的长度;输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备还执行:根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图,第二三维点云图包括待测量对象和待测量对象基于的平面;根据第一三维点云图中和第二三维点云图,确定待测量对象在第二三维点云图中的基准测量平面,在第二三维点云图中的基准测量平面中确定测量起点;在第二三维点云图中确定待测量对象的测量终点;根据第二三维点云图中的测量起点以及测量终点,确定待测量对象的长度。
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备还执行:向移动设备发送请求消息,请求消息用于请求获取电子设备周围环境的第一三维点云图;接收移动设备发送的第一三维点云图。
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备还包括显示屏;电子设备还执行:在显示屏中显示自行扫描或自行拍摄的图像。
根据第一方面,或者以上第一方面的任意一种实现方式,待测量对象为待测量人,电子设备还执行:确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;识别出自行扫描或自行拍摄的图像中待测量人的眼睛位置;在第二三维点云图中确定基准测量平面和眼睛位置之间的距离;根据基准测量平面和眼睛位置在第二三维点云图中的位置坐标,确定基准测量平面和眼睛位置之间的 距离;根据基准测量平面和眼睛位置之间的距离以及预设的距离值,确定待测量人的身高,预设的距离值为眼睛到头顶的距离值。
根据第一方面,或者以上第一方面的任意一种实现方式,待测量对象为待测量人,电子设备还执行:确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;识别出自行扫描或自行拍摄的图像中待测量人的头顶位置;在第二三维点云图中确定基准测量平面和头顶位置之间的距离;根据基准测量平面和头顶位置在第二三维点云图中的位置坐标,确定待测量人的身高。
根据第一方面,或者以上第一方面的任意一种实现方式,电子设备还执行:根据第二图像中的测量终点到第二基准测量平面的垂直距离,获取测量对象的长度;或者,获取第二图像中的测量起点,测量起点为第二基准测量平面与待测量对象的交点;根据第二图像中的测量起点和测量终点,获取待测量对象的长度。
根据第一方面,或者以上第一方面的任意一种实现方式,待测量对象为待测量人,测量终点为人的眼睛位置;电子设备还执行:获取测量终点到第二基准测量平面的垂直距离,输出垂直距离与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离;或者,获取测量起点与测量终点之间的长度,输出长度与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离。
根据第一方面,或者以上第一方面的任意一种实现方式,待测量对象为待测量人,测量终点为人的头顶位置;电子设备还执行以下步骤:输出测量终点到第二基准测量平面的垂直距离;或者,输出测量起点与测量终点之间的长度。
根据第一方面,或者以上第一方面的任意一种实现方式,在接收移动设备发送的第一三维点云图后,电子设备还执行以下步骤:接收用户的第一操作,第一操作用于启动测量待测量对象的长度。
根据第一方面,或者以上第一方面的任意一种实现方式,第一三维点云图包括电子设备所在的环境中的地面信息。
根据第一方面,或者以上第一方面的任意一种实现方式,所述第一基准测量平面和所述待测量对象基于的平面为同一平面。
第二方面,提供了一种移动设备。移动设备与电子设备无线通信;移动设备与电子设备处于同一空间(例如,同一房间)。移动设备包括:处理器,存储器,ToF摄像头,以及计算机程序,计算机程序存储在存储器上,当计算机程序被处理器执行时,使得移动设备执行:接收到来自电子设备的请求消息;请求消息用于请求获取第一图像;第一图像为电子设备的周围环境的第一三维点云图;接收到一个用户输入;用户输入用于指示获取电子设备的周围环境的第一三维点云图;响应于用户输入,利用ToF摄像头扫描电子设备的周围环境,获取第一三维点云图;向电子设备发送第一三维点云图。
可替换地,提供了一种移动设备。移动设备与电子设备无线通信;移动设备与电子设备处于同一空间(例如,同一房间)。移动设备包括:处理器,存储器,ToF摄像头,以及计算机程序,计算机程序存储在存储器上,当计算机程序被处理器执行时,当计算机程序被处理器执行时,使得移动设备执行:接收到一个用户输入;用户输入用于指示获取电子设备的周围环境的第一三维点云图;响应于用户输入,利用ToF摄 像头扫描电子设备的周围环境,获取第一三维点云图;向电子设备发送第一三维点云图。
示例性地,移动设备可以包括以下的至少一种:智能手机、平板电脑。
第二方面提供的移动设备,通过扫描电子设备周围的环境图像生成电子设备周围环境的第一三维点云图,并将第一三维点云图发送给电子设备,可以使得电子设备可以拍摄周围环境自行扫描或自行拍摄的图像,确定自行扫描或自行拍摄的图像中的需要测量的物体在第一三维点云图中所在的平面,即确定出基准测量平面,从而解决了电子设备上的摄像头无法识别到被测测物体在三维点云图中所在的平面的问题,实现了利用电子设备测量对象的长度等,提高用户体验。
根据第二方面,或者以上第二方面的任意一种实现方式,第一三维点云图包括电子设备所在的环境中的地面信息。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
根据第二方面,或者以上第二方面的任意一种实现方式,移动设备还包括显示屏;移动设备执行:在显示屏上显示电子设备周围的环境图像。
示例性地,移动设备上安装有AR测量类的APP,或者,集成有AR测量功能。移动设备上的摄像头为ToF(time of flight)摄像头。
第三方面,提供一种测量长度的方法,应用于电子设备。电子设备与移动设备无线通信,且两者处于同一空间。电子设备包括摄像头。该方法包括:电子设备接收到来自移动设备的告知消息;告知消息包括第一图像;电子设备获取到待测量对象在第一图像中基于的第一基准测量平面;电子设备自行扫描或自行拍摄第二图像;第二图像包括待测量对象和待测量对象基于的平面;电子设备根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二图像中的第二基准测量平面;电子设备自动获取第二图像中待测量对象的测量终点,电子设备根据第二图像中的第二基准测量平面和测量终点,获取待测量对象的长度;电子设备输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
可替换地,提供一种测量长度的方法,应用于电子设备。电子设备与移动设备无线通信,且两者处于同一空间。电子设备包括摄像头。该方法包括:自行扫描或自行拍摄第二图像;第二图像包括待测量对象和待测量对象基于的平面;接收到来自移动设备的告知消息,告知消息包括第一图像;获取到待测量对象在第一图像中基于的第一基准测量平面;根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二图像中的第二基准测量平面;自动获取第二图像中待测量对象的测量终点,根据第二图像中的第二基准测量平面和测量终点,获取待测量对象的长度;输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
示例性地,电子设备上的摄像头为ToF(time of flight)摄像头。
示例性地,电子设备上安装有AR测量类的APP,或者,集成有AR测量功能。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
根据第三方面,或者以上第三方面的任意一种实现方式,告知消息中的第一图像 可以为电子设备周围环境的第一三维点云图。第一三维点云图包括待测量对象基于的基准测量平面。第一图像中的第一基准测量平面可以为第一三维点云图包括的待测量对象基于的基准测量平面。
根据第三方面,或者以上第一方面的任意一种实现方式,该方法还包括:电子设备根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图,第二三维点云图包括待测量对象和待测量对象基于的平面;电子设备根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二三维点云图中的第二基准测量平面;电子设备自动获取第二三维点云图中待测量对象的测量终点;电子设备根据第二三维点云图中的第二基准测量平面和测量终点,获取待测量对象的长度;电子设备输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
根据第三方面,或者以上第三方面的任意一种实现方式,该方法还包括:电子设备根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图,第二三维点云图包括待测量对象和待测量对象基于的平面;电子设备根据第一三维点云图中和第二三维点云图,确定待测量对象在第二三维点云图中的基准测量平面;电子设备在第二三维点云图中的基准测量平面中确定测量起点;电子设备在第二三维点云图中确定待测量对象的测量终点;电子设备根据第二三维点云图中的测量起点以及测量终点,确定待测量对象的长度。
根据第三方面,或者以上第三方面的任意一种实现方式,该方法还包括:电子设备向移动设备发送请求消息,请求消息用于请求获取电子设备周围环境的第一三维点云图;电子设备接收移动设备发送的第一三维点云图。
根据第三方面,或者以上第三方面的任意一种实现方式,电子设备还包括显示屏,该方法还包括:电子设备在显示屏中显示自行扫描或自行拍摄的图像。
根据第三方面,或者以上第三方面的任意一种实现方式,待测量对象为待测量人,方法还包括:电子设备确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;电子设备识别出自行扫描或自行拍摄的图像中待测量人的眼睛位置;电子设备在第二三维点云图中确定基准测量平面和眼睛位置之间的距离;电子设备根据基准测量平面和眼睛位置在第二三维点云图中的位置坐标,确定基准测量平面和眼睛位置之间的距离;电子设备根据基准测量平面和眼睛位置之间的距离以及预设的距离值,确定待测量人的身高,预设的距离值为眼睛到头顶的距离值。
根据第三方面,或者以上第三方面的任意一种实现方式,待测量对象为待测量人,方法还包括:电子设备确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;电子设备识别出自行扫描或自行拍摄的图像中待测量人的头顶位置;电子设备在第二三维点云图中确定基准测量平面和头顶位置之间的距离;电子设备根据基准测量平面和头顶位置在第二三维点云图中的位置坐标,确定待测量人的身高。
根据第三方面,或者以上第三方面的任意一种实现方式,该方法还包括:电子设备根据第二图像中的测量终点到第二基准测量平面的垂直距离,获取待测量对象的长度;或者,获取第二图像中的测量起点,测量起点为第二基准测量平面与待测量对象 的交点;电子设备根据第二图像中的测量起点和测量终点,获取待测量对象的长度。
根据第三方面,或者以上第三方面的任意一种实现方式,待测量对象为待测量人,该测量终点为人的眼睛位置;该方法还包括:电子设备获取测量终点到第二基准测量平面的垂直距离,输出垂直距离与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离;或者,电子设备获取测量起点与测量终点之间的长度,输出该长度与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离。
根据第三方面,或者以上第三方面的任意一种实现方式,待测量对象为待测量人,测量终点为人的头顶位置;该方法还包括:电子设备输出测量终点到第二基准测量平面的垂直距离;或者,电子设备输出测量起点与测量终点之间的长度。
根据第三方面,或者以上第三方面的任意一种实现方式,在电子设备接收移动设备发送的第一三维点云图后,该方法还包括:电子设备接收用户的第一操作,第一操作用于启动测量待测量对象的长度。
根据第三方面,或者以上第三方面的任意一种实现方式,第一三维点云图包括电子设备所在的环境中的地面信息。
第三方面以及第三方面的任意一种实施方式所对应的技术效果,请参见上述第一方面以及第一方面的任意一种实施方式所对应的技术效果。
第四方面,提供了一种测量长度的方法,该方法应用于移动设备。移动设备与电子设备无线通信,且两者处于同一空间(例如,同一房间)。移动设备包括显示屏和ToF摄像头;该方法包括:移动设备接收到来自电子设备的请求消息;请求消息用于请求获取第一图像;第一图像为电子设备的周围环境的第一三维点云图;移动设备接收到一个用户输入;用户输入用于指示获取电子设备的周围环境的第一三维点云图;移动设备响应于该用户输入,利用ToF摄像头扫描电子设备的周围环境,获取第一三维点云图;移动设备向电子设备发送第一三维点云图。
可替换地,提供了一种测量长度的方法,该方法应用于移动设备。移动设备与电子设备无线通信,且两者处于同一空间(例如,同一房间)。移动设备包括显示屏和ToF摄像头。该方法包括:接收到一个用户输入;用户输入用于指示获取电子设备的周围环境的第一三维点云图;响应于用户输入,利用ToF摄像头扫描电子设备的周围环境,获取第一三维点云图;向电子设备发送第一三维点云图。
示例性地,移动设备包括以下至少一种:智能手机、平板电脑。
根据第四方面,第一三维点云图包括电子设备所在的环境中的地面信息。
根据第四方面,或者以上第四方面的任意一种实现方式,该方法还包括:移动设备在显示屏上显示电子设备周围的环境图像。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
第四方面以及第四方面的任意一种实施方式所对应的技术效果,请参见上述第二方面以及第二方面的任意一种实施方式所对应的技术效果。
第五方面,提供了一种测量长度的方法,该方法应用于测量系统。测量系统包括移动设备和电子设备,电子设备与移动设备无线通信,且两者处于同一空间。移动设 备包括第一显示屏和ToF摄像头;电子设备包括第二显示屏和第二摄像头;该方法包括:移动设备接收到来自电子设备的请求消息;请求消息用于请求获取第一图像;第一图像为电子设备的周围环境的第一三维点云图;移动设备接收到一个用户输入;用户输入用于指示获取电子设备的周围环境的第一三维点云图;响应于用户输入,利用ToF摄像头扫描电子设备的周围环境,获取第一三维点云图;移动设备向电子设备发送第一三维点云图。电子设备获取到待测量对象在第一图像中基于的第一基准测量平面;电子设备利用第二摄像头拍摄自行扫描或自行拍摄第二图像,自行扫描或自行拍摄的第二图像包括待测量对象和待测量对象基于的平面;电子设备根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二图像中的第二基准测量平面;电子设备自动获取第二图像中待测量对象的测量终点,电子设备根据第二图像中的第二基准测量平面和测量终点,获取待测量对象的长度;电子设备输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
示例性地,电子设备上的第二摄像头为ToF(time of flight)摄像头。
示例性地,电子设备上安装有AR测量类的APP,或者,集成有AR测量功能。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
示例性地,移动设备包括以下的至少一种:智能手机、平板电脑。
根据第五方面,或者以上第五方面的任意一种实现方式,该方法还包括:电子设备根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图,第二三维点云图包括待测量对象和待测量对象基于的平面;电子设备根据第一基准测量平面以及待测量对象基于的平面,获取到待测量对象基于的平面为第二三维点云图中的第二基准测量平面;电子设备自动获取第二三维点云图中待测量对象的测量终点;电子设备根据第二三维点云图中的第二基准测量平面和测量终点,获取待测量对象的长度;电子设备输出待测量对象的长度,或者,输出调整后的待测量对象的长度。
根据第五方面,或者以上第五方面的任意一种实现方式,该方法还包括:电子设备根据自行扫描或自行拍摄的图像,生成自行扫描或自行拍摄的图像对应的第二三维点云图,第二三维点云图包括待测量对象和待测量对象基于的平面;电子设备根据第一三维点云图中和第二三维点云图,确定待测量对象在第二三维点云图中的基准测量平面;电子设备在第二三维点云图中的基准测量平面中确定测量起点;电子设备在第二三维点云图中确定待测量对象的测量终点;电子设备根据第二三维点云图中的测量起点以及测量终点,确定待测量对象的长度。
根据第五方面,或者以上第五方面的任意一种实现方式,该方法还包括:电子设备在第二显示屏中显示自行扫描或自行拍摄的图像。
根据第五方面,或者以上第五方面的任意一种实现方式,待测量对象为待测量人,该方法还包括:电子设备确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;电子设备识别出自行扫描或自行拍摄的图像中待测量人的眼睛位置;电子设备在第二三维点云图中确定基准测量平面和眼睛位置之间的距离;电子设备根据基准测量平面和眼睛位置在第二三维点云图中的位置坐标,确 定基准测量平面和眼睛位置之间的距离;电子设备根据基准测量平面和眼睛位置之间的距离以及预设的距离值,确定待测量人的身高,预设的距离值为眼睛到头顶的距离值。
根据第五方面,或者以上第五方面的任意一种实现方式,待测量对象为待测量人,该方法还包括:电子设备确定待测量人在第二三维点云图中的基准测量平面,基准测量平面为待测量人所站立的地平面;电子设备识别出自行扫描或自行拍摄的图像中待测量人的头顶位置;电子设备在第二三维点云图中确定基准测量平面和头顶位置之间的距离;电子设备根据基准测量平面和头顶位置在第二三维点云图中的位置坐标,确定待测量人的身高。
根据第五方面,或者以上第五方面的任意一种实现方式,该方法还包括:电子设备根据第二图像中的测量终点到第二基准测量平面的垂直距离,获取待测量对象的长度;或者,获取第二图像中的测量起点,测量起点为第二基准测量平面与待测量对象的交点;电子设备根据第二图像中的测量起点和测量终点,获取待测量对象的长度。
根据第五方面,或者以上第五方面的任意一种实现方式,待测量对象为待测量人,该测量终点为人的眼睛位置;该方法还包括:电子设备获取测量终点到第二基准测量平面的垂直距离,输出垂直距离与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离;或者,电子设备获取测量起点与测量终点之间的长度,输出该长度与第一距离之和;第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离。
根据第五方面,或者以上第五方面的任意一种实现方式,待测量对象为待测量人,测量终点为人的头顶位置;该方法还包括:电子设备输出测量终点到第二基准测量平面的垂直距离;或者,电子设备输出测量起点与测量终点之间的长度。
根据第五方面,或者以上第五方面的任意一种实现方式,在电子设备接收移动设备发送的第一三维点云图后,该方法还包括:电子设备接收用户的第一操作,第一操作用于启动测量待测量对象的长度。
根据第五方面,或者以上第五方面的任意一种实现方式,该第一三维点云图包括该电子设备所在的环境中的地面信息。
根据第五方面,或者以上第五方面的任意一种实现方式,该方法还包括:移动设备在该第一显示屏上显示该电子设备周围的环境图像。
示例性地,电子设备周围环境包括:电子设备所在环境的地面信息、以及电子设备周围环境中存在的各个物体以及各个物体的相对位置关系等。
第五方面以及第五方面的任意一种实施方式所对应的技术效果,请参见上述第三方面以及第三方面的任意一种实施方式,第四方面以及第四方面的任意一种实施方式所对应的技术效果。
第六方面,提供了一种测量长度的系统。该系统包括电子设备和移动设备,电子设备与移动设备无线通信,且两者处于同一空间(例如,同一房间)。移动设备包括第一显示屏和ToF摄像头;电子设备包括第二显示屏和第二摄像头;电子设备用于执行以上第五方面,或者以上第五方面的任意一种实现方式中由电子设备执行的步骤。移动设备用于执行以上第五方面,或者以上第五方面的任意一种实现方式中由移动设备 执行的步骤。
第六方面及第六方面中任意一种实现方式所对应的技术效果,可参见上述第五方面及第五方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第七方面,提供了一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当计算机程序被电子设备执行时,使得电子设备执行第三方面及第三方面中任意一种实施方式的方法。
第七方面以及第七方面中任意一种实现方式所对应的技术效果,可参见上述第三方面以及第三方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第八方面,提供了一种计算机可读存储介质。计算机可读存储介质存储有计算机程序(也可称为指令或代码),当计算机程序被移动设备执行时,使得移动设备执行第四方面及第四方面中任意一种实施方式的方法。
第八方面及第八方面中任意一种实施方式所对应的技术效果,可参见上述第四方面及第四方面中任意一种实施方式所对应的技术效果,此处不再赘述。
第九方面,提供了一种芯片。该芯片包括处理器和存储器,处理器用于读取并执行存储器中存储的计算机程序,以执行第三方面及第三方面任意一种实现方式的方法。
第九方面以及第九方面中任意一种实现方式所对应的技术效果,可参见上述第三方面以及第三方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十方面,提供了一种芯片。该芯片包括处理器和存储器,处理器用于读取并执行存储器中存储的计算机程序,以执行第四方面及第四方面任意一种实现方式的方法。
第十方面以及第十方面中任意一种实现方式所对应的技术效果,可参见上述第四方面及第四方面任意一种实现方式所对应的技术效果,此处不再赘述。
第十一方面,提供了一种计算机程序产品,当计算机程序产品被电子设备执行时,使得电子设备执行第三方面及第三方面任意一种实现方式的方法。
第十一方面以及第十一方面中任意一种实现方式所对应的技术效果,可参见上述第三方面以及第三方面中任意一种实现方式所对应的技术效果,此处不再赘述。
第十二方面,提供了一种计算机程序产品,当计算机程序产品被电子设备执行时,使得移动设备执行第四方面及第四方面任意一种实现方式的方法。
第十二方面以及第十二方面中任意一种实现方式所对应的技术效果,可参见上述第四方面以及第四方面中任意一种实现方式所对应的技术效果,此处不再赘述。
本申请提供的测量长度的方法,先利用移动设备的摄像头扫描并建立好电子设备周围环境的第一三维点云图(电子设备周围环境包括待测量对象基于的基准测量平面),移动设备将第一三维点云图发送给电子设备(例如,华为智慧屏)。在电子设备利用自身的摄像头获取待测量对象和待测量对象所基于的平面的图像后,基于从电子设备获取的第一三维点云图,可以确定自行扫描或自行拍摄的图像中待测量对象的基准测量平面,从而可以准确测量出诸如待测量对象高度等的尺寸。这样,即使具有显示屏和摄像头的电子设备,固定安装在墙上、车上等,或者显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上)不易转动或不能转动,也能通过借助移动设备易于转动的特性,使得电子设备准确地进行AR测量。用户体验也得以改善。
附图说明
图1为本申请实施例提供的移动设备测量时的用户界面示意图。
图2为本申请实施例提供的测量长度的方法的场景示意图。
图3为本申请实施例提供的测量长度的方法的流程示意图。
图4为本申请实施例提供的电子设备测量的用户界面示意图。
图5为本申请实施例提供的电子设备的硬件架构示意图。
图6为本申请实施例提供的移动设备的硬件架构示意图。
具体实施方式
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。
以下实施例中所使用的术语只是为了描述特定实施例的目的,而并非旨在作为对本申请的限制。如在本申请的说明书和所附权利要求书中所使用的那样,单数表达形式“一个”、“一种”、“所述”、“上述”、“该”和“这一”旨在也包括例如“一个或多个”这种表达形式,除非其上下文中明确地有相反指示。还应当理解,在本申请实施例中,“一个或多个”是指一个或两个以上(包含两个);“和/或”,描述关联对象的关联关系,表示可以存在三种关系;例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B的情况,其中A、B可以是单数或者复数。字符“/”一般表示前后关联对象是一种“或”的关系。
在本说明书中描述的参考“一个实施例”或“一些实施例”等意味着在本申请的一个或多个实施例中包括结合该实施例描述的特定特征、结构或特点。由此,在本说明书中的不同之处出现的语句“在一个实施例中”、“在一些实施例中”、“在其他一些实施例中”、“在另外一些实施例中”等不是必然都参考相同的实施例,而是意味着“一个或多个但不是所有的实施例”,除非是以其他方式另外特别强调。术语“包括”、“包含”、“具有”及它们的变形都意味着“包括但不限于”,除非是以其他方式另外特别强调。
本申请实施例涉及的多个,是指大于或等于两个。需要说明的是,在本申请实施例的描述中,“第一”、“第二”等词汇,仅用于区分描述的目的,而不能理解为指示或暗示相对重要性,也不能理解为指示或暗示顺序。
随着电子设备的智能化程度提高,增强现实(augmented reality,AR)类型的应用越来越广泛。具有显示屏和摄像头的电子设备,有些固定安装在墙上、车上等,有些由于显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上),有些是上述两者兼具。即使该电子设备安装AR测量应用,或者集成AR测量功能,由于该电子设备或该电子设备上的摄像头不易转动甚至不能转动(比如,有些电子设备上的摄像头只能升降),进而使得电子设备的AR测量应用或AR测量功能无法准确识别出基准测量平面,进而使得电子设备的AR测量结果的准确率低,用户体验较差。
移动设备由于其易于转动,通过ToF(time of flight)摄像头和AR测量应用或集成的AR测量功能,可以准确地识别出基准测量平面。
示例性地,图1为本申请实施例提供的移动设备测量时的用户界面示意图。在用户利用移动设备(以华为mate系列智能手机为例)上的AR测量待测量对象的长度时, 用户首先打开“实用工具”,选择“实用工具”中的“AR测量”,在“AR测量”中选择“长度”之后,移动设备将自动打开摄像头;用户将摄像头对准待测量对象所基于的基准测量平面(例如地面),缓缓移动智能手机寻找平面,直到智能手机的显示屏显示如图1中的a所示的指示标(中间有个点的圆形);用户缓缓移动智能手机,使得待测量对象的一端位于指示标处,如图1中的b所示,用户点击“添加起始点”图标确定测量起始点;用户缓缓移动智能手机,如图1中的c所示,在指示标移动至待测量对象的另一端的过程中,智能手机上便会显示待测量对象的长度;在指示标移动至待测量对象的另一端时,此时显示的长度即为待测量对象的长度。
这样,用户可以测量人的身高。有关操作如下:首先打开“实用工具”,选择“实用工具”中的“AR测量”,在“AR测量”中选择“长度”之后,智能手机将自动打开摄像头;用户将摄像头对准人脚下平面,缓缓移动智能手机定位平面,直到显示屏出现指示标(中间有个点的圆形);用户缓缓移动智能手机,使得人脚位于指示标处;用户点击“添加起始点”图标固定测量起始点;缓缓向上移动智能手机,当指示标移动至人的头顶后,智能手机显示的长度即为人的身高。
发明人经过研究,总结出:具有摄像头和显示屏的电子设备,由于固定安装或显示屏尺寸较大的原因,不易转动甚至不能转动,即使为该电子设备配置有ToF(time of flight)摄像头,也无法准确地识别出基准测量平面,仍然无法解决测量不准确的问题;考虑到移动设备或移动设备上的ToF(time of flight)摄像头易于转动,可以通过上述电子设备和上述移动设备的配合,解决上述技术问题,从而提高用户体验。
有鉴于此,本申请提供了一种测量长度的方法、电子设备以及移动设备。电子设备和移动设备无线通信。可选地,两者可在同一局域网中。在本申请提供的方法中,先利用移动设备的摄像头扫描并建立好电子设备周围环境的第一三维点云图(电子设备周围环境包括待测量对象基于的基准测量平面),并确定第一三维点云图中的基准测量平面,移动设备将第一三维点云图以及基准测量平面在第一三维点云图中的位置,发送给电子设备(例如,华为智慧屏)。在电子设备自行扫描或自行拍摄待测量对象和待测量对象所基于的平面的图像后,电子设备基于第一三维点云图、第一三维点云图中的基准测量平面,以及上述自行扫描或自行拍摄的图像,可以确定自行扫描或自行拍摄的图像中的基准测量平面,从而在电子设备自行扫描或自行拍摄的图像中确定待测量对象的基准测量平面;电子设备从自行扫描或自行拍摄的图像中,确定待测量对象与基准测量平面的接触端为待测量对象的一端;电子设备自动识别出待测量对象的另一端;并给出待测量对象的两端之间的长度。这样,电子设备可以准确地测量出待测量对象的长度。这样,即使具有显示屏和摄像头的电子设备,固定安装在墙上、车上等,或者显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上),也能通过电子设备安装的AR测量应用或集成的AR测量功能,准确地进行AR测量。用户体验也得以改善。
示例性地,图2为本申请实施例提供的测量长度的方法的场景示意图。如图2所示,移动设备100与电子设备200无线通信。无线通信的方式,包括但不限于以下的至少一种:蓝牙、Wi-Fi等。其中,Wi-Fi的无线通信方式可以为Wi-Fi P2P(peer to peer),也可以为同一局域网下的Wi-Fi连接。移动设备100包括ToF(time of flight)摄像头 110、显示屏120,并且移动设备100安装有AR测量类的应用程序,或者集成有AR测量的功能。摄像头110包括ToF(time of flight)摄像头。电子设备200包括摄像头220、显示屏210,并且电子设备200也安装有AR测量类的应用程序,或者集成有AR测量的功能。
示例性地,摄像头220可以安装在电子设备的显示屏210的上边缘。电子设备200和移动设备100位于同一个区域(比如,同一房间)内。可选地,电子设备200的摄像头220和移动设备100上的摄像头110均为ToF(time of flight)摄像头;或者,电子设备200上的摄像头也可以为其他的摄像头,而不是ToF(time of flight)摄像头。
应理解,在本申请实施例中,对于摄像头220在显示屏210上的位置不作限制。例如,摄像头220还可以安装在显示屏210的左边缘或者右边缘等位置。
虽然在图2中电子设备200是以具有摄像头和较大显示屏的电子设备为例,但本领域技术人员熟知的是,电子设备200也可以是固定安装的电子设备,比如车载电脑等。电子设备200可以搭载
Figure PCTCN2022079102-appb-000001
Windows、Linux或者其它操作系统。电子设备200安装AR测量类的APP,或者集成AR测量功能。示例性地,电子设备200包括但不限于智能电视、台式计算机、车载设备等。本申请实施例对此不作限定。电子设备200包括一个摄像头。示例性地,该摄像头不易转动或不能转动。示例性地,上述电子设备不易转动或不能转动。
示例性地,移动设备100包括摄像头。移动设备100安装有AR测量类的APP,或集成有AR测量功能。示例性地,移动设备100包括但不限于以下的一种:智能手机、智能耳机、平板电脑、具备无线通讯功能的可穿戴电子设备(如智能手表、智能手环、智能戒指、智能眼镜)、膝上型计算机(Laptop)等。移动设备的示例性实施例包括但不限于搭载
Figure PCTCN2022079102-appb-000002
Windows、Linux或者其它操作系统的便携式电子设备。
移动设备200和电子设备100安装的AR测量类APP可以为相同的APP,或者,也可以是不同的AR测量类APP。可选地,移动设备或电子设备的AR测量类APP或AR测量功能,可以为移动设备或电子设备出厂时就预装在设备上,或出厂时就集成在设备上的。
示例性地,图3为本申请实施例提供的测量长度的方法的流程示意图。图3所示的方法可以应用在图2所示的场景中。因为移动设备易于转动和移动,所以移动设备上的摄像头不限于能否升降,也不限于能否转动。移动设备与电子设备无线通信。无线通信的方式包括但不限于Wi-Fi,蓝牙,ZigBee等。如图3所示,该方法300包括:
S301,电子设备向移动设备发送请求消息,请求消息用于请求获取电子设备周围环境的第一三维点云图。
可选地,用户在电子设备第一次开机初始化的过程中,便触发了电子设备向移动设备发送请求消息;请求消息用于请求获取电子设备周围环境的三维点云图(以下为了便于区分,称为第一三维点云图)。在该过程中,用户仅需打开电子设备即可。
可选地,在用户将电子设备从一个房间换到另一个房间后,由于电子设备所在的周围环境发生变化,用户可以打开电子设备的AR测量类应用,此时便触发了电子设备向移动空设备发送请求消息,请求消息用于请求获取电子设备周围环境的第一三维 点云图。
可选地,在用户需要利用电子设备测量人的身高时,用户点击打开电子设备上的AR测量类型的应用,此时便触发了电子设备向移动设备发送请求消息,请求消息用于请求获取电子设备周围环境的第一三维点云图。
S302,移动设备接收到该请求消息后,根据用户输入,确定是否获取电子设备周围环境的第一三维点云图。
具体地,在移动设备接收到该请求消息后,移动设备可以在显示界面上提示用户:是否获取电子设备周围环境的第一三维点云图。用户可以点击“是”选项,表明用户同意。用户也可以点击“否”选项,表明用户拒绝。上述的“是”选项可以替换为“同意”选项等其他含义相同或相近的选项。上述的“否”选项可以替换为“拒绝”选项等其他含义相同或相近的选项。
在用户点击“是”选项后,移动设备可以执行S303。可选地,在执行S303之前,移动设备还可以向电子设备发送响应消息;响应消息用于指示移动设备同意获取电子设备的周围环境的第一三维点云图。可选地,移动设备也可以不向电子设备发送响应消息。
如果用户不同意,则用户可以点击“否”选项。可选地,用户点击“否”选项后,移动设备也可以向电子设备发送响应消息;响应消息用于指示移动设备不同意获取电子设备的周围环境的第一三维点云图。可选地,移动设备也可以不向电子设备发送响应消息。
S303,在用户输入指示同意后,移动设备通过摄像头扫描,获取电子设备周围环境的第一三维点云图。
在用户输入指示同意的情况下,移动设备显示扫描界面。用户可以拿起移动设备左右移动,利用移动设备的ToF摄像头扫描电子设备的周围环境。扫描结束后,移动设备会生成电子设备的周围环境的第一三维点云图。
可选地,用户输入可以为触摸输入,也可以为语音输入。
可选地,电子设备的周围环境包括待测量对象基于的基准测量平面。进一步地,电子设备的周围环境还可包括待测量对象。相应地,第一三维点云图包括待测量对象基于的基准测量平面、待测量对象的图像。进一步地,第一三维点云图还可包括电子设备的图像。
点云图是指通过测量仪器(例如3D摄像头、激光扫描仪等)对对象进行拍照或者扫描,从而得到的对象外观表面的点数据的集合。例如,在上述用户利用移动设备测量身高的过程中,用户利用移动设备上的ToF摄像头进行扫描或拍摄获得图像,移动设备便可以根据该图像,生成该图像对应的三维点云图。
具体地,ToF摄像头可以通过红外光以及飞行时间原理,主动发射红外光并接收返回的红外光,从而可以测出周围环境中各对象与摄像头之间的距离。因此,ToF摄像头可以直接扫描或拍摄各对象的图像,并且可以测量各对象与摄像头距离,从而在拍摄的图像上恢复出被扫描或被拍摄的各对象的三维结构。
移动设备可以通过ToF摄像头,对电子设备的周围环境扫描。电子设备的周围环境包括待测量对象基于的基准测量平面,进一步的,还可以包括待测量对象和电子设 备。可选的,电子设备的周围环境还可包括其他的对象等。本申请对此不作限定。可选地,在扫描中,移动设备可以左右来回移动。在扫描后,移动设备可以利用视觉同时定位与地图构建(simultaneous localization and mapping,SLAM)技术获取第一三维点云图。第一三维点云图可以准确地反映各对象的三维形状,并且第一三维点云图中每个点的空间坐标都是确定的。
用户在利用移动设备扫描电子设备周围环境的过程中,需要缓缓移动或者转动移动设备,以识别基准测量平面。这样,就可以在第一三维点云图中确定出基准测量平面。以测量人的身高为例,基准测量平面为人站立的平面。比如,地面等。
可选的,在本申请实施例中,也可以不用执行S301,这样,移动设备也可以不用执行S302和S303。取而代之的为:移移动设备通过摄像头扫描,获取电子设备周围环境的第一三维点云图。该步骤可以是用户在移动设备上周期性设置启动的,例如,每半年启动依次,或者,是用户根据自己的需要,对移动设备进行相应的操作进而启动的。之后可以执行S304。
S304,移动设备将第一三维点云图发送给电子设备。
示例性地,移动设备可以通过之前建立的无线通信方式向电子设备发送第一三维点云图。比如,移动设备与电子设备之前建立Wi-Fi直连,此时移动设备通过Wi-Fi直连向电子设备分享第一三维点云图。
电子设备接收到第一三维点云图后,执行S305。
应理解,上述的S301、S302、S303和S304可以是在电子设备初始化的时候执行。例如,在用户安装好电子设备且第一次开机后,移动设备可以将电子设备的周围环境的第一三维点云图发送给电子设备。也就是说,S301、S302、S303和S304可以只执行一次。在电子设备的周围环境变化的情况下,可以重新执行S301、S302、S303和S304。例如,用户将电子设备从一个房间换到了另一个房间后,可以重新执行S303和S304。
S305,利用自身摄像头自行扫描或自行拍摄图像,自行扫描或自行拍摄的图像包括待测量对象和待测量对象基于的平面。
可替换地,自行扫描或自行拍摄的图像包括待测量对象的另一端和待测量对象的一端基于的平面。
可选地,在待测量对象为人,要给人测量身高的场景下,假设人站在地面上,自行扫描或自行拍摄的图像可以仅包括人的头部或脸部,以及地面。这时,自行扫描或自行拍摄的图像可以不包括人的脚部。这是基于人一定站在地面的假设前提下。
可选地,电子设备的摄像头可以为ToF摄像头,也可以不为ToF摄像头。
可选地,在电子设备的摄像头为ToF摄像头的前提下,电子设备可以根据自行扫描或自行拍摄的图像,生成第二三维点云图。
可选地,自行扫描或自行拍摄的图像可以包括待测量对象的全部图像。比如,待测量对象为人,自行扫描或自行拍摄的图像可以包括人的全部图像(即全身照)。
S306,电子设备根据自行扫描或自行拍摄的图像、第一三维点云图,确定待测量对象在自行扫描或自行拍摄的图像中的基准测量平面。
由于电子设备不易转动或不能转动,或者,电子设备的摄像头不易转动或不能转 动,所以自行扫描或自行拍摄的图像中信息有限,电子设备不能仅从自行扫描或自行拍摄的图像中,确定出基准测量平面。不过,由于第一三维点云图包括待测量对象基于的基准测量平面,因此电子设备可以基于第一三维点云图中的基准测量平面,确定出自行扫描或自行拍摄的图像中的基准测量平面。
进一步地,电子设备可以在自行扫描或自行拍摄的图像中,确定出待测量对象的一端与基准测量平面的交点(即测量起点)。
可选地,在电子设备根据自行扫描或自行拍摄的图像,生成第二三维点云图后,由于电子设备不易转动或不能转动,或者,电子设备的摄像头不易转动或不能转动,所以自行扫描或自行拍摄的图像中信息有限,因而第二三维点云图中的信息有限,电子设备不能仅从第二三维点云图中,确定出基准测量平面。不过,由于第一三维点云图包括待测量对象基于的基准测量平面,因此电子设备可以基于第一三维点云图中的基准测量平面,确定出第二三维点云图中的基准测量平面。
在一种示例中,第一三维点云图可以理解为一个全集。第二三维点云图可以理解为第一三维点云图这一全集中的一个子集。电子设备将第一三维点云图和第二三维点云图进行融合和匹配,根据第一三维点云图中的基准测量平面,确定第二三维点云图中的基准测量平面。
在一种示例中,由于第二三维点云图有一个平面与第一三维点云图中的基准测量平面具有相同的属性,电子设备可以据此识别出第二三维点云图中的基准测量平面。
进一步地,电子设备可以在第二三维点云图的基准测量平面中识别出测量起点。
在一种示例中,以测量人的身高为例,图4示出了电子设备测量人的身高的用户界面。如图4所示,指示标所在的位置即为测量起点。
进一步地,电子设备可以在第二三维点云图中,确定出待测量对象的一端与基准测量平面的交点(即测量起点)。
可选地,在假设待测量对象一定站立在基准测量平面的前提下,也可不用确定出待测量对象的一端与基准测量平面的交点。
可选地,基准测量平面可以为地平面。地平面可以为一楼的地平面、二楼的地平面、三楼的地平面等任意楼层的地平面。
S307,电子设备自动获取待测量对象的测量终点,根据自行扫描或自行拍摄图像中的测量基准平面和测量终点,确定待测量对象的长度。
可选地,自行扫描或自行拍摄的图像可以包括待测量对象的测量终点。电子设备从自行扫描或自行拍摄的图像中获取待测量对象的测量终点。
可选地,第二三维点云图可以包括待测量对象的测量终点。电子设备从第二三维点云图中获取待测量对象的测量终点。
在一种示例中,待测量对象为人,测量终点为人的头顶位置或人的眼睛位置。
若上述的测量终点为人的头顶位置,可以从自行扫描或自行拍摄的图像中,根据测量起点和测量终点,使用AR测量,获取到待测量对象的高度。
若上述的测量终点为人的眼睛位置,可根据统计得到的人眼到头顶的平均距离,估算待测量人的身高。具体地,统计得到的人眼到头顶的平均距离一般在10cm-12cm之间。在本申请实施例中,人眼到头顶的平均距离可以取10cm、11cm或者12cm。将 人眼到头顶的平均距离加上基准测量平面到人眼之间的距离,便可以得到待测量人的身高。电子设备便可以显示人的身高。可替换地,电子设备也可以通过语音播放人的身高。
可替换地,电子设备自动获取待测量对象的测量终点,根据第二三维点云图中的测量基准平面和测量终点,确定待测量对象的长度。
在一种示例中,待测量对象为人,测量终点为人的头顶位置或人的眼睛位置。
若上述的测量终点为人的头顶位置,可以从第二三维点云图中,根据测量起点和测量终点,使用AR测量,获取到待测量对象的高度。
若上述的测量终点为人的眼睛位置,可根据统计得到的人眼到头顶的平均距离,估算待测量人的身高。具体地,统计得到的人眼到头顶的平均距离一般在10cm-12cm之间。在本申请实施例中,人眼到头顶的平均距离可以取10cm、11cm或者12cm。将人眼到头顶的平均距离加上基准测量平面到人眼之间的距离,便可以得到待测量人的身高。电子设备便可以显示人的身高。可替换地,电子设备也可以通过语音播放人的身高。
应理解,在本申请实施例中,对于人眼到头顶的平均距离的取值也可以为其他值,本申请实施例在此不作限制。
可选地,电子设备可以通过自行扫描或自行拍摄的图像,自行决定测量终点为人的头顶位置或人的眼睛位置。具体来说,若人距离电子设较近,电子设备未能扫描或拍摄到人的头顶,但扫描或拍摄到人的眼睛,则以人的眼睛位置为测量终点。若人距离电子设备较远,电子设备扫描或拍摄到人的头顶,则以人的头顶位置为测量终点。若电子设备未能扫描或拍摄到人,在一种方式下,电子设备可以提醒人调整其与电子设备的摄像头之间的距离,直至电子设备能够扫描或拍摄到人的头顶或人的眼睛;在另一种方式下,电子设备可以升降自身摄像头,寻找人的头顶或人的眼睛,若在预设时长内寻找到,则按照上述的方式处理;若在预设时长内未能寻找到,则电子设备可以提醒人调整其与电子设备的摄像头之间的距离,直至电子设备能够扫描或拍摄到人的头顶或人的眼睛。若电子设备扫描或拍摄到人的头顶和眼睛,可以优选人的头顶位置为测量终点,也可以优选人的眼睛位置为测量终点。
以上仅是以测量人的身高为例说明。本领域技术人员应当明了,测量其他对象的长度、高度、宽度、厚度等与此类似。此处不再一一说明。
需要说明的是,S301-S304并不是每次都要执行的,仅在起始执行一次即可。后续,只要电子设备所处空间的基准测量平面(比如,地平面)没有变化,就无需执行。比如,电子设备固定在客厅的墙上,在执行过一次S301-S304之后,电子设备仍然固定在客厅的墙上,只要客厅的地平面没有变化,下次就无需再次执行S301-S304,直接执行S305-S307即可。
若电子设备被移动至其他房间,或者基准测量平面发生变化(比如,地平面上铺了地毯等),则需要重新执行S301-S304。
可替换地,S303也可被替换为:接收到一个用户输入后,移动设备获取电子设备周围环境的第一三维点云图;之后执行S304-S307。此时,在S304之前,就无需执行S301-S303了。即在本实施方式提供的替换后的方法中不包括S301-S303,仅包括替换 后的S304以及图3示出的S305-S307。同样地,替换后的S303并非每次都需要执行。仅在起始执行一次即可。后续,只要电子设备所处空间的基准测量平面(比如,地平面)没有变化,就无需执行。
可选地,在电子设备获取到待测量对象的长度后,电子设备还可以将待测量对象的长度等信息(比如,当前时间、自行扫描或自行拍摄的图像等中的至少一项)发送给移动设备或其他的远程设备。其他的远程设备与电子设备可以预先绑定。这样,通过其他的远程设备也可以查看或存储上述信息。其他的远程设备可以为服务器,也可以为智能设备。
本申请提供了一种测量长度的方法、电子设备以及移动设备。电子设备和移动设备无线通信。可选地,两者可在同一局域网中。在本申请提供的方法中,先利用移动设备的摄像头扫描并建立好电子设备周围环境的第一三维点云图(电子设备周围环境包括待测量对象基于的基准测量平面;可选的,还可以包括待测量对象和/或电子设备);并确定第一三维点云图中的基准测量平面,移动设备将第一三维点云图以及基准测量平面在第一三维点云图中的位置,发送给电子设备。在电子设备自行扫描或自行拍摄待测量对象和待测量对象所基于的平面的图像后,电子设备基于第一三维点云图、第一三维点云图中的基准测量平面,以及上述自行扫描或自行拍摄的图像,可以确定自行扫描或自行拍摄的图像中的基准测量平面,从而在电子设备自行扫描或自行拍摄的图像中确定待测量对象的基准测量平面;电子设备从自行扫描或自行拍摄的图像中,确定待测量对象与基准测量平面的接触端为待测量对象的一端;电子设备自动识别出待测量对象的另一端;并给出待测量对象的两端之间的长度。这样,电子设备可以准确地测量出待测量对象的长度。这样,即使具有显示屏和摄像头的电子设备,固定安装在墙上、车上等,或者显示屏的尺寸较大(比如,显示屏尺寸在14英寸以上),也能通过电子设备安装的AR测量应用或集成的AR测量功能,准确地进行AR测量。用户体验也得以改善。
本申请实施例提供的方法,不仅可以测量待测量对象的单个尺寸,还可以基于测量出的单个尺寸,进一步测量出待测量对象的面积、体积等,本申请实施例在此不作限制。
需要说明的是,上述只是为了帮助本领域技术人员更好地理解本申请实施例,而非要限制本申请实施例的范围。本领域技术人员根据所给出的上述示例,所能想到的其他实施例,也在本申请的范围之内。
需要说明的是,本申请的上述实施例或上述实施方式所包括的任意技术特征的全部或部分,均可以自由组合;自由组合后的技术方案也在本申请的范围之内。
上述结合图1-图4描述了本申请实施例提供的测量长度的方法的实施例。下面对本申请实施例提供的电子设备以及移动设备的硬件结构进行描述。
本申请实施例提供的电子设备包括显示屏以及摄像头。该摄像头可以为ToF摄像头,也可以为ToF摄像头以外的摄像头。本实施例可以根据上述方法,对电子设备进行功能模块的划分。例如,可以对应各个功能,划分为各个功能模块,也可以将两个或两个以上的功能集成在一个处理模块中。上述集成的模块可以采用硬件的形式实现。需要说明的是,本实施例中对模块的划分是示意性的,仅仅为一种逻辑功能划分,实 际实现时可以有另外的划分方式。需要说明的是,上述方法实施例涉及的各步骤的相关内容,均可以援引到对应功能模块的功能描述,此处不再赘述。
本实施例提供的电子设备,用于执行上述测量长度方法,因此可以达到与上述实现方法相同的效果。在采用集成的单元的情况下,电子设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对电子设备的动作进行控制管理。例如,可以用于支持电子设备执行处理单元执行的步骤。存储模块可以用于支持执行存储程序代码和数据等。通信模块,可以用于电子设备与其他设备(例如与移动设备)的通信。
其中,处理模块可以是处理器或控制器。其可以实现或执行结合本申请公开内容所描述的各种示例性地逻辑方框,模块和电路。处理器也可以是实现计算功能的组合,例如包含一个或多个微处理器组合,数字信号处理(digital signal processing,DSP)和微处理器的组合等等。存储模块可以是存储器。通信模块具体可以为射频电路、蓝牙芯片、Wi-Fi芯片等与其他电子设备交互的设备。
示例性地,图5示出了本申请实施例提供的电子设备的硬件架构。如图5所示,电子设备400可包括处理器410,外部存储器接口420,内部存储器430,通用串行总线(universal serial bus,USB)接口440,充电管理模块450,电源管理模块451,电池452,天线1,天线2(可选),无线通信模块460,传感器模块470、显示屏480、摄像头490。摄像头490可以为ToF摄像头,也可以为ToF摄像头以外的其他摄像头。
可以理解的是,本申请实施例示意的结构并不构成对电子设备400的具体限定。在本申请另一些实施例中,电子设备400可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
处理器410可以包括一个或多个处理单元。例如:处理器410可以包括应用处理器(application processor,AP),调制解调处理器,图形处理器(graphics processing unit,GPU),图像信号处理器(image signal processor,ISP),控制器,视频编解码器,数字信号处理器(digital signal processor,DSP),基带处理器,和/或神经网络处理器(neural-network processing unit,NPU)等。其中,不同的处理单元可以是独立的部件,也可以集成在一个或多个处理器中。在一些实施例中,电子设备400也可以包括一个或多个处理器410。其中,控制器可以根据指令操作码和时序信号,产生操作控制信号,完成取指令和执行指令的控制。
在一些实施例中,处理器410可以包括一个或多个接口。接口可以包括集成电路间(inter-integrated circuit,I2C)接口,集成电路间音频(integrated circuit sound,I2S)接口,脉冲编码调制(pulse code modulation,PCM)接口,通用异步收发传输器(universal asynchronous receiver/transmitter,UART)接口,移动产业处理器接口(mobile industry processor interface,MIPI),通用输入输出(general-purpose input/output,GPIO)接口,SIM卡接口,和/或USB接口等。其中,USB接口440是符合USB标准规范的接口,具体可以是Mini USB接口,Micro USB接口,USB Type C接口等。USB接口440可以用于电子设备400与外围设备之间传输数据。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明, 并不构成对电子设备400的结构限定。在本申请另一些实施例中,电子设备400也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
电子设备400的无线通信功能可以通过天线1,天线2以及无线通信模块460等实现。
无线通信模块460可以提供应用在电子设备400上的包括Wi-Fi(包括Wi-Fi感知和Wi-Fi AP),蓝牙(bluetooth,BT),无线数传模块(例如,433MHz,868MHz,915MHz)等无线通信的解决方案。无线通信模块460可以是集成至少一个通信处理模块的一个或多个器件。无线通信模块460经由天线1或者天线2(或者,天线1和天线2)接收电磁波,将电磁波信号滤波以及调频处理,将处理后的信号发送到处理器410。无线通信模块460还可以从处理器410接收待发送的信号,对其进行调频,放大,经天线1或者天线2转为电磁波辐射出去。
外部存储器接口420可以用于连接外部存储卡,例如Micro SD卡,实现扩展电子设备400的存储能力。外部存储卡通过外部存储器接口420与处理器410通信,实现数据存储功能。例如将音乐,视频等文件保存在外部存储卡中。
内部存储器430可以用于存储一个或多个计算机程序,该一个或多个计算机程序包括指令。处理器410可以通过运行存储在内部存储器430的上述指令,从而使得电子设备400执行本申请一些实施例中所提供的方法,以及各种应用以及数据处理等。内部存储器430可以包括代码存储区和数据存储区。其中,代码存储区可存储操作系统。数据存储区可存储电子设备400使用过程中所创建的数据等。此外,内部存储器430可以包括高速随机存取存储器,还可以包括非易失性存储器,例如一个或多个磁盘存储部件,闪存部件,通用闪存存储器(universal flash storage,UFS)等。在一些实施例中,处理器410可以通过运行存储在内部存储器430的指令,和/或存储在设置于处理器410中的存储器的指令,来使得电子设备400执行本申请实施例中所提供的方法,以及其他应用及数据处理。
摄像头490可以实时的拍摄图片或者图像,并且,摄像头490还可以在电子设备400上升降,即摄像头490的位置可变的。
示例性地,图6示出了本申请实施例提供的移动设备的硬件架构。如图6所示,移动设备500可包括处理器510,外部存储器接口520,内部存储器530,USB接口540,充电管理模块550,电源管理模块551,电池552,无线通信模块560,传感器模块570、显示屏580、摄像头590等。摄像头590为ToF摄像头。用户可以利用移动设备500完成待测量对象长度的测量。
可以理解的是,本申请实施例示意的结构并不构成对移动设备500的具体限定。在本申请另一些实施例中,移动设备500可以包括比图示更多或更少的部件,或者组合某些部件,或者拆分某些部件,或者不同的部件布置。图示的部件可以以硬件,软件或软件和硬件的组合实现。
可以理解的是,本申请实施例示意的各模块间的接口连接关系,只是示意性说明,并不构成对移动设备500的结构限定。在本申请另一些实施例中,移动设备500也可以采用上述实施例中不同的接口连接方式,或多种接口连接方式的组合。
本申请实施例提供的移动设备,用于执行上述的测量长度方法,因此可以达到与 上述实现方法相同的效果。在采用集成的单元的情况下,移动设备可以包括处理模块、存储模块和通信模块。其中,处理模块可以用于对移动设备的动作进行控制管理。例如,可以用于支持移动设备执行处理单元执行的步骤。存储模块可以用于支持执行存储程序代码和数据等。通信模块,可以用于移动设备与其他设备(例如与电子设备)的通信。
本申请实施例还提供了一种测量长度的系统,该系统包括:上述方法实例中的电子设备和移动设备。
本申请实施例还提供了一种计算机可读存储介质,用于存储计算机程序,计算机程序用于执行上述本申请实施例提供的测量长度方法。计算机可读介质可以是只读存储器(read-only memory,ROM)或随机存取存储器(random access memory,RAM),本申请实施例对此不做限制。
本申请还提供了一种计算机程序产品,当该计算机程序产品被执行时,以使得电子设备和移动设备执行对应于上述方法中的对应的操作。
本申请实施例还提供了一种位于通信装置中的芯片,芯片包括:处理单元和通信单元,处理单元,例如可以是处理器;通信单元例如可以是输入/输出接口、管脚或电路等。处理单元可执行计算机程序,以使通信装置执行上述本申请实施例提供的测量长度方法。
可选地,计算机程序被存储在存储单元中。
可选地,存储单元为芯片内的存储单元,如寄存器、缓存等,存储单元还可以是终端内的位于芯片外部的存储单元,如只读存储器(read-only memory,ROM)或可存储静态信息和指令的其他类型的静态存储设备,随机存取存储器(random access memory,RAM)等。其中,上述任一处提到的处理器,可以是一个CPU,微处理器,ASIC,或一个或多个用于控制上述的反馈信息的传输方法的程序执行的集成电路。处理单元和存储单元可以解耦,分别设置在不同的物理设备上,通过有线或者无线的方式连接来实现处理单元和存储单元的各自的功能,以支持系统芯片实现上述实施例中的各种功能。或者,处理单元和存储器也可以耦合在同一个设备上。
通过以上实施方式的描述,本领域技术人员可以了解到,为描述的方便和简洁,仅以上述各功能模块的划分进行举例说明。实际应用中,可以根据需要而将上述功能分配由不同的功能模块完成,即将装置的内部结构划分成不同的功能模块,以完成以上描述的全部或者部分功能。
应该理解到,本申请所提供的几个实施例中所揭露的装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的。例如,模块或单元的划分,仅仅为一种逻辑功能划分。实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个装置。另外,一些特征可以忽略,或不执行。另外,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
作为分离部件说明的单元可以是物理上分开的,也可以不是物理上分开的。作为单元显示的部件可以是一个物理单元或多个物理单元。即可以位于一个地方,或者也可以分布到多个不同地方。可以根据实际的需要,选择其中的部分或者全部单元来实 现本方案的目的。
另外,本申请各个实施例中的各功能单元,可以集成在一个处理单元中;也可以单独物理存在;还可以是部分单元集成在一个单元中,部分单元单独物理存在。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
集成的单元若以软件功能单元的形式实现,并作为独立的产品销售或使用时,则可以存储在一个可读取存储介质中。基于这样的理解,本申请实施例技术方案的全部或部分可以以软件产品的形式体现出来。该软件产品存储在一个存储介质中。该软件产品包括若干指令用以使得一个设备(可以是单片机,芯片等)或处理器(processor)执行本申请各个实施例方法的全部或部分步骤。前述的存储介质包括:U盘、移动硬盘、ROM、RAM、磁碟或者光盘等各种可以存储程序代码的介质。
需要说明的是,本申请提供的上述各个实施例的全部或部分(比如,任意特征的部分或全部),均可以任意地、相互地组合或结合使用。
以上内容,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (14)

  1. 一种电子设备,其特征在于,所述电子设备与移动设备无线通信;所述移动设备与所述电子设备处于同一空间;所述电子设备包括:
    处理器;
    存储器;
    摄像头;
    以及计算机程序,所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述电子设备执行以下步骤:
    接收到来自所述移动设备的告知消息;所述告知消息包括第一图像;
    获取到待测量对象在所述第一图像中基于的第一基准测量平面;
    自行扫描或自行拍摄第二图像;所述第二图像包括所述待测量对象和所述待测量对象基于的平面;
    根据所述第一基准测量平面以及所述待测量对象基于的平面,获取到所述待测量对象基于的平面为所述第二图像中的第二基准测量平面;
    自动获取所述第二图像中所述待测量对象的测量终点,根据所述第二图像中的所述第二基准测量平面和所述测量终点,获取所述待测量对象的长度;
    输出所述待测量对象的长度,或者,输出调整后的所述待测量对象的长度。
  2. 根据权利要求1所述的电子设备,其特征在于,所述根据所述第二图像中的所述第二基准测量平面和所述测量终点,获取所述待测量对象的长度;包括:
    根据所述第二图像中的所述测量终点到所述第二基准测量平面的垂直距离,获取所述待测量对象的长度;或者,
    获取所述第二图像中的测量起点,所述测量起点为所述第二基准测量平面与所述待测量对象的交点;根据所述第二图像中的所述测量起点和所述测量终点,获取所述待测量对象的长度。
  3. 根据权利要求2所述的电子设备,其特征在于,
    所述待测量对象为人;
    所述测量终点为人的头顶位置;
    所述输出所述待测量对象的长度;包括:输出所述测量终点到所述第二基准测量平面的垂直距离;或者,输出所述测量起点与所述测量终点之间的长度。
  4. 根据权利要求2所述的电子设备,其特征在于,
    所述待测量对象为人;
    所述测量终点为人的眼睛位置;
    所述输出调整后的所述待测量对象的长度;包括:
    获取所述测量终点到所述第二基准测量平面的垂直距离,输出所述垂直距离与第一距离之和;所述第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离;或者,
    获取所述测量起点与所述测量终点之间的长度,输出所述长度与第一距离之和;所述第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离。
  5. 根据权利要求1-4中任意一项所述的电子设备,其特征在于,所述第一图像为 所述电子设备的周围环境的第一三维点云图;
    在所述接收到来自所述移动设备的告知消息之前,所述电子设备还执行:
    向所述移动设备发送请求消息;所述请求消息用于请求获取所述第一图像。
  6. 根据权利要求1-5中任意一项所述的电子设备,其特征在于,所述第一基准测量平面和所述待测量对象基于的平面为同一平面。
  7. 一种电子设备,其特征在于,所述电子设备与移动设备无线通信;所述移动设备与所述电子设备处于同一空间;所述电子设备包括:
    处理器;
    存储器;
    摄像头;
    以及计算机程序,所述计算机程序存储在所述存储器上,当所述计算机程序被所述处理器执行时,使得所述电子设备执行以下步骤:
    接收到来自所述移动设备的告知消息;所述告知消息包括第一图像;
    获取到待测量对象在所述第一图像中基于的第一基准测量平面;
    自行扫描或自行拍摄第二图像;
    根据第二图像,生成所述第二图像对应的第二三维点云图;所述第二三维点云图包括所述待测量对象和所述待测量对象基于的平面;
    根据所述第一基准测量平面以及所述待测量对象基于的平面,获取到所述待测量对象基于的平面为所述第二三维点云图中的第二基准测量平面;
    自动获取所述第二三维点云图中所述待测量对象的测量终点,根据所述第二三维点云图中的所述第二基准测量平面和所述测量终点,获取所述待测量对象的长度;
    输出所述待测量对象的长度,或者,输出调整后的所述待测量对象的长度。
  8. 一种测量长度的方法,应用于电子设备;其特征在于,所述电子设备与移动设备无线通信;所述移动设备与所述电子设备处于同一空间;所述电子设备包括摄像头;所述方法包括:
    所述电子设备接收到来自所述移动设备的告知消息;所述告知消息包括第一图像;
    所述电子设备获取到待测量对象在所述第一图像中基于的第一基准测量平面;
    所述电子设备利用所述摄像头自行扫描或自行拍摄第二图像;所述第二图像包括所述待测量对象和所述待测量对象基于的平面;
    所述电子设备根据所述第一基准测量平面以及所述待测量对象基于的平面,获取到所述待测量对象基于的平面为所述第二图像中的第二基准测量平面;
    所述电子设备自动获取所述第二图像中所述待测量对象的测量终点,根据所述第二图像中的所述第二基准测量平面和所述测量终点,获取所述待测量对象的长度;
    所述电子设备输出所述待测量对象的长度,或者,所述电子设备输出调整后的所述待测量对象的长度。
  9. 根据权利要求8所述的方法,其特征在于,所述电子设备根据所述第二图像中的所述第二基准测量平面和所述测量终点,获取所述待测量对象的长度;包括:
    所述电子设备根据所述第二图像中的测量终点到所述第二基准测量平面的垂直距离,获取所述待测量对象的长度;或者,
    所述电子设备获取所述第二图像中的测量起点,所述测量起点为所述第二基准测量平面与所述待测量对象的交点;所述电子设备根据所述第二图像中的所述测量起点和所述测量终点,获取所述待测量对象的长度。
  10. 根据权利要求9所述的方法,其特征在于,
    所述待测量对象为人;
    所述测量终点为人的头顶位置;
    所述电子设备输出所述待测量对象的长度;包括:所述电子设备输出所述测量终点到所述第二基准测量平面的垂直距离;或者,所述电子设备输出所述测量起点与所述测量终点之间的长度。
  11. 根据权利要求9所述的方法,其特征在于,
    所述待测量对象为人;
    所述测量终点为人的眼睛位置;
    所述电子设备输出调整后的所述待测量对象的长度;包括:
    所述电子设备获取所述测量终点到所述第二基准测量平面的垂直距离,输出所述垂直距离与第一距离之和;所述第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离;或者,
    所述电子设备获取所述测量起点与所述测量终点之间的长度,输出所述长度与第一距离之和;所述第一距离为统计得到的人的眼睛位置与人的头顶位置的平均距离。
  12. 根据权利要求8-11中任意一项所述的方法,其特征在于,所述第一图像为所述电子设备的周围环境的第一三维点云图;
    在所述电子设备接收到来自所述移动设备的告知消息之前,所述方法还包括:
    所述电子设备向所述移动设备发送请求消息;所述请求消息用于请求获取所述第一图像。
  13. 一种计算机可读存储介质,其特征在于,所述计算机可读存储介质存储有计算机程序,当所述计算机程序在电子设备上运行时,使得所述电子设备执行如权利要求8-12中任意一项所述的方法。
  14. 一种计算机程序产品,其特征在于,当所述计算机程序产品在计算机上运行时,使得所述计算机执行如权利要求8-12中任意一项所述的方法。
PCT/CN2022/079102 2021-03-09 2022-03-03 一种测量长度的方法、电子设备以及移动设备 WO2022188691A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110255036.4A CN115046480B (zh) 2021-03-09 2021-03-09 一种测量长度的方法、电子设备以及移动设备
CN202110255036.4 2021-03-09

Publications (1)

Publication Number Publication Date
WO2022188691A1 true WO2022188691A1 (zh) 2022-09-15

Family

ID=83156359

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/079102 WO2022188691A1 (zh) 2021-03-09 2022-03-03 一种测量长度的方法、电子设备以及移动设备

Country Status (2)

Country Link
CN (1) CN115046480B (zh)
WO (1) WO2022188691A1 (zh)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016183723A1 (zh) * 2015-05-15 2016-11-24 华为技术有限公司 一种测量的方法及终端
CN108304119A (zh) * 2018-01-19 2018-07-20 腾讯科技(深圳)有限公司 物体测量方法、智能终端及计算机可读存储介质
CN108682031A (zh) * 2018-05-21 2018-10-19 深圳市酷开网络科技有限公司 基于增强现实技术的测量方法、智能终端及存储介质
US20190051054A1 (en) * 2017-08-08 2019-02-14 Smart Picture Technologies, Inc. Method for measuring and modeling spaces using markerless augmented reality
CN109635539A (zh) * 2018-10-30 2019-04-16 华为技术有限公司 一种人脸识别方法及电子设备
CN110006343A (zh) * 2019-04-15 2019-07-12 Oppo广东移动通信有限公司 物体几何参数的测量方法、装置和终端
US10636158B1 (en) * 2020-01-13 2020-04-28 Bodygram, Inc. Methods and systems for height estimation from a 2D image using augmented reality
CN111316059A (zh) * 2017-11-07 2020-06-19 讯宝科技有限责任公司 使用邻近设备确定对象尺寸的方法和装置

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
DE102016105496A1 (de) * 2015-03-26 2016-09-29 Faro Technologies Inc. System zur Prüfung von Objekten mittels erweiterter Realität
US10853946B2 (en) * 2018-05-18 2020-12-01 Ebay Inc. Physical object boundary detection techniques and systems
CN110006340B (zh) * 2019-03-26 2020-09-08 华为技术有限公司 一种物体尺寸测量方法和电子设备
CN116385523A (zh) * 2019-03-26 2023-07-04 华为技术有限公司 一种测距方法及电子设备
CN112197708B (zh) * 2020-08-31 2022-04-22 深圳市慧鲤科技有限公司 测量方法及装置、电子设备及存储介质

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016183723A1 (zh) * 2015-05-15 2016-11-24 华为技术有限公司 一种测量的方法及终端
US20190051054A1 (en) * 2017-08-08 2019-02-14 Smart Picture Technologies, Inc. Method for measuring and modeling spaces using markerless augmented reality
CN111316059A (zh) * 2017-11-07 2020-06-19 讯宝科技有限责任公司 使用邻近设备确定对象尺寸的方法和装置
CN108304119A (zh) * 2018-01-19 2018-07-20 腾讯科技(深圳)有限公司 物体测量方法、智能终端及计算机可读存储介质
CN108682031A (zh) * 2018-05-21 2018-10-19 深圳市酷开网络科技有限公司 基于增强现实技术的测量方法、智能终端及存储介质
CN109635539A (zh) * 2018-10-30 2019-04-16 华为技术有限公司 一种人脸识别方法及电子设备
CN110006343A (zh) * 2019-04-15 2019-07-12 Oppo广东移动通信有限公司 物体几何参数的测量方法、装置和终端
US10636158B1 (en) * 2020-01-13 2020-04-28 Bodygram, Inc. Methods and systems for height estimation from a 2D image using augmented reality

Also Published As

Publication number Publication date
CN115046480B (zh) 2023-11-10
CN115046480A (zh) 2022-09-13

Similar Documents

Publication Publication Date Title
US10970865B2 (en) Electronic device and method for applying image effect to images obtained using image sensor
WO2021042999A1 (zh) 近距离传输信息的方法和电子设备
US11263469B2 (en) Electronic device for processing image and method for controlling the same
WO2020192535A1 (zh) 一种测距方法及电子设备
US10848669B2 (en) Electronic device and method for displaying 360-degree image in the electronic device
US11582391B2 (en) Electronic device capable of controlling image display effect, and method for displaying image
WO2021170129A1 (zh) 一种位姿确定方法以及相关设备
US11062422B2 (en) Image processing apparatus, image communication system, image processing method, and recording medium
WO2021175097A1 (zh) 一种非视距物体的成像方法和电子设备
KR20220008308A (ko) 조명 장치 제어 방법, 조명 장치 피팅 및 전자 장치
US20210368093A1 (en) Electronic device and method for processing image of same
CN113536063A (zh) 信息处理方法、装置、设备及存储介质
CN113269877A (zh) 获取房间布局平面图的方法和电子设备
WO2022188691A1 (zh) 一种测量长度的方法、电子设备以及移动设备
EP3366037B1 (en) Electronic apparatus for providing panorama image and control method thereof
CN109804408B (zh) 一致的球面照片和视频朝向校正
CN112804481B (zh) 监控点位置的确定方法、装置及计算机存储介质
US11700455B2 (en) Image capturing device, image communication system, and method for display control
CN114390195A (zh) 一种自动对焦的方法、装置、设备及存储介质
JP7520599B2 (ja) 撮影支援装置、方法およびプログラム
KR20210106763A (ko) 객체의 움직임을 추적하는 전자 장치 및 방법
CN113065457A (zh) 人脸检测点处理方法、装置、计算机设备及存储介质
KR20160007251A (ko) 전자 장치 및 카메라 동작 방법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22766217

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 22766217

Country of ref document: EP

Kind code of ref document: A1