calculate distance in meters between two bounding box coordinates
up vote
0
down vote
favorite
The images that I have in my dataset have been taken from at different zoom levels. So, it's kind of a bird-eye view of a place where I need to detect humans on the ground.
I need to calculate distance between two bounding box in actual length (meters).
The data that I have is camera focal length, which I got using CV2 Camera Calibration method. So, I have a camera matrix as shown here https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html.
For each zoom level, I have two xml files - intrinsic and extrinsic.
But, I am not sure how do I proceed further to use them in calculating the distance.
<opencv_storage><M type_id="opencv-matrix"><rows>3</rows><cols>3</cols><dt>d</dt><data>
2.7571971911817068e+03 0. 3.2541419672795934e+02 0.
3.4383231216135928e+03 2.0362852071392774e+02 0. 0. 1.</data></M><D type_id="opencv-matrix"><rows>1</rows><cols>8</cols><dt>d</dt><data>
-2.8636067603781758e+01 -2.1605516406937022e+03
-2.8115159951341410e-03 -6.4403584422980525e-02
1.1047392183552937e+05 -2.3525871276310724e+01
-2.8771858140924023e+03 1.3726582186567629e+05</data></D></opencv_storage>
This is one of the intrinsics.xml content.
python object-detection cv2
add a comment |
up vote
0
down vote
favorite
The images that I have in my dataset have been taken from at different zoom levels. So, it's kind of a bird-eye view of a place where I need to detect humans on the ground.
I need to calculate distance between two bounding box in actual length (meters).
The data that I have is camera focal length, which I got using CV2 Camera Calibration method. So, I have a camera matrix as shown here https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html.
For each zoom level, I have two xml files - intrinsic and extrinsic.
But, I am not sure how do I proceed further to use them in calculating the distance.
<opencv_storage><M type_id="opencv-matrix"><rows>3</rows><cols>3</cols><dt>d</dt><data>
2.7571971911817068e+03 0. 3.2541419672795934e+02 0.
3.4383231216135928e+03 2.0362852071392774e+02 0. 0. 1.</data></M><D type_id="opencv-matrix"><rows>1</rows><cols>8</cols><dt>d</dt><data>
-2.8636067603781758e+01 -2.1605516406937022e+03
-2.8115159951341410e-03 -6.4403584422980525e-02
1.1047392183552937e+05 -2.3525871276310724e+01
-2.8771858140924023e+03 1.3726582186567629e+05</data></D></opencv_storage>
This is one of the intrinsics.xml content.
python object-detection cv2
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
The images that I have in my dataset have been taken from at different zoom levels. So, it's kind of a bird-eye view of a place where I need to detect humans on the ground.
I need to calculate distance between two bounding box in actual length (meters).
The data that I have is camera focal length, which I got using CV2 Camera Calibration method. So, I have a camera matrix as shown here https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html.
For each zoom level, I have two xml files - intrinsic and extrinsic.
But, I am not sure how do I proceed further to use them in calculating the distance.
<opencv_storage><M type_id="opencv-matrix"><rows>3</rows><cols>3</cols><dt>d</dt><data>
2.7571971911817068e+03 0. 3.2541419672795934e+02 0.
3.4383231216135928e+03 2.0362852071392774e+02 0. 0. 1.</data></M><D type_id="opencv-matrix"><rows>1</rows><cols>8</cols><dt>d</dt><data>
-2.8636067603781758e+01 -2.1605516406937022e+03
-2.8115159951341410e-03 -6.4403584422980525e-02
1.1047392183552937e+05 -2.3525871276310724e+01
-2.8771858140924023e+03 1.3726582186567629e+05</data></D></opencv_storage>
This is one of the intrinsics.xml content.
python object-detection cv2
The images that I have in my dataset have been taken from at different zoom levels. So, it's kind of a bird-eye view of a place where I need to detect humans on the ground.
I need to calculate distance between two bounding box in actual length (meters).
The data that I have is camera focal length, which I got using CV2 Camera Calibration method. So, I have a camera matrix as shown here https://docs.opencv.org/3.4.3/dc/dbb/tutorial_py_calibration.html.
For each zoom level, I have two xml files - intrinsic and extrinsic.
But, I am not sure how do I proceed further to use them in calculating the distance.
<opencv_storage><M type_id="opencv-matrix"><rows>3</rows><cols>3</cols><dt>d</dt><data>
2.7571971911817068e+03 0. 3.2541419672795934e+02 0.
3.4383231216135928e+03 2.0362852071392774e+02 0. 0. 1.</data></M><D type_id="opencv-matrix"><rows>1</rows><cols>8</cols><dt>d</dt><data>
-2.8636067603781758e+01 -2.1605516406937022e+03
-2.8115159951341410e-03 -6.4403584422980525e-02
1.1047392183552937e+05 -2.3525871276310724e+01
-2.8771858140924023e+03 1.3726582186567629e+05</data></D></opencv_storage>
This is one of the intrinsics.xml content.
python object-detection cv2
python object-detection cv2
asked Nov 19 at 11:51
nirvair
98011638
98011638
add a comment |
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53374061%2fcalculate-distance-in-meters-between-two-bounding-box-coordinates%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown