diff --git a/py/__pycache__/calc_way.cpython-312.pyc b/py/__pycache__/calc_way.cpython-312.pyc index 7918d1c..c61edaf 100644 Binary files a/py/__pycache__/calc_way.cpython-312.pyc and b/py/__pycache__/calc_way.cpython-312.pyc differ diff --git a/py/__pycache__/get_data.cpython-312.pyc b/py/__pycache__/get_data.cpython-312.pyc index 7f30ffe..2c9a851 100644 Binary files a/py/__pycache__/get_data.cpython-312.pyc and b/py/__pycache__/get_data.cpython-312.pyc differ diff --git a/py/measure_lib.py b/py/measure_lib.py index e5d9215..25d0a35 100644 --- a/py/measure_lib.py +++ b/py/measure_lib.py @@ -174,8 +174,8 @@ output_folder = 'C:\\Users\\Administrator\\Desktop\\BYD\\Visual measurement\\pic # return Z/len(x_bot),-max_Yw def vs_measurement(txt_name,position): - if not os.path.exists(txt_name): - return None,None,None,None + # if not os.path.exists(txt_name): + # return None,None,None,None # 获取数据 x_bot, y_bot, x_top, y_top = get_data.get_data(txt_name) @@ -183,8 +183,8 @@ def vs_measurement(txt_name,position): y_bot = np.array(y_bot) x_top = np.array(x_top) y_top = np.array(y_top) - if not (x_bot or y_bot or x_top or y_top): - return 1,1,1,1 + # if not (x_bot or y_bot or x_top or y_top): + # return 1,1,1,1 # 拟合路沿上下直线方程 @@ -246,7 +246,7 @@ if __name__ == '__main__': # print(f"x_zero: {x_zero}") # print(f"y_zero: {y_zero}") t = time.time() - Zw_intersection, distance, Zw_pos, distance_pos = vs_measurement(txt_name,1500) + Zw_intersection, distance, Zw_pos, distance_pos = vs_measurement(r"C:\Users\Administrator\Desktop\BYD\git\measure_lib\py\new.txt",877) # vs_measurement(txt_name) print(f"time: {time.time() - t}") print(Zw_intersection, distance, Zw_pos, distance_pos) \ No newline at end of file