CN115839667B - Height measurement method, device, equipment and storage medium - Google Patents

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

Info

Publication number
CN115839667B
CN115839667B CN202310143820.5A CN202310143820A CN115839667B CN 115839667 B CN115839667 B CN 115839667B CN 202310143820 A CN202310143820 A CN 202310143820A CN 115839667 B CN115839667 B CN 115839667B
Authority
CN
China
Prior art keywords
camera
image
height
coordinate point
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.)
Active
Application number
CN202310143820.5A
Other languages
Chinese (zh)
Other versions
CN115839667A (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 measurement method, a height measurement device, height measurement 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 using a first camera and a second camera which are integrated in advance in an image acquisition device so as to obtain a corresponding first image and a corresponding second image; determining 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; determining a target proportional relationship 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation. In this way, the height of the target object can be efficiently calculated by calculating the imaging coordinates of the target position.

Description

Height measurement method, device, equipment and storage medium
Technical Field
The present invention relates to the field of image algorithms, and in particular, to a method, an apparatus, a device, and a storage medium for measuring a height.
Background
In some situations, it is desirable to quickly measure the height of an object or body. The manual measurement method is difficult to meet the requirement, and therefore an electronic measurement method is needed. The existing electronic equipment for measuring the height is characterized in that ultrasonic waves are arranged above a body to be measured, and the height is calculated by utilizing ultrasonic ranging; the other is to measure the distance by using the depth information of the binocular camera. The ultrasonic scheme requires to be installed above the tested body, has specific requirements on installation space and measurement space, and causes larger errors due to target position deviation. In addition, the binocular camera depth information ranging scheme is required to calibrate the binocular camera, the calibration process is complicated, and the calibration result is easily affected by the light environment, so that a larger error is generated.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a height measurement method, apparatus, device, and storage medium, which can efficiently acquire the height of a target object. The specific scheme is as follows:
in a first aspect, the present application discloses a height measurement method comprising:
Respectively horizontally shooting a target object by using a first camera and a second camera which are integrated in advance in an 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 corresponding 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image;
and determining the height of the target object by utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation.
Optionally, the determining a first coordinate point and a second coordinate point of the highest position point of the target object, which correspond 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 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.
Optionally, the method further comprises:
and a first camera fixing part and a second camera fixing part for fixing a camera are arranged in the image acquisition device according to the preset interval 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 a distance between the first camera fixing portion and the second camera fixing portion is smaller than a preset threshold.
Optionally, the determining the height of the target object by using the actual height of the first camera and the first coordinate point, and/or the actual height of the second camera and the second coordinate point and using the target proportional relationship includes:
determining the height of the target object by utilizing the target proportion 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 actual height of the first camera and the first coordinate point, and/or the actual height of the second camera and the second coordinate point and using the target proportional relationship includes:
calculating the 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 average post-coordinate point;
and determining the height of the target object by using the target proportion relation, the height average value and the average post-coordinate point.
Optionally, the first camera and the second camera which are integrated in advance in the image acquisition device are used for respectively carrying out horizontal shooting on the target object 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 corresponding 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 carrying out horizontal shooting on a target object for a plurality of times by using a first camera and a second camera which are integrated in advance in an image acquisition device so as to obtain a plurality of groups of first images and second images;
determining coordinate points corresponding to the highest position point of the target object on the first image and the second image of each group respectively 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and the target proportional relation includes:
utilizing the first camera and the first coordinate points of each group, and/or the actual height of the second camera and the second coordinate points of each group, and utilizing the target proportion relation to respectively determine a plurality of initial heights of the target object;
and determining the height of the target object based on the initial heights.
In a second aspect, the present application discloses a height measurement device comprising:
the image acquisition module is used for respectively horizontally shooting the target object by utilizing a first camera and a second camera which are integrated in advance in the image acquisition device so as to obtain a corresponding first image and a corresponding second image;
The coordinate point determining module is used for 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 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 relationship is a proportional relationship 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportion relation.
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 storing a computer program which, when executed by a processor, implements the aforementioned height measurement method.
In the application, first, a first camera and a second camera which are integrated in advance in an image acquisition device are utilized to respectively shoot a target object horizontally 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 corresponding 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation. And the coordinate difference of the highest position point of the target object on the first image and the second image obtained by simultaneous shooting of 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 between the coordinate difference and the actual distance is obtained, and the height of the target object is determined based on the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point by utilizing the target proportional relation. In this way, by measuring the height by using two cameras, the cameras do not need to be calibrated, and the distance does not need to be calculated by 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 that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a height measurement method disclosed herein;
FIG. 2 is a diagram of an image acquisition device disclosed herein;
FIG. 3 is a flow chart of a specific height measurement method disclosed herein;
FIG. 4 is a schematic view of a height measurement device disclosed herein;
fig. 5 is a block diagram of an electronic device disclosed in the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
In some situations, it is desirable to quickly measure the height of an object or body. The manual measurement method is difficult to meet the requirement, and therefore an electronic measurement method is needed. The existing electronic equipment for measuring the height has specific requirements on the installation space and the measurement space, and meanwhile, the target position deviation can cause larger errors or the measurement result is easily influenced by the 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 the target object, and has clear calculation principle and small error.
Referring to fig. 1, an embodiment of the present application discloses a height measurement method, including:
step S11: respectively horizontally shooting a target object by using a first camera and a second camera which are integrated in advance in an image acquisition device so as to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
in this embodiment, a target object is simultaneously and horizontally photographed by using a first camera and a second camera which are integrated in advance in an image acquisition device, so as 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 of the same type and a fixed tool. The first camera fixing part and the second camera fixing part for fixing the cameras are arranged in the image acquisition device according to the preset interval requirement, so that the first cameras and the second cameras are respectively fixed by the first camera fixing part and the second camera fixing part. 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, and the preset threshold is set by practical conditions. The two cameras are respectively connected to the computer host through USB wires. The image acquisition device keeps two cameras horizontally installed, the height is fixed, and the angle needs to ensure that the cameras shoot forward horizontally. The distance between the two cameras has a certain influence on the measurement precision, and the imaging over-deflection of the two cameras to the same target caused by the too far distance is generally required to be within one tenth of the height difference between the height to be measured and the height difference 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 so as to be connected with two cameras of the image acquisition system. The other parts can meet the requirements of image acquisition, analysis and calculation, the related algorithm is not complex, and the mainstream computers on the market can meet the performance requirements. Therefore, in the actual construction process, the installation position and angle of the image acquisition equipment inevitably generate some reasonable errors, and the related errors can be eliminated through limiting the effective distance and adjusting parameters such as the camera distance, the acquisition device height and the like.
Step S12: determining 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; 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 on the first image and the second image, respectively, includes: and detecting the first image and the second image by using a preset target detection algorithm 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 utilizing 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 are respectively obtained.
Step S13: determining a target proportional relationship 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 relationship is a proportional relationship 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 relationship based on the proportional relationship 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 utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation.
In this embodiment, after the target proportional relationship is obtained, the height of the target object may be calculated correspondingly based on the target proportional relationship.
In a first specific embodiment, the determining the height of the target object by using the actual height of the first camera and the first coordinate point, and/or the actual height of the second camera and the second coordinate point, and using the target proportional relationship includes: determining the height of the target object by utilizing the target proportion 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 proportion relation is obtained, any one image from the first image and the second image can be selected to perform the height calculation of the target object. For example, a first image is selected for height calculation of the target object. And after the target proportion relation is obtained, obtaining the corresponding actual height of the first camera and the height of the first coordinate point. Since the camera is capturing the target object horizontally, it will be appreciated that the center point of the image represents the position of the camera on the first image. Therefore, the coordinate height difference between the coordinates of the first coordinate point and the central point is obtained, and the height of the target object is obtained by multiplying the value of the target proportional relation by the coordinate height difference and adding the actual height of the first camera.
In a second specific embodiment, the determining the height of the target object by using the actual height of the first camera and the first coordinate point, and/or the actual height of the second camera and the second coordinate point and using the target proportional relationship includes: calculating the 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 average post-coordinate point; and determining the height of the target object by using the target proportion relation, the height average value and the average post-coordinate point. I.e. after the target proportional relation is obtained, the height calculation of the target object can be performed by combining the first image and the second image. In this way, the determined height of the target object is more accurate.
The height calculation assuming that the first camera and the second camera are placed differently will be described next.
Assume that the first camera and the second camera are placed horizontally. And respectively positioning the first coordinates of the highest point of the target object to be (P1 x, P1 y) and the second coordinates to be (P2 x, P2 y) by using a target detection algorithm. The image distances diffx= |p1x—p2x| of those 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. Thus, the coordinate height difference from the coordinate of the highest point of the target object to the center 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 capturing device, that is, the average heights of the first camera and the second camera.
Assume that the first camera and the second camera are vertically placed. And respectively positioning the first coordinates of the highest point of the target object to be (P1 x, P1 y) and the second coordinates to be (P2 x, P2 y) by using a target detection algorithm. Then the image distances diffx= |p1y-p2y| of the 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 formula of the coordinate height difference from the coordinate of the highest point of the target object to the center 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 capturing device, that is, the average heights of the first camera and the second camera.
It is assumed that the first camera and the second camera are not placed horizontally and vertically. And respectively positioning the first coordinates of the highest point of the target object to be (P1 x, P1 y) and the second coordinates to be (P2 x, P2 y) by using a target detection algorithm. The calculation formula of the image distance of the two coordinate points at that time is that
Figure SMS_3
Wherein DiffX is the 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 formula of the coordinate height difference from the coordinate of the highest point of the target object to the center 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 capturing device, that is, the average heights of the first camera and the second camera.
In the application, first, a first camera and a second camera which are integrated in advance in an image acquisition device are utilized to respectively shoot a target object horizontally 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 corresponding 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation. And 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 proportion relation between the coordinate difference and the actual distance is obtained, and the height of the target object is determined based on the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point by utilizing the target proportion relation. In this way, by measuring the height by using two cameras, the cameras do not need to be calibrated, and the distance does not need to be calculated by 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 is in the horizontal direction of the target, and no space is required above the target relative to the ultrasonic ranging scheme. And the target position is easy to measure, so that whether the position is proper is checked; compared with the existing depth information ranging scheme, the method does not need to calibrate two cameras, saves a lot of workload, and is not easy to influence by light environment in precision.
The foregoing embodiment specifically describes a height measurement method, and in this embodiment, a method for eliminating synchronization errors will be specifically described.
Referring to fig. 3, an embodiment of the present application discloses a specific height measurement method, including:
step S21: and respectively carrying out horizontal shooting on the target object for a plurality of times by using a first camera and a second camera which are integrated in advance in the image acquisition device so as to obtain a plurality of groups of first images and second images.
In this embodiment, a plurality of consecutive shots may be performed to obtain a plurality of sets of first images and second images.
Step S22: determining coordinate points corresponding to the highest position point of the target object on the first image and the second image of each group respectively 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image.
Step S24: the first camera and the first coordinate points of each group, and/or the actual height of the second camera and the second coordinate points of each group, and respectively determine a plurality of initial heights of the target object by utilizing the target proportion relation.
Step S25: and determining the height of the target object based on the 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 determining rule. In general, in order to eliminate the synchronization error of the image acquisition of the two cameras, continuous acquisition and calculation are adopted for 7 times, two maximum values and two minimum values are removed, and an average value of calculation results of 3 times in the middle is taken. Typically 7 calculations can be done in 1 second.
For the specific process of steps S22 to S24, reference may be made to the corresponding content disclosed in the foregoing embodiment, and no further description is given here.
In this embodiment, first, a first camera and a second camera integrated in advance in an image acquisition device are used to respectively perform multiple horizontal shooting on a target object, so as to obtain a plurality of groups of first images and second images; determining coordinate points corresponding to the highest position point of the target object on the first image and the second image of each group respectively 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image; the first camera and the first coordinate points of each group, and/or the actual height of the second camera and the second coordinate points of each group, and respectively determining a plurality of initial heights of the target object by utilizing the target proportion relation; and determining the height of the target object based on the initial heights. In this way, the heights of the target objects are determined through the initial heights, so that the synchronization error acquired by 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 correspondingly discloses a height measurement device, including:
an image acquisition module 11, configured to horizontally shoot a target object by using a first camera and a second camera that are integrated in advance in an image acquisition device, so as to obtain a first image corresponding to the first camera and a second image corresponding to the second camera;
a coordinate point determining module 12, configured 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; the first image and the second image are images which are placed in the same preset coordinate system in advance;
a proportional relation determining module 13, configured to determine a target proportional relation 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image;
the height determining module 14 is configured to determine the height of the target object by using the actual height of the first camera and the first coordinate point, and/or using the actual height of the second camera and the second coordinate point, and using the target proportional relationship.
In the application, first, a first camera and a second camera which are integrated in advance in an image acquisition device are utilized to respectively shoot a target object horizontally 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 corresponding to the highest position point of the target object on the first image and the second image respectively; determining a target proportional relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image; and determining the height of the target object by utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation. And determining 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, determining the actual distance between the first camera and the second camera, obtaining a target proportional relation between the coordinate difference and the actual distance, and determining the height of the target object based on the target proportional relation and the actual height of the first camera and/or the second camera, the first coordinate point and/or the second coordinate point. In this way, by measuring the height by using two cameras, the cameras do not need to be calibrated, and the distance does not need to be calculated by 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 measurement device may specifically further include:
the fixed part setting module is used for setting a first camera fixed part and a second camera fixed part for fixing a camera in the image acquisition device according to a preset interval requirement so as to respectively fix the first camera and the second camera by utilizing the first camera fixed part and the second camera fixed part.
In some specific embodiments, the preset spacing requirement is that a spacing between the first camera mount and the second camera mount is less 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 proportion 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 the height average value corresponding to the actual heights of the first camera and the second camera;
the coordinate point determining unit is used for carrying out average calculation on coordinate values corresponding to the first coordinate point and the second coordinate point so as to obtain an average post-coordinate point;
and the second height determining unit is used for determining the height of the target object by using the target proportion relation, the height average value and the average post-coordinate point.
In some specific embodiments, the image acquisition module 11 may be specifically configured to perform multiple horizontal shots of the target object by using a first camera and a second camera that are integrated in advance in the image acquisition device, so as to obtain several 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 corresponding to the highest position point of the target object on the first image and the second image of each group, so as to obtain a plurality of groups of first coordinate points and second coordinate points.
Accordingly, the height determining module 14 may specifically include:
the initial height determining unit is used for determining the first camera and the first coordinate points of each group, and/or determining the actual height of the second camera and the second coordinate points of each group, and determining a plurality of initial heights of the target object respectively by utilizing the target proportional relation;
and the third height determining unit is used for determining the height of the target object based on the initial heights.
Further, the embodiment of the present application further discloses an electronic device, and fig. 5 is a block diagram of the electronic device 20 according to an exemplary embodiment, where the content of the figure is not to be considered as any limitation on the scope of use of the present application.
Fig. 5 is a schematic structural diagram of an electronic device 20 according to an embodiment of the present application. 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 measurement 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 an operating 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 the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein; the input/output interface 25 is used for acquiring external input data or outputting external output data, and the specific interface type thereof may be selected according to the specific application requirement, which is not limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device 20 and computer programs 222, which may be Windows Server, netware, unix, linux, etc. 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 performed by the electronic device 20 disclosed in any of the embodiments described above.
Further, the application also discloses a computer readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the previously disclosed height measurement method. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
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 elements and steps are described above generally in terms of functionality in order to clearly illustrate the 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 solution. 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. The software modules may be disposed 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 is further noted that relational terms such as first and second, and the like are 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. Moreover, 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 one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing has outlined the detailed description of the preferred embodiment of the present application, and the detailed description of the principles and embodiments of the present application has been provided herein by way of example only to facilitate the understanding of the method and core concepts of the present application; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method of measuring height, comprising:
respectively horizontally shooting a target object by using a first camera and a second camera which are integrated in advance in an 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 corresponding 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 relationship 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 relationship is a proportional relationship between a unit coordinate distance and a unit actual distance on the image;
And determining the height of the target object by utilizing the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportional relation.
2. The height measurement method according to claim 1, wherein the determining the first coordinate point and the second coordinate point of the highest position point of the target object on the first image and the second image, respectively, comprises:
and detecting the first image and the second image by using a preset target detection algorithm 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.
3. The height measurement method according to claim 1, further comprising:
and a first camera fixing part and a second camera fixing part for fixing a camera are arranged in the image acquisition device according to the preset interval 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. A height measurement method according to claim 3, wherein the preset spacing requirement is that the spacing between the first camera fixing portion and the second camera fixing portion is smaller than a preset threshold.
5. The height measurement method according to claim 1, wherein the determining the height of the target object using the actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and using the target proportional relationship comprises:
determining the height of the target object by utilizing the target proportion 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and using the target proportional relationship comprises:
calculating the 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 average post-coordinate point;
And determining the height of the target object by using the target proportion relation, the height average value and the average post-coordinate point.
7. The height measurement method according to any one of claims 1 to 6, wherein the target object is horizontally photographed by using a first camera and a second camera integrated in advance in an image acquisition device, respectively, 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 corresponding 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 carrying out horizontal shooting on a target object for a plurality of times by using a first camera and a second camera which are integrated in advance in an image acquisition device so as to obtain a plurality of groups of first images and second images;
determining coordinate points corresponding to the highest position point of the target object on the first image and the second image of each group respectively 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and the target proportional relation includes:
utilizing the first camera and the first coordinate points of each group, and/or the actual height of the second camera and the second coordinate points of each group, and utilizing the target proportion relation to respectively determine a plurality of initial heights of the target object;
and determining the height of the target object based on the initial heights.
8. A height measurement device, comprising:
the image acquisition module is used for respectively carrying out horizontal shooting on a target object by utilizing a first camera and a second camera which are 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;
the coordinate point determining module is used for 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;
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 relationship is a proportional relationship 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 actual height of the first camera and the first coordinate point and/or the actual height of the second camera and the second coordinate point and utilizing the target proportion relation.
9. An electronic device, comprising:
a memory for storing a computer program;
a processor for executing the computer program to implement the height measurement method according to 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 the height measurement 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 CN115839667A (en) 2023-03-24
CN115839667B true 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110135594A (en) * 2010-06-11 2011-12-19 주식회사 선반도체 Method and device for measuring snow
CN109448043A (en) * 2018-10-22 2019-03-08 浙江农林大学 Standing tree height extracting method under plane restriction
CN111671360A (en) * 2020-05-26 2020-09-18 深圳拓邦股份有限公司 Sweeping robot position calculating method and device and sweeping robot

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3596314B2 (en) * 1998-11-02 2004-12-02 日産自動車株式会社 Object edge position measuring device and moving object traffic judging device
CN101228973B (en) * 2007-01-22 2011-08-03 殷实 Non-contact measurement method and system for human outside measurement
TWI379224B (en) * 2009-06-30 2012-12-11 Cheng Uei Prec Ind Co Ltd Optical positing apparatus and positing method thereof
CN101876535B (en) * 2009-12-02 2015-11-25 北京中星微电子有限公司 A kind of height measurement method, device and supervisory system
US9696897B2 (en) * 2011-10-19 2017-07-04 The Regents Of The University Of California Image-based measurement tools
CN102494609B (en) * 2011-11-18 2013-09-18 李志扬 Three-dimensional photographing process based on laser probe array and device utilizing same
CN105758319B (en) * 2016-03-21 2019-03-22 北京小米移动软件有限公司 The method and apparatus for measuring target object height by 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
CN113409438A (en) * 2020-02-28 2021-09-17 华为技术有限公司 Digital photogrammetry method, electronic equipment and system
JPWO2021192906A1 (en) * 2020-03-25 2021-09-30
CN111524176A (en) * 2020-04-16 2020-08-11 深圳市沃特沃德股份有限公司 Method and device for measuring and positioning sight distance and computer equipment
CN111932605B (en) * 2020-09-11 2023-12-01 广东韶钢松山股份有限公司 Size detection method, size detection 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

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20110135594A (en) * 2010-06-11 2011-12-19 주식회사 선반도체 Method and device for measuring snow
CN109448043A (en) * 2018-10-22 2019-03-08 浙江农林大学 Standing tree height extracting method under plane restriction
CN111671360A (en) * 2020-05-26 2020-09-18 深圳拓邦股份有限公司 Sweeping robot position calculating method and device and sweeping robot

Also Published As

Publication number Publication date
CN115839667A (en) 2023-03-24

Similar Documents

Publication Publication Date Title
CN110111384B (en) Calibration method, device and system of TOF (time of flight) depth module
WO2016155074A1 (en) Correcting and focusing method and system for included angle of optical axis, and dual-camera equipment
CN107967701B (en) Calibration method, device and equipment of depth camera equipment
CN105699982B (en) The high-precision camera chip multipoint ranging apparatus and method of double excitation calibration
CN108709542A (en) Method for fast measuring, system based on coordinate transform and device
CN109781163B (en) Calibration parameter validity checking method, device, equipment and storage medium
EP3548838B1 (en) Wire rope measuring device and wire rope measuring method
CN111427027A (en) Method, device and system for calibrating multi-line laser radar
CN104111059A (en) Distance measuring and locating device and method and terminal
GB2554796A (en) Testing 3D imaging systems
CN109682398B (en) Method, device and system for calibrating orientation elements in complete machine of stereo mapping camera
KR20120058802A (en) Apparatus and method for calibrating 3D Position in 3D position/orientation tracking system
CN115839667B (en) Height measurement method, device, equipment and storage medium
Godinho et al. An efficient technique for surface strain recovery from photogrammetric data using meshless interpolation
CN110631499B (en) Digital image deformation measuring method based on non-grid method and electronic equipment
US10977821B2 (en) High accuracy extrinsic calibration procedure for cameras and range sensors
CN115683046A (en) Distance measuring method, distance measuring device, sensor and computer readable storage medium
CN204613404U (en) Based on the multipoint ranging apparatus of wire harness laser instrument and common CCD
CN115018922A (en) Distortion parameter calibration method, electronic device and computer readable storage medium
KR101475742B1 (en) Apparatus and method for performing photogrammetry
CN207280477U (en) A kind of a wide range of dynamic testing angle precision detection device of spaceborne sweep mechanism
CN111504269A (en) Underwater scale measuring method and device
CN113358318B (en) Cable collision detection method, device, equipment and storage medium
CN112198494A (en) Time-of-flight module calibration method, device and system and terminal equipment
CN107990853B (en) A kind of source image distance detecting method and device

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