本文整理汇总了Python中SeaGoatVision.commons.param.Param.add_notify_reset方法的典型用法代码示例。如果您正苦于以下问题:Python Param.add_notify_reset方法的具体用法?Python Param.add_notify_reset怎么用?Python Param.add_notify_reset使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SeaGoatVision.commons.param.Param
的用法示例。
在下文中一共展示了Param.add_notify_reset方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_params
# 需要导入模块: from SeaGoatVision.commons.param import Param [as 别名]
# 或者: from SeaGoatVision.commons.param.Param import add_notify_reset [as 别名]
def _create_params(self):
self.dct_params = {}
if not self.camera:
return
lst_ignore_prop = ["Trigger"]
dct_prop = self.camera.get_dict_available_features()
for name, value in dct_prop.items():
if name in lst_ignore_prop:
continue
try:
if name == "White Balance":
param = Param("%s%s" % (name, self.key_auto_param), False)
param.add_notify_reset(self.update_property_param)
self.dct_params[param.get_name()] = param
param = Param("%s-red" % name, value["RV_value"], min_v=value["min"], max_v=value["max"])
param.add_notify_reset(self.update_property_param)
self.dct_params[param.get_name()] = param
param = Param("%s-blue" % name, value["BU_value"], min_v=value["min"], max_v=value["max"])
param.add_notify_reset(self.update_property_param)
self.dct_params[param.get_name()] = param
continue
elif name == "Shutter" or name == "Gain":
param = Param("%s%s" % (name, self.key_auto_param), False)
param.add_notify_reset(self.update_property_param)
self.dct_params[param.get_name()] = param
param = Param(name, value["value"], min_v=value["min"], max_v=value["max"])
param.add_notify_reset(self.update_property_param)
self.dct_params[param.get_name()] = param
except Exception as e:
log.printerror_stacktrace(logger, "%s - name: %s, value: %s" % (e, name, value))
示例2: _create_params
# 需要导入模块: from SeaGoatVision.commons.param import Param [as 别名]
# 或者: from SeaGoatVision.commons.param.Param import add_notify_reset [as 别名]
def _create_params(self):
self.dct_params = {}
default_resolution_name = "800x600"
self.dct_resolution = {default_resolution_name:(800, 600),
"320x240":(320, 240),
"640x480":(640, 480),
"1024x768":(1024, 768),
"1280x960":(1280, 960)}
param = Param("resolution", default_resolution_name, lst_value=self.dct_resolution.keys())
param.add_notify_reset(self.reset_property_param)
self.dct_params["resolution"] = param
default_fps_name = "30"
self.dct_fps = {default_fps_name:30, "15":15, "7.5":7.5}
param = Param("fps", default_fps_name, lst_value=self.dct_fps.keys())
param.add_notify_reset(self.reset_property_param)
self.dct_params["fps"] = param