改阈值

This commit is contained in:
FEIJINTI 2022-07-27 08:20:58 +08:00
parent 5ace1f858b
commit ea7243da29
2 changed files with 3 additions and 1 deletions

View File

@ -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
# 需要设置的谱段等参数

View File

@ -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: