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


Python cv2.setWindowProperty方法代码示例

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


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

示例1: main

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [as 别名]
def main():
    '''
    Arguments to be set:
        showCam : determine if show the camera preview screen.
    '''
    print("Enter main() function")
    
    if args.testImage is not None:
        img = cv2.imread(args.testImage)
        img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
        img = cv2.resize(img, FACE_SHAPE)
        print(class_label[result[0]])
        sys.exit(0)

    showCam = 1

    capture = getCameraStreaming()

    if showCam:
        cv2.startWindowThread()
        cv2.namedWindow(windowsName, cv2.WND_PROP_FULLSCREEN)
        cv2.setWindowProperty(windowsName, cv2.WND_PROP_FULLSCREEN, cv2.WND_PROP_FULLSCREEN)
    
    showScreenAndDectect(capture) 
开发者ID:a514514772,项目名称:Real-Time-Facial-Expression-Recognition-with-DeepLearning,代码行数:26,代码来源:webcam_detection.py

示例2: previewImage

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [as 别名]
def previewImage(self, text, img):
        if self.PREVIEW_IMAGES==True:
            #show full screen
            cv2.namedWindow(text, cv2.WND_PROP_FULLSCREEN)
            cv2.setWindowProperty(text,cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)

            cv2.imshow(text,img)
            if self.PREVIEW_AUTOCLOSE==True:
                cv2.waitKey(2000)
                cv2.destroyAllWindows()
    
            else:
                cv2.waitKey(0)
                cv2.destroyAllWindows() 
开发者ID:pacogarcia3,项目名称:hta0-horizontal-robot-arm,代码行数:16,代码来源:image_recognition_singlecam.py

示例3: set_display

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [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

示例4: set_full_screen

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [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

示例5: main

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [as 别名]
def main():
    '''
    Arguments to be set:
        showCam : determine if show the camera preview screen.
    '''
    print("Enter main() function")
    
    capture = getCameraStreaming()

    cv2.startWindowThread()
    cv2.namedWindow(windowsName, cv2.WND_PROP_FULLSCREEN)
    cv2.setWindowProperty(windowsName, cv2.WND_PROP_FULLSCREEN, cv2.WND_PROP_FULLSCREEN)
    
    while True:
        recContent = speechRecognition()
        if recContent is not None:
            emotion = showScreenAndDectect(capture)
            if emotion == "Angry":
                emoji = " >:O"
            elif emotion == "Fear":
                emoji = " :-S"
            elif emotion == "Happy":
                emoji = " :-D"
            elif emotion == "Sad":
                emoji = " :'("
            elif emotion == "Surprise":
                emoji = " :-O"
            else:
                emoji = " "
            print("Output result: " + recContent + emoji) 
开发者ID:a514514772,项目名称:Real-Time-Facial-Expression-Recognition-with-DeepLearning,代码行数:32,代码来源:gen_sentence_with_emoticons.py

示例6: previewImage

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [as 别名]
def previewImage(self, text, img):
        #show full screen
        cv2.namedWindow(text, cv2.WND_PROP_FULLSCREEN)
        cv2.setWindowProperty(text,cv2.WND_PROP_FULLSCREEN,cv2.WINDOW_FULLSCREEN)

        cv2.imshow(text,img)
        cv2.waitKey(2000)
        cv2.destroyAllWindows() 
开发者ID:pacogarcia3,项目名称:hta0-horizontal-robot-arm,代码行数:10,代码来源:camera_realworldxyz.py

示例7: maximize_win

# 需要导入模块: import cv2 [as 别名]
# 或者: from cv2 import setWindowProperty [as 别名]
def maximize_win(winname):
    cv2.setWindowProperty(winname, cv2.WND_PROP_FULLSCREEN, True); 
开发者ID:HLIG,项目名称:HUAWEIOCR-2019,代码行数:4,代码来源:img.py


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