The present invention relates to a depth camera that can measure the oblique velocity of an object. More particularly, the invention relates to a depth camera that uses image-related techniques to measure the oblique velocity of a moving object.
Depth cameras can be used to capture depth-related information (e.g., a depth distance) and is particularly suitable for use in various non-contact sensing applications, some common examples of which are facial recognition, measurement of speed, object tracking, and 3D scanning and modeling. The existing depth cameras, however, cannot measure the lateral, longitudinal, or oblique velocity of a moving object or image.
The present invention provides a depth camera capable of measuring the oblique velocity of an object. The major technical problem to be solved by the invention is to overcome the aforesaid deficiency of the prior art that the prior art cannot measure the lateral/longitudinal/oblique velocity of an object effectively with image-related techniques.
The present invention provides a depth camera capable of measuring the oblique velocity of an object, wherein the depth camera includes a depth camera body and a third configuration file. The depth camera body at least includes a set of lenses, a computation unit, and a storage unit. The third configuration file includes a first configuration file and a second configuration file. The first configuration file is stored in the storage unit and records a reference pixel number in the horizontal direction, an image sensor length (which is the length of the image sensor corresponding to one of the lenses), and a lens focal length (which is the fixed focal length of the one of the lenses). The second configuration file is stored in the storage unit and records a reference pixel number in the vertical direction, the distance of a longitudinal movement of a second object, and the lens focal length. The computation unit reads or records the third configuration file and runs an oblique velocity calculation system. The oblique velocity calculation system includes a lateral velocity calculation system for generating the lateral velocity of an object, a longitudinal velocity calculation system for generating the longitudinal velocity of the object, and oblique velocity calculation software for adding the square of the lateral velocity of the object and the square of the longitudinal velocity of the object and taking the square root of the sum so as to obtain the oblique velocity of the object, wherein the lateral velocity and/or the longitudinal velocity of the object is greater than or equal to zero.
Implementation of the present invention can produce at least the following advantageous effect: The oblique velocity of an object can be calculated in real time by way of an image-taking technique.
The structure and the technical means adopted by the present invention to achieve the above and other objectives can be best understood by referring to the following detailed description of some preferred embodiments and the accompanying drawings, wherein:
The depth cameras 100, 200, and 300 in the following embodiments of the present invention use the basic hardware architecture of the conventional depth camera 11 (e.g., the Intel RealSense D455 depth camera) shown in
Referring to
The first configuration file 110 is stored in a storage unit 11b of the depth camera body 11. The first configuration file 110 records a reference pixel number HPb in the horizontal direction, an image sensor length l, and a lens focal length f.
The reference pixel number HPb in the horizontal direction (e.g., 1920 pixels) can be viewed as a built-in scale that serves as a reference for distance measurement. The image sensor length l (e.g., 3.84 mm) is the length of the image sensor corresponding to one of the lenses 11a of the depth camera body 11. The lens focal length f (e.g., 1.88 mm) is the fixed focal length of the one of the lenses 11a.
To measure the lateral velocity of an object, a computation unit 11c of the depth camera body 11 reads or records the first configuration file 110 and runs the lateral velocity calculation system 120. The lateral velocity calculation system 120 includes first image-processing software 121 and lateral velocity calculation software 122.
Referring to
The number of pixels Δp corresponding to the lateral movement of the first object 140 is calculated as follows. The first object 140 at the second image-taking time point t2, or the 9-sec time point, is at the second position P2, or the 527th pixel, and the first object 140 at the first image-taking time point t1, or the 0-sec time point, is at the first position P1, or the 0th pixel. Therefore, the number of pixels Δp corresponding to the lateral movement of the first object 140 is 527 pixels, and the duration Δt1 of the lateral movement of the first object 140 is the time difference of 9 sec. The first depth distance s1, which is the distance from the one of the lenses 11a to the first object 140 when the images are taken, is 633 mm.
Referring to
The step S110 of calculating the distance of a lateral movement of an object is carried out as follows. The distance Δs' of the lateral movement of the object is calculated by dividing the number of pixels Δp corresponding to the lateral movement of the first object by the reference pixel number HPb in the horizontal direction and then multiplying the quotient by the image sensor length l. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S120 of calculating a first average velocity is carried out as follows. The first average velocity v1′ is calculated by dividing the distance Δs′ of the lateral movement of the object by the duration Δt1 of the lateral movement of the first object. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S130 of calculating a lateral magnification ratio is carried out as follows. The lateral magnification ratio MT is calculated by dividing the lens focal length f by the sum of the first depth distance s1 at which the images are taken and the lens focal length f. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S140 of calculating the lateral velocity of the object is carried out as follows. The lateral velocity vla2 of the object is calculated by dividing the first average velocity v1′ by the absolute value of the lateral magnification ratio MT. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
Referring to
The second configuration file 210 is stored in a storage unit 11b of the depth camera body 11. The second configuration file 210 records a reference pixel number VPb in the vertical direction and a lens focal length f.
The reference pixel number VPb in the vertical direction (e.g., 1080 pixels) is also a built-in scale that serves as a reference for distance measurement. The lens focal length f is the same as that of the depth camera 100 capable of measuring the lateral velocity of an object, i.e., 1.88 mm.
To measure the longitudinal velocity of an object, a computation unit 11c of the depth camera body 11 reads or records the second configuration file 210 and runs the longitudinal velocity calculation system 220. The longitudinal velocity calculation system 220 includes second image-processing software 221 and longitudinal velocity calculation software 222.
Referring to
The distance Δz2 of the longitudinal movement of the second object 240 is calculated as follows. The second object 240 at the fourth image-taking time point t4, or the 9-sec time point, is at the third depth distance s3, and the second object 240 at the third image-taking time point t3, or the 0-sec time point, is at the second depth distance s2. Therefore, the distance Δz2 of the longitudinal movement of the second object 240 is 5556 mm, and the duration Δt2 of the longitudinal movement of the second object is the time difference of 9 sec.
Referring to
The step S210 of calculating an average lateral magnification ratio is carried out as follows. The average lateral magnification ratio MT1 is calculated by dividing the sum of the lateral magnification ratio MTN of the second object 240 at the nearest position (which corresponds to the shortest distance from the depth camera) and the lateral magnification ratio MTF of the second object 240 at the farthest position (which corresponds to the greatest distance from the depth camera) by 2. The calculation can be expressed mathematically as:
Each of the lateral magnification ratio MTN at the nearest position and the lateral magnification ratio MTF at the farthest position is calculated by dividing the lens focal length f by the sum of the lens focal length f and the corresponding second or third depth distance s2 or s3. The calculation can be expressed mathematically as:
or as:
By substituting actual values into the above equations, we obtain:
Therefore, by substituting actual values into the equation for the average lateral magnification ratio MT1, we obtain:
The step S220 of calculating a longitudinal magnification ratio is carried out as follows. The longitudinal magnification ratio ML is calculated as the square of the average lateral magnification ratio MT1. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S230 of calculating the distance of a longitudinal movement of an image is carried out as follows. The distance Δz′ of the longitudinal movement of the image is calculated by multiplying the distance Δz2 of the longitudinal movement of the second object by the longitudinal magnification ratio ML. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S240 of calculating a second average velocity is carried out as follows. The second average velocity v2′ is calculated by dividing the distance Δz′ of the longitudinal movement of the image by the duration Δt2 of the longitudinal movement of the second object. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
The step S250 of calculating the longitudinal velocity of an object is carried out as follows. The longitudinal velocity vlo2 of the object is calculated by dividing the second average velocity v2′ by the longitudinal magnification ratio ML. The calculation can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
Referring to
The third configuration file 310 is stored in a storage unit 11b of the depth camera body 11. The third configuration file 310 records and includes the first configuration file 110 and the second configuration file 210.
To measure the oblique velocity of an object, a computation unit 11c of the depth camera body 11 reads or records the third configuration file 310 and runs the oblique velocity calculation system 320. The oblique velocity calculation system 320 includes the lateral velocity calculation system 120, the longitudinal velocity calculation system 220, and oblique velocity calculation software 321.
The depth camera 300 capable of measuring the oblique velocity of an object is used to measure the oblique velocity of the oblique movement of the third object 310 between a fifth image-taking time point t5 and a sixth image-taking time point t6. Therefore, the lateral velocity calculation system 120 and the longitudinal velocity calculation system 220 will use data corresponding to the fifth image-taking time point t5 and to the sixth image-taking time point t6 and data in the first configuration file 110 and in the second configuration file 210.
For example, the third object 310 at the fifth image-taking time point t5 (e.g., the 0-sec time point) is at a fifth position P5, whose pixel position along the horizontal axis of the pixel coordinate system is the 0th pixel and which corresponds to a fourth depth distance s4 (e.g., 633 mm), and the third object 310 at the sixth image-taking time point t6 (e.g., the 9-sec time point) is at a sixth position P6, whose pixel position along the horizontal axis of the pixel coordinate system is the 527th pixel and which corresponds to a fifth depth distance s5 (e.g., 6189 mm).
The lateral velocity calculation system 120 and the longitudinal velocity calculation system 220 perform calculations by substituting the duration of the lateral movement of the third object, i.e., 9 sec, for the duration Δt1 of the lateral movement of the first object and for the duration Δt2 of the longitudinal movement of the second object; by substituting the number of pixels corresponding to the lateral movement of the third object, i.e., 527 pixels, for the number of pixels Δp corresponding to the lateral movement of the first object; and by substituting the distance of the longitudinal movement of the third object, i.e., 5556 mm, for the distance Δz2 of the longitudinal movement of the second object.
The foregoing calculations also incorporate the data in the first configuration file 110, namely the reference pixel number HPb in the horizontal direction (e.g., 1920 pixels), the image sensor length l (e.g., 3.84 mm), and the lens focal length f (e.g., 1.88 mm); and the data in the second configuration file 210, namely the reference pixel number VPb in the vertical direction (e.g., 1080 pixels) and the lens focal length f (e.g., 1.88 mm).
After calculation, the lateral velocity vla2 of the object (e.g., 39.2 mm/s) is produced by the lateral velocity calculation system 120 for the third object 310
After calculation, the longitudinal velocity vlo2 of the object (e.g., 617.2 mm/s) is also produced by the longitudinal velocity calculation system 220 for the third object 310.
Referring to
The calculation by the oblique velocity calculation software 321 can be expressed mathematically as:
By substituting actual values into the above equation, we obtain:
Referring to
The above description is based on only some preferred embodiments of the present invention and is not intended to limit the invention in any way. Although the invention has been disclosed above by way of the preferred embodiments, the embodiments are not intended to limit the invention. A person skilled in the relevant art will recognize that equivalent embodiments can be achieved by modifying, varying, or making equivalent changes to the disclosed embodiments without departing from the scope of the technical solution of the invention. Any simple modification or equivalent change that is made to the above embodiments according to the material contents of the invention shall be regarded as falling within the scope of the technical solution of the invention.
Number | Date | Country | Kind |
---|---|---|---|
112128718 | Jul 2023 | TW | national |