diff --git a/config.py b/config.py index 425b4c9..6e8d4e1 100644 --- a/config.py +++ b/config.py @@ -4,7 +4,7 @@ import numpy as np class Config: # 文件相关参数 - nRows, nCols, nBands, spec_size_threshold, = 256, 1024, 22, 3 + nRows, nCols, nBands, spec_size_threshold = 256, 1024, 22, 3 nRgbRows, nRgbCols, nRgbBands, rgb_size_threshold = 1024, 4096, 3, 4 # 需要设置的谱段等参数 diff --git a/main.py b/main.py index b24d49e..3f5a818 100644 --- a/main.py +++ b/main.py @@ -27,6 +27,7 @@ def main(): # 读取(开启一个管道) if len(data) < 3: threshold = int(float(data)) + Config.spec_size_threshold = threshold print("[INFO] Get threshold: ", threshold) continue else: @@ -34,6 +35,7 @@ def main(): rgb_data = os.read(fd_rgb, total_rgb) if len(rgb_data) < 3: rgb_threshold = int(float(rgb_data)) + Config.rgb_size_threshold = rgb_threshold print(rgb_threshold) continue else: