mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 14:23:55 +00:00
改阈值
This commit is contained in:
parent
5ace1f858b
commit
ea7243da29
@ -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
|
||||
|
||||
# 需要设置的谱段等参数
|
||||
|
||||
2
main.py
2
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:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user