Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

The problem has been solved. Don't set values too highly x>600 and x<600, Set minimum to x>100 and x>100 Do net set below values, otherwise freezing. As @berak, you can set resize cv2.WND_PROP_FULLSCREEN // 2.

#left mouse click to cycle through images

    def cycleImage(event, x, y, flag, param): 
        global i, images
        #click the right side of the image to go to the next picture
        if event == cv2.EVENT_LBUTTONDOWN:
            if (x > 100): 
                cycleForward() 
                print ("Forward "+ tr(x))
            #click the left side of the image to go to the previous picture    
            if (x < 100): 
                cycleBackward()
                print ("Backwards "+ str(x))

I tested it perfectly.

The problem has been solved. Don't set values too highly x>600 and x<600, Set minimum to x>100 and x>100 Do net set below values, otherwise freezing. As @berak, you can set resize cv2.WND_PROP_FULLSCREEN // 2.

#left mouse click to cycle through images

    def cycleImage(event, x, y, flag, param): 
        global i, images
        #click the right side of the image to go to the next picture
        if event == cv2.EVENT_LBUTTONDOWN:
            if (x > 100): 
                cycleForward() 
                print ("Forward "+ tr(x))
str(x))
            #click the left side of the image to go to the previous picture    
            if (x < 100): 
                cycleBackward()
                print ("Backwards "+ str(x))

I tested it perfectly.

The problem has been solved. Don't set values too highly x>600 and x<600, Set minimum to x>100 and x>100 Do net set below values, otherwise freezing. As @berak, @berak said, you can set resize by using cv2.WND_PROP_FULLSCREEN // 2.

#left mouse click to cycle through images

    def cycleImage(event, x, y, flag, param): 
        global i, images
        #click the right side of the image to go to the next picture
        if event == cv2.EVENT_LBUTTONDOWN:
            if (x > 100): 
                cycleForward() 
                print ("Forward "+ str(x))
            #click the left side of the image to go to the previous picture    
            if (x < 100): 
                cycleBackward()
                print ("Backwards "+ str(x))

I tested it perfectly.

The problem has been solved. Don't set values too highly x>600 and x<600, Set minimum to x>100 and x>100 Do net set below values, otherwise freezing. As @berak said, you can set resize by using cv2.WND_PROP_FULLSCREEN // 2.

#left mouse click to cycle through images

    def cycleImage(event, x, y, flag, param): 
        global i, images
        #click the right side of the image to go to the next picture
        if event == cv2.EVENT_LBUTTONDOWN:
            if (x > 100): 
                cycleForward() 
                print ("Forward "+ str(x))
            #click the left side of the image to go to the previous picture    
            if (x < 100): 
                cycleBackward()
                print ("Backwards "+ str(x))

#create fullscreen image
cv2.namedWindow("window", cv2.WND_PROP_FULLSCREEN)
cv2.setWindowProperty("window",cv2.WND_PROP_FULLSCREEN//2,cv2.WINDOW_FULLSCREEN//2)

I tested it perfectly.