|
|
|
@ -236,7 +236,7 @@ def vs_measurement(txt_name, position = 900):
|
|
|
|
|
x, y = calc_slope_line.find_intersection((k, -1, b), (slope_top, -1, intercept_top))
|
|
|
|
|
Zw_intersection = calc_way.calc_height(x_intersection, y_intersection, x, y, alpha, beta)
|
|
|
|
|
Xw_intersection, Yw_intersection = calc_way.calc_distance(x_intersection, y_intersection, alpha, beta)
|
|
|
|
|
print(Xw_intersection, Yw_intersection)
|
|
|
|
|
# print(Xw_intersection, Yw_intersection)
|
|
|
|
|
# #位置修正
|
|
|
|
|
# Yw_intersection = Yw_intersection + model.y
|
|
|
|
|
Xw_bot = []
|
|
|
|
@ -268,19 +268,19 @@ def vs_measurement(txt_name, position = 900):
|
|
|
|
|
return 1, Zw_pos, distance_pos
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
|
# t=time.time()
|
|
|
|
|
# h, w = vs_measurement(r'C:\Users\Administrator\Desktop\BYD\Visual measurement\py\new.txt')
|
|
|
|
|
# print(h,w)
|
|
|
|
|
# print(f"time: {time.time() - t}")
|
|
|
|
|
# x_zero, y_zero = calc_way.calc_zeros()
|
|
|
|
|
# x_zero = np.array(x_zero)
|
|
|
|
|
# y_zero = np.array(y_zero)
|
|
|
|
|
# print(f"x_zero: {x_zero}")
|
|
|
|
|
# print(f"y_zero: {y_zero}")
|
|
|
|
|
t = time.time()
|
|
|
|
|
test_name = r'C:\Users\Administrator\Desktop\BYD\error\20250620\20250620\CANNOT_CALCULATE_LINER_REGRESSION_.txt'
|
|
|
|
|
state, Zw_intersection, distance, Zw_pos, distance_pos = vs_measurement(test_name, 900)
|
|
|
|
|
# vs_measurement(txt_name)
|
|
|
|
|
print(f"time: {time.time() - t}")
|
|
|
|
|
print(Zw_intersection, distance, Zw_pos, distance_pos)
|
|
|
|
|
# if __name__ == '__main__':
|
|
|
|
|
# # t=time.time()
|
|
|
|
|
# # h, w = vs_measurement(r'C:\Users\Administrator\Desktop\BYD\Visual measurement\py\new.txt')
|
|
|
|
|
# # print(h,w)
|
|
|
|
|
# # print(f"time: {time.time() - t}")
|
|
|
|
|
# # x_zero, y_zero = calc_way.calc_zeros()
|
|
|
|
|
# # x_zero = np.array(x_zero)
|
|
|
|
|
# # y_zero = np.array(y_zero)
|
|
|
|
|
# # print(f"x_zero: {x_zero}")
|
|
|
|
|
# # print(f"y_zero: {y_zero}")
|
|
|
|
|
# t = time.time()
|
|
|
|
|
# test_name = r'C:\Users\Administrator\Desktop\BYD\error\20250620\20250620\INPUT_MUST_NOT_BE_EMPTY.txt'
|
|
|
|
|
# state, Zw_pos, distance_pos = vs_measurement(test_name, 900)
|
|
|
|
|
# # vs_measurement(txt_name)
|
|
|
|
|
# print(f"time: {time.time() - t}")
|
|
|
|
|
# print( Zw_pos, distance_pos)
|