#!/usr/bin/python # -*- coding: utf-8 -*- """ is_ex_bird = False #目标检测标志位,每个一秒检测一次目标检测,如果有鸟,则置为True,为True的时候说明, 处理30s的线程还在继续,直到标志位变为了False再开启新的线程 Density_thread_flag = False #密度估计线程标志位,为True说明开启了密度估计线程,处理完750帧为止,标志位标为False, Detection_thread_flag = False #目标检测和细粒度识别线程标志位,为True说明开启了密度估计线程,处理完750帧为止,标志位标为False, Vedio_thread_flag = False #存储视频线程标志位,存储30s SaveImage_thread_flag = False #保存原图线程标志位,存储30张原图 ALL_thread_flag = False #所有线程的标志位,单独开设一个线程,监控所有线程是否都结束,如果都结束,则置为False,后续添加线程管理,可以放在这里面 DebugPrint_flag = True #打印标志位 Camera_device = "0001" #摄像头编号,0001 image_time = None #当前处理的30视频的编号 """ def _init(): global _global_dict _global_dict = {"is_ex_bird":False, "Density_thread_flag":False, "Detection_thread_flag":False, "Vedio_thread_flag":False, "SaveImage_thread_flag":False, "ALL_thread_flag":False, "DebugPrint_flag":True, "Camera_device":"0001", "image_time":None} def set_value(name, value): _global_dict[name] = value def get_value(name, defValue=None): try: return _global_dict[name] except KeyError: return defValue