本文整理汇总了Python中SeaGoatVision.commons.param.Param.get_name方法的典型用法代码示例。如果您正苦于以下问题:Python Param.get_name方法的具体用法?Python Param.get_name怎么用?Python Param.get_name使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SeaGoatVision.commons.param.Param
的用法示例。
在下文中一共展示了Param.get_name方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _create_params
# 需要导入模块: from SeaGoatVision.commons.param import Param [as 别名]
# 或者: from SeaGoatVision.commons.param.Param import get_name [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: _deserialize_param
# 需要导入模块: from SeaGoatVision.commons.param import Param [as 别名]
# 或者: from SeaGoatVision.commons.param.Param import get_name [as 别名]
def _deserialize_param(params_ser):
if type(params_ser) is dict:
value = {}
for name, param_ser in params_ser.items():
param = Param(name, None, serialize=param_ser)
value[param.get_name()] = param
return value
elif type(params_ser) is list:
return [Param("temp", None, serialize=param_ser) for param_ser in
params_ser]
return []
示例3: deserialize
# 需要导入模块: from SeaGoatVision.commons.param import Param [as 别名]
# 或者: from SeaGoatVision.commons.param.Param import get_name [as 别名]
def deserialize(self, data):
if not data:
return False
for uno_data in data:
if not uno_data:
continue
try:
param = Param(None, None, serialize=uno_data)
own_param = self.dct_params.get(param.get_name(), None)
if own_param:
own_param.merge(param)
except Exception as e:
log.printerror_stacktrace(logger, e)
return False
return True