mirror of
https://github.com/NanjingForestryUniversity/supermachine-tobacco.git
synced 2025-11-08 14:23:55 +00:00
[ext] 添加了信息读取与打印功能
This commit is contained in:
parent
5754c74167
commit
6bdc464ca9
@ -28,8 +28,8 @@ class Config:
|
|||||||
rgb_tobacco_model_path = r"models/tobacco_dt_2022-08-05_10-38.model"
|
rgb_tobacco_model_path = r"models/tobacco_dt_2022-08-05_10-38.model"
|
||||||
rgb_background_model_path = r"models/background_dt_2022-08-09_16-08.model"
|
rgb_background_model_path = r"models/background_dt_2022-08-09_16-08.model"
|
||||||
threshold_low, threshold_high = 10, 230
|
threshold_low, threshold_high = 10, 230
|
||||||
threshold_s = 190
|
threshold_s = 190 # 饱和度的最高允许值
|
||||||
rgb_size_threshold = 4
|
rgb_size_threshold = 4 # rgb的尺寸限制
|
||||||
|
|
||||||
# mask parameter
|
# mask parameter
|
||||||
target_size = (1024, 1024) # (Width, Height) of mask
|
target_size = (1024, 1024) # (Width, Height) of mask
|
||||||
|
|||||||
@ -35,7 +35,16 @@ m. 模式切换:测下一个喷阀还是重发?
|
|||||||
print("我在等连接...")
|
print("我在等连接...")
|
||||||
self.c, addr = self.s.accept() # 建立客户端连接
|
self.c, addr = self.s.accept() # 建立客户端连接
|
||||||
print('和它的链接建立成功了:', addr)
|
print('和它的链接建立成功了:', addr)
|
||||||
|
self.c.settimeout(0.1)
|
||||||
while True:
|
while True:
|
||||||
|
data = ''
|
||||||
|
try:
|
||||||
|
data = self.c.recv(1024)
|
||||||
|
except Exception as e:
|
||||||
|
print(f"===================================================================")
|
||||||
|
if len(data) > 0:
|
||||||
|
print("receive data!!!")
|
||||||
|
print(data)
|
||||||
value = input(self.reminder)
|
value = input(self.reminder)
|
||||||
if value == 'q':
|
if value == 'q':
|
||||||
print("好的,我退出啦")
|
print("好的,我退出啦")
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user