This document contains a table of real distance measurements, corresponding pixel from center measurements, and angle measurements. It then describes computing the gain and offset values that relate the pixel from center measurements to the angle measurements. The gain is calculated to be 0.002 and the offset is calculated to be 0.001. It instructs the reader to modify the values for gain and offset in a file called detect_fcn.m to these calculated values.
This document contains a table of real distance measurements, corresponding pixel from center measurements, and angle measurements. It then describes computing the gain and offset values that relate the pixel from center measurements to the angle measurements. The gain is calculated to be 0.002 and the offset is calculated to be 0.001. It instructs the reader to modify the values for gain and offset in a file called detect_fcn.m to these calculated values.
This document contains a table of real distance measurements, corresponding pixel from center measurements, and angle measurements. It then describes computing the gain and offset values that relate the pixel from center measurements to the angle measurements. The gain is calculated to be 0.002 and the offset is calculated to be 0.001. It instructs the reader to modify the values for gain and offset in a file called detect_fcn.m to these calculated values.
Real Distance (cm) Y (rows) Pixel From Center (PFC)
50 188 44 40 199 55 30 218 74 20 255 111 (
(rad) 0.0898 0.112 0.1489 0.2213 )
Compute gain and offset:
PFC*gain + offset = 44*gain + offset = 0.0898 55*gain + offset = 0.112 Where: gain =0.002 offset=0.001 In the file detect_fcn.m, modify in last lines the gain and offset value: h_cm=5; gain=0.0020; offset=0.001; pfc=Y-144; distance=round(h_cm/tan(pfc*gain + offset));