当前位置: 首页>>代码示例>>Python>>正文


Python SimpleNamespace.frame_size方法代码示例

本文整理汇总了Python中types.SimpleNamespace.frame_size方法的典型用法代码示例。如果您正苦于以下问题:Python SimpleNamespace.frame_size方法的具体用法?Python SimpleNamespace.frame_size怎么用?Python SimpleNamespace.frame_size使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在types.SimpleNamespace的用法示例。


在下文中一共展示了SimpleNamespace.frame_size方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _classify

# 需要导入模块: from types import SimpleNamespace [as 别名]
# 或者: from types.SimpleNamespace import frame_size [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
        )
开发者ID:pupil-labs,项目名称:pupil,代码行数:33,代码来源:fixation_detector.py

示例2: _setup_fake_gpool

# 需要导入模块: from types import SimpleNamespace [as 别名]
# 或者: from types.SimpleNamespace import frame_size [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
开发者ID:pupil-labs,项目名称:pupil,代码行数:13,代码来源:map_gaze.py


注:本文中的types.SimpleNamespace.frame_size方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。