WO2024112873A1 - Camera calibration and distance measurement using parallel lines - Google Patents

Camera calibration and distance measurement using parallel lines Download PDF

Info

Publication number
WO2024112873A1
WO2024112873A1 PCT/US2023/080888 US2023080888W WO2024112873A1 WO 2024112873 A1 WO2024112873 A1 WO 2024112873A1 US 2023080888 W US2023080888 W US 2023080888W WO 2024112873 A1 WO2024112873 A1 WO 2024112873A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
point
camera
height
ground
Prior art date
Application number
PCT/US2023/080888
Other languages
French (fr)
Inventor
Amit ROZNER
Yohay Falik
Calanit Dotan
Original Assignee
Johnson Controls Tyco IP Holdings LLP
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
Priority claimed from US18/516,070 external-priority patent/US20240177330A1/en
Application filed by Johnson Controls Tyco IP Holdings LLP filed Critical Johnson Controls Tyco IP Holdings LLP
Publication of WO2024112873A1 publication Critical patent/WO2024112873A1/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • G06T7/73Determining position or orientation of objects or cameras using feature-based methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30244Camera pose

Definitions

  • the described aspects relate to camera and computer vision systems.
  • Height estimation is useful in many world applications. For example, the heights of vehicles may be estimated for when height restrictions exist (e.g., tunnels, bridges, etc.). In another example, height may be used by security applications to distinguish children from adults.
  • height may be used by security applications to distinguish children from adults.
  • camera calibration parameters both intrinsic and extrinsic matrices. Camera calibration is the process of determining camera parameters in order to complete operations with specified performance measurements. Unfortunately, the calibration process is often complicated and not always possible on the field.
  • An example aspect includes a method for estimating a real world distance in an image, comprising obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height.
  • the method further includes estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the method further includes determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the method further includes obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the method further includes estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane.
  • the method further includes determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the method further includes calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
  • Another example aspect includes an apparatus for estimating a real world distance in an image, comprising a memory and a processor coupled with the memory.
  • the processor is configured to obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height.
  • the processor is further configured to estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the processor further configured to determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane.
  • the processor further configured to obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the processor further configured to estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the processor further configured to determine, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane. Additionally, the processor further configured to calibrate the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
  • Another example aspect includes an apparatus for estimating a real world distance in an image, comprising means for obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height.
  • the apparatus further includes means for estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the apparatus further includes means for determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane.
  • the apparatus further includes means for obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the apparatus further includes means for estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the apparatus further includes means for determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the apparatus further includes means for calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
  • Another example aspect includes a computer-readable medium having instructions stored thereon for estimating a real world distance in an image, wherein the instructions are executable by a processor to obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height.
  • the instructions are further executable to estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane.
  • the instructions are further executable to determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the instructions are further executable to obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the instructions are further executable to estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the instructions are further executable to determine, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the instructions are further executable to calibrate the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
  • An example aspect includes a method for estimating a real world distance in an image, comprising obtaining an image from a camera installed in an environment.
  • the method further includes identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the method further includes determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the method further includes identifying a ground line connecting the first intersection point and the second intersection point. Additionally, the method further includes estimating an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the method further includes calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • Another example aspect includes an apparatus for estimating a real world distance in an image, comprising a memory and a processor coupled with the memory.
  • the processor is configured to obtain an image from a camera installed in an environment.
  • the processor is further configured to identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the processor further configured to determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the processor further configured to identify a ground line connecting the first intersection point and the second intersection point. Additionally, the processor further configured to estimate an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the processor further configured to calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • Another example aspect includes an apparatus for estimating a real world distance in an image, comprising means for obtaining an image from a camera installed in an environment.
  • the apparatus further includes means for identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the apparatus further includes means for determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the apparatus further includes means for identifying a ground line connecting the first intersection point and the second intersection point. Additionally, the apparatus further includes means for estimating an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the apparatus further includes means for calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • Another example aspect includes a computer-readable medium having instructions stored thereon for estimating a real world distance in an image, wherein the instructions are executable by a processor to obtain an image from a camera installed in an environment.
  • the instructions are further executable to identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the instructions are further executable to determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the instructions are further executable to identify a ground line connecting the first intersection point and the second intersection point. Additionally, the instructions are further executable to estimate an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the instructions are further executable to calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • the one or more aspects comprise the features hereinafter fully described and particularly pointed out in the claims.
  • the following description and the annexed drawings set forth in detail certain illustrative features of the one or more aspects. These features are indicative, however, of but a few of the various ways in which the principles of various aspects may be employed, and this description is intended to include all such aspects and their equivalents.
  • FIG. 1A is an image of an object captured by a camera to be calibrated
  • FIG. IB is a second image of the object in a different position
  • FIG. 2 is a diagram showing points on an image plane being mapped to points on a ground plane using a homography matrix
  • FIG. 3A is a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances, of a first vector that intersects with a point on the object (in Fig. 1) and a ground plane;
  • FIG. 3B is a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances, of an intersection between the first vector (in FIG. 3A) and a second vector drawn based on the object at a different position;
  • FIG. 4 is an image of an object on a surface with parallel lines as captured by a camera to be calibrated, and as projected onto a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances;
  • FIG. 5 is a diagram of a detection plane associated with the camera calibrated based on the image of Fig. 4;
  • FIG. 6 is a block diagram of an example of a computer device having components configured to perform a method for estimating a real world distance in an image
  • FIG. 7 is a flowchart of an example of a method for estimating a real world distance in an image
  • FIG. 8 is a flowchart of additional aspects of the method of FIG. 7;
  • FIG. 9 is a block diagram of an example of a computer device having components configured to perform a method for estimating a real world distance in an image
  • FIG. 10 is a flowchart of an example of a method for estimating a real world distance in an image.
  • FIG. 11 is a flowchart of additional aspects of the method of FIG. 10.
  • the present disclosure describes systems and methods to calibrate a camera and to measure real world distances, such as height, in an image captured by the camera.
  • the calibration for subsequent measurement is performed using image to ground homography.
  • the calibration for subsequent measurement is performed using parallel lines on the ground in the image, along with a camera focal length and an object of known height in the image.
  • the calibrated camera can then be used to estimate a height and/or size of other objects in an image captured by the camera.
  • the approaches may be used to estimate any distance in a plane perpendicular to the plane on which the homography is calculated (e.g., the ground plane).
  • Conventional cameras are unable to estimate height using a single image due to a lack of proper calibration. Achieving the proper calibration, as specifically described in the present disclosure, can thus improve camera technology and enable accurate height estimations.
  • the described aspects provide a simple and efficient technique, as compared to prior complicated and intensive techniques, for calibrating a camera to determine real world measurements. For instance, estimating object height from a single image requires full camera calibration parameters (both intrinsic and extrinsic matrices). Such a full calibration process is complicated and not always possible in the field.
  • the described aspects include two approaches for height estimation with two calibration processes. The calibration processes provide sufficient calibration parameters to provide accurate estimations that can be used to estimate object measurements. The described aspects may be useful in many practical applications.
  • height estimation from a security camera might be useful in many world applications, including estimating heights for vehicles when height restriction exists, such as in the case of vehicles going under bridges, or for child detection by person height estimation, such as in the case of limiting access to prohibited/ dangerous areas.
  • an image 100 of an object 102 is captured by a camera 103 to be calibrated.
  • Image 100 is bound by image plane 104.
  • An x-y-z axis reference of a real world coordinate system (referred to as a world plane) is shown in FIG. 1A.
  • Image plane 104 and ground plane 106 may be any plane in the x-y-z space. For simplicity, suppose that image plane 104 is parallel to the x-z plane and ground plane 106 is parallel to the x-y plane.
  • the representation of image plane 104 and ground plane 106 may be not be as simplistic as described. Nevertheless, the algorithms and execution of the systems and methods in the present disclosure still apply to complicated representations of image plane 104 and ground plane 106.
  • calibration parameters include intrinsic parameters (e.g., focal length), which do not depend on the camera position relative to the real world coordinate system, and extrinsic parameters which describe the orientation and location of the camera 103 (e.g., rotation and translation of the camera 103 with respect to some real world coordinate system).
  • intrinsic parameters e.g., focal length
  • extrinsic parameters which describe the orientation and location of the camera 103 (e.g., rotation and translation of the camera 103 with respect to some real world coordinate system).
  • a planar homography matrix relates the transformation between two planes (up to a scale factor). For example, the transformation between some world plane to the image plane.
  • a homography matrix H is utilized. The homography matrix provides partial information about the calibration parameters.
  • a simple process to find the homography matrix is by matching at least four unique 3-D world points on a real world plane with their corresponding 2-D image points on the image plane. For example, if the homography matrix for an image-to-world ground plane is needed, the chosen points should be on the ground, and homography enables calculating the world location of all the image points on the ground. Given the homography matrix that converts points from an image plane to a ground plane, and two images of an object with known height, the present disclosure describes calibrating a camera 103 and using the calibration to estimate sizes of arbitrary objects captured by the calibrated camera 103.
  • FIG. 2 is a diagram 200 showing points on an image plane being mapped to points on a ground plane using a homography matrix.
  • point (xii, yii) may represent the top most point on object 102 and point (xi2, yi2) may represent the bottom most point (aligned with the top most point along the z-axis) on object 102.
  • These points on image plane 104 represent the perspective of a camera, which does not have a sense of depth.
  • Homography matrix H may be used to convert point (xn, yn) to point (x g i, y g i) and point (xi2, yi2) to point (x g 2, y g 2) on ground plane 106.
  • Points (x g i, y g i) and (x g 2, y g 2) are positions of the image plane points in a real world plane. However, it is evident that even if (xi2, yi2) is a point on the ground and is accurately positioned as (x g 2, y g 2) on ground plane 106, the height associated with point (xn, yn) is not represented by (x g i, y g i). Point (xn, yri) should also be mapped to (x g 2, y g 2) because the top point of object 102 is positioned on the same point as the bottom point of object 102. However, the height properties of object 102 cause the mapping to be to (x g i, y g i).
  • a calibration component installed on a computing device e.g., the camera 103 itself or a server connected to the camera 103 is configured to obtain a first image and estimate two world points.
  • Point ai corresponds to point (x g 2, y g 2) in FIG. 2.
  • the calibration component estimates ai using the homography matrix H and, for example, an object bottom-most point, (e.g., a foot or feet position in a case of the object being a person) in pixels on the image plane.
  • the second point is pi, which is the intersection of the ground and a ray n extending from the camera center to the top-most point of the object (e.g., a top of a head of a person).
  • the calibration component calculates pi using the homography matrix H and, for example, the head position in pixels on the image plane.
  • Point pi corresponds to point (x g i, y g i) in FIG. 2.
  • graph 300 includes a first vector that intersects with a point on the object and a ground plane.
  • Graph 300 is captured along the y-z plane in the world plane of FIGS. 1A and IB and depicts point ai and pi. It should be noted that during the calibration phase height “h” of the object is known. Accordingly, the topmost point on the object is (xi, yi, h).
  • the calibration component may then obtain a second image from the camera 103.
  • FIG. IB is a second image 150 of the object 102 on a different location on the ground plane.
  • the calibration component determines two world points.
  • the second point is p2, which is the intersection of the ground and a ray n extending from the camera center to the top-most point of the object (e.g., the head of the person).
  • the top-most point of the object is (x2, y2, h).
  • the calibration component determines an intersection of n and n, which serves as the camera center C in the world frame or world coordinate system (i.e., the height of the center of camera 103 in the real world relative to the ground plane) by estimating ray n by extending from the point pi to (xi, yi, h) and r2 by extending the point p2 to (x2, y2, h).
  • a2 (3, 4, 0).
  • the coordinates of p2 are (3, 8, 0). This suggests that the length difference along the y-axis between a2 and p2 is 4 feet.
  • the known height of the object is 6 feet.
  • the point above a2 is thus (3, 4, 6).
  • xi 3 ft
  • yi 10 ft.
  • the coordinates of the point above ai is thus (3, 10, 6).
  • graph 350 includes an intersection between the first vector (i.e., ri) and a second vector (i.e., r2) drawn based on the object at a different position.
  • the determination of C serves as the calibration of the camera 103.
  • the calibration component finds, using the homography matrix H, an intersection pj between the ground plane and a ray that extends from point C to the top-most point of the object (e.g., the head of the person).
  • the calibration component estimates the height of the object given its position on the ground plane. For example, given the height of the camera, at least one point is known.
  • a graph 400 including an image frame 402 having an image of object 404 (e.g., a cabinet) on a surface with parallel lines is captured by a camera 103 to be calibrated.
  • object 404 e.g., a cabinet
  • parallel lines 408 and parallel lines 406 are parallel in the real world.
  • parallel lines in the real world appear angled in the image.
  • parallel lines 406 are angled inward such that they would intersect from the perspective of the camera 103.
  • parallel lines 408 are angled inward such that they too would intersect.
  • the calibration component can calibrate the camera 103 and estimate the heights of arbitrary objects. More specifically, the calibration component determines an intersection point at oo of parallel lines 406, namely, pi./ . and the intersection point of parallel lines 408, namely, p2,oo . It should be noted that points pi. / and pi. / extend beyond image frame 202.
  • the calibration component may generate a graph where each pixel of image frame 402 represents a unit on the graph (as shown in FIG. 4). In some aspects, the bottom left pixel of image frame 402 serves as the origin point of the graph (0,0). The graph may extend as far as needed depending on where the parallel lines intersect.
  • the calibration component determines the projection of the ground line at oo, namely, infinity line 410 (used interchangeably with / g . / and ground line 510). Using the focal length f of the camera 103 and the image size in pixels of image frame 402, the calibration component determines an internal camera matrix K. The calibration component then uses K and infinity line 410 to find any point at infinity, nr , on any line perpendicular to the ground line. The determination of m / serves as the calibration of the camera 103. [0047] Referring to FIG. 5, diagram 500 includes a detection plane 506 associated with the camera 103 calibrated based on the graph 400 and image frame 402 of Fig. 4.
  • the height of object 502 is known and the calibration component determines the unknown height of object 504 using the calibrated camera 103.
  • the calibration component determines the intersection p ⁇ (intersection 512) of (A) the line connecting the bottom-most point of the new object (e.g., the feet of object 504) and the bottom-most point of the known object (e.g., the feet of object 502) and (B) ground line 510 (e.g., infinity line 410 from FIG. 4).
  • object 502 is a stationary object that is used as reference for comparison with other objects.
  • the calibration component further calculates a virtual line 514 at intersection 512.
  • Virtual line 514 is perpendicular to ground line 510 and passes through intersection 512.
  • the calibration component determines detection plane 506, which is a plane including at least one point on each of the two objects and virtual line 514. As shown in FIG. 5, which shows detection plane 506 partially shaded (particularly where the two objects are located). It should be noted that detection plane 506 extends to encompass virtual line 514.
  • the calibration component determines the homography matrix that transform virtual line 514 to its canonical form (0, 0, 1) T and uses the homography matrix to rectify the top-most and bottom -most points of the objects 502 and 504.
  • detection plane 506 e.g., plane II
  • Calibration component 615 uses H to rectify the head and feet points of object 502 and 504.
  • computing device 600 may perform a method 700 of estimating a real world height/size in an image, by such as via execution of calibration component 615 by processor(s) 605 and/or one or more memories 610.
  • method 700 and computing device 900 relate to the first approach that includes using image to ground homography and two images of an object of known size to calibrate the camera 103, which can then be used to estimate real world heights and sizes in an image.
  • the method 700 includes obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 620 may be configured to or may comprise means for obtaining a first image (e.g., image 100) from a camera 103 installed at an unknown height in an environment, wherein the first image includes a first object (e.g., object 102) at a first location in the environment, wherein the first object has a known object height (e.g., 6 feet).
  • calibration component 615 identifies the first object by detecting (e.g., using a person detection classifier) an object bounding box around the first object.
  • the method 700 includes estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane.
  • image plane e.g., image plane 104
  • a first point e.g., the feet
  • the method 700 includes determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 630 may be configured to or may comprise means for determining, based on the known object height, a first vector (e.g., ri) that intersects with a second point on the first object (e.g., the head of a person) and points to the real world ground plane (e.g., intersecting at pi).
  • a first vector e.g., ri
  • the real world ground plane e.g., intersecting at pi
  • the method 700 includes obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment.
  • the first object in the second image is also bound by an object bounding box, which is detected by calibration component 615.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 635 may be configured to or may comprise means for obtaining a second image from the camera 103, wherein the second image includes the first object (e.g., object 102) at a second location in the environment.
  • the method 700 includes estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane.
  • the method 700 includes determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 645 may be configured to or may comprise means for determining, based on the known object height, a second vector (e.g., r2) that intersects with the second point (e.g., the head) on the first object in the second image and points to the real world ground plane.
  • a second vector e.g., r2
  • the method 700 includes calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or calibrating component 650 may be configured to or may comprise means for calibrating the camera 103 by determining a height of the center of a camera lens of camera 103 (e.g., C) using an intersection of the first vector (e.g., ri) and the second vector (e.g., ).
  • the exact three-dimensional location of the camera lens center is determined. This location includes the height and lateral position of the camera lens center.
  • the second point on the first object has a known second point height based on the known object height.
  • the first point is associated with a base of the first object (e.g., the bottom-most point), and the second point is associated with atop of the first object (e.g., the top-most point).
  • the first object is a person
  • the first point is associated with a foot of the person
  • the second point is associated with a head of the person.
  • the method 700 may further include receiving a third image from the camera, wherein the third image includes a second object without a known height in the environment.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 655 may be configured to or may comprise means for obtaining a third image from the camera 103, wherein the third image includes a second object without a known height in the environment.
  • the third image may be similar to image 100, but the object in the third image may be different from object 102.
  • image 100 includes a person as the object used to calibrate the camera 103, once the camera 103 is calibrated, the object may be any item, person, animal, etc.
  • the object may be animate or inanimate and does not need to be the same type of object used to calibrate the camera 103.
  • the object in the third image can also be in any location of the environment as long as the base of the object and the top of the object is visible in the third image - to calculate the size (e.g., height) of the object.
  • the method 700 may further include determining a height metric of the second object using the homography matrix and the height of the center of the camera lens.
  • computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 660 may be configured to or may comprise means for determining a height metric of the second object using the homography matrix and the height of the center of the camera lens of camera 103 (e.g., C).
  • a third point e.g., the feet
  • the determining at block 804 of the height metric of the second object comprises determining, based on the height of the center of the camera lens, a third vector (e.g., rs) that intersects with a fourth point (e.g. the head) on the second object and points to the ground plane (e.g., intersecting at ps).
  • a third vector e.g., rs
  • a fourth point e.g. the head
  • the determining at block 804 of the height metric of the second object comprises determining the height metric between the third point and the fourth point on the second object based on a distance between the third point and the fourth point relative to the height of the center of the camera lens of camera 103 (e.g., Q.
  • calibration component 615 may calculate the height as equal to C x ((xs - p x ) / (Cx - p x )), as discussed previously.
  • the third point is associated with a base of the second object, and the fourth point is associated with a top of the second object.
  • computing device 900 may perform a method 1000 of estimating a real world distance in an image, by such as via execution of calibration component 915 by processor(s) 905 and/or one or more memories 910.
  • method 700 and computing device 900 relate to the second approach for calibration and subsequent measurement using parallel lines on the ground in an image, along with a camera focal length and an object of known height in the image.
  • the method 1000 includes obtaining an image from a camera installed in an environment.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or obtaining component 920 may be configured to or may comprise means for obtaining an image (e.g., image frame 402) from a camera 103 installed in an environment.
  • the method 1000 includes identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or identifying component 925 may be configured to or may comprise means for identifying, in the image, a first set of parallel lines (e.g., parallel lines 406) on a real world ground plane and a second set of parallel lines (e.g., parallel lines 408) on the real world ground plane.
  • the method 1000 includes determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or determining component 930 may be configured to or may comprise means for determining a first intersection point (e.g., pi,®) of the first set of parallel lines and a second intersection point of the second set of parallel lines (e.g., p 2 ,®).
  • the method 1000 includes identifying a ground line connecting the first intersection point and the second intersection point.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or identifying component 935 may be configured to or may comprise means for identifying a ground line (e.g., infinity line 410) connecting the first intersection point and the second intersection point.
  • the method 1000 includes estimating an internal camera matrix based on a focal length and an image size associated with the camera.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or estimating component 940 may be configured to or may comprise means for estimating an internal camera matrix (e.g., K) based on a focal length (e.g.. /) and an image size (e.g., of image frame 402) associated with the camera 103.
  • the method 1000 includes calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or calibrating component 945 may be configured to or may comprise means for calibrating the camera 103 for real world distance measurement by determining a perpendicular vector (e .g . , m / ) to the ground line based on the internal camera matrix.
  • the method 1000 may further include determining a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
  • computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or determining component 950 may be configured to or may comprise means for determining a height metric of the second object (e.g., object 504) using the perpendicular vector (e.g., m / ) to the ground line (e.g., infinity line 410) and the known height of the first object (e.g., object 502).
  • the determining at block 1102 of the height metric of the second object comprises determining an intersection between the ground line (e.g., infinity line 410) and a vector (e.g., vector 508) through a first ground point on the first object and a second ground point on the second object.
  • the ground line e.g., infinity line 410
  • a vector e.g., vector 508
  • the determining at block 1102 of the height metric of the second object comprises calculating a virtual line (e.g., virtual line 514) in a plane (e.g., detection plane 506) that comprises the first object (e.g., object 502) and the second object (e.g., object 504) that is perpendicular to the ground line (e.g., ground line 510) and includes the intersection (e.g., intersection 512).
  • a virtual line e.g., virtual line 514 in a plane (e.g., detection plane 506) that comprises the first object (e.g., object 502) and the second object (e.g., object 504) that is perpendicular to the ground line (e.g., ground line 510) and includes the intersection (e.g., intersection 512).
  • the determining at block 1102 of the height metric of the second object comprises determining a homography matrix that transforms the virtual line to a canonical form.
  • the determining at block 1102 of the height metric of the second object comprises calculating a first rectified top point on the first object and second rectified top point on the second object using the homography matrix.
  • the determining at block 1102 of the height metric of the second object comprises calculating the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
  • the height /o is known.
  • a method for estimating a real world distance in an image comprising: obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height; estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane; determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane; obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment; estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane; determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image
  • Clause 2 The method of clause 1, wherein the second point on the first object has a known second point height based on the known object height.
  • Clause 3 The method of any one or any combination of the preceding clauses, wherein the first point is associated with a base of the first object, and the second point is associated with a top of the first object.
  • Clause 4 The method of any one or any combination of the preceding clauses, wherein the first object is a person, the first point is associated with a foot of the person, and the second point is associated with a head of the person.
  • Clause 5. The method of any one or any combination of the preceding clauses, further comprising: obtaining a third image from the camera, wherein the third image includes a second object without a known height in the environment; and determining a height metric of the second object using the homography matrix and the height of the center of the camera lens of the camera.
  • determining the height metric of the second object comprises: estimating, using the homography matrix, a third position of a third point on the second object based on the real world ground plane; determining, based on the height of the center of the camera lens, a third vector that intersects with a fourth point on the second object and points to the ground plane; and determining the height metric between the third point and the fourth point on the second object based on a distance between the third point and the fourth point relative to the height of the center of the camera lens of the camera.
  • Clause 7 The method of any one or any combination of the preceding clauses, wherein the third point is associated with a base of the second object, and the fourth point is associated with atop of the second object.
  • An apparatus for estimating a real world distance in an image comprising: a memory; and a processor coupled with the memory and configured to: obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height; estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane; determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane; obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment; estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane; determine, based on the known object height, a second vector that intersects with the
  • Clause 9 The apparatus of clause 8, wherein the second point on the first object has a known second point height based on the known object height.
  • Clause 10 The apparatus of any one or any combination of the preceding clauses, wherein the first point is associated with a base of the first object, and the second point is associated with a top of the first object.
  • Clause 14 The apparatus of any one or any combination of the preceding clauses, wherein the third point is associated with a base of the second object, and the fourth point is associated with atop of the second object.
  • a method for estimating a real world distance in an image comprising: obtaining an image from a camera installed in an environment; identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identifying a ground line connecting the first intersection point and the second intersection point; estimating an internal camera matrix based on a focal length and an image size associated with the camera; and calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • determining the height metric of the second object comprises: determining an intersection between the ground line and a vector through a first ground point on the first object and a second ground point on the second object; calculating a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determining a homography matrix that transforms the virtual line to a canonical form; calculating a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculating the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
  • An apparatus for estimating a real world distance in an image comprising: a memory; and a processor coupled with the memory and configured to: obtain an image from a camera installed in an environment; identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identify a ground line connecting the first intersection point and the second intersection point; estimate an internal camera matrix based on a focal length and an image size associated with the camera; and calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
  • Clause 22 The apparatus of any one or any combination of the preceding clauses, wherein the first object is a stationary object in the environment.
  • Clause 23 The apparatus of any one or any combination of the preceding clauses, wherein the first set of parallel lines intersect with the second set of parallel lines.
  • Clause 24 The apparatus of any one or any combination of the preceding clauses, wherein the first set of parallel lines are perpendicular to the second set of parallel lines in the real world ground plane.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

Example implementations include a method, apparatus and computer-readable medium for estimating a real world distance in an image, comprising obtaining an image from a camera installed in an environment and identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. The implementations include determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines, identifying a ground line connecting the first intersection point and the second intersection point, and estimating an internal camera matrix based on a focal length and an image size associated with the camera. The implementations include calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.

Description

CAMERA CALIBRATION AND DISTANCE MEASUREMENT USING
PARALLEL LINES
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims the benefit of priority to U.S. Patent Application No. 18/516,070 “CAMERA CALIBRATION AND DISTANCE MEASUREMENT USING PARALLEL LINES”, filed on November 21, 2023, which claims the benefit of priority to U.S Provisional Application No. 63/384,845 “CAMERA CALIBRATION AND DISTANCE MEASUREMENT USING PARALLEL LINES”, filed November 23, 2022. The disclosure of the prior applications is hereby incorporated by reference in their entirety.
BACKGROUND
Technical Field
[0002] The described aspects relate to camera and computer vision systems.
Introduction
[0003] Height estimation is useful in many world applications. For example, the heights of vehicles may be estimated for when height restrictions exist (e.g., tunnels, bridges, etc.). In another example, height may be used by security applications to distinguish children from adults. In terms of computer vision, estimating object height from a single image requires camera calibration parameters (both intrinsic and extrinsic matrices). Camera calibration is the process of determining camera parameters in order to complete operations with specified performance measurements. Unfortunately, the calibration process is often complicated and not always possible on the field.
SUMMARY
[0004] The following presents a simplified summary of one or more aspects in order to provide a basic understanding of such aspects. This summary is not an extensive overview of all contemplated aspects, and is intended to neither identify key or critical elements of all aspects nor delineate the scope of any or all aspects. Its sole purpose is to present some concepts of one or more aspects in a simplified form as a prelude to the more detailed description that is presented later. [0005] An example aspect includes a method for estimating a real world distance in an image, comprising obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height. The method further includes estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the method further includes determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the method further includes obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the method further includes estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the method further includes determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the method further includes calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0006] Another example aspect includes an apparatus for estimating a real world distance in an image, comprising a memory and a processor coupled with the memory. The processor is configured to obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height. The processor is further configured to estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the processor further configured to determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the processor further configured to obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the processor further configured to estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the processor further configured to determine, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane. Additionally, the processor further configured to calibrate the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0007] Another example aspect includes an apparatus for estimating a real world distance in an image, comprising means for obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height. The apparatus further includes means for estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the apparatus further includes means for determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the apparatus further includes means for obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the apparatus further includes means for estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the apparatus further includes means for determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the apparatus further includes means for calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0008] Another example aspect includes a computer-readable medium having instructions stored thereon for estimating a real world distance in an image, wherein the instructions are executable by a processor to obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height. The instructions are further executable to estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. Additionally, the instructions are further executable to determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. Additionally, the instructions are further executable to obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment. Additionally, the instructions are further executable to estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. Additionally, the instructions are further executable to determine, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the second real world ground plane. Additionally, the instructions are further executable to calibrate the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0009] An example aspect includes a method for estimating a real world distance in an image, comprising obtaining an image from a camera installed in an environment. The method further includes identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the method further includes determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the method further includes identifying a ground line connecting the first intersection point and the second intersection point. Additionally, the method further includes estimating an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the method further includes calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
[0010] Another example aspect includes an apparatus for estimating a real world distance in an image, comprising a memory and a processor coupled with the memory. The processor is configured to obtain an image from a camera installed in an environment. The processor is further configured to identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the processor further configured to determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the processor further configured to identify a ground line connecting the first intersection point and the second intersection point. Additionally, the processor further configured to estimate an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the processor further configured to calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
[0011] Another example aspect includes an apparatus for estimating a real world distance in an image, comprising means for obtaining an image from a camera installed in an environment. The apparatus further includes means for identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the apparatus further includes means for determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the apparatus further includes means for identifying a ground line connecting the first intersection point and the second intersection point. Additionally, the apparatus further includes means for estimating an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the apparatus further includes means for calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
[0012] Another example aspect includes a computer-readable medium having instructions stored thereon for estimating a real world distance in an image, wherein the instructions are executable by a processor to obtain an image from a camera installed in an environment. The instructions are further executable to identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. Additionally, the instructions are further executable to determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. Additionally, the instructions are further executable to identify a ground line connecting the first intersection point and the second intersection point. Additionally, the instructions are further executable to estimate an internal camera matrix based on a focal length and an image size associated with the camera. Additionally, the instructions are further executable to calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
[0013] To the accomplishment of the foregoing and related ends, the one or more aspects comprise the features hereinafter fully described and particularly pointed out in the claims. The following description and the annexed drawings set forth in detail certain illustrative features of the one or more aspects. These features are indicative, however, of but a few of the various ways in which the principles of various aspects may be employed, and this description is intended to include all such aspects and their equivalents.
BRIEF DESCRIPTION OF THE DRAWINGS
[0014] The disclosed aspects will hereinafter be described in conjunction with the appended drawings, provided to illustrate and not to limit the disclosed aspects, wherein like designations denote like elements, wherein dashed lines may indicate optional elements, and in which:
[0015] FIG. 1A is an image of an object captured by a camera to be calibrated;
[0016] FIG. IB is a second image of the object in a different position;
[0017] FIG. 2 is a diagram showing points on an image plane being mapped to points on a ground plane using a homography matrix;
[0018] FIG. 3A is a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances, of a first vector that intersects with a point on the object (in Fig. 1) and a ground plane;
[0019] FIG. 3B is a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances, of an intersection between the first vector (in FIG. 3A) and a second vector drawn based on the object at a different position;
[0020] FIG. 4 is an image of an object on a surface with parallel lines as captured by a camera to be calibrated, and as projected onto a graph of a z-axis distance metric versus an y-axis distance metric, in real world distances;
[0021] FIG. 5 is a diagram of a detection plane associated with the camera calibrated based on the image of Fig. 4;
[0022] FIG. 6 is a block diagram of an example of a computer device having components configured to perform a method for estimating a real world distance in an image;
[0023] FIG. 7 is a flowchart of an example of a method for estimating a real world distance in an image;
[0024] FIG. 8 is a flowchart of additional aspects of the method of FIG. 7;
[0025] FIG. 9 is a block diagram of an example of a computer device having components configured to perform a method for estimating a real world distance in an image;
[0026] FIG. 10 is a flowchart of an example of a method for estimating a real world distance in an image; and
[0027] FIG. 11 is a flowchart of additional aspects of the method of FIG. 10. DETAILED DESCRIPTION
[0028] Various aspects are now described with reference to the drawings. In the following description, for purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of one or more aspects. It may be evident, however, that such aspect(s) may be practiced without these specific details.
[0029] The present disclosure describes systems and methods to calibrate a camera and to measure real world distances, such as height, in an image captured by the camera. In one approach, the calibration for subsequent measurement is performed using image to ground homography. In another approach, the calibration for subsequent measurement is performed using parallel lines on the ground in the image, along with a camera focal length and an object of known height in the image. In either approach, the calibrated camera can then be used to estimate a height and/or size of other objects in an image captured by the camera. In general, the approaches may be used to estimate any distance in a plane perpendicular to the plane on which the homography is calculated (e.g., the ground plane). Conventional cameras are unable to estimate height using a single image due to a lack of proper calibration. Achieving the proper calibration, as specifically described in the present disclosure, can thus improve camera technology and enable accurate height estimations.
[0030] The described aspects provide a simple and efficient technique, as compared to prior complicated and intensive techniques, for calibrating a camera to determine real world measurements. For instance, estimating object height from a single image requires full camera calibration parameters (both intrinsic and extrinsic matrices). Such a full calibration process is complicated and not always possible in the field. The described aspects include two approaches for height estimation with two calibration processes. The calibration processes provide sufficient calibration parameters to provide accurate estimations that can be used to estimate object measurements. The described aspects may be useful in many practical applications. For instance, height estimation from a security camera might be useful in many world applications, including estimating heights for vehicles when height restriction exists, such as in the case of vehicles going under bridges, or for child detection by person height estimation, such as in the case of limiting access to prohibited/ dangerous areas.
[0031] Referring to FIG. 1A, an image 100 of an object 102 is captured by a camera 103 to be calibrated. Image 100 is bound by image plane 104. An x-y-z axis reference of a real world coordinate system (referred to as a world plane) is shown in FIG. 1A. Image plane 104 and ground plane 106 may be any plane in the x-y-z space. For simplicity, suppose that image plane 104 is parallel to the x-z plane and ground plane 106 is parallel to the x-y plane. It should be noted that depending on the position of the camera 103 installed in the environment, the tilt of the camera 103, the curvature of the floor, etc., the representation of image plane 104 and ground plane 106 may be not be as simplistic as described. Nevertheless, the algorithms and execution of the systems and methods in the present disclosure still apply to complicated representations of image plane 104 and ground plane 106.
[0032] In some aspects, calibration parameters include intrinsic parameters (e.g., focal length), which do not depend on the camera position relative to the real world coordinate system, and extrinsic parameters which describe the orientation and location of the camera 103 (e.g., rotation and translation of the camera 103 with respect to some real world coordinate system).
[0033] To estimate the calibration parameters, 3-D world points and their corresponding 2-D image points are utilized. To get these correspondences, multiple images of a calibration pattern can be used. By the correspondences, the calibration parameters can be determined.
[0034] Regarding the correspondences, a planar homography matrix relates the transformation between two planes (up to a scale factor). For example, the transformation between some world plane to the image plane. To convert between a point on image plane 104 and ground plane 106, a homography matrix H is utilized. The homography matrix provides partial information about the calibration parameters.
[0035] A simple process to find the homography matrix is by matching at least four unique 3-D world points on a real world plane with their corresponding 2-D image points on the image plane. For example, if the homography matrix for an image-to-world ground plane is needed, the chosen points should be on the ground, and homography enables calculating the world location of all the image points on the ground. Given the homography matrix that converts points from an image plane to a ground plane, and two images of an object with known height, the present disclosure describes calibrating a camera 103 and using the calibration to estimate sizes of arbitrary objects captured by the calibrated camera 103.
[0036] FIG. 2 is a diagram 200 showing points on an image plane being mapped to points on a ground plane using a homography matrix. For example, point (xii, yii) may represent the top most point on object 102 and point (xi2, yi2) may represent the bottom most point (aligned with the top most point along the z-axis) on object 102. These points on image plane 104 represent the perspective of a camera, which does not have a sense of depth. Homography matrix H may be used to convert point (xn, yn) to point (xgi, ygi) and point (xi2, yi2) to point (xg2, yg2) on ground plane 106. Points (xgi, ygi) and (xg2, yg2) are positions of the image plane points in a real world plane. However, it is evident that even if (xi2, yi2) is a point on the ground and is accurately positioned as (xg2, yg2) on ground plane 106, the height associated with point (xn, yn) is not represented by (xgi, ygi). Point (xn, yri) should also be mapped to (xg2, yg2) because the top point of object 102 is positioned on the same point as the bottom point of object 102. However, the height properties of object 102 cause the mapping to be to (xgi, ygi).
[0037] In the first approach, image to ground homography and two images of an object of known size are used to calibrate the camera 103, which can then be used to estimate real world distances on the vertical axis (e.g., object height) in an image. In this approach, a calibration component installed on a computing device (e.g., the camera 103 itself or a server connected to the camera 103) is configured to obtain a first image and estimate two world points. The first is ai = (xi, yi, 0), where ai is the bottom-most point on the object (e.g., the feet location of a person). Point ai corresponds to point (xg2, yg2) in FIG. 2. The calibration component estimates ai using the homography matrix H and, for example, an object bottom-most point, (e.g., a foot or feet position in a case of the object being a person) in pixels on the image plane. The second point is pi, which is the intersection of the ground and a ray n extending from the camera center to the top-most point of the object (e.g., a top of a head of a person). The calibration component calculates pi using the homography matrix H and, for example, the head position in pixels on the image plane. Point pi corresponds to point (xgi, ygi) in FIG. 2.
[0038] Referring to FIG. 3 A, for example, graph 300 includes a first vector that intersects with a point on the object and a ground plane. Graph 300 is captured along the y-z plane in the world plane of FIGS. 1A and IB and depicts point ai and pi. It should be noted that during the calibration phase height “h” of the object is known. Accordingly, the topmost point on the object is (xi, yi, h).
[0039] The calibration component may then obtain a second image from the camera 103. FIG. IB is a second image 150 of the object 102 on a different location on the ground plane. Again, the calibration component determines two world points. The first world point is a2 = (x2, y2, 0), which is the bottom-most point on the object. The second point is p2, which is the intersection of the ground and a ray n extending from the camera center to the top-most point of the object (e.g., the head of the person). In this case, the top-most point of the object is (x2, y2, h). The calibration component then determines an intersection of n and n, which serves as the camera center C in the world frame or world coordinate system (i.e., the height of the center of camera 103 in the real world relative to the ground plane) by estimating ray n by extending from the point pi to (xi, yi, h) and r2 by extending the point p2 to (x2, y2, h).
[0040] Suppose that X2 = 3 ft, and y2 = 4 ft. Accordingly, a2 = (3, 4, 0). Suppose that the coordinates of p2 are (3, 8, 0). This suggests that the length difference along the y-axis between a2 and p2 is 4 feet. Suppose that the known height of the object is 6 feet. The point above a2 is thus (3, 4, 6). Given these two points, a first ray n extending to camera 103 may be determined using the line equation z = -1.5y + 12. Suppose that xi = 3 ft, and yi = 10 ft. The coordinates of the point above ai is thus (3, 10, 6). Suppose that the coordinates of pi are (3, 20, 0). Given these two points, a second ray n extending to camera 103 may be determined using the line equation z = -0.6y + 12. It should be noted that these are simplistic line equations in which it is assumed that the object simply moves in a straight line towards the camera and does not shift sideways. Both of these rays intersect at point C, which is given by (0, 12). This suggests that the camera is fixed in a spot 12 ft above the ground plane.
[0041] Referring to FIG. 3B, for example, graph 350 includes an intersection between the first vector (i.e., ri) and a second vector (i.e., r2) drawn based on the object at a different position. The determination of C serves as the calibration of the camera 103.
[0042] Subsequently, when a new object with an unknown height is captured by the calibrated camera 103 in a single input image, the calibration component estimates a ground location as = (xs, ys, 0) of the object using the homography matrix (e.g., converting the pixel location of the feet of a person to the real world location of the feet). The calibration component then finds, using the homography matrix H, an intersection pj between the ground plane and a ray that extends from point C to the top-most point of the object (e.g., the head of the person). The calibration component then estimates the height of the object given its position on the ground plane. For example, given the height of the camera, at least one point is known. Given pv there are two known points and a ray r3 can be formed. If the y position of a3 is then entered in the line equation of r3, the value of h can be determined. For example, if p3 is (3, 7, 0) and the camera is positioned on (3, 0, 12), the line equation is z = -( 12/7)y + 12. If a3 is (3, 3, 0), then z = -(12/7)(3) + 12 = 6.86. This suggests that the height is approximately 6.86 of the arbitrary object. [0043] On a high level, it should be noted that rs = p3 + X(p3 - C). To find the height of the object, the calibration components finds Xz for which rz = Z3 (i.e., Xz = (z3 - pz) / (pz - Cz)). The calibration component determines the height on the point where X = Xz. More specifically, height = Cz ((z3 - pz) / (Cz - pz)).
[0044] Referring to FIG. 4, in an example of the second approach for calibration and subsequent measurement using parallel lines on the ground in an image, along with a camera focal length and an object of known height in the image, a graph 400 including an image frame 402 having an image of object 404 (e.g., a cabinet) on a surface with parallel lines is captured by a camera 103 to be calibrated. It should be noted that parallel lines 408 and parallel lines 406 are parallel in the real world. However, due to factors such as the curvature/shape of the lens of the camera 103 and the angle at which the camera 103 is positioned, parallel lines in the real world appear angled in the image. For example, in graph 400 and image frame 402, parallel lines 406 are angled inward such that they would intersect from the perspective of the camera 103. Likewise, parallel lines 408 are angled inward such that they too would intersect.
[0045] Given two sets of parallel lines (e.g., parallel lines 408 and parallel lines 406), wherein one set intersects with the other set (e.g., are perpendicular or cross at an angle), a camera focal length and an image of an object with a known height lo, the calibration component can calibrate the camera 103 and estimate the heights of arbitrary objects. More specifically, the calibration component determines an intersection point at oo of parallel lines 406, namely, pi./ . and the intersection point of parallel lines 408, namely, p2,oo . It should be noted that points pi. / and pi. / extend beyond image frame 202. The calibration component may generate a graph where each pixel of image frame 402 represents a unit on the graph (as shown in FIG. 4). In some aspects, the bottom left pixel of image frame 402 serves as the origin point of the graph (0,0). The graph may extend as far as needed depending on where the parallel lines intersect.
[0046] The calibration component then determines the projection of the ground line at oo, namely, infinity line 410 (used interchangeably with /g. / and ground line 510). Using the focal length f of the camera 103 and the image size in pixels of image frame 402, the calibration component determines an internal camera matrix K. The calibration component then uses K and infinity line 410 to find any point at infinity, nr , on any line perpendicular to the ground line. The determination of m / serves as the calibration of the camera 103. [0047] Referring to FIG. 5, diagram 500 includes a detection plane 506 associated with the camera 103 calibrated based on the graph 400 and image frame 402 of Fig. 4. In diagram 500, the height of object 502 is known and the calibration component determines the unknown height of object 504 using the calibrated camera 103. In particular, when a new object enters a scene in an image frame captured by camera 103, the calibration component determines the intersection p< (intersection 512) of (A) the line connecting the bottom-most point of the new object (e.g., the feet of object 504) and the bottom-most point of the known object (e.g., the feet of object 502) and (B) ground line 510 (e.g., infinity line 410 from FIG. 4). In this case, object 502 is a stationary object that is used as reference for comparison with other objects.
[0048] The calibration component further calculates a virtual line 514 at intersection 512. Virtual line 514 is perpendicular to ground line 510 and passes through intersection 512. From virtual line 514, the calibration component determines detection plane 506, which is a plane including at least one point on each of the two objects and virtual line 514. As shown in FIG. 5, which shows detection plane 506 partially shaded (particularly where the two objects are located). It should be noted that detection plane 506 extends to encompass virtual line 514. The calibration component determines the homography matrix that transform virtual line 514 to its canonical form (0, 0, 1)T and uses the homography matrix to rectify the top-most and bottom -most points of the objects 502 and 504. For example, the calibration component uses the feet and head points of the persons in diagram 500 (e.g., fi, hi, i=l, 2, respectively). The calibration component then calculates the rectified heights Zrj = |7ii -fi\, where the height of object 504 is given by fo (/r,l)//lr,2.
[0049] To better explain this calculation, consider the following example:
[0050] In Fig. 5, suppose that ground line 510 is represented by tg oo and is given by tg oo = (3/9, 1, -320). Suppose that vector 508 is represented
Figure imgf000014_0001
connecting the feet of object 504 with the feet of object 502, and is given by
Figure imgf000014_0002
= (-0.38, 1, 147). Intersection 512 is the intersection of tg oo and t 2f> and is given by tf2f x tg ;00 = (243, 239, 1). This point is the first point on the line at infinity of detection plane 506 (e.g., plane II). Suppose that the two lines and l2 are given by
Figure imgf000014_0003
= (78.5, 1, -54903) and l2 = (-71, 1, 37420). These two lines intersect at the point mm (not shown in the figure) given by mm = (617, 642, 1). Virtual line 514 is represented by tn oo and is the line between intersection 512 and and is given by trc co = (-4.4e-3, 2.6e-4, 1). The homography matrix H that
1 0 0 rectifies this line by to the form (0, 0, 1) is given by H = 0 1 0
-6186 374 1413583
[0051] Calibration component 615 uses H to rectify the head and feet points of object 502 and 504. The rectified head and feet points of object 504 are h2 = (-2.5e-4, -9.6e-5, 1), fi = (-2.6e-4, -1.6e-4, 1) and the rectified head and feet points of object 502 are hi = (-3e-4, - 1.2e-4, 1), fi = (-3e-4, -2e-4, 1). After the projective rectification, the length ratios are the conserved. Accordingly, if the object 502 height (e.g., hobject) is known to be 2 meters, then: 0.1 * 2 = 0.2 m.
Figure imgf000015_0001
[0052] Referring to Fig. 6 and Fig. 7, in operation, computing device 600 may perform a method 700 of estimating a real world height/size in an image, by such as via execution of calibration component 615 by processor(s) 605 and/or one or more memories 610. For example, method 700 and computing device 900 relate to the first approach that includes using image to ground homography and two images of an object of known size to calibrate the camera 103, which can then be used to estimate real world heights and sizes in an image.
[0053] At block 702, the method 700 includes obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 620 may be configured to or may comprise means for obtaining a first image (e.g., image 100) from a camera 103 installed at an unknown height in an environment, wherein the first image includes a first object (e.g., object 102) at a first location in the environment, wherein the first object has a known object height (e.g., 6 feet). In some aspects, calibration component 615 identifies the first object by detecting (e.g., using a person detection classifier) an object bounding box around the first object.
[0054] At block 704, the method 700 includes estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or estimating component 625 may be configured to or may comprise means for estimating, using a homography matrix that transforms an image plane (e.g., image plane 104) associated with the image (e.g., image 100) to a real world plane, a first position (e.g., ai = (xi, yi, 0)) of a first point (e.g., the feet) on the first object in the first image based on a real world ground plane (e.g., ground plane 106).
[0055] At block 706, the method 700 includes determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 630 may be configured to or may comprise means for determining, based on the known object height, a first vector (e.g., ri) that intersects with a second point on the first object (e.g., the head of a person) and points to the real world ground plane (e.g., intersecting at pi).
[0056] At block 708, the method 700 includes obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment. In some aspects, the first object in the second image is also bound by an object bounding box, which is detected by calibration component 615. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 635 may be configured to or may comprise means for obtaining a second image from the camera 103, wherein the second image includes the first object (e.g., object 102) at a second location in the environment.
[0057] At block 710, the method 700 includes estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or estimating component 640 may be configured to or may comprise means for estimating, using the homography matrix, a second position (e.g., a2 = (x2, y2, 0)) of the first point (e.g., the feet) on the first object in the second image based on the real world ground plane (e.g., ground plane 106).
[0058] At block 712, the method 700 includes determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 645 may be configured to or may comprise means for determining, based on the known object height, a second vector (e.g., r2) that intersects with the second point (e.g., the head) on the first object in the second image and points to the real world ground plane.
[0059] At block 714, the method 700 includes calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or calibrating component 650 may be configured to or may comprise means for calibrating the camera 103 by determining a height of the center of a camera lens of camera 103 (e.g., C) using an intersection of the first vector (e.g., ri) and the second vector (e.g., ). In some aspects, the exact three-dimensional location of the camera lens center is determined. This location includes the height and lateral position of the camera lens center.
[0060] In an alternative or additional aspect, the second point on the first object has a known second point height based on the known object height.
[0061] In an alternative or additional aspect, the first point is associated with a base of the first object (e.g., the bottom-most point), and the second point is associated with atop of the first object (e.g., the top-most point).
[0062] In an alternative or additional aspect, the first object is a person, the first point is associated with a foot of the person, and the second point is associated with a head of the person.
[0063] Referring to Fig. 8, in an alternative or additional aspect, at block 802, the method 700 may further include receiving a third image from the camera, wherein the third image includes a second object without a known height in the environment. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or obtaining component 655 may be configured to or may comprise means for obtaining a third image from the camera 103, wherein the third image includes a second object without a known height in the environment. For example, the third image may be similar to image 100, but the object in the third image may be different from object 102. It should be noted that although image 100 includes a person as the object used to calibrate the camera 103, once the camera 103 is calibrated, the object may be any item, person, animal, etc. The object may be animate or inanimate and does not need to be the same type of object used to calibrate the camera 103. The object in the third image can also be in any location of the environment as long as the base of the object and the top of the object is visible in the third image - to calculate the size (e.g., height) of the object.
[0064] In this optional aspect, at block 804, the method 700 may further include determining a height metric of the second object using the homography matrix and the height of the center of the camera lens. For example, in an aspect, computing device 600, processor(s) 605, one or more memories 610, calibration component 615, and/or determining component 660 may be configured to or may comprise means for determining a height metric of the second object using the homography matrix and the height of the center of the camera lens of camera 103 (e.g., C).
[0065] In this optional aspect, at block 806, the determining at block 804 of the height metric of the second object comprises estimating, using the homography matrix, a third position (e.g., as = (xs, ys, 0)) of a third point (e.g., the feet) on the second object based on the real world ground plane (e.g., ground plane 106).
[0066] In this optional aspect, at block 808, the determining at block 804 of the height metric of the second object comprises determining, based on the height of the center of the camera lens, a third vector (e.g., rs) that intersects with a fourth point (e.g. the head) on the second object and points to the ground plane (e.g., intersecting at ps).
[0067] In this optional aspect, at block 810, the determining at block 804 of the height metric of the second object comprises determining the height metric between the third point and the fourth point on the second object based on a distance between the third point and the fourth point relative to the height of the center of the camera lens of camera 103 (e.g., Q.
[0068] For example, calibration component 615 may calculate the height as equal to Cx ((xs - px) / (Cx - px)), as discussed previously.
[0069] In an alternative or additional aspect, the third point is associated with a base of the second object, and the fourth point is associated with a top of the second object.
[0070] Referring to Fig. 9 and Fig. 10, in operation, computing device 900 may perform a method 1000 of estimating a real world distance in an image, by such as via execution of calibration component 915 by processor(s) 905 and/or one or more memories 910. For example, method 700 and computing device 900 relate to the second approach for calibration and subsequent measurement using parallel lines on the ground in an image, along with a camera focal length and an object of known height in the image.
[0071] At block 1002, the method 1000 includes obtaining an image from a camera installed in an environment. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or obtaining component 920 may be configured to or may comprise means for obtaining an image (e.g., image frame 402) from a camera 103 installed in an environment.
[0072] At block 1004, the method 1000 includes identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or identifying component 925 may be configured to or may comprise means for identifying, in the image, a first set of parallel lines (e.g., parallel lines 406) on a real world ground plane and a second set of parallel lines (e.g., parallel lines 408) on the real world ground plane.
[0073] At block 1006, the method 1000 includes determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or determining component 930 may be configured to or may comprise means for determining a first intersection point (e.g., pi,®) of the first set of parallel lines and a second intersection point of the second set of parallel lines (e.g., p2,®).
[0074] At block 1008, the method 1000 includes identifying a ground line connecting the first intersection point and the second intersection point. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or identifying component 935 may be configured to or may comprise means for identifying a ground line (e.g., infinity line 410) connecting the first intersection point and the second intersection point.
[0075] At block 1010, the method 1000 includes estimating an internal camera matrix based on a focal length and an image size associated with the camera. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or estimating component 940 may be configured to or may comprise means for estimating an internal camera matrix (e.g., K) based on a focal length (e.g.. /) and an image size (e.g., of image frame 402) associated with the camera 103.
[0076] At block 1012, the method 1000 includes calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or calibrating component 945 may be configured to or may comprise means for calibrating the camera 103 for real world distance measurement by determining a perpendicular vector (e .g . , m / ) to the ground line based on the internal camera matrix.
[0077] Referring to Fig. 11, in an alternative or additional aspect wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, at block 1102, the method 1000 may further include determining a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object. For example, in an aspect, computing device 900, processor(s) 905, one or more memories 910, calibration component 915, and/or determining component 950 may be configured to or may comprise means for determining a height metric of the second object (e.g., object 504) using the perpendicular vector (e.g., m / ) to the ground line (e.g., infinity line 410) and the known height of the first object (e.g., object 502).
[0078] In this optional aspect, at block 1104, the determining at block 1102 of the height metric of the second object comprises determining an intersection between the ground line (e.g., infinity line 410) and a vector (e.g., vector 508) through a first ground point on the first object and a second ground point on the second object.
[0079] In this optional aspect, at block 1106, the determining at block 1102 of the height metric of the second object comprises calculating a virtual line (e.g., virtual line 514) in a plane (e.g., detection plane 506) that comprises the first object (e.g., object 502) and the second object (e.g., object 504) that is perpendicular to the ground line (e.g., ground line 510) and includes the intersection (e.g., intersection 512).
[0080] In this optional aspect, at block 1108, the determining at block 1102 of the height metric of the second object comprises determining a homography matrix that transforms the virtual line to a canonical form. For example, calibration component 915 determines the homography matrix that transforms virtual line 514 to its canonical form. For example, given the coordinates of the point A(xo, yo) and the coordinates of the point n = {/; m}, the equation of the line can be written in the canonical form using the following formula: x - xO > y - yO
I m
[0081] In this optional aspect, at block 1110, the determining at block 1102 of the height metric of the second object comprises calculating a first rectified top point on the first object and second rectified top point on the second object using the homography matrix. For example, calibration component 915 uses the feet and head points of the persons in diagram 500 (e.g.,Ji, hi, i=l, 2, respectively).
[0082] In this optional aspect, at block 1112, the determining at block 1102 of the height metric of the second object comprises calculating the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object. Calibration component 915 then calculates the rectified heights k,i= \hi -fi\, where the height of object 504 is given by /o (/r,i)//fr,2. Here, the height /o is known.
[0083] The following clauses include additional implementations of the present disclosure.
[0084] Clause 1. A method for estimating a real world distance in an image, comprising: obtaining a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height; estimating, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane; determining, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane; obtaining a second image from the camera, wherein the second image includes the first object at a second location in the environment; estimating, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane; determining, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane; and calibrating the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0085] Clause 2. The method of clause 1, wherein the second point on the first object has a known second point height based on the known object height.
[0086] Clause 3. The method of any one or any combination of the preceding clauses, wherein the first point is associated with a base of the first object, and the second point is associated with a top of the first object.
[0087] Clause 4. The method of any one or any combination of the preceding clauses, wherein the first object is a person, the first point is associated with a foot of the person, and the second point is associated with a head of the person. [0088] Clause 5. The method of any one or any combination of the preceding clauses, further comprising: obtaining a third image from the camera, wherein the third image includes a second object without a known height in the environment; and determining a height metric of the second object using the homography matrix and the height of the center of the camera lens of the camera.
[0089] Clause 6. The method of any one or any combination of the preceding clauses, wherein determining the height metric of the second object comprises: estimating, using the homography matrix, a third position of a third point on the second object based on the real world ground plane; determining, based on the height of the center of the camera lens, a third vector that intersects with a fourth point on the second object and points to the ground plane; and determining the height metric between the third point and the fourth point on the second object based on a distance between the third point and the fourth point relative to the height of the center of the camera lens of the camera.
[0090] Clause 7. The method of any one or any combination of the preceding clauses, wherein the third point is associated with a base of the second object, and the fourth point is associated with atop of the second object.
[0091] Clause 8. An apparatus for estimating a real world distance in an image, comprising: a memory; and a processor coupled with the memory and configured to: obtain a first image from a camera installed at an unknown height in an environment, wherein the first image includes a first object at a first location in the environment, wherein the first object has a known object height; estimate, using a homography matrix that transforms an image plane associated with the image to a real world plane, a first position of a first point on the first object in the first image based on a real world ground plane; determine, based on the known object height, a first vector that intersects with a second point on the first object and points to the real world ground plane; obtain a second image from the camera, wherein the second image includes the first object at a second location in the environment; estimate, using the homography matrix, a second position of the first point on the first object in the second image based on the real world ground plane; determine, based on the known object height, a second vector that intersects with the second point on the first object in the second image and points to the real world ground plane; and calibrate the camera by determining a height of the center of a camera lens of the camera using an intersection of the first vector and the second vector.
[0092] Clause 9. The apparatus of clause 8, wherein the second point on the first object has a known second point height based on the known object height. [0093] Clause 10. The apparatus of any one or any combination of the preceding clauses, wherein the first point is associated with a base of the first object, and the second point is associated with a top of the first object.
[0094] Clause 11. The apparatus of any one or any combination of the preceding clauses, wherein the first object is a person, the first point is associated with a foot of the person, and the second point is associated with a head of the person.
[0095] Clause 12. The apparatus of any one or any combination of the preceding clauses, wherein the one or more processors individually or in combination are further configured to: obtain a third image from the camera, wherein the third image includes a second object without a known height in the environment; and determine a height metric of the second object using the homography matrix and the height of the center of the camera lens.
[0096] Clause 13. The apparatus of any one or any combination of the preceding clauses, wherein to determine the height metric of the second object comprises to: estimate, using the homography matrix, a third position of a third point on the second object based on the real world ground plane; determine, based on the height of the center of the camera lens, a third vector that intersects with a fourth point on the second object and points to the ground plane; and determine the height metric between the third point and the fourth point on the second object based on a distance between the third point and the fourth point relative to the height of the center of the camera lens.
[0097] Clause 14. The apparatus of any one or any combination of the preceding clauses, wherein the third point is associated with a base of the second object, and the fourth point is associated with atop of the second object.
[0098] Clause 15. A method for estimating a real world distance in an image, comprising: obtaining an image from a camera installed in an environment; identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determining a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identifying a ground line connecting the first intersection point and the second intersection point; estimating an internal camera matrix based on a focal length and an image size associated with the camera; and calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix. [0099] Clause 16. The method of clause 15, wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, further comprising: determining a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
[00100] Clause 17. The method of any one or any combination of the preceding clauses, wherein determining the height metric of the second object comprises: determining an intersection between the ground line and a vector through a first ground point on the first object and a second ground point on the second object; calculating a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determining a homography matrix that transforms the virtual line to a canonical form; calculating a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculating the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
[00101] Clause 18. An apparatus for estimating a real world distance in an image, comprising: a memory; and a processor coupled with the memory and configured to: obtain an image from a camera installed in an environment; identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identify a ground line connecting the first intersection point and the second intersection point; estimate an internal camera matrix based on a focal length and an image size associated with the camera; and calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
[00102] Clause 19. The apparatus of clause 18, wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, wherein the one or more processors individually or in combination are further configured to: determine a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
[00103] Clause 20. The apparatus of any one or any combination of the preceding clauses, wherein to determine the height metric of the second object comprises to: determine an intersection between the ground line and a vector through a first ground point on the first object and a second ground point on the second object; calculate a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determine a homography matrix that transforms the virtual line to a canonical form; calculate a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculate the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
[00104] Clause 21. The apparatus of any one or any combination of the preceding clauses, wherein the height metric of the second object is proportional to the known height of the first object.
[00105] Clause 22. The apparatus of any one or any combination of the preceding clauses, wherein the first object is a stationary object in the environment.
[00106] Clause 23. The apparatus of any one or any combination of the preceding clauses, wherein the first set of parallel lines intersect with the second set of parallel lines. [00107] Clause 24. The apparatus of any one or any combination of the preceding clauses, wherein the first set of parallel lines are perpendicular to the second set of parallel lines in the real world ground plane.
[00108] While the foregoing disclosure discusses illustrative aspects and/or embodiments, it should be noted that various changes and modifications could be made herein without departing from the scope of the described aspects and/or embodiments as defined by the appended claims. Furthermore, although elements of the described aspects and/or embodiments may be described or claimed in the singular, the plural is contemplated unless limitation to the singular is explicitly stated. Additionally, all or a portion of any aspect and/or embodiment may be utilized with all or a portion of any other aspect and/or embodiment, unless stated otherwise.

Claims

1. A method for estimating a real world distance in an image, comprising: obtaining an image from a camera installed in an environment; identifying, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determining a first intersection point of the first set of parallel lines mapped on an image plane and a second intersection point of the second set of parallel lines mapped on the image plane; identifying a ground line connecting the first intersection point and the second intersection point; estimating an internal camera matrix based on a focal length and an image size associated with the camera; and calibrating the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
2. The method of claim 1, wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, further comprising: determining a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
3. The method of claim 2, wherein determining the height metric of the second object comprises: determining an intersection between the ground line and a vector passing through a first ground point on the first object and a second ground point on the second object; calculating a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determining a homography matrix that transforms the virtual line to a canonical form; calculating a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculating the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
4. The method of claim 2, wherein the height metric of the second object is proportional to the known height of the first object.
5. The method of claim 2, wherein the first object is a stationary object in the environment.
6. The method of claim 1, wherein the first set of parallel lines intersect with the second set of parallel lines.
7. The method of claim 1, wherein the first set of parallel lines are perpendicular to the second set of parallel lines in the real world ground plane.
8. An apparatus for estimating a real world distance in an image, comprising: one or more memories; and one or more processors coupled with the one or more memories, wherein the one or more processors are configured, individually or in combination, to: obtain an image from a camera installed in an environment; identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identify a ground line connecting the first intersection point and the second intersection point; estimate an internal camera matrix based on a focal length and an image size associated with the camera; and calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
9. The apparatus of claim 8, wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, wherein the processor is further configured to: determine a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
10. The apparatus of claim 9, wherein to determine the height metric of the second object comprises to: determine an intersection between the ground line and a vector through a first ground point on the first object and a second ground point on the second object; calculate a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determine a homography matrix that transforms the virtual line to a canonical form; calculate a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculate the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
11. The apparatus of claim 9, wherein the height metric of the second object is proportional to the known height of the first object.
12. The apparatus of claim 9, wherein the first object is a stationary object in the environment.
13. The apparatus of claim 8, wherein the first set of parallel lines intersect with the second set of parallel lines.
14. The apparatus of claim 8, wherein the first set of parallel lines are perpendicular to the second set of parallel lines in the real world ground plane.
15. An computer-readable medium storing instructions for estimating a real world distance in an image, wherein the instructions are executable by one or more processors to: obtain an image from a camera installed in an environment; identify, in the image, a first set of parallel lines on a real world ground plane and a second set of parallel lines on the real world ground plane; determine a first intersection point of the first set of parallel lines and a second intersection point of the second set of parallel lines; identify a ground line connecting the first intersection point and the second intersection point; estimate an internal camera matrix based on a focal length and an image size associated with the camera; and calibrate the camera for real world distance measurement by determining a perpendicular vector to the ground line based on the internal camera matrix.
16. The computer-readable medium of claim 15, wherein the image or a subsequent image from the camera of the environment includes a first object having a known height and a second object having an unknown height, further comprising instructions executable by the one or more processors to: determine a height metric of the second object using the perpendicular vector to the ground line and the known height of the first object.
17. The computer-readable medium of claim 16, wherein an instruction to determine the height metric of the second object comprises instructions executable by the one or more processors to: determine an intersection between the ground line and a vector through a first ground point on the first object and a second ground point on the second object; calculate a virtual line in a plane comprising the first object and the second object that is perpendicular to the ground line and includes the intersection; determine a homography matrix that transforms the virtual line to a canonical form; calculate a first rectified top point on the first object and second rectified top point on the second object using the homography matrix; and calculate the height metric of the second object based on the first rectified top point and the first ground point of the first object and the second rectified top point and the second ground point of the second object.
18. The computer-readable medium of claim 16, wherein the height metric of the second object is proportional to the known height of the first object.
19. The computer-readable medium of claim 16, wherein the first object is a stationary object in the environment.
PCT/US2023/080888 2022-11-23 2023-11-22 Camera calibration and distance measurement using parallel lines WO2024112873A1 (en)

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
US202263384845P 2022-11-23 2022-11-23
US63/384,845 2022-11-23
US18/516,070 2023-11-21
US18/516,070 US20240177330A1 (en) 2022-11-23 2023-11-21 Camera calibration and distance measurement using parallel lines

Publications (1)

Publication Number Publication Date
WO2024112873A1 true WO2024112873A1 (en) 2024-05-30

Family

ID=89164460

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2023/080888 WO2024112873A1 (en) 2022-11-23 2023-11-22 Camera calibration and distance measurement using parallel lines

Country Status (1)

Country Link
WO (1) WO2024112873A1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220108473A1 (en) * 2020-10-01 2022-04-07 Ford Global Technologies, Llc Traffic camera calibration

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20220108473A1 (en) * 2020-10-01 2022-04-07 Ford Global Technologies, Llc Traffic camera calibration

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
CRIMINISI A ET AL: "A NEW APPROACH TO OBTAIN HEIGHT MEASUREMENTS FROM VIDEO", PROCEEDINGS OF SPIE, IEEE, US, vol. 3576, November 1998 (1998-11-01), pages 227 - 238, XP001031515, ISBN: 978-1-62841-730-2, DOI: 10.1117/12.334540 *

Similar Documents

Publication Publication Date Title
Scaramuzza et al. Extrinsic self calibration of a camera and a 3d laser range finder from natural scenes
US7106898B2 (en) 3D scanning using shadows
CN102472609B (en) Position and orientation calibration method and apparatus
Coughlan et al. Manhattan world: Orientation and outlier detection by bayesian inference
Pagani et al. Structure from motion using full spherical panoramic cameras
US9883163B2 (en) Method and system for determining camera parameters from a long range gradient based on alignment differences in non-point image landmarks
US10529076B2 (en) Image processing apparatus and image processing method
Sinclair et al. Quantitative planar region detection
US20170256042A1 (en) Methods and computer program products for calibrating stereo imaging systems by using a planar mirror
WO2013190772A1 (en) Spatial information detection device and person location detection device
Nienaber et al. A comparison of low-cost monocular vision techniques for pothole distance estimation
US10348961B2 (en) Camera modeling system
WO2023201578A1 (en) Extrinsic parameter calibration method and device for monocular laser speckle projection system
Bergström et al. Virtual projective shape matching in targetless CAD-based close-range photogrammetry for efficient estimation of specific deviations
Horanyi et al. Generalized pose estimation from line correspondences with known vertical direction
CN116128966A (en) Semantic positioning method based on environmental object
Gallegos et al. Appearance-based slam relying on a hybrid laser/omnidirectional sensor
EP2840550A1 (en) Camera pose estimation
Khurana et al. An improved method for extrinsic calibration of tilting 2D LRF
WO2024112873A1 (en) Camera calibration and distance measurement using parallel lines
US20240177330A1 (en) Camera calibration and distance measurement using parallel lines
WO2024112878A1 (en) Camera calibration and distance measurement based on homography
Mendonça et al. Estimation of epipolar geometry from apparent contours: Affine and circular motion cases
US20240169589A1 (en) Camera calibration and distance measurement based on homography
Viéville et al. Computation of ego motion using the vertical cue

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: 23821463

Country of ref document: EP

Kind code of ref document: A1