Blocks.Screen

 1import cv2
 2
 3def main(inputs, outputs, parameters, synchronise):
 4    '''
 5    ## Displays the given Image
 6
 7    Takes an image as an input and displays it on the user's screen.
 8    The `cv2.imshow()` function is used in order to display the image.
 9    
10    **Inputs**: BGR Image
11
12    **Outputs**: None
13
14    **Parameters**: None
15    '''
16    auto_enable = False
17    try:
18        enable = inputs.read_number('Enable')
19    except Exception:
20        auto_enable = True
21    while (auto_enable or inputs.read_number('Enable')):
22        img = inputs.read_image("Img")
23        if img is None:
24            continue
25
26        cv2.imshow("frame", img)
27        cv2.waitKey(10)
28
29        synchronise()
def main(inputs, outputs, parameters, synchronise)
 4def main(inputs, outputs, parameters, synchronise):
 5    '''
 6    ## Displays the given Image
 7
 8    Takes an image as an input and displays it on the user's screen.
 9    The `cv2.imshow()` function is used in order to display the image.
10    
11    **Inputs**: BGR Image
12
13    **Outputs**: None
14
15    **Parameters**: None
16    '''
17    auto_enable = False
18    try:
19        enable = inputs.read_number('Enable')
20    except Exception:
21        auto_enable = True
22    while (auto_enable or inputs.read_number('Enable')):
23        img = inputs.read_image("Img")
24        if img is None:
25            continue
26
27        cv2.imshow("frame", img)
28        cv2.waitKey(10)
29
30        synchronise()

Block Description

Displays the given Image

Takes an image as an input and displays it on the user's screen. The cv2.imshow() function is used in order to display the image.

Inputs: BGR Image

Outputs: None

Parameters: None