WO2018032860A1 - 一种测量方法及装置 - Google Patents
一种测量方法及装置 Download PDFInfo
- Publication number
- WO2018032860A1 WO2018032860A1 PCT/CN2017/086592 CN2017086592W WO2018032860A1 WO 2018032860 A1 WO2018032860 A1 WO 2018032860A1 CN 2017086592 W CN2017086592 W CN 2017086592W WO 2018032860 A1 WO2018032860 A1 WO 2018032860A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- image
- distance
- measured
- capturing device
- image capturing
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C3/00—Measuring distances in line of sight; Optical rangefinders
- G01C3/10—Measuring distances in line of sight; Optical rangefinders using a parallactic triangle with variable angles and a base of fixed length in the observation station, e.g. in the instrument
- G01C3/12—Measuring distances in line of sight; Optical rangefinders using a parallactic triangle with variable angles and a base of fixed length in the observation station, e.g. in the instrument with monocular observation at a single point, e.g. coincidence type
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C3/00—Measuring distances in line of sight; Optical rangefinders
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01C—MEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
- G01C11/00—Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
- G01C11/04—Interpretation of pictures
- G01C11/30—Interpretation of pictures by triangulation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/50—Depth or shape recovery
Definitions
- the present application relates to the field of video surveillance technologies, and in particular, to a measurement method and apparatus.
- a laser range finder can be installed in the camera to realize the distance by the laser range finder.
- Measurement or, according to the Chinese patent application with the publication number CN203813888, entitled “A Vehicle Range Ranging Module with Dual Cameras", a stereo camera can be used for shooting, thereby realizing the distance by stereoscopic vision technology of the stereo camera. measuring.
- the purpose of the embodiment of the present application is to provide a measurement method and device, so as to realize the ranging function of the image acquisition device at a low production cost under the premise of ensuring convenient installation of the image acquisition device.
- An embodiment of the present application provides a measurement method, which is applied to an image collection device, and the method package include:
- the calculating the object to be measured and the image based on the first distance, the erection height of the image capturing device, and the pitch angle of the image capturing device The second distance between the collection devices, including:
- the method further includes:
- the method further includes:
- the calculating the waiting is performed based on the second distance, the fourth distance, the erection height of the image capturing device, and a pitch angle of the image capturing device.
- the height of the measurement object including:
- the obtaining a fourth distance between a horizontal line where the highest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located is obtained.
- the distance between the side of the set of parallel sides farther from the ground and the horizontal line where the center point of the image picture is located is taken as the fourth distance.
- the method before the capturing the object to be measured in the image image corresponding to the image data file, the method further includes:
- the image data file is processed to convert the bit width of the image data file to a set bit width.
- the calculating the waiting is performed based on the second distance, the fourth distance, the erection height of the image capturing device, and a pitch angle of the image capturing device.
- the height of the measurement object including:
- the obtaining a first distance between a horizontal line where the lowest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located is obtained.
- the distance between the side of the set of parallel sides that is closer to the ground and the horizontal line where the center point of the image picture is located is taken as the first distance.
- the calculating the object to be measured and the image based on the first distance, the erection height of the image capturing device, and the pitch angle of the image capturing device The second distance between the collection devices, including:
- the embodiment of the present application further provides a measuring device, which is applied to an image collecting device, and the device includes:
- An image acquisition module configured to acquire image data to generate an image data file
- An image processing module configured to capture an object to be measured in an image image corresponding to the image data file
- a first measurement module configured to obtain a first distance between a horizontal line where the lowest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located;
- a second measuring module configured to calculate a second distance between the object to be measured and the image capturing device based on the first distance, a height of the image capturing device, and a pitch angle of the image capturing device .
- the second measurement module includes:
- a first calculating unit configured to calculate a third distance between the first target point and a center point of the imaging target surface according to the first distance, wherein the first target point is the lowest point Corresponding points on the imaging target surface of the optical lens of the image acquisition device;
- a second calculating unit configured to calculate an angle between the first connection and the ground according to the third distance and a pitch angle of the image capturing device, where the first connection is an actual position of the lowest point a line connecting the optical center of the optical lens;
- a third calculating unit configured to calculate a second distance between the object to be measured and the image capturing device according to an angle between the first connection and the ground, and an erection height of the image capturing device.
- the device further includes:
- a third measurement module configured to obtain a horizontal line of the highest point of the object to be measured in the image picture and the image picture after capturing an object to be measured in an image picture corresponding to the image data file The fourth distance between the horizontal lines where the center point is located;
- a fourth measuring module configured to calculate a second distance, the fourth distance, an erection height of the image capturing device, and after calculating a second distance between the object to be measured and the image capturing device
- the elevation angle of the image acquisition device calculates the height of the object to be measured.
- the fourth measurement module includes:
- a fourth calculating unit configured to calculate, according to the fourth distance, a fifth distance between the second target point and a center point of the imaging target surface, wherein the second target point is the highest point Corresponding points on the imaging target surface of the optical lens of the image acquisition device;
- a fifth calculating unit configured to calculate an angle between the third connection and the ground according to the fifth distance and a pitch angle of the image capturing device, wherein the third connection is the highest point a connection between the actual position and the optical center of the optical lens;
- a sixth calculating unit configured to calculate a height of the object to be measured according to an angle between the third connection and the ground, an erection height of the image capturing device, and the second distance.
- the third measurement module includes:
- a first object to be measured processing unit configured to enclose the object to be measured with a target rectangle, and make a set of parallel sides of the two parallel sides of the target rectangle parallel to a horizontal line of a center point of the image frame,
- the target rectangle is a rectangle having the smallest area among the rectangles that can surround the object to be measured;
- the first distance determining unit is configured to use a distance between a side of the set of parallel sides that is farther from the ground and a horizontal line where the center point of the image picture is located as the fourth distance.
- the device further includes:
- bit width conversion module configured to process the image data file to convert a bit width of the image data file to a set before capturing an object to be measured in an image image corresponding to the image data file Bit width.
- the fourth measurement module includes:
- a first elevation angle detecting unit configured to detect whether a pitch angle of the image capturing device changes before calculating a height of the object to be measured
- a first elevation angle correction unit configured to correct a pitch angle of the image acquisition device in a case where a change in a pitch angle of the image acquisition device is changed
- a height calculation unit configured to calculate a height of the object to be measured based on the second distance, the fourth distance, a height of the image capturing device, and a corrected pitch angle of the image acquisition.
- the first measurement module includes:
- a second object to be measured processing unit configured to surround the object to be measured with a target rectangle, and make a set of parallel sides of the two sets of parallel sides of the target rectangle be parallel to a horizontal line of a center point of the image frame,
- the target rectangle is a rectangle having the smallest area among the rectangles that can surround the object to be measured;
- the second distance determining unit is configured to use, as the first distance, a distance between a side of the set of parallel sides that is closer to the ground and a horizontal line where the center point of the image picture is located.
- the second measurement module includes:
- a second elevation angle detecting unit configured to detect whether a pitch angle of the image capturing device changes before calculating a second distance between the object to be measured and the image capturing device
- a second elevation angle correction unit configured to correct a pitch angle of the image acquisition device in a case where a change in a pitch angle of the image acquisition device is changed
- a distance calculating unit configured to calculate, between the object to be measured and the image capturing device, based on the first distance, the erection height of the image capturing device, and the corrected pitch angle of the image capturing device The second distance.
- the device further includes:
- the alarm module is configured to output an alarm signal if the second distance is less than a preset distance threshold.
- the device further includes:
- a display module configured to display, in the image image, a second distance and a height corresponding to the object to be measured.
- the embodiment of the present application further provides a storage medium for storing executable program code, and the executable program code executes the above measurement method at runtime.
- the embodiment of the present application further provides an application program for performing execution of the above measurement method at runtime.
- An embodiment of the present application further provides an image collection device, including:
- processor a memory, a communication interface, and a bus
- the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
- the memory stores executable program code
- the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
- the embodiment of the present application provides a measurement method and device.
- the method is applied to an image capturing device, and the method includes: acquiring image data to generate an image data file; capturing an object to be measured in an image image corresponding to the image data file; and obtaining a lowest point of the object to be measured in the image image
- the first distance between the horizontal line and the horizontal line where the center point of the image frame is located; based on the first distance, the erection height of the image capturing device, and the pitch angle of the image capturing device, the second between the object to be measured and the image capturing device is calculated distance.
- the image acquisition device does not realize the measurement of the distance by the laser ranging technology or the stereo vision technology, but is based on the first distance, the erection height of the image acquisition device, and the image acquisition device.
- the pitch angle is used to measure the distance. Therefore, there is no need to set up devices such as laser emission and laser reception in the image acquisition device.
- the shape of the image acquisition device does not need to be as large as a stereo computer, and only needs to be in the image acquisition device.
- the hardware and software make some adjustments so that they can perform the above steps. Therefore, the image acquisition device can not only measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
- Figure 2 is a view showing an image screen on a display screen
- FIG. 3 is a specific flowchart of S104 in FIG. 1;
- FIG. 4 is a schematic diagram of photographing of an image acquisition device
- FIG. 5 is another schematic diagram of the image capture device
- FIG. 6 is a structural block diagram of a measuring apparatus according to an embodiment of the present application.
- the embodiment of the present application provides a method and device for dissolving a folder.
- the embodiment of the present application provides a measurement method and device.
- a measurement method provided by the embodiment of the present application is first introduced below.
- the image capturing device may be a camera, such as a monocular camera.
- the image capturing device may also be other types of devices capable of performing image capturing functions. Do not make any restrictions.
- the measurement method may include:
- the image capturing device can acquire an optical signal corresponding to the current shooting scene, and then convert the acquired optical signal into an image signal, where the image information can constitute image data, and then the electronic device can generate an image according to the image data. data files.
- the object to be measured may be a pedestrian, a vehicle, or the like.
- the type of the object to be measured is not limited thereto, and may be determined according to actual conditions, which is not limited in this embodiment.
- the specific process of capturing the object to be measured in the image picture corresponding to the image data file may be implemented by using a processing method of the direction gradient histogram HOG and the support vector machine SVM.
- HOG is a feature descriptor used for object detection in computer vision and image processing, which constructs features by calculating and counting the gradient direction histogram of the local region of the image.
- SVM is a supervised learning model in the field of machine learning that is commonly used for pattern recognition, classification, and regression analysis.
- the processing method of the HOG and the SVM may include the following steps:
- Sample establishment establish a positive and negative sample set of images adapted to the requirements of the HOG descriptor
- Feature extraction Using the HOG descriptor to perform batch feature extraction on the established positive and negative sample sets of images, thereby establishing a feature sample set;
- Classifier training Supervised training of SVM using feature sample sets
- Target detection is performed on the video sequence using the target detection method based on HOG description.
- the object to be measured in the image screen corresponding to the image data file can be finally captured.
- the lowest point of the object to be measured in the image picture is point A or point B (points A and B are on the same horizontal line)
- the horizontal line of the lowest point of the object to be measured in the image picture is The line where the line segment AB is located, the center point of the image picture is T point, and correspondingly, the first distance is the vertical distance between the point T and the line segment AB, that is, d AB .
- the erection height of the image capturing device refers to: the distance from the center point of the imaging target surface to the ground in the optical lens of the image capturing device, that is, H shown in FIG. 4 and FIG. 5; the pitch of the image capturing device;
- the angle refers to the angle between the line connecting the optical center of the optical lens and the center point of the imaging target surface to the ground in the image capturing device, that is, the ⁇ EOM shown in FIGS. 4 and 5.
- S104 that is, based on the first distance, the erection height of the image capturing device, and the elevation angle of the image capturing device, calculate the object to be measured and the image capturing device.
- the second distance between the two can include:
- the calculation formula used when calculating the third distance may be:
- d bot is the third distance
- d AB is the first distance
- Him is the height resolution of the image frame
- H sensor is the height of the imaging target surface.
- S1042 Calculate an angle between the first connection and the ground according to the third distance and the elevation angle of the image acquisition device, wherein the first connection is a connection between the actual position of the lowest point and the optical center of the optical lens.
- the calculation formula used when calculating the angle between the first line and the ground may be:
- ⁇ EOF is the angle between the first connection and the second connection
- the first connection is the connection between the actual position of the lowest point and the optical center of the optical lens
- the second connection is the optical center and imaging of the optical lens.
- the line connecting the center points of the target surface, d bot is the third distance
- d f is the focal length of the optical lens
- ⁇ is the angle between the first line and the ground
- ⁇ EOM and ⁇ are the elevation angles of the image acquisition device.
- S1043 Calculate a second distance between the object to be measured and the image capturing device according to an angle between the first connection and the ground, and an erection height of the image capturing device.
- the calculation formula used when calculating the second distance may be:
- Dis is the second distance
- H is the erection height of the image acquisition device
- ⁇ is the angle between the first connection and the ground.
- the P r point is the actual position of the lowest point of the object to be measured
- the O point is the optical center of the optical lens
- the E point is the center point of the imaging target surface
- the OE is perpendicular to the imaging target surface
- the F point (P) The intersection of the line where the r O is connected and the imaging target surface is the lowest point on the imaging target surface
- the ground is the horizontal line where P r Q is located
- the FQ is perpendicular to the ground.
- the length of the FN in FIG. 4 is much smaller than the NQ, that is, the erection height H of the image capturing device, so that the FQ can be considered to be equal to H, correspondingly,
- H, d bot , d f and ⁇ can be pre-stored data.
- d f can be relatively easily determined, and the user can pre-store the d f value in the image capturing device.
- H and ⁇ after the image acquisition device is installed, the user can measure H by using a length measuring tool such as a scale, and measure ⁇ by an angle measuring tool such as a protractor, and then prestore the measured H and ⁇ . In the image acquisition device.
- the image acquisition device to acquire the value of the parameter may be its own internal prestored H, d f ⁇ and the like.
- H d f ⁇
- d bot it cannot be stored in advance, but it can be determined according to the following formula:
- the H im and H sensor may also be values pre-stored in the image acquisition device.
- the image acquisition device can obtain d bot , and then obtain ⁇ according to the obtained d bot , and then, according to the geometric relationship between ⁇ , H and Dis, It's very easy to get Dis.
- the image acquisition device can obtain the second distance very easily, and the calculation amount of the image acquisition device is very small, and the image acquisition device only needs a very short time to obtain the second distance, so that Can better meet the actual needs.
- the implementation form of calculating the second distance between the object to be measured and the image capturing device is not limited to the above implementation form, and The implementation form can be determined according to the actual situation, and the embodiment does not limit this.
- the image capturing device only needs to capture the object to be measured in the image image after obtaining the image data file, and obtain the horizontal line of the object to be measured at the lowest point in the image image and the center of the image frame.
- the first distance between the horizontal lines where the points are located, and based on the first distance, the erection height of the image acquisition device, and the elevation angle of the image acquisition device, the second distance between the object to be measured and the image acquisition device itself can be obtained.
- the image acquisition device does not realize the measurement of the distance by the laser ranging technology or the stereo vision technology, but is based on the first distance, the erection height of the image acquisition device, and the image acquisition device.
- the pitch angle is used to measure the distance. Therefore, there is no need to set up devices such as laser emission and laser reception in the image acquisition device.
- the shape of the image acquisition device does not need to be as large as a stereo computer, and only needs to be in the image acquisition device.
- the software and hardware make some corresponding adjustments so that they can execute S101 to S104. Therefore, the image acquisition device can not only measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
- the method may further include:
- a fourth distance between the horizontal line where the highest point of the object to be measured is located in the image picture and the horizontal line where the center point of the image picture is located is obtained.
- the method may further include:
- the height of the object to be measured is calculated based on the second distance, the fourth distance, the erection height of the image capture device, and the pitch angle of the image capture device.
- the height of the object to be measured is the distance between the highest point of the object to be measured and the ground in the actual scene, that is, the vertical distance between N points and P r Q in FIG. 5 .
- the implementation form of calculating the height of the object to be measured is various, and is described below by way of example.
- calculating the height of the object to be measured based on the second distance, the fourth distance, the erection height of the image capturing device, and the pitch angle of the image capturing device may include:
- the calculation formula used when calculating the fifth distance may be:
- d top is the fifth distance
- d DC is the fourth distance
- Him is the height resolution of the image frame
- H sensor is the height of the imaging target surface.
- the angle between the third line and the ground is calculated according to the fifth distance and the pitch angle of the image capturing device, wherein the third line is the connection between the actual position of the highest point and the optical center of the optical lens.
- calculating the third connection and the ground according to the fifth distance and the elevation angle of the image capture device The calculation formula used between the angles can be:
- ⁇ EOF is the angle between the third connection and the fourth connection
- the third connection is the connection between the actual position of the highest point and the optical center of the optical lens
- the fourth connection is the optical center and imaging of the optical lens.
- the line connecting the center point of the target surface, d top is the fifth distance
- d f is the focal length of the optical lens
- ⁇ is the angle between the third line and the ground
- ⁇ EOM and ⁇ are the elevation angles of the image acquisition device.
- the height of the object to be measured is calculated according to the angle between the third line and the ground, the erection height of the image capturing device, and the second distance.
- the calculation formula used when calculating the height of the object to be measured may be:
- h is the height of the object to be measured
- H is the height of the image acquisition device
- Dis is the second distance
- ⁇ is the angle between the third line and the ground.
- the N point is the actual position of the highest point of the object to be measured
- the O point is the optical center of the optical lens
- the E point is the center point of the imaging target surface
- the OE is perpendicular to the imaging target surface
- the F point NO The intersection of the line where the connection is located and the imaging target surface is the highest point on the imaging target surface
- the ground is the horizontal line where P r Q is located
- the FQ is perpendicular to the ground.
- H, Dis, d top , d f and ⁇ can both be pre-stored data.
- d f can be relatively easily determined, and the user can pre-store the d f value in the image capturing device.
- H and ⁇ after the image acquisition device is installed, the user can measure H by using a length measuring tool such as a scale, and measure ⁇ by an angle measuring tool such as a protractor, and then prestore the measured H and ⁇ . In the image acquisition device.
- the image acquisition device can obtain the values of the parameters such as H, d f and ⁇ which are pre-stored in the internal image. Dis can be obtained from the first distance and the preset distance calculation formula. For d top , it cannot be stored in advance, but it can be determined according to the following formula:
- the H im and H sensor may also be values pre-stored in the image acquisition device.
- the image acquisition device can obtain d top , and then obtain ⁇ according to the obtained d top , and then, according to the geometric relationship between h, ⁇ , H and Dis It is very easy to get h.
- the calculation amount of the image acquisition device is very small, and the image acquisition device only needs a very short time to obtain the height of the object to be measured, which can satisfactorily satisfy Actual demand.
- obtaining a fourth distance between a horizontal line where the highest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located may include:
- the object to be measured is surrounded by the target rectangle, and one of the two parallel sides of the target rectangle is parallel to the horizontal line of the center point of the image frame, wherein the target rectangle is the area of each rectangle capable of enclosing the object to be measured The smallest rectangle;
- the distance between the side of the set of parallel sides farther from the ground and the horizontal line where the center point of the image picture is located is taken as the fourth distance.
- the image capturing device may display the image image corresponding to the image data file in the display screen.
- the image capture device can capture an object to be measured in the image frame, such as the pedestrian shown in FIG. 2.
- the image acquisition device can use the target rectangle ABCD to surround the object to be measured, In the target rectangle ABCD, the AB side and the CD side are parallel to the horizontal line where the center point T of the image picture is located. It is easy to see that the intersection of the CD edge and the outer contour of the pedestrian is the highest point of the object to be measured in the image picture, and the distance between the CD side and the horizontal line where the center point T of the image picture is located is taken as the fourth distance. Just fine.
- obtaining a first distance between a horizontal line where the lowest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located may include:
- the object to be measured is surrounded by the target rectangle, and one of the two parallel sides of the target rectangle is parallel to the horizontal line of the center point of the image frame, wherein the target rectangle is a rectangle capable of enclosing the object to be measured The smallest rectangle in the middle;
- the distance between the side of the set of parallel sides that is closer to the ground and the horizontal line where the center point of the image picture is located is taken as the first distance.
- the image capturing device may display the image image corresponding to the image data file in the display screen.
- the image capture device can capture an object to be measured in the image frame, such as the pedestrian shown in FIG. 2.
- the image acquisition device can surround the object to be measured with the target rectangle ABCD.
- the target rectangle ABCD the AB edge and the CD edge are parallel to the horizontal line where the center point T of the image frame is located. It is easy to see that the intersection of the AB edge and the outer contour of the pedestrian is the lowest point of the object to be measured in the image picture, and the distance between the AB side and the horizontal line where the center point T of the image picture is located is taken as the first distance. Just fine.
- capturing a map corresponding to the image data file may also include before the object to be measured in the picture;
- the image data file is processed to convert the bit width of the image data file to a set bit width.
- bit width of the setting is: a bit width capable of ensuring that the image picture corresponding to the image data file is normally displayed on the display screen, for example, 8 bits.
- the image capturing device needs to display the image screen corresponding to the image data file in the display screen.
- the image data file directly collected by the image acquisition device has a relatively high bit width, for example, 12 bits or 14 bits, but the bit width of the image data file corresponding to the image screen displayed on the display screen is displayed.
- the display requires that the bit width of the image data file be the set bit width, for example, 8 bits.
- the image capturing device may process the image data file, thereby converting the bit width of the image data file to the set bit width, so that The image screen corresponding to the image data file can be successfully displayed on the display screen to facilitate the subsequent steps.
- the embodiment can ensure that the picture corresponding to the image data file is successfully displayed on the display screen, so as to perform the subsequent steps, thereby obtaining the second distance and the height of the object to be measured.
- the image capture device will be mounted on a moving object such as a vehicle.
- the image capture device can be mounted to the front of the vehicle.
- the elevation angle of the image acquisition device installed at the front of the vehicle will change.
- the image acquisition device still uses its pre-stored pitch angle to calculate the height of the object to be measured. Will cause the calculated height value to be less accurate.
- calculating the height of the object to be measured based on the second distance, the fourth distance, the erection height of the image capturing device, and the pitch angle of the image capturing device may include:
- the corrected elevation angle is calculated to calculate the height of the object to be measured.
- an electronic compass can be mounted on the image capturing device, and the amount of change in the pitch angle of the vehicle can be measured by the electronic compass.
- the pitch angle pre-stored in the image acquisition device is ⁇ EOM
- the amount of change in the pitch angle measured by the electronic compass is Then the actual pitch angle of the image acquisition device is ⁇ EOM and The difference between the two.
- the elevation angle of the image acquisition device can be corrected, that is, the EOM and The difference between the two is used as the actual pitch angle for height calculation.
- the second distance between the object to be measured and the image capturing device is calculated based on the first distance, the erection height of the image capturing device, and the pitch angle of the image capturing device, including:
- the second distance between the object to be measured and the image acquisition device is calculated based on the first distance, the erection height of the image acquisition device, and the corrected elevation angle of the image acquisition device.
- the process of correcting the pitch angle by the image capturing device may refer to the process of calculating the height of the object to be measured, and details are not described herein.
- the image acquisition device in the embodiment of the present application can not only measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs. .
- the embodiment of the present application further provides a measuring device. See Figure 6, The block diagram of the measurement device provided by the embodiment of the present application is shown. As shown in FIG. 6, the device can be applied to an image capture device, and the device can include:
- An image acquisition module 61 configured to acquire image data to generate an image data file
- the image processing module 62 is configured to capture an object to be measured in an image image corresponding to the image data file;
- a first measurement module 63 configured to obtain a first distance between a horizontal line where the lowest point of the object to be measured is located in the image picture and a horizontal line where the center point of the image picture is located;
- the second measuring module 64 is configured to calculate a second distance between the object to be measured and the image capturing device based on the first distance, the erection height of the image capturing device, and the pitch angle of the image capturing device.
- the image acquisition device does not realize the measurement of the distance by the laser ranging technology or the stereo vision technology, but is based on the first distance, the erection height of the image acquisition device, and the image acquisition device.
- the pitch angle is used to measure the distance. Therefore, there is no need to set up devices such as laser emission and laser reception in the image acquisition device.
- the shape of the image acquisition device does not need to be as large as a stereo computer, and only needs to be in the image acquisition device. Software and hardware can make some corresponding adjustments. Therefore, the image acquisition device can not only measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
- the second measurement module may include:
- a first calculating unit configured to calculate, according to the first distance, a third distance between the first target point and a center point of the imaging target surface, wherein the first target point is the lowest point of the imaging target of the optical lens of the image capturing device Corresponding point on the face;
- a second calculating unit configured to calculate an angle between the first connection and the ground according to the third distance and the elevation angle of the image capturing device, wherein the first connection is the lowest point of the actual position and the optical lens of the optical lens line;
- the third calculating unit is configured to calculate a second distance between the object to be measured and the image capturing device according to an angle between the first connection and the ground, and an erection height of the image capturing device.
- the device may further include:
- a third measurement module configured to obtain, between the image to be measured in the image image corresponding to the image data file, between the horizontal line where the highest point of the object to be measured is located in the image picture and the horizontal line where the center point of the image picture is located Fourth distance
- a fourth measuring module configured to calculate a to-be-measured based on the second distance, the fourth distance, the erection height of the image capturing device, and the pitch angle of the image capturing device after calculating the second distance between the object to be measured and the image capturing device The height of the object.
- the fourth measurement module may include:
- a fourth calculating unit configured to calculate, according to the fourth distance, a fifth distance between the second target point and a center point of the imaging target surface, wherein the second target point is the highest point of the imaging target of the optical lens of the image capturing device Corresponding point on the face;
- a fifth calculating unit configured to calculate an angle between the third connection and the ground according to the fifth distance and the elevation angle of the image capturing device, wherein the third connection is the actual position of the highest point and the optical center of the optical lens Connection
- the sixth calculating unit is configured to calculate the height of the object to be measured according to the angle between the third connecting line and the ground, the erection height of the image capturing device, and the second distance.
- the third measurement module may include:
- the first object to be measured processing unit is configured to enclose the object to be measured by using the target rectangle, and make one of the two parallel sides of the target rectangle parallel to a horizontal line of the center point of the image frame, wherein the target rectangle is capable of a rectangle having the smallest area among the rectangles of the object to be measured;
- the first distance determining unit is configured to use a distance between a side of the set of parallel sides that is farther from the ground and a horizontal line where the center point of the image picture is located as the fourth distance.
- the device may further include:
- the bit width conversion module is configured to process the image data file to convert the bit width of the image data file to a set bit width before capturing the object to be measured in the image image corresponding to the image data file.
- the fourth measurement module may include:
- a first elevation angle detecting unit configured to detect whether a pitch angle of the image capturing device changes before calculating a height of the object to be measured
- a first pitch angle correction unit configured to correct a pitch angle of the image capturing device when a pitch angle of the image capturing device changes
- the height calculation unit is configured to calculate the height of the object to be measured based on the second distance, the fourth distance, the erection height of the image acquisition device, and the corrected elevation angle of the image acquisition.
- the first measurement module may include:
- a second object to be measured processing unit is configured to surround the object to be measured by using a target rectangle, and make one of the two parallel sides of the target rectangle parallel to a horizontal line of the center point of the image frame, wherein the target rectangle is capable of a rectangle having the smallest area among the rectangles of the object to be measured;
- the second distance determining unit is configured to use a distance between a side of the set of parallel sides that is closer to the ground and a horizontal line where the center point of the image picture is located as the first distance.
- the second measurement module may include:
- a second elevation angle detecting unit configured to detect whether a pitch angle of the image capturing device changes before calculating a second distance between the object to be measured and the image capturing device
- a second elevation angle correction unit configured to correct a pitch angle of the image acquisition device when a pitch angle of the image acquisition device changes
- the distance calculating unit is configured to calculate a second distance between the object to be measured and the image capturing device based on the first distance, the erection height of the image capturing device, and the corrected pitch angle of the image capturing device.
- the device may further include:
- the alarm module is configured to output an alarm signal if the second distance is less than a preset distance threshold.
- the image acquisition device can be mounted on a vehicle.
- the second distance is less than the preset distance threshold, it indicates that the distance between the vehicle on which the image acquisition device is installed and the object to be measured, such as the vehicle on the road surface and the pedestrian, is very close.
- the image acquisition device can issue an alarm signal. For example, an audible signal, the occupant on the vehicle can detect the situation in time and respond to the situation quickly, so as to effectively ensure the safety of the vehicle and the pedestrian.
- the device may further include:
- a display module configured to display, in the image image, a second distance and a height corresponding to the object to be measured.
- the user can know the height information and the distance information of the object to be measured through the content displayed in the image screen, which can provide a better user experience.
- the image acquisition device in the embodiment of the present application can not only measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs. .
- a storage medium provided by an embodiment of the present application is described below.
- the embodiment of the present application further provides a storage medium for storing executable program code, and the executable program code executes the above measurement method at runtime.
- the image acquisition device in the embodiment of the present invention not only can measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
- the embodiment of the present application further provides an application program for performing execution of the above measurement method at runtime.
- the image acquisition device in the embodiment of the present invention not only can measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
- An embodiment of the present application further provides an image collection device, including:
- processor a memory, a communication interface, and a bus
- the processor, the memory, and the communication interface are connected by the bus and complete communication with each other;
- the memory stores executable program code
- the processor runs a program corresponding to the executable program code by reading executable program code stored in the memory for:
- the image acquisition device in the embodiment of the present invention not only can measure the distance between itself and the object to be measured, but also has a relatively low production cost, is convenient and convenient to install, and can better meet actual needs.
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Radar, Positioning & Navigation (AREA)
- Remote Sensing (AREA)
- Electromagnetism (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Length Measuring Devices By Optical Means (AREA)
- Measurement Of Optical Distance (AREA)
Abstract
一种测量方法及装置。其中,测量方法应用于图像采集设备,其包括:采集图像数据以生成图像数据文件(S101);捕捉图像数据文件所对应的图像画面中的待测量对象(S102);获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离(S103);基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离(S104)。与相关技术相比,图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
Description
本申请要求于2016年8月15日提交中国专利局、申请号为201610669751.1、发明名称为“一种测量方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
本申请涉及视频监控技术领域,特别是涉及一种测量方法及装置。
随着科学技术的迅猛发展,人们对摄像机等图像采集设备的功能提出了越来越高的要求,例如:人们希望图像采集设备能够自动识别出其拍摄到的对象与其自身之间的距离。为了达到上述目的,在相关技术中,根据公开号为CN100388760,名称为“测距式数码相机”的中国专利申请,可以在摄像机中安装激光测距仪,以通过激光测距仪来实现距离的测量,或者,根据公开号为CN203813888,名称为“一种采用双摄像头的车用测距模块”的中国专利申请,可以采用立体摄像机来进行拍摄,从而借助立体摄像机的立体视觉技术来实现距离的测量。
但是,在进行距离的测量时,以上两种方式均存在着一定的缺陷:对于前者而言,摄像机中需要设置激光发射和激光接收等装置,故摄像机的生产成本较高;对于后者而言,立体摄像机的体积一般较大,故其安装起来较为麻烦。
因此,如何在保证图像采集设备安装便捷的前提下,以较低的生产成本实现图像采集设备的测距功能是一个亟待解决的问题。
发明内容
本申请实施例的目的在于提供一种测量方法及装置,以在保证图像采集设备安装便捷的前提下,以较低的生产成本实现图像采集设备的测距功能。
本申请实施例提供了一种测量方法,应用于图像采集设备,所述方法包
括:
采集图像数据以生成图像数据文件;
捕捉所述图像数据文件所对应的图像画面中的待测量对象;
获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;
基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,所述基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离,包括:
根据所述第一距离,计算第一目标点与所述成像靶面的中心点之间的第三距离,其中,所述第一目标点为所述最低点在所述图像采集设备的光学镜头的成像靶面上的对应点;
根据所述第三距离和所述图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,所述第一连线为所述最低点的实际位置与所述光学镜头的光心的连线;
根据所述第一连线与地面的夹角,以及所述图像采集设备的架设高度,计算所述待测量对象与所述图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,所述捕捉所述图像数据文件所对应的图像画面中的待测量对象之后,所述方法还包括:
获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离;
相应地,所述计算所述待测量对象与所述图像采集设备之间的第二距离之后,所述方法还包括:
基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度,包括:
根据所述第四距离,计算第二目标点与所述成像靶面的中心点之间的第五距离,其中,所述第二目标点为所述最高点在所述图像采集设备的光学镜头的成像靶面上的对应点;
根据所述第五距离和所述图像采集设备的俯仰角,计算第三连线与地面之间的夹角,其中,所述第三连线为所述最高点的实际位置与所述光学镜头的光心的连线;
根据所述第三连线与地面的夹角,所述图像采集设备的架设高度,以及所述第二距离,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离,包括:
利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;
将该组平行边中离地面较远的边与所述图像画面的中心点所在的水平线之间的距离作为第四距离。
在本申请实施例的一种具体实施方式中,所述捕捉所述图像数据文件所对应的图像画面中的待测量对象之前,所述方法还包括;
对所述图像数据文件进行处理,以将所述图像数据文件的位宽转换为设定的位宽。
在本申请实施例的一种具体实施方式中,所述基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度,包括:
检测所述图像采集设备的俯仰角是否发生变化;
若为是,对所述图像采集设备的俯仰角进行修正;
基于所述第二距离、所述第四距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离,包括:
利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;
将该组平行边中离地面较近的边与所述图像画面的中心点所在的水平线之间的距离作为第一距离。
在本申请实施例的一种具体实施方式中,所述基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离,包括:
检测所述图像采集设备的俯仰角是否发生变化;
若为是,对所述图像采集设备的俯仰角进行修正;
基于所述第一距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
本申请实施例还提供了一种测量装置,应用于图像采集设备,所述装置包括:
图像采集模块,用于采集图像数据以生成图像数据文件;
图像处理模块,用于捕捉所述图像数据文件所对应的图像画面中的待测量对象;
第一测量模块,用于获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;
第二测量模块,用于基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,所述第二测量模块,包括:
第一计算单元,用于根据所述第一距离,计算第一目标点与所述成像靶面的中心点之间的第三距离,其中,所述第一目标点为所述最低点在所述图像采集设备的光学镜头的成像靶面上的对应点;
第二计算单元,用于根据所述第三距离和所述图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,所述第一连线为所述最低点的实际位置与所述光学镜头的光心的连线;
第三计算单元,用于根据所述第一连线与地面的夹角,以及所述图像采集设备的架设高度,计算所述待测量对象与所述图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,所述装置还包括:
第三测量模块,用于在捕捉所述图像数据文件所对应的图像画面中的待测量对象之后,获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离;
第四测量模块,用于在计算所述待测量对象与所述图像采集设备之间的第二距离之后,基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述第四测量模块,包括:
第四计算单元,用于根据所述第四距离,计算第二目标点与所述成像靶面的中心点之间的第五距离,其中,所述第二目标点为所述最高点在所述图像采集设备的光学镜头的成像靶面上的对应点;
第五计算单元,用于根据所述第五距离和所述图像采集设备的俯仰角,计算第三连线与地面之间的夹角,其中,所述第三连线为所述最高点的实际位置与所述光学镜头的光心的连线;
第六计算单元,用于根据所述第三连线与地面的夹角,所述图像采集设备的架设高度,以及所述第二距离,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述第三测量模块,包括:
第一待测量对象处理单元,用于利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;
第一距离确定单元,用于将该组平行边中离地面较远的边与所述图像画面的中心点所在的水平线之间的距离作为第四距离。
在本申请实施例的一种具体实施方式中,所述装置还包括:
位宽转换模块,用于在捕捉所述图像数据文件所对应的图像画面中的待测量对象之前,对所述图像数据文件进行处理,以将所述图像数据文件的位宽转换为设定的位宽。
在本申请实施例的一种具体实施方式中,所述第四测量模块,包括:
第一俯仰角检测单元,用于在计算所述待测量对象的高度之前,检测所述图像采集设备的俯仰角是否发生变化;
第一俯仰角修正单元,用于在所述图像采集设备的俯仰角发生变化的情况下,对所述图像采集设备的俯仰角进行修正;
高度计算单元,用于基于所述第二距离、所述第四距离、所述图像采集设备的架设高度,以及所述图像采集经修正后的俯仰角,计算所述待测量对象的高度。
在本申请实施例的一种具体实施方式中,所述第一测量模块,包括:
第二待测量对象处理单元,用于利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;
第二距离确定单元,用于将该组平行边中离地面较近的边与所述图像画面的中心点所在的水平线之间的距离作为第一距离。
在本申请实施例的一种具体实施方式中,所述第二测量模块,包括:
第二俯仰角检测单元,用于在计算所述待测量对象与所述图像采集设备之间的第二距离之前,检测所述图像采集设备的俯仰角是否发生变化;
第二俯仰角修正单元,用于在所述图像采集设备的俯仰角发生变化的情况下,对所述图像采集设备的俯仰角进行修正;
距离计算单元,用于基于所述第一距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,所述装置还包括:
报警模块,用于在所述第二距离小于预设的距离阈值的情况下,输出报警信号。
在本申请实施例的一种具体实施方式中,所述装置还包括:
显示模块,用于在所述图像画面中显示所述待测量对象所对应的第二距离和高度。
本申请实施例还提供了一种存储介质,用于存储可执行程序代码,所述可执行程序代码在运行时执行上述测量方法。
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行执行上述测量方法。
本申请实施例还提供了一种图像采集设备,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
采集图像数据以生成图像数据文件;
捕捉所述图像数据文件所对应的图像画面中的待测量对象;
获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;
基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
本申请实施例提供了一种测量方法及装置。其中,该方法应用于图像采集设备,该方法包括:采集图像数据以生成图像数据文件;捕捉图像数据文件所对应的图像画面中的待测量对象;获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离;基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离。与相关技术相比,本申请实施例中,图像采集设备并不是通过激光测距技术或者立体视觉技术来实现距离的测量的,而是基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角来实现距离的测量的,因此,该图像采集设备内不需要设置激光发射和激光接收等装置,该图像采集设备的外形也不需要像立体计算机那么庞大,只需要对图像采集设备内的软硬件做出一些相应的调整,使其可以执行上述步骤即可。因此,该图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
通过参考附图会更加清楚地理解本申请的特征和优点,附图是示意性的而不应理解为对本申请进行任何限制,在附图中:
图1为本申请实施例提供的测量方法的流程图;
图2为图像画面在显示屏上的展示图;
图3为图1中S104的具体流程图;
图4为图像采集设备的拍摄原理图;
图5为图像采集设备的又一拍摄原理图;
图6为本申请实施例提供的测量装置的结构框图。
为了简化文件夹解散过程的操作步骤,提高文件夹的解散效率,并提高用户体验,本申请实施例提供了一种文件夹的解散方法及装置。
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
为了解决相关技术存在的问题,本申请实施例提供了一种测量方法及装置。
下面首先对本申请实施例所提供的一种测量方法进行介绍。
需要说明的是,本申请实施例所提供的一种测量方法可以应用于图像采集设备。在实际应用中,该图像采集设备可以为相机,例如单目相机等,当然,该图像采集设备也可以为其他类型的、能够实现图像采集功能的设备,本实施例对图像采集设备的具体类型不做任何限定。
参见图1,图中示出了本申请实施例所提供的一种测量方法的流程图。如图1所示,该测量方法可以包括:
S101,采集图像数据以生成图像数据文件。
其中,图像采集设备可以获取与当前拍摄场景相对应的光学信号,然后将获取到的光学信号转换为图像信号,该图像信息即可构成图像数据,接下来,电子设备可以根据上述图像数据生成图像数据文件。
S102,捕捉图像数据文件所对应的图像画面中的待测量对象。
具体地,待测量对象可以为行人、车辆等,当然,待测量对象的类型并不局限于此,具体可以根据实际情况来确定,本实施例对此不做任何限定。
本实施例中,捕捉图像数据文件所对应的图像画面中的待测量对象的具体过程可以通过采用方向梯度直方图HOG和支持向量机SVM的处理方法来实现。
需要说明的是,HOG是一种在计算机视觉和图像处理中用来进行物体检测的特征描述子,其通过计算和统计图像局部区域的梯度方向直方图来构成特征。SVM是机器学习领域的一个有监督的学习模型,其通常用来进行模式识别、分类以及回归分析。
具体地,HOG和SVM的处理方法可以包括以下步骤:
A、样本建立:建立适应HOG描述器要求的图像正负样本集;
B、特征提取:利用HOG描述器对已建立的图像正负样本集进行批量特征提取,从而建立特征样本集;
C、建立SVM模型:建立含有类惩罚因子的SVM模型;
D、分类器训练:使用特征样本集对SVM进行有监督训练;
E、目标检测:使用基于HOG描述的目标检测方法对视频序列进行目标检测。
当采用上述处理方法后,最终即可捕捉到图像数据文件所对应的图像画面中的待测量对象。
需要说明的是,捕捉图像数据文件所对应的图像画面中的待测量对象的具体实现方式并不局限于上述情况,其也可以通过其他方式来确定,本实施例在此不再一一赘述。
S103,获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离。
如图2所示,假设待测量对象在图像画面中的最低点为A点或B点(A点和B点在同一水平线上),待测量对象在图像画面中的最低点所在的水平线即为
线段AB所在的直线,图像画面的中心点为T点,相应地,第一距离即为T点至线段AB之间的垂直距离,即dAB。
需要强调的是,获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离的具体实现形式多样,为了布局清楚,后续进行举例介绍。
S104,基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离。
需要说明的是,图像采集设备的架设高度是指:图像采集设备的光学镜头中,成像靶面的中心点至地面的距离,即图4和图5中所示的H;图像采集设备的俯仰角是指:图像采集设备中,光学镜头的光心和成像靶面的中心点两者的连线与地面之间的夹角,即图4和图5中所示的∠EOM。
在本申请实施例的一种具体实施方式中,如图3所示,S104,即基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离,可以包括:
S1041,根据第一距离,计算第一目标点与成像靶面的中心点之间的第三距离,其中,第一目标点为最低点在图像采集设备的光学镜头的成像靶面上的对应点。
具体地,根据第一距离,计算第三距离时采用的计算公式可以为:
其中,dbot为第三距离,dAB为第一距离,Him为图像画面的高度分辨率,Hsensor为成像靶面的高度。
S1042,根据第三距离和图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,第一连线为最低点的实际位置与光学镜头的光心的连线。
具体地,根据第三距离和图像采集设备的俯仰角,计算第一连线与地面的夹角时采用的计算公式可以为:
其中,∠EOF为第一连线与第二连线的夹角,第一连线为最低点的实际位置与光学镜头的光心的连线,第二连线为光学镜头的光心与成像靶面的中心点的连线,dbot为第三距离,df为光学镜头的焦距,β为第一连线与地面的夹角,∠EOM和α为图像采集设备的俯仰角。
S1043,根据第一连线与地面的夹角,以及图像采集设备的架设高度,计算待测量对象与图像采集设备之间的第二距离。
具体地,根据第一连线与地面的夹角,以及图像采集设备的架设高度,计算第二距离时采用的计算公式可以为:
其中,Dis为第二距离,H为图像采集设备的架设高度,β为第一连线与地面的夹角。
下面结合图4,对第二距离的具体计算原理进行说明。
如图4所示,Pr点为待测量对象的最低点的实际位置,O点为光学镜头的光心,E点为成像靶面的中心点,OE与成像靶面垂直,F点(PrO的连线所在的直线与成像靶面的交点)为最低点在成像靶面上的对应点,地面为PrQ所在的水平线,并且,FQ与地面垂直。
根据图4中的几何关系容易得到:
本实施例中,若想要得到Dis,需要获得H、dbot、df和α。其中,H、df和α可以为预存的数据。具体地,对于df来说,只要确定了光学镜头的规格,df就可以较为容易地确定,用户可以将该df值预存于图像采集设备内。而对于H和α来说,在图像采集设备安装好之后,用户可以采用刻度尺等长度测量工具测得H,并采用量角器等角度测量工具测得α,然后将测得的H和α均预存于图像采集设备内。这样,当需要计算第二距离时,图像采集设备可以去获取自身内部预存的H、df和α等参数的值。而对于dbot而言,其并不能预先
存储,但是其可以根据下列公式来确定:
其中,与H、df和α等参数类似,Him和Hsensor也可以为预存于图像采集设备内的值。
这样,当获得了第一距离dAB之后,图像采集设备就可以得到dbot,然后根据获得的dbot就可以得到β,接下来,根据β、H和Dis三者之间的几何关系就可以非常容易地获得Dis。
可以看出,当采用上述方式时,图像采集设备可以非常容易地获得第二距离,并且,图像采集设备的计算量非常小,图像采集设备只需要非常短的时间就能够得到第二距离,这样能够较好的满足实际需求。
需要说明的是,基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离的实现形式并不局限于上述实现形式,具体实现形式可以根据实际情况来确定,本实施例对此不做任何限定。
容易看出,本实施例中,图像采集设备只需要在获得图像数据文件后,捕捉图像画面中的待测量对象,并获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离,并基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,即可得到待测量对象与图像采集设备本身的第二距离。
与相关技术相比,本实施例中,图像采集设备并不是通过激光测距技术或者立体视觉技术来实现距离的测量的,而是基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角来实现距离的测量的,因此,该图像采集设备内不需要设置激光发射和激光接收等装置,该图像采集设备的外形也不需要像立体计算机那么庞大,只需要对图像采集设备内的软硬件做出一些相应的调整,使其可以执行S101至S104即可。因此,该图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
在本申请实施例的一种具体实施方式中,捕捉图像数据文件所对应的图像画面中的待测量对象之后,该方法还可以包括:
获得待测量对象在图像画面中的最高点所在的水平线与图像画面的中心点所在的水平线之间的第四距离。
相应地,计算待测量对象与图像采集设备之间的第二距离之后,该方法还可以包括:
基于第二距离、第四距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象的高度。
其中,待测量对象的高度是待测量对象在实际场景中的最高点与地面之间的距离,即图5中N点至PrQ之间的垂直距离。
需要说明的是,基于第二距离、第四距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象的高度的实现形式多样,下面进行举例介绍。
本实施例中,基于第二距离、第四距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象的高度,可以包括:
根据第四距离,计算第二目标点与成像靶面的中心点之间的第五距离,其中,第二目标点为最高点在图像采集设备的光学镜头的成像靶面上的对应点。
具体地,根据第四距离,计算第五距离时采用的计算公式可以为:
其中,dtop为第五距离,dDC为第四距离,Him为图像画面的高度分辨率,Hsensor为成像靶面的高度。
根据第五距离和图像采集设备的俯仰角,计算第三连线与地面之间的夹角,其中,第三连线为最高点的实际位置与光学镜头的光心的连线。
具体地,根据第五距离和图像采集设备的俯仰角,计算第三连线与地面
之间的夹角时采用的计算公式可以为:
其中,∠EOF为第三连线与第四连线的夹角,第三连线为最高点的实际位置与光学镜头的光心的连线,第四连线为光学镜头的光心与成像靶面的中心点的连线,dtop为第五距离,df为光学镜头的焦距,β为第三连线与地面之间的夹角,∠EOM和α均为图像采集设备的俯仰角。
根据第三连线与地面之间的夹角,图像采集设备的架设高度,以及第二距离,计算待测量对象的高度。
具体地,根据第三连线与地面的夹角,以及第二距离,计算待测量对象的高度时采用的计算公式可以为:
h=H-Dis·tanβ
其中,h为待测量对象的高度,H为图像采集设备的架设高度,Dis为第二距离,β为第三连线与地面之间的夹角。
下面结合图5,对待测量对象的高度的具体计算原理进行说明。
如图5所示,N点为待测量对象的最高点的实际位置,O点为光学镜头的光心,E点为成像靶面的中心点,OE与成像靶面垂直,F点(NO的连线所在的直线与成像靶面的交点)为最高点在成像靶面上的对应点,地面为PrQ所在的水平线,并且,FQ与地面垂直。
根据图5中的几何关系容易得到:
一般而言,图5中的FP的长度要远小于PQ,即图像采集设备的架设高度H,故可以认为FQ约等于H,相应地,h=H-Dis·tanβ。
本实施例中,若想要得到h,需要获得H、Dis、dtop、df和α。其中,H、df和α均可以为预存的数据。具体地,对于df来说,只要确定了光学镜头的规格,df就可以较为容易地确定,用户可以将该df值预存于图像采集设备内。而对于H和α来说,在图像采集设备安装好之后,用户可以采用刻度尺等长度
测量工具测得H,并采用量角器等角度测量工具测得α,然后将测得的H和α均预存于图像采集设备内。这样,当需要计算待测量对象的高度时,图像采集设备可以去获取自身内部预存的H、df和α等参数的值。Dis可以根据第一距离和预设的距离计算公式得到。对于dtop而言,其并不能预先存储,但是其可以根据下列公式来确定:
其中,与H、df和α等参数类似,Him和Hsensor也可以为预存于图像采集设备内的值。
这样,当获得了第四距离dDC之后,图像采集设备就可以得到dtop,然后根据获得的dtop就可以得到β,接下来,根据h、β、H和Dis四者之间的几何关系就可以非常容易地获得h。
可以看出,当采用上述方式来计算待测量对象的高度时,图像采集设备的计算量非常小,图像采集设备只需要非常短的时间就能够得到待测量对象的高度,这样能够较好地满足实际需求。
在本申请实施例的一种具体实施方式中,获得待测量对象在图像画面中的最高点所在的水平线与图像画面的中心点所在的水平线之间的第四距离,可以包括:
利用目标矩形围设待测量对象,并使目标矩形两组平行边中的一组平行边与图像画面的中心点所在的水平线平行,其中,目标矩形为能够围设待测量对象的各矩形中面积最小的矩形;
将该组平行边中离地面较远的边与图像画面的中心点所在的水平线之间的距离作为第四距离。
如图2所示,在采集到图像数据并成功生成图像数据文件后,图像采集设备可以将图像数据文件所对应的图像画面在显示屏中进行显示。接下来,图像采集设备可以捕捉图像画面中的待测量对象,例如图2中所示的行人。在捕捉到该行人之后,图像采集设备可以利用目标矩形ABCD围设待测量对象,对
于目标矩形ABCD而言,AB边和CD边与图像画面的中心点T所在的水平线平行。容易看出,CD边与该行人的外轮廓的交点即为待测量对象在图像画面中的最高点,此时将CD边与图像画面的中心点T所在的水平线之间的距离作为第四距离即可。
可以看出,当采用这种方式来确定第四距离时,第四距离的获得操作实施起来非常便捷。
在本申请实施例的一种具体实施方式中,获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离,可以包括:
利用目标矩形围设待测量对象,并使目标矩形两组平行边中的一组平行边与图像画面的中心点所在的水平线平行,其中,目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;
将该组平行边中离地面较近的边与图像画面的中心点所在的水平线之间的距离作为第一距离。
如图2所示,在采集到图像数据并成功生成图像数据文件后,图像采集设备可以将图像数据文件所对应的图像画面在显示屏中进行显示。接下来,图像采集设备可以捕捉图像画面中的待测量对象,例如图2中所示的行人。在捕捉到该行人之后,图像采集设备可以利用目标矩形ABCD围设待测量对象,对于目标矩形ABCD而言,AB边和CD边与图像画面的中心点T所在的水平线平行。容易看出,AB边与该行人的外轮廓的交点即为待测量对象在图像画面中的最低点,此时将AB边与图像画面的中心点T所在的水平线之间的距离作为第一距离即可。
可以看出,当采用这种方式来确定第一距离时,第一距离的获得操作实施起来非常便捷。
在本申请实施例的一种具体实施方式中,捕捉图像数据文件所对应的图
像画面中的待测量对象之前,该方法还可以包括;
对图像数据文件进行处理,以将图像数据文件的位宽转换为设定的位宽。
需要强调的是,该设定的位宽为:能够保证图像数据文件所对应的图像画面在显示屏上正常进行显示的位宽,例如8bits。
容易看出,当采用目标矩形的方式来确定第一距离和第四距离时,图像采集设备需要将图像数据文件所对应的图像画面在显示屏中进行显示。本实施例中,图像采集设备直接采集到的图像数据文件所对应的位宽一般较高,例如12bits或14bits,但是,显示屏对于在其上显示的图像画面所对应的图像数据文件的位宽有一些限制,即显示屏要求图像数据文件的位宽为设定的位宽,例如8bits。本实施例中,在捕捉图像数据文件所对应的图像画面中的待测量对象之前,图像采集设备可以对图像数据文件进行处理,从而将图像数据文件的位宽转换为设定的位宽,这样,图像数据文件所对应的图像画面能够成功地在显示屏上进行显示,以便于执行后续步骤。
可以看出,本实施例可以保证图像数据文件所对应的画面成功地在显示屏上进行显示,以便于执行后续的步骤,进而得到第二距离及待测量对象的高度。
可以理解的是,在一些情况下,该图像采集设备将会安装于车辆等运动的物体上。具体地,该图像采集设备可以安装于车辆的前部。当车辆的前轮经过地面的坑时,安装于车辆的前部的图像采集设备的俯仰角将会发生变化,此时,图像采集设备若仍采用其预存的俯仰角来计算待测量对象的高度,将会导致计算出的高度值不够准确。为了较好地解决该问题,本实施例中,基于第二距离、第四距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象的高度,可以包括:
检测图像采集设备的俯仰角是否发生变化;
若为是,对图像采集设备的俯仰角进行修正;
基于第二距离、第四距离、图像采集设备的架设高度,以及图像采集设
备经修正后的俯仰角,计算待测量对象的高度。
本实施例中,该图像采集设备上可以安装一电子罗盘,通过该电子罗盘可以测得车辆的俯仰角的变化量。假设图像采集设备内预存的俯仰角为∠EOM,电子罗盘测得的俯仰角变化量为那么图像采集设备实际的俯仰角为∠EOM和两者的差值。在实际计算待测量对象的高度时,可以对图像采集设备的俯仰角进行修正,即将∠EOM和两者的差值作为实际的俯仰角来进行高度计算。
可以看出,本实施例中,通过对图像采集设备的俯仰角进行修正,能够保证最终得到的待测量对象的高度较为准确。
类似地,本实施例中,基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离,包括:
检测图像采集设备的俯仰角是否发生变化;
若为是,对图像采集设备的俯仰角进行修正;
基于第一距离、图像采集设备的架设高度,以及图像采集设备经修正后的俯仰角,计算待测量对象与图像采集设备之间的第二距离。
本实施例中,图像采集设备对俯仰角进行修正的过程参照计算待测量对象的高度时的修正过程即可,在此不再赘述。
可以看出,本实施例中,通过对图像采集设备的俯仰角进行修正,能够保证最终得到的第二距离也较为精准。
综上,本申请实施例中的图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
相应于上述方法实施例,本申请实施例还提供了一种测量装置。参见图6,
图中示出了本申请实施例提供的测量装置的结构框图。如图6所示,该装置可以应用于图像采集设备,该装置可以包括:
图像采集模块61,用于采集图像数据以生成图像数据文件;
图像处理模块62,用于捕捉图像数据文件所对应的图像画面中的待测量对象;
第一测量模块63,用于获得待测量对象在图像画面中的最低点所在的水平线与图像画面的中心点所在的水平线之间的第一距离;
第二测量模块64,用于基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象与图像采集设备之间的第二距离。
与相关技术相比,本实施例中,图像采集设备并不是通过激光测距技术或者立体视觉技术来实现距离的测量的,而是基于第一距离、图像采集设备的架设高度和图像采集设备的俯仰角来实现距离的测量的,因此,该图像采集设备内不需要设置激光发射和激光接收等装置,该图像采集设备的外形也不需要像立体计算机那么庞大,只需要对图像采集设备内的软硬件做出一些相应的调整即可。因此,该图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
在本申请实施例的一种具体实施方式中,第二测量模块,可以包括:
第一计算单元,用于根据第一距离,计算第一目标点与成像靶面的中心点之间的第三距离,其中,第一目标点为最低点在图像采集设备的光学镜头的成像靶面上的对应点;
第二计算单元,用于根据第三距离和图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,第一连线为最低点的实际位置与光学镜头的光心的连线;
第三计算单元,用于根据第一连线与地面的夹角,以及图像采集设备的架设高度,计算待测量对象与图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,该装置还可以包括:
第三测量模块,用于在捕捉图像数据文件所对应的图像画面中的待测量对象之后,获得待测量对象在图像画面中的最高点所在的水平线与图像画面的中心点所在的水平线之间的第四距离;
第四测量模块,用于在计算待测量对象与图像采集设备之间的第二距离之后,基于第二距离、第四距离、图像采集设备的架设高度和图像采集设备的俯仰角,计算待测量对象的高度。
在本申请实施例的一种具体实施方式中,第四测量模块,可以包括:
第四计算单元,用于根据第四距离,计算第二目标点与成像靶面的中心点之间的第五距离,其中,第二目标点为最高点在图像采集设备的光学镜头的成像靶面上的对应点;
第五计算单元,用于根据第五距离和图像采集设备的俯仰角,计算第三连线与地面之间的夹角,其中,第三连线为最高点的实际位置与光学镜头的光心的连线;
第六计算单元,用于根据第三连线与地面的夹角,图像采集设备的架设高度,以及第二距离,计算待测量对象的高度。
在本申请实施例的一种具体实施方式中,第三测量模块,可以包括:
第一待测量对象处理单元,用于利用目标矩形围设待测量对象,并使目标矩形两组平行边中的一组平行边与图像画面的中心点所在的水平线平行,其中,目标矩形为能够围设待测量对象的各矩形中面积最小的矩形;
第一距离确定单元,用于将该组平行边中离地面较远的边与图像画面的中心点所在的水平线之间的距离作为第四距离。
在本申请实施例的一种具体实施方式中,该装置还可以包括:
位宽转换模块,用于在捕捉图像数据文件所对应的图像画面中的待测量对象之前,对图像数据文件进行处理,以将图像数据文件的位宽转换为设定的位宽。
在本申请实施例的一种具体实施方式中,第四测量模块,可以包括:
第一俯仰角检测单元,用于在计算待测量对象的高度之前,检测图像采集设备的俯仰角是否发生变化;
第一俯仰角修正单元,用于在图像采集设备的俯仰角发生变化的情况下,对图像采集设备的俯仰角进行修正;
高度计算单元,用于基于第二距离、第四距离、图像采集设备的架设高度,以及图像采集经修正后的俯仰角,计算待测量对象的高度。
在本申请实施例的一种具体实施方式中,第一测量模块,可以包括:
第二待测量对象处理单元,用于利用目标矩形围设待测量对象,并使目标矩形两组平行边中的一组平行边与图像画面的中心点所在的水平线平行,其中,目标矩形为能够围设待测量对象的各矩形中面积最小的矩形;
第二距离确定单元,用于将该组平行边中离地面较近的边与图像画面的中心点所在的水平线之间的距离作为第一距离。
在本申请实施例的一种具体实施方式中,第二测量模块,可以包括:
第二俯仰角检测单元,用于在计算待测量对象与图像采集设备之间的第二距离之前,检测图像采集设备的俯仰角是否发生变化;
第二俯仰角修正单元,用于在图像采集设备的俯仰角发生变化的情况下,对图像采集设备的俯仰角进行修正;
距离计算单元,用于基于第一距离、图像采集设备的架设高度,以及图像采集设备经修正后的俯仰角,计算待测量对象与图像采集设备之间的第二距离。
在本申请实施例的一种具体实施方式中,该装置还可以包括:
报警模块,用于在第二距离小于预设的距离阈值的情况下,输出报警信号。
本实施例中,该图像采集设备可以安装于车辆上。当第二距离小于预设的距离阈值时,则说明安装有图像采集设备的车辆与待测量对象,例如路面上的车辆和行人之间的距离非常近,此时,图像采集设备可以发出报警信号,例如声音信号,车辆上的乘员可以及时地察觉到该情况,并迅速地对该情况做出相应的反应,这样可以有效地保证车辆和行人的安全。
在本申请实施例的一种具体实施方式中,该装置还可以包括:
显示模块,用于在图像画面中显示待测量对象所对应的第二距离和高度。
本实施例中,用户通过上述图像画面中所显示的内容可以非常直观、方便地获知待测量对象的高度信息和距离信息,这样可以给用户带来较好的使用体验。
综上,本申请实施例中的图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
下面对本申请实施例所提供的一种存储介质进行说明。
本申请实施例还提供了一种存储介质,用于存储可执行程序代码,所述可执行程序代码在运行时执行上述测量方法。
本申请实施例中的图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
下面对本申请实施例所提供的一种应用程序进行说明。
本申请实施例还提供了一种应用程序,所述应用程序用于在运行时执行执行上述测量方法。
本申请实施例中的图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
下面对本申请实施例所提供的一种图像采集设备进行说明。
本申请实施例还提供了一种图像采集设备,包括:
处理器、存储器、通信接口和总线;
所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;
所述存储器存储可执行程序代码;
所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:
采集图像数据以生成图像数据文件;
捕捉所述图像数据文件所对应的图像画面中的待测量对象;
获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;
基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
本申请实施例中的图像采集设备不仅能实现其自身与待测量对象之间距离的测量,并且,其生产成本也比较低,安装起来也较为方便便捷,能够较好地满足实际需求。
需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
本说明书中的各个实施例均采用相关的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
以上所述仅为本申请的较佳实施例而已,并非用于限定本申请的保护范围。凡在本申请的精神和原则之内所作的任何修改、等同替换、改进等,均包含在本申请的保护范围内。
Claims (23)
- 一种测量方法,其特征在于,应用于图像采集设备,所述方法包括:采集图像数据以生成图像数据文件;捕捉所述图像数据文件所对应的图像画面中的待测量对象;获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 如权利要求1所述的方法,其特征在于,所述基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离,包括:根据所述第一距离,计算第一目标点与所述成像靶面的中心点之间的第三距离,其中,所述第一目标点为所述最低点在所述图像采集设备的光学镜头的成像靶面上的对应点;根据所述第三距离和所述图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,所述第一连线为所述最低点的实际位置与所述光学镜头的光心的连线;根据所述第一连线与地面的夹角,以及所述图像采集设备的架设高度,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 如权利要求1所述的方法,其特征在于,所述捕捉所述图像数据文件所对应的图像画面中的待测量对象之后,所述方法还包括:获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离;相应地,所述计算所述待测量对象与所述图像采集设备之间的第二距离之后,所述方法还包括:基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度。
- 如权利要求3所述的方法,其特征在于,所述基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度,包括:根据所述第四距离,计算第二目标点与所述成像靶面的中心点之间的第五距离,其中,所述第二目标点为所述最高点在所述图像采集设备的光学镜头的成像靶面上的对应点;根据所述第五距离和所述图像采集设备的俯仰角,计算第三连线与地面之间的夹角,其中,所述第三连线为所述最高点的实际位置与所述光学镜头的光心的连线;根据所述第三连线与地面的夹角,所述图像采集设备的架设高度,以及所述第二距离,计算所述待测量对象的高度。
- 如权利要求3所述的方法,其特征在于,所述获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离,包括:利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;将该组平行边中离地面较远的边与所述图像画面的中心点所在的水平线之间的距离作为第四距离。
- 如权利要求5所述的方法,其特征在于,所述捕捉所述图像数据文件所对应的图像画面中的待测量对象之前,所述方法还包括;对所述图像数据文件进行处理,以将所述图像数据文件的位宽转换为设定的位宽。
- 如权利要求3所述的方法,其特征在于,所述基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角, 计算所述待测量对象的高度,包括:检测所述图像采集设备的俯仰角是否发生变化;若为是,对所述图像采集设备的俯仰角进行修正;基于所述第二距离、所述第四距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象的高度。
- 如权利要求1-7中任一项所述的方法,其特征在于,所述获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离,包括:利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;将该组平行边中离地面较近的边与所述图像画面的中心点所在的水平线之间的距离作为第一距离。
- 如权利要求1-7中任一项所述的方法,其特征在于,所述基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离,包括:检测所述图像采集设备的俯仰角是否发生变化;若为是,对所述图像采集设备的俯仰角进行修正;基于所述第一距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 一种测量装置,其特征在于,应用于图像采集设备,所述装置包括:图像采集模块,用于采集图像数据以生成图像数据文件;图像处理模块,用于捕捉所述图像数据文件所对应的图像画面中的待测量对象;第一测量模块,用于获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;第二测量模块,用于基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 如权利要求10所述的装置,其特征在于,所述第二测量模块,包括:第一计算单元,用于根据所述第一距离,计算第一目标点与所述成像靶面的中心点之间的第三距离,其中,所述第一目标点为所述最低点在所述图像采集设备的光学镜头的成像靶面上的对应点;第二计算单元,用于根据所述第三距离和所述图像采集设备的俯仰角,计算第一连线与地面的夹角,其中,所述第一连线为所述最低点的实际位置与所述光学镜头的光心的连线;第三计算单元,用于根据所述第一连线与地面的夹角,以及所述图像采集设备的架设高度,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 如权利要求10所述的装置,其特征在于,所述装置还包括:第三测量模块,用于在捕捉所述图像数据文件所对应的图像画面中的待测量对象之后,获得所述待测量对象在所述图像画面中的最高点所在的水平线与所述图像画面的中心点所在的水平线之间的第四距离;第四测量模块,用于在计算所述待测量对象与所述图像采集设备之间的第二距离之后,基于所述第二距离、所述第四距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象的高度。
- 如权利要求12所述的装置,其特征在于,所述第四测量模块,包括:第四计算单元,用于根据所述第四距离,计算第二目标点与所述成像靶面的中心点之间的第五距离,其中,所述第二目标点为所述最高点在所述图像采集设备的光学镜头的成像靶面上的对应点;第五计算单元,用于根据所述第五距离和所述图像采集设备的俯仰角, 计算第三连线与地面之间的夹角,其中,所述第三连线为所述最高点的实际位置与所述光学镜头的光心的连线;第六计算单元,用于根据所述第三连线与地面的夹角,所述图像采集设备的架设高度,以及所述第二距离,计算所述待测量对象的高度。
- 如权利要求12所述的装置,其特征在于,所述第三测量模块,包括:第一待测量对象处理单元,用于利用目标矩形围设所述待测量对象,并使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;第一距离确定单元,用于将该组平行边中离地面较远的边与所述图像画面的中心点所在的水平线之间的距离作为第四距离。
- 如权利要求14所述的装置,其特征在于,所述装置还包括:位宽转换模块,用于在捕捉所述图像数据文件所对应的图像画面中的待测量对象之前,对所述图像数据文件进行处理,以将所述图像数据文件的位宽转换为设定的位宽。
- 如权利要求12所述的装置,其特征在于,所述第四测量模块,包括:第一俯仰角检测单元,用于在计算所述待测量对象的高度之前,检测所述图像采集设备的俯仰角是否发生变化;第一俯仰角修正单元,用于在所述图像采集设备的俯仰角发生变化的情况下,对所述图像采集设备的俯仰角进行修正;高度计算单元,用于基于所述第二距离、所述第四距离、所述图像采集设备的架设高度,以及所述图像采集经修正后的俯仰角,计算所述待测量对象的高度。
- 如权利要求10-16中任一项所述的装置,其特征在于,所述第一测量模块,包括:第二待测量对象处理单元,用于利用目标矩形围设所述待测量对象,并 使所述目标矩形两组平行边中的一组平行边与所述图像画面的中心点所在的水平线平行,其中,所述目标矩形为能够围设所述待测量对象的各矩形中面积最小的矩形;第二距离确定单元,用于将该组平行边中离地面较近的边与所述图像画面的中心点所在的水平线之间的距离作为第一距离。
- 如权利要求10-16中任一项所述的装置,其特征在于,所述第二测量模块,包括:第二俯仰角检测单元,用于在计算所述待测量对象与所述图像采集设备之间的第二距离之前,检测所述图像采集设备的俯仰角是否发生变化;第二俯仰角修正单元,用于在所述图像采集设备的俯仰角发生变化的情况下,对所述图像采集设备的俯仰角进行修正;距离计算单元,用于基于所述第一距离、所述图像采集设备的架设高度,以及所述图像采集设备经修正后的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
- 如权利要求10-16中任一项所述的装置,其特征在于,所述装置还包括:报警模块,用于在所述第二距离小于预设的距离阈值的情况下,输出报警信号。
- 如权利要求10-16中任一项所述的装置,其特征在于,所述装置还包括:显示模块,用于在所述图像画面中显示所述待测量对象所对应的第二距离和高度。
- 一种存储介质,其特征在于,用于存储可执行程序代码,所述可执行程序代码在运行时执行权利要求1-9中任一项所述的测量方法。
- 一种应用程序,其特征在于,所述应用程序用于在运行时执行执行权利要求1-9中任一项所述的测量方法。
- 一种图像采集设备,其特征在于,包括:处理器、存储器、通信接口和总线;所述处理器、所述存储器和所述通信接口通过所述总线连接并完成相互间的通信;所述存储器存储可执行程序代码;所述处理器通过读取所述存储器中存储的可执行程序代码来运行与所述可执行程序代码对应的程序,以用于:采集图像数据以生成图像数据文件;捕捉所述图像数据文件所对应的图像画面中的待测量对象;获得所述待测量对象在所述图像画面中的最低点所在的水平线与所述图像画面的中心点所在的水平线之间的第一距离;基于所述第一距离、所述图像采集设备的架设高度和所述图像采集设备的俯仰角,计算所述待测量对象与所述图像采集设备之间的第二距离。
Priority Applications (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US16/323,472 US11017552B2 (en) | 2016-08-15 | 2017-05-31 | Measurement method and apparatus |
| EP17840836.5A EP3499184B1 (en) | 2016-08-15 | 2017-05-31 | Measurement method and apparatus |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201610669751.1 | 2016-08-15 | ||
| CN201610669751.1A CN107764233B (zh) | 2016-08-15 | 2016-08-15 | 一种测量方法及装置 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2018032860A1 true WO2018032860A1 (zh) | 2018-02-22 |
Family
ID=61196440
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2017/086592 Ceased WO2018032860A1 (zh) | 2016-08-15 | 2017-05-31 | 一种测量方法及装置 |
Country Status (4)
| Country | Link |
|---|---|
| US (1) | US11017552B2 (zh) |
| EP (1) | EP3499184B1 (zh) |
| CN (1) | CN107764233B (zh) |
| WO (1) | WO2018032860A1 (zh) |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113364968B (zh) * | 2020-03-05 | 2023-06-20 | 浙江宇视科技有限公司 | 一种对焦方法、装置、摄像机和可读存储介质 |
| CN111327830B (zh) * | 2020-03-27 | 2021-08-20 | 苏州科达科技股份有限公司 | 图像采集组件的架设参数获取系统、方法、装置和存储介质 |
| KR20230007477A (ko) * | 2020-06-03 | 2023-01-12 | 구글 엘엘씨 | 객체 바텀 위치에 기초하여 한 깊이 추정 |
| CN114111704B (zh) * | 2020-08-28 | 2023-07-18 | 华为技术有限公司 | 测量距离的方法、装置、电子设备及可读存储介质 |
| CN112040132A (zh) * | 2020-09-09 | 2020-12-04 | 清华大学 | 动物外部特征获取方法、装置及计算机设备 |
| CN113124753A (zh) * | 2021-04-19 | 2021-07-16 | 北京麦哲科技有限公司 | 一种体积测量方法和装置 |
| CN114046769B (zh) * | 2022-01-12 | 2022-05-10 | 杭州宏景智驾科技有限公司 | 一种基于多维参考信息的单目测距方法 |
| CN118376581A (zh) * | 2024-06-24 | 2024-07-23 | 滁州捷泰新能源科技有限公司 | 一种光伏组件的户外el检测装置和检测方法 |
Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080030711A1 (en) * | 2006-08-03 | 2008-02-07 | Casio Computer Co., Ltd. | Method for measuring distance to object |
| CN103852068A (zh) * | 2012-12-03 | 2014-06-11 | 三星泰科威株式会社 | 获得摄像机与目标之间的水平距离的方法和摄像机 |
| CN104236462A (zh) * | 2013-06-14 | 2014-12-24 | 北京千里时空科技有限公司 | 一种提取视频图像中物体高度和距离的方法 |
| CN104792302A (zh) * | 2015-04-29 | 2015-07-22 | 深圳市保千里电子有限公司 | 一种建模测车距的方法 |
| CN106153000A (zh) * | 2016-06-17 | 2016-11-23 | 合肥工业大学 | 一种前方车辆距离检测方法 |
| CN106443650A (zh) * | 2016-09-12 | 2017-02-22 | 电子科技大学成都研究院 | 一种基于几何关系的单目视觉测距方法 |
Family Cites Families (11)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP3861781B2 (ja) | 2002-09-17 | 2006-12-20 | 日産自動車株式会社 | 前方車両追跡システムおよび前方車両追跡方法 |
| CN100388760C (zh) | 2004-12-30 | 2008-05-14 | 亚洲光学股份有限公司 | 测距式数码相机 |
| JP4656975B2 (ja) | 2005-03-16 | 2011-03-23 | 株式会社リコー | 画像表示装置、画像表示方法、およびその方法をコンピュータに実行させるプログラム |
| US8164628B2 (en) * | 2006-01-04 | 2012-04-24 | Mobileye Technologies Ltd. | Estimating distance to an object using a sequence of images recorded by a monocular camera |
| CN101074876A (zh) * | 2007-06-26 | 2007-11-21 | 北京中星微电子有限公司 | 一种自动测量距离的方法及装置 |
| KR101284798B1 (ko) * | 2009-12-08 | 2013-07-10 | 한국전자통신연구원 | 단일 카메라 영상 기반의 객체 거리 및 위치 추정 장치 및 방법 |
| CN101881613A (zh) * | 2010-06-21 | 2010-11-10 | 邓丹 | 测量两点之间距离的方法 |
| CN203813888U (zh) | 2014-04-23 | 2014-09-03 | 江西科技学院 | 一种应用双摄像头的车用测距模块 |
| CN104899554A (zh) * | 2015-05-07 | 2015-09-09 | 东北大学 | 一种基于单目视觉的车辆测距方法 |
| CN105488454B (zh) * | 2015-11-17 | 2019-04-23 | 天津工业大学 | 基于单目视觉的前方车辆检测与测距 |
| US9847036B2 (en) * | 2016-04-06 | 2017-12-19 | Gulfstrem Areospace Corporation | Wearable aircraft towing collision warning devices and methods |
-
2016
- 2016-08-15 CN CN201610669751.1A patent/CN107764233B/zh active Active
-
2017
- 2017-05-31 EP EP17840836.5A patent/EP3499184B1/en active Active
- 2017-05-31 WO PCT/CN2017/086592 patent/WO2018032860A1/zh not_active Ceased
- 2017-05-31 US US16/323,472 patent/US11017552B2/en active Active
Patent Citations (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20080030711A1 (en) * | 2006-08-03 | 2008-02-07 | Casio Computer Co., Ltd. | Method for measuring distance to object |
| CN103852068A (zh) * | 2012-12-03 | 2014-06-11 | 三星泰科威株式会社 | 获得摄像机与目标之间的水平距离的方法和摄像机 |
| CN104236462A (zh) * | 2013-06-14 | 2014-12-24 | 北京千里时空科技有限公司 | 一种提取视频图像中物体高度和距离的方法 |
| CN104792302A (zh) * | 2015-04-29 | 2015-07-22 | 深圳市保千里电子有限公司 | 一种建模测车距的方法 |
| CN106153000A (zh) * | 2016-06-17 | 2016-11-23 | 合肥工业大学 | 一种前方车辆距离检测方法 |
| CN106443650A (zh) * | 2016-09-12 | 2017-02-22 | 电子科技大学成都研究院 | 一种基于几何关系的单目视觉测距方法 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN107764233A (zh) | 2018-03-06 |
| EP3499184B1 (en) | 2022-06-15 |
| US11017552B2 (en) | 2021-05-25 |
| EP3499184A1 (en) | 2019-06-19 |
| EP3499184A4 (en) | 2019-09-11 |
| CN107764233B (zh) | 2020-09-04 |
| US20190172214A1 (en) | 2019-06-06 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2018032860A1 (zh) | 一种测量方法及装置 | |
| CN108833785B (zh) | 多视角图像的融合方法、装置、计算机设备和存储介质 | |
| CN101650783B (zh) | 图像识别方法以及摄像装置 | |
| CN107615334B (zh) | 物体识别装置以及物体识别系统 | |
| CN105812652B (zh) | 一种终端的对焦方法及终端 | |
| CN111723801A (zh) | 鱼眼相机图片中目标检测矫正的方法与系统 | |
| CN106650665A (zh) | 人脸跟踪方法及装置 | |
| TW201727537A (zh) | 人臉識別系統及人臉識別方法 | |
| US11605220B2 (en) | Systems and methods for video surveillance | |
| CN105849770A (zh) | 信息处理装置、信息处理方法及程序 | |
| CN111307039A (zh) | 一种物体长度识别方法、装置、终端设备和存储介质 | |
| WO2017215351A1 (zh) | 摄像装置识别范围的调整方法及装置 | |
| CN110610171A (zh) | 图像处理方法和装置、电子设备、计算机可读存储介质 | |
| JP6361313B2 (ja) | 車両検出方法及び装置 | |
| CN109040746B (zh) | 摄像头校准方法和装置、电子设备、计算机可读存储介质 | |
| WO2022183685A1 (zh) | 目标检测方法、电子介质和计算机存储介质 | |
| CN105180802B (zh) | 一种物体尺寸信息识别方法和装置 | |
| CN115953483A (zh) | 一种参数标定方法、装置、计算机设备及存储介质 | |
| CN104823218A (zh) | 使用单一普通摄像机来检测行人的系统和方法 | |
| WO2016145831A1 (zh) | 图像的获取方法及装置 | |
| JP2018503195A (ja) | 物体検出方法及び物体検出装置 | |
| WO2019090904A1 (zh) | 确定距离的方法、装置、设备及存储介质 | |
| CN108737733B (zh) | 信息提示方法和装置、电子设备、计算机可读存储介质 | |
| CN105025219A (zh) | 图像获取方法 | |
| CN103873755A (zh) | 跳跃人像拍摄系统及方法 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 17840836 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| ENP | Entry into the national phase |
Ref document number: 2017840836 Country of ref document: EP Effective date: 20190315 |


