CN115839667A - Height measuring method, device, equipment and storage medium - Google Patents

Height measuring method, device, equipment and storage medium Download PDF

Info

Publication number
CN115839667A
CN115839667A CN202310143820.5A CN202310143820A CN115839667A CN 115839667 A CN115839667 A CN 115839667A CN 202310143820 A CN202310143820 A CN 202310143820A CN 115839667 A CN115839667 A CN 115839667A
Authority
CN
China
Prior art keywords
camera
image
coordinate point
height
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202310143820.5A
Other languages
Chinese (zh)
Other versions
CN115839667B (en
Inventor
高兴兴
杨宝生
郭小璇
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qingdao Tosun Intelligent Technology Inc
Original Assignee
Qingdao Tosun Intelligent Technology Inc
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 Qingdao Tosun Intelligent Technology Inc filed Critical Qingdao Tosun Intelligent Technology Inc
Priority to CN202310143820.5A priority Critical patent/CN115839667B/en
Publication of CN115839667A publication Critical patent/CN115839667A/en
Application granted granted Critical
Publication of CN115839667B publication Critical patent/CN115839667B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Length Measuring Devices By Optical Means (AREA)

Abstract

The application discloses a height measuring method, a device, equipment and a storage medium, which relate to the technical field of image algorithms and comprise the following steps: respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance to obtain a corresponding first image and a corresponding second image; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; and determining the height of the target object by utilizing the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point. In this way, the height of the target object can be efficiently calculated by calculation of the target position imaging coordinates.

Description

Height measuring method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image algorithm technology, and in particular, to a height measuring method, apparatus, device, and storage medium.
Background
In some scenarios, it is desirable to quickly measure the height of an object or human body. The manual measurement mode is difficult to meet the requirement, so an electronic measurement mode is required. One of the existing electronic devices for measuring height is to mount ultrasonic waves above a body to be measured, and calculate the height by using the ultrasonic waves for distance measurement; the other is to measure distance by using binocular camera depth information. The ultrasonic scheme requires installation above a measured body, has specific requirements on installation space and measurement space, and causes large errors due to target position deviation. In addition, according to the binocular camera depth information ranging scheme, calibration needs to be performed on the binocular camera, the calibration process is complicated, the calibration result is easily affected by the light environment, and large errors are generated.
Disclosure of Invention
In view of the above, the present invention provides a height measuring method, apparatus, device and storage medium, which can efficiently obtain the height of a target object. The specific scheme is as follows:
in a first aspect, the present application discloses a height measuring method, comprising:
respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance;
determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image;
and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
Optionally, the determining a first coordinate point and a second coordinate point of the highest position point of the target object respectively corresponding to the first image and the second image includes:
and detecting the first image and the second image by using a preset target detection algorithm so as to determine a first coordinate point and a second coordinate point of the highest position point of the target object, which respectively correspond to the first image and the second image.
Optionally, the method further includes:
the image acquisition device is provided with a first camera fixing part and a second camera fixing part for fixing cameras according to a preset distance requirement, so that the first camera and the second camera are respectively fixed by the first camera fixing part and the second camera fixing part.
Optionally, the preset distance requirement is that the distance between the first camera fixing part and the second camera fixing part is smaller than a preset threshold.
Optionally, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes:
determining the height of the target object by using the target proportional relation, the actual height of the target camera and the target coordinate point; the target camera is any one of the first camera and the second camera, and the target coordinate point is a coordinate point corresponding to the target camera in the first coordinate point and the second coordinate point.
Optionally, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes:
calculating a height average value corresponding to the actual heights of the first camera and the second camera;
carrying out average calculation on coordinate values corresponding to the first coordinate point and the second coordinate point to obtain an averaged coordinate point;
and determining the height of the target object by using the target proportional relation, the height average value and the averaged coordinate point.
Optionally, the target object is horizontally photographed by using a first camera and a second camera integrated in advance in the image acquisition device, so as to obtain a first image corresponding to the first camera and a second image corresponding to the second camera; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance, and the method comprises the following steps:
respectively horizontally shooting a target object for multiple times by utilizing a first camera and a second camera which are pre-integrated in an image acquisition device to obtain a plurality of groups of first images and second images;
determining coordinate points of the highest position point of the target object respectively corresponding to the first image and the second image of each group to obtain a plurality of groups of first coordinate points and second coordinate points;
correspondingly, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes:
determining a plurality of initial heights of the target object respectively by using the target proportional relation, the actual heights of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point of each group;
determining the height of the target object based on the plurality of initial heights.
In a second aspect, the present application discloses a height measuring device comprising:
the image acquisition module is used for respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in the image acquisition device in advance so as to obtain a corresponding first image and a corresponding second image;
a coordinate point determination module, configured to determine a first coordinate point and a second coordinate point, where a highest-position point of the target object corresponds to each of the first image and the second image;
the proportional relation determining module is used for determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image;
and the height determining module is used for determining the height of the target object by utilizing the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
In a third aspect, the present application discloses an electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the aforementioned height measurement method.
In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program which, when executed by a processor, implements the aforementioned height measurement method.
According to the method, firstly, a first camera and a second camera which are integrated in advance in an image acquisition device are used for horizontally shooting a target object respectively to obtain a first image corresponding to the first camera and a second image corresponding to the second camera; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance; determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point. It can be seen that the coordinate difference of the highest position point of the target object on the first image and the second image obtained by simultaneously shooting the first camera and the second camera is determined, the actual distance between the first camera and the second camera is determined, the target proportional relation of the coordinate difference and the actual distance is obtained, and the height of the target object is determined based on the target proportional relation, the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point. Therefore, the two cameras are used for measuring the height, the cameras do not need to be calibrated, and the distance does not need to be calculated through depth information. The height of the target object can be efficiently calculated through the difference calculation of the imaging coordinate points of the target position and the parameters of the image acquisition device.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
FIG. 1 is a flow chart of a height measurement method disclosed herein;
FIG. 2 is a diagram of an image capture device of the present disclosure;
FIG. 3 is a flow chart of a specific height measurement method disclosed herein;
FIG. 4 is a schematic view of a height measuring device according to the present disclosure;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In some scenarios, it is desirable to quickly measure the height of an object or human body. The manual measurement mode is difficult to meet the requirement, so an electronic measurement mode is required. The existing electronic equipment for measuring height has specific requirements on installation space and measuring space, and meanwhile, larger errors can be caused by target position deviation or the measuring result is easily influenced by light environment to generate larger errors. In this embodiment, a height measurement method will be specifically described, which can provide an efficient, simple and reliable means for measuring the height of a target object, and has a clear calculation principle and a small error.
Referring to fig. 1, an embodiment of the present application discloses a height measuring method, including:
step S11: respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
in this embodiment, a first camera and a second camera integrated in advance in an image acquisition device are used to horizontally shoot a target object at the same time to obtain a corresponding first image and a corresponding second image; the image acquisition device is shown in fig. 2, and comprises two undistorted cameras with the same model and a fixed tool. The first camera fixing part and the second camera fixing part are arranged in the image acquisition device according to the preset distance requirement, and the first camera and the second camera are fixed by the first camera fixing part and the second camera fixing part respectively. The preset distance requirement is that the distance between the first camera fixing part and the second camera fixing part is smaller than a preset threshold value, and the preset threshold value is set by actual conditions. The two cameras are respectively connected to the computer host through USB lines. The image acquisition device keeps two cameras horizontally installed, the height is fixed, and the angle is required to ensure that the cameras horizontally shoot forwards. The distance between the two cameras has a certain influence on the measurement accuracy, and generally, the imaging of the two cameras to the same target is not excessively deviated due to the excessively long distance within one tenth of the height difference between the height to be measured and the height of the acquisition device. The first camera and the second camera may be arranged arbitrarily as long as the distance is appropriate. The computer host needs to be provided with two USB interfaces to connect two cameras of the image acquisition system. The rest requirements of image acquisition, analysis and calculation are met, the related algorithm is not complex, and mainstream computers on the market can meet the performance requirements. Therefore, in the actual building process, reasonable errors can be inevitably generated at the installation position and angle of the image acquisition equipment, and relevant errors can be eliminated by limiting the effective distance and adjusting the parameters such as the distance of the camera and the height of the acquisition device.
Step S12: determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance.
In this embodiment, the determining a first coordinate point and a second coordinate point of the highest position point of the target object respectively corresponding to the first image and the second image includes: and detecting the first image and the second image by using a preset target detection algorithm so as to determine a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively. The first image and the second image are processed and placed in the same preset coordinate system, then the first image and the second image are detected by using a preset target detection algorithm, and a first coordinate point and a second coordinate point, corresponding to the highest position point of the target object, on the first image and the second image respectively, are obtained.
Step S13: determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image.
In this embodiment, the first coordinate point and the second coordinate point are calculated to obtain an image distance between the first coordinate point and the second coordinate point. And then determining a target proportional relation based on the proportional relation between the actual distance between the first camera and the second camera and the image distance.
Step S14: and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
In this embodiment, after the target proportional relationship is obtained, the height of the target object may be correspondingly calculated based on the target proportional relationship.
In a first specific embodiment, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes: determining the height of the target object by using the target proportional relation, the actual height of the target camera and the target coordinate point; the target camera is any one of the first camera and the second camera, and the target coordinate point is a coordinate point corresponding to the target camera in the first coordinate point and the second coordinate point. That is, after the target proportional relationship is obtained, any one image may be selected from the first image and the second image to calculate the height of the target object. For example, a first image is selected for height calculation of the target object. And after the target proportional relation is obtained, obtaining the actual height of the corresponding first camera and the height of the first coordinate point. Since the camera horizontally captures the target object, it can be understood that the center point of the image represents the position of the camera on the first image. Therefore, the coordinate height difference value of the first coordinate point and the coordinate of the center point is obtained, and the height of the target object can be obtained by adding the actual height of the first camera to the value obtained by multiplying the coordinate height difference value by the target proportional relation.
In a second specific embodiment, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes: calculating a height average value corresponding to the actual heights of the first camera and the second camera; carrying out average calculation on coordinate values corresponding to the first coordinate point and the second coordinate point to obtain an averaged coordinate point; and determining the height of the target object by using the target proportional relation, the height average value and the averaged coordinate point. That is, after the target proportional relationship is obtained, the height of the target object may be calculated by combining the first image and the second image. Thus, the height of the target object can be determined more accurately.
Next, the calculation of the height assuming that the first camera and the second camera are placed differently will be described.
It is assumed that the first camera and the second camera are horizontally disposed. And respectively positioning the first coordinates (P1 x, P1 y) and the second coordinates (P2 x, P2 y) of the highest point of the target object by using a target detection algorithm. The image distance of those two coordinate points DiffX = | P1x-P2x |. The target ratio Dp = d ÷ DiffX can thus be calculated, where d represents the actual distance of the first camera and the second camera. The coordinates of the center points of the two images are (P3 x, P3 y), (P4 x, P4 y), respectively. Therefore, the coordinate height difference from the coordinate of the highest point of the target object to the central point of the image can be calculated
Figure SMS_1
The height of the target object is Dp × DiffY + Ho, where Ho is the height of the image acquisition device, that is, the average height of the first camera and the second camera.
It is assumed that the first camera and the second camera are vertically placed. And respectively positioning the first coordinates (P1 x, P1 y) and the second coordinates (P2 x, P2 y) of the highest point of the target object by using a target detection algorithm. Then the image distance DiffX of the two coordinate points is then = | P1y-P2y |. The target ratio Dp = d ÷ DiffX can thus be calculated, where d represents the actual distance of the first camera and the second camera. The coordinates of the center points of the two images are (P3 x, P3 y) and (P4 x, P4 y), respectively. Therefore, the coordinate height difference formula from the highest point coordinate of the target object to the central point of the image can be calculated as
Figure SMS_2
The height of the target object is Dp × DiffY + Ho, where Ho is the height of the image acquisition device, that is, the average height of the first camera and the second camera.
The first camera and the second camera are assumed to be vertically placed in a non-horizontal manner. And respectively positioning the first coordinates (P1 x, P1 y) and the second coordinates (P2 x, P2 y) of the highest point of the target object by using a target detection algorithm. The formula for calculating the image distance of the two coordinate points at that time is
Figure SMS_3
Wherein the DiffX is an image distance of two coordinate points. The target ratio Dp = d ÷ DiffX can thus be calculated, where d represents the actual distance of the first camera and the second camera. The coordinates of the center points of the two images are (P3 x, P3 y) and (P4 x, P4 y), respectively. Therefore, the coordinate height difference formula from the highest point coordinate of the target object to the central point of the image can be calculated as
Figure SMS_4
The height of the target object is Dp × DiffY + Ho, where Ho is the height of the image acquisition device, that is, the average height of the first camera and the second camera.
In the application, firstly, a first camera and a second camera which are integrated in advance in an image acquisition device are used for horizontally shooting a target object respectively to obtain a first image corresponding to the first camera and a second image corresponding to the second camera; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance; determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point. It can be seen that the coordinate difference of the highest position point of the target object on the first image and the second image obtained by simultaneously shooting the first camera and the second camera is determined, the actual distance between the first camera and the second camera is determined, the target proportional relation of the coordinate difference and the actual distance is obtained, and the height of the target object is determined based on the target proportional relation, the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point. Therefore, the two cameras are used for measuring the height, the cameras do not need to be calibrated, and the distance does not need to be calculated through depth information. The height of the target object can be efficiently calculated through the difference calculation of the imaging coordinate points of the target position and the parameters of the image acquisition device. The installation position of the camera in the invention is the horizontal direction of the target, and no space requirement is required above the target relative to an ultrasonic ranging scheme. And easily measure the target position, thereby verifying whether the position is proper; compared with the existing depth information ranging scheme, the two cameras do not need to be calibrated, so that a lot of workload is saved, and the precision is not easily influenced by the light environment.
In the above embodiment, a method for measuring height is specifically described, and in the present embodiment, a method for eliminating a synchronization error is specifically described.
Referring to fig. 3, an embodiment of the present application discloses a specific height measuring method, including:
step S21: the method comprises the steps of horizontally shooting a target object for multiple times by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance respectively to obtain a plurality of groups of first images and second images.
In this embodiment, a plurality of times of continuous shooting may be performed to obtain a plurality of sets of the first image and the second image.
Step S22: determining coordinate points of the highest position point of the target object respectively corresponding to the first image and the second image of each group to obtain a plurality of groups of first coordinate points and second coordinate points; the first image and the second image are images which are placed in the same preset coordinate system in advance.
Step S23: determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image.
Step S24: and respectively determining a plurality of initial heights of the target object by utilizing the target proportional relation, the actual heights of the first camera and/or the second camera and the first coordinate point and/or the second coordinate point of each group.
Step S25: determining the height of the target object based on the plurality of initial heights.
In this embodiment, after a plurality of sets of initial heights are obtained, the height of the target object may be determined according to a preset height determination rule. Generally, in order to eliminate the synchronization error of image acquisition of two cameras, continuous acquisition calculation is adopted for 7 times, two maximum values and two minimum values are removed, and the average value of the calculation results of the middle 3 times is taken. Typically 7 calculations can be completed in 1 second.
For the specific processes of the steps S22 to S24, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and details are not repeated here.
In this embodiment, first, a first camera and a second camera integrated in advance in an image acquisition device are used to horizontally shoot a target object for multiple times, so as to obtain a plurality of groups of first images and second images; determining coordinate points of the highest position point of the target object respectively corresponding to the first image and the second image of each group to obtain a plurality of groups of first coordinate points and second coordinate points; the first image and the second image are images which are placed in the same preset coordinate system in advance; determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image; respectively determining a plurality of initial heights of the target object by utilizing the target proportional relation, the actual heights of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point of each group; determining the height of the target object based on the plurality of initial heights. Therefore, the height of the target object is determined through the plurality of initial heights, the synchronization error of the two cameras can be eliminated, and the accuracy of the result is improved.
As described with reference to fig. 4, the embodiment of the present application further discloses a height measuring apparatus, including:
the image acquisition module 11 is configured to horizontally shoot a target object by using a first camera and a second camera integrated in an image acquisition device in advance, so as to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
a coordinate point determination module 12, configured to determine a first coordinate point and a second coordinate point, which correspond to a highest-position point of the target object on the first image and the second image, respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance;
a proportional relationship determination module 13, configured to determine a target proportional relationship based on an actual distance between the first camera and the second camera and an image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image;
an altitude determining module 14, configured to determine an altitude of the target object by using the target proportional relationship, the actual altitude of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
In the application, firstly, a first camera and a second camera which are integrated in advance in an image acquisition device are used for horizontally shooting a target object respectively to obtain a first image corresponding to the first camera and a second image corresponding to the second camera; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the first image and the second image are images which are placed in the same preset coordinate system in advance; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point. It can be seen that the coordinate difference of the highest position point of the target object on the first image and the second image obtained by simultaneously shooting the first camera and the second camera is determined, the actual distance between the first camera and the second camera is determined, the target proportional relation of the coordinate difference and the actual distance is obtained, and the height of the target object is determined based on the target proportional relation, the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point. Therefore, the height is measured by adopting the two cameras, the cameras do not need to be calibrated, and the distance does not need to be calculated through depth information. The height of the target object can be efficiently calculated through the difference calculation of the imaging coordinate points of the target position and the parameters of the image acquisition device.
In some specific embodiments, the coordinate point determining module 12 may be specifically configured to detect the first image and the second image by using a preset target detection algorithm, so as to determine a first coordinate point and a second coordinate point, corresponding to a highest position point of the target object, on the first image and the second image, respectively.
In some specific embodiments, the height measuring device may further include:
the fixing part setting module is used for setting a first camera fixing part and a second camera fixing part which are used for fixing cameras in the image acquisition device according to the preset distance requirement, so that the first camera fixing part and the second camera fixing part are used for fixing the first camera and the second camera respectively.
In some specific embodiments, the preset distance requirement is that a distance between the first camera fixing part and the second camera fixing part is smaller than a preset threshold.
In some specific embodiments, the height determining module 14 may specifically include:
the first height determining unit is used for determining the height of the target object by utilizing the target proportional relation, the actual height of the target camera and the target coordinate point; the target camera is any one of the first camera and the second camera, and the target coordinate point is a coordinate point corresponding to the target camera in the first coordinate point and the second coordinate point.
In some specific embodiments, the height determining module 14 may specifically include:
the height average value determining unit is used for calculating a height average value corresponding to the actual heights of the first camera and the second camera;
a coordinate point determining unit, configured to perform average calculation on coordinate values corresponding to the first coordinate point and the second coordinate point to obtain an averaged coordinate point;
a second height determining unit, configured to determine a height of the target object by using the target proportional relationship, the height average value, and the averaged coordinate point.
In some specific embodiments, the image obtaining module 11 may be specifically configured to perform multiple horizontal shots on the target object by using a first camera and a second camera that are integrated in advance in the image capturing device, so as to obtain a plurality of groups of first images and second images.
In some specific embodiments, the coordinate point determining module 12 may be specifically configured to determine coordinate points of the highest position point of the target object on the first image and the second image of each group respectively, so as to obtain a plurality of groups of first coordinate points and second coordinate points.
Correspondingly, the height determining module 14 may specifically include:
an initial height determining unit, configured to determine a plurality of initial heights of the target object respectively by using the target proportional relationship, actual heights of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point of each group;
a third height determining unit, configured to determine the height of the target object based on the plurality of initial heights.
Further, an electronic device is disclosed in the embodiments of the present application, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, which should not be construed as limiting the scope of the application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present disclosure. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input output interface 25, and a communication bus 26. Wherein the memory 22 is used for storing a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the height measuring method disclosed in any of the foregoing embodiments. In addition, the electronic device 20 in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide a working voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and an external device, and a communication protocol followed by the communication interface is any communication protocol applicable to the technical solution of the present application, and is not specifically limited herein; the input/output interface 25 is configured to obtain external input data or output data to the outside, and a specific interface type thereof may be selected according to specific application requirements, which is not specifically limited herein.
In addition, the storage 22 is used as a carrier for storing resources, and may be a read-only memory, a random access memory, a magnetic disk or an optical disk, etc., and the resources stored thereon may include an operating system 221, a computer program 222, etc., and the storage manner may be a transient storage manner or a permanent storage manner.
The operating system 221 is used for managing and controlling each hardware device on the electronic device 20 and the computer program 222, and may be Windows Server, netware, unix, linux, or the like. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the height measurement method by the electronic device 20 disclosed in any of the foregoing embodiments.
Further, the present application also discloses a computer-readable storage medium for storing a computer program; wherein the computer program when executed by a processor implements the height measurement method of the preceding disclosure. For the specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, which are not described herein again.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising a … …" does not exclude the presence of another identical element in a process, method, article, or apparatus that comprises the element.
The technical solutions provided by the present application are introduced in detail, and specific examples are applied in the description to explain the principles and embodiments of the present application, and the descriptions of the above examples are only used to help understanding the method and the core ideas of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A height measuring method, comprising:
respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance;
determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image;
and determining the height of the target object by using the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
2. The height measuring method according to claim 1, wherein the determining first and second coordinate points at which the highest-position point of the target object corresponds on the first and second images, respectively, comprises:
and detecting the first image and the second image by using a preset target detection algorithm so as to determine a first coordinate point and a second coordinate point of the highest position point of the target object, which respectively correspond to the first image and the second image.
3. The height measuring method according to claim 1, further comprising:
the image acquisition device is provided with a first camera fixing part and a second camera fixing part for fixing cameras according to a preset distance requirement, so that the first camera and the second camera are respectively fixed by the first camera fixing part and the second camera fixing part.
4. The height measuring method according to claim 3, wherein the predetermined distance requirement is that a distance between the first camera fixing part and the second camera fixing part is smaller than a predetermined threshold value.
5. The height measurement method according to claim 1, wherein the determining the height of the target object using the target proportional relationship, the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point comprises:
determining the height of the target object by using the target proportional relation, the actual height of the target camera and the target coordinate point; the target camera is any one of the first camera and the second camera, and the target coordinate point is a coordinate point corresponding to the target camera in the first coordinate point and the second coordinate point.
6. The height measurement method according to claim 1, wherein the determining the height of the target object using the target proportional relationship, the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point comprises:
calculating a height average value corresponding to the actual heights of the first camera and the second camera;
carrying out average calculation on coordinate values corresponding to the first coordinate point and the second coordinate point to obtain an averaged coordinate point;
and determining the height of the target object by using the target proportional relation, the height average value and the averaged coordinate point.
7. The height measuring method according to any one of claims 1 to 6, wherein a first camera and a second camera integrated in advance in an image acquisition device are used for horizontally shooting a target object respectively to obtain a first image corresponding to the first camera and a second image corresponding to the second camera; determining a first coordinate point and a second coordinate point which correspond to the highest position point of the target object on the first image and the second image respectively; the first image and the second image are images which are placed in the same preset coordinate system in advance, and the method comprises the following steps:
horizontally shooting a target object for multiple times by utilizing a first camera and a second camera which are integrated in an image acquisition device in advance respectively to obtain a plurality of groups of first images and second images;
determining coordinate points of the highest position point of the target object respectively corresponding to the first image and the second image of each group to obtain a plurality of groups of first coordinate points and second coordinate points; the first image and the second image are images which are placed in the same preset coordinate system in advance;
correspondingly, the determining the height of the target object by using the target proportional relationship, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point includes:
determining a plurality of initial heights of the target object respectively by using the target proportional relation, the actual heights of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point of each group;
determining the height of the target object based on the plurality of initial heights.
8. A height measuring device, comprising:
the image acquisition module is used for respectively horizontally shooting a target object by utilizing a first camera and a second camera which are integrated in the image acquisition device in advance so as to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
a coordinate point determination module, configured to determine a first coordinate point and a second coordinate point, where a highest-position point of the target object corresponds to each of the first image and the second image; the first image and the second image are images which are placed in the same preset coordinate system in advance;
the proportional relation determining module is used for determining a target proportional relation based on the actual distance between the first camera and the second camera and the image distance between the first coordinate point and the second coordinate point; the target proportional relation is a proportional relation between a unit coordinate distance and a unit actual distance on the image;
and the height determining module is used for determining the height of the target object by utilizing the target proportional relation, the actual height of the first camera and/or the second camera, and the first coordinate point and/or the second coordinate point.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the height measuring method of any one of claims 1 to 7.
10. A computer-readable storage medium for storing a computer program which, when executed by a processor, implements a height measuring method according to any one of claims 1 to 7.
CN202310143820.5A 2023-02-21 2023-02-21 Height measurement method, device, equipment and storage medium Active CN115839667B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310143820.5A CN115839667B (en) 2023-02-21 2023-02-21 Height measurement method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310143820.5A CN115839667B (en) 2023-02-21 2023-02-21 Height measurement method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115839667A true CN115839667A (en) 2023-03-24
CN115839667B CN115839667B (en) 2023-05-12

Family

ID=85579971

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310143820.5A Active CN115839667B (en) 2023-02-21 2023-02-21 Height measurement method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115839667B (en)

Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477260B1 (en) * 1998-11-02 2002-11-05 Nissan Motor Co., Ltd. Position measuring apparatus using a pair of electronic cameras
CN101228973A (en) * 2007-01-22 2008-07-30 殷实 Non-contact measurement method and system for human outside measurement
CN101876535A (en) * 2009-12-02 2010-11-03 北京中星微电子有限公司 Method, device and monitoring system for height measurement
US20110110559A1 (en) * 2009-06-30 2011-05-12 Yu-Hsiang Chen Optical Positioning Apparatus And Positioning Method Thereof
KR20110135594A (en) * 2010-06-11 2011-12-19 주식회사 선반도체 Method and device for measuring snow
CN102494609A (en) * 2011-11-18 2012-06-13 李志扬 Three-dimensional photographing process based on laser probe array and device utilizing same
US20140300722A1 (en) * 2011-10-19 2014-10-09 The Regents Of The University Of California Image-based measurement tools
CN105758319A (en) * 2016-03-21 2016-07-13 北京小米移动软件有限公司 Method and device for measuring height of target object through mobile terminal
CN105973140A (en) * 2016-04-29 2016-09-28 维沃移动通信有限公司 Method of measuring object spatial parameters and mobile terminal
CN106289161A (en) * 2016-08-01 2017-01-04 北京小米移动软件有限公司 Height measurement method and device
CN109448043A (en) * 2018-10-22 2019-03-08 浙江农林大学 Standing tree height extracting method under plane restriction
CN111524176A (en) * 2020-04-16 2020-08-11 深圳市沃特沃德股份有限公司 Method and device for measuring and positioning sight distance and computer equipment
CN111671360A (en) * 2020-05-26 2020-09-18 深圳拓邦股份有限公司 Sweeping robot position calculating method and device and sweeping robot
CN111932605A (en) * 2020-09-11 2020-11-13 广东韶钢松山股份有限公司 Size detection method and device, electronic equipment and readable storage medium
CN113409438A (en) * 2020-02-28 2021-09-17 华为技术有限公司 Digital photogrammetry method, electronic equipment and system
WO2021192906A1 (en) * 2020-03-25 2021-09-30 Necソリューションイノベータ株式会社 Calculation method
CN114838704A (en) * 2022-04-28 2022-08-02 杭州海康威视系统技术有限公司 Height detection method and device and computer readable storage medium
CN114926316A (en) * 2022-05-30 2022-08-19 上海商汤智能科技有限公司 Distance measuring method, distance measuring device, electronic device, and storage medium

Patent Citations (18)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6477260B1 (en) * 1998-11-02 2002-11-05 Nissan Motor Co., Ltd. Position measuring apparatus using a pair of electronic cameras
CN101228973A (en) * 2007-01-22 2008-07-30 殷实 Non-contact measurement method and system for human outside measurement
US20110110559A1 (en) * 2009-06-30 2011-05-12 Yu-Hsiang Chen Optical Positioning Apparatus And Positioning Method Thereof
CN101876535A (en) * 2009-12-02 2010-11-03 北京中星微电子有限公司 Method, device and monitoring system for height measurement
KR20110135594A (en) * 2010-06-11 2011-12-19 주식회사 선반도체 Method and device for measuring snow
US20140300722A1 (en) * 2011-10-19 2014-10-09 The Regents Of The University Of California Image-based measurement tools
CN102494609A (en) * 2011-11-18 2012-06-13 李志扬 Three-dimensional photographing process based on laser probe array and device utilizing same
CN105758319A (en) * 2016-03-21 2016-07-13 北京小米移动软件有限公司 Method and device for measuring height of target object through mobile terminal
CN105973140A (en) * 2016-04-29 2016-09-28 维沃移动通信有限公司 Method of measuring object spatial parameters and mobile terminal
CN106289161A (en) * 2016-08-01 2017-01-04 北京小米移动软件有限公司 Height measurement method and device
CN109448043A (en) * 2018-10-22 2019-03-08 浙江农林大学 Standing tree height extracting method under plane restriction
CN113409438A (en) * 2020-02-28 2021-09-17 华为技术有限公司 Digital photogrammetry method, electronic equipment and system
WO2021192906A1 (en) * 2020-03-25 2021-09-30 Necソリューションイノベータ株式会社 Calculation method
CN111524176A (en) * 2020-04-16 2020-08-11 深圳市沃特沃德股份有限公司 Method and device for measuring and positioning sight distance and computer equipment
CN111671360A (en) * 2020-05-26 2020-09-18 深圳拓邦股份有限公司 Sweeping robot position calculating method and device and sweeping robot
CN111932605A (en) * 2020-09-11 2020-11-13 广东韶钢松山股份有限公司 Size detection method and device, electronic equipment and readable storage medium
CN114838704A (en) * 2022-04-28 2022-08-02 杭州海康威视系统技术有限公司 Height detection method and device and computer readable storage medium
CN114926316A (en) * 2022-05-30 2022-08-19 上海商汤智能科技有限公司 Distance measuring method, distance measuring device, electronic device, and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
董秋雷;吴毅红;胡占义;: "基于视频的实时自动人体高度测量", 自动化学报 *
高莉平;徐爱俊;: "应用智能终端的立木高度测量方法", 东北林业大学学报 *
鲍文霞,梁栋,翟鸣,周婷婷: "一种基于图像的运动物体检测及高度分析算法", 微机发展 *

Also Published As

Publication number Publication date
CN115839667B (en) 2023-05-12

Similar Documents

Publication Publication Date Title
CN104613930B (en) Method and device for measuring distance as well as mobile terminal
CN111650446A (en) Power parameter measuring method, system, device, computer equipment and storage medium
CN109781163B (en) Calibration parameter validity checking method, device, equipment and storage medium
CN103945043A (en) Photographic method and electronic device
CN104835141A (en) Mobile terminal and method for building three-dimensional model through laser range finding
CN104111059A (en) Distance measuring and locating device and method and terminal
CN103644865A (en) Plane area measuring method based on digital image analysis
CN104833342B (en) Mobile terminal and method of establishing stereoscopic model through multipoint distance measurement
CN108709542A (en) Method for fast measuring, system based on coordinate transform and device
CN107967701B (en) Calibration method, device and equipment of depth camera equipment
CN109696153B (en) RTK tilt measurement accuracy detection method and system
CN113014816A (en) Method and device for determining trigger point of flying shooting
CN112291024A (en) Information synchronization method, information synchronization device and electronic equipment
CN108603752B (en) Deflection angle detection method and device and jitter compensation method and device for camera module of terminal
CN114661049A (en) Inspection method, inspection device and computer readable medium
CN115839667A (en) Height measuring method, device, equipment and storage medium
CN109489658B (en) Moving target positioning method and device and terminal equipment
CN117490722A (en) Multi-sensor external parameter determination method and device, electronic equipment and medium
CN114754695B (en) Multi-view-field bridge deflection measuring device and method and storage medium
CN106839994B (en) A kind of measuring system for image
CN115184373A (en) Calibration method and related device
US11415695B2 (en) Distance measuring system with layout generation functionality
CN111028287B (en) Method and device for determining a transformation matrix of radar coordinates and camera coordinates
CN112344966A (en) Positioning failure detection method and device, storage medium and electronic equipment
CN113358318B (en) Cable collision detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant