本文整理汇总了Python中types.SimpleNamespace.intrinsics方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleNamespace.intrinsics方法的具体用法?Python SimpleNamespace.intrinsics怎么用?Python SimpleNamespace.intrinsics使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类types.SimpleNamespace
的用法示例。
在下文中一共展示了SimpleNamespace.intrinsics方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: _classify
# 需要导入模块: from types import SimpleNamespace [as 别名]
# 或者: from types.SimpleNamespace import intrinsics [as 别名]
def _classify(self):
"""
classify fixations
"""
if self.g_pool.app == "exporter":
return
if self.bg_task:
self.bg_task.cancel()
gaze_data = [gp.serialized for gp in self.g_pool.gaze_positions]
cap = SimpleNamespace()
cap.frame_size = self.g_pool.capture.frame_size
cap.intrinsics = self.g_pool.capture.intrinsics
cap.timestamps = self.g_pool.capture.timestamps
generator_args = (
cap,
gaze_data,
np.deg2rad(self.max_dispersion),
self.min_duration / 1000,
self.max_duration / 1000,
self.g_pool.min_data_confidence,
)
self.fixation_data = deque()
self.fixation_start_ts = deque()
self.fixation_stop_ts = deque()
self.bg_task = bh.IPC_Logging_Task_Proxy(
"Fixation detection", detect_fixations, args=generator_args
)
示例2: _setup_fake_gpool
# 需要导入模块: from types import SimpleNamespace [as 别名]
# 或者: from types.SimpleNamespace import intrinsics [as 别名]
def _setup_fake_gpool(frame_size, intrinsics, detection_mapping_mode, rec_dir):
cap = SimpleNamespace()
cap.frame_size = frame_size
cap.intrinsics = intrinsics
pool = SimpleNamespace()
pool.capture = cap
pool.get_timestamp = time
pool.detection_mapping_mode = detection_mapping_mode
pool.rec_dir = rec_dir
pool.app = "player"
return pool