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


Python Camera.set_params方法代码示例

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


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

示例1: Picture

# 需要导入模块: import Camera [as 别名]
# 或者: from Camera import set_params [as 别名]
class Picture(object):
    """contains picture attributes and crop list"""

    def __init__(self):
        """constructor"""

        # mission relevant attributes
        # TODO: move these to target class
        # self._latitude = "uncalculated"
        # self._longitude = "uncalculated"
        # self._shape = "unknown"
        # self._alpha = "unknown"
        # self._alphacolor = "unknown"
        # self._color = "unknown"
        # self._orientation = "unknown"

        # "intermediate" attributes
        self._gps_x = 0.0
        self._gps_y = 0.0
        self._pan = 0.0
        self._tilt = 0.0
        self._yaw = 0.0
        self._pitch = 0.0
        self._roll = 0.0
        self._plane_orientation = 0.0
        self._altitude = 0.0
        self._pan = 0.0

        # representation of camera used to take picture
        self.bloggie = Camera()
        self.bloggie.set_params(fc1=3224.35414, fc2=3202.87322, cc1=1396.72711, cc2=975.48995, alpha_c=0.0)

        # various crops of pictures
        # we want to start with index 1, so we put an dud in crop_list[0]
        self.crop_list = [0]

        # resolution fields
        self.x_thumbnail_resolution = 800
        self.y_thumbnail_resolution = 600
        self.x_resolution = 2400
        self.y_resolution = 1800

    def add_crop(self, x_offset=0, y_offset=0):
        """append a new crop to the end of the crop list"""
        crop_num = len(self.crop_list)
        self.crop_list.append(Crop(self, x_offset=x_offset, y_offset=y_offset, name="crop_" + str(crop_num)))

        # return the number of the crop added
        return len(self.crop_list) - 1

    def get_crop(self, crop_num):
        """return the crop with matching crop num"""
        return self.crop_list[crop_num]

    def num_crops(self):
        return len(self.crop_list)

    def get_latitude(self):
        return self._latitude

    def set_latitude(self, value):
        self._latitude = value

    def get_longitude(self):
        return self._longitude

    def set_longitude(self, value):
        self._longitude = value

    def get_shape(self):
        return self._shape

    def set_shape(self, value):
        self._shape = value

    def get_alpha(self):
        return self._alpha

    def set_alpha(self, value):
        self._alpha = value

    def get_color(self):
        return self._color

    def set_color(self, value):
        self._color = value

    def get_alphacolor(self):
        return self._alphacolor

    def set_alphacolor(self, value):
        self._alphacolor = value

    def get_orientation(self):
        return self._orientation

    def set_orientation(self, value):
        self._orientation = value

    def get_gps_x(self):
#.........这里部分代码省略.........
开发者ID:sharma16aug,项目名称:RU-AUVSI-ImageStation,代码行数:103,代码来源:Picture.py


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