distance 계산 후 publish 하기

distance github

https://github.com/Asadullah-Dal17/Distance_measurement_using_single_camera

이론 :: Pinhole camera model

camera lens model → pinhole camera model 사용

수학적으로 계산이 용이, 오차 거의 없기 때문에 수학적 모델로 pinhole model 사용

Untitled

Real_world scale

실제 object의 width x height(cm) 측정

(h)4.75cm × (w)8.6cm

h = 179.52755906 pixel

w = 325.03937008 pixel

1543.9370079

Cam_world scale

100cm object를 위치 한뒤 캡쳐하여

BoundingBox width x height (pixel) 측정

Untitled

Untitled

0.0671875 = bbox width / 640

0.0604167 = bbox height / 480

bbox_w = 43 pixel

bbox_h = 29.000016 pixel

1,247.000688

Focal length estimation

Width

325.03937008 : 43 = 1000mm : f mm

f = 132.2916666661539 mm

Scale (제곱 비례식...?)

Diagonal