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


Python cv2.WINDOW_FULLSCREEN属性代码示例

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


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

示例1: set_display

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import WINDOW_FULLSCREEN [as 别名]
def set_display(window_name, full_scrn):
    """Set disply window to either full screen or normal."""
    if full_scrn:
        cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
                              cv2.WINDOW_FULLSCREEN)
    else:
        cv2.setWindowProperty(window_name, cv2.WND_PROP_FULLSCREEN,
                              cv2.WINDOW_NORMAL) 
开发者ID:jkjung-avt,项目名称:tensorrt_demos,代码行数:10,代码来源:display.py

示例2: set_full_screen

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import WINDOW_FULLSCREEN [as 别名]
def set_full_screen(full_scrn):
    """Set display window to full screen or not."""
    prop = cv2.WINDOW_FULLSCREEN if full_scrn else cv2.WINDOW_NORMAL
    cv2.setWindowProperty(WINDOW_NAME, cv2.WND_PROP_FULLSCREEN, prop) 
开发者ID:dataplayer12,项目名称:homesecurity,代码行数:6,代码来源:xavier_surveillance.py

示例3: main

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import WINDOW_FULLSCREEN [as 别名]
def main():
    angle = 0
    scale = 0.1
    windowName = "Video Rotation"
    cv2.namedWindow(windowName, cv2.WINDOW_FULLSCREEN)

    capture = cv2.VideoCapture(0)

    if capture.isOpened():
        flag, frame = capture.read()
    else:
        flag = False

    rows, cols, channels = frame.shape

    while flag:

        if angle > 360:
            angle = 0

        if scale < 2:
            scale = scale + 0.1
        else:
            scale = 0.1

        flag, frame = capture.read()

        rotationmatrix = cv2.getRotationMatrix2D((cols / 2, rows / 2), angle, scale)
        transformedoutput = cv2.warpAffine(frame, rotationmatrix, (cols, rows))

        cv2.imshow(windowName, transformedoutput)

        angle = angle + 1
        time.sleep(0.01)

        if cv2.waitKey(1) & 0xFF == 27:
            break

    cv2.destroyAllWindows()
    capture.release() 
开发者ID:amarlearning,项目名称:Finger-Detection-and-Tracking,代码行数:42,代码来源:VideoRotation.py


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