opencvdragrect icon indicating copy to clipboard operation
opencvdragrect copied to clipboard

Late finding

Open oldAlNow opened this issue 9 months ago • 0 comments

It seems the waitkey() in clearCanvasNDraw() of the selectinwindow.py causes the recursive stack.

My temporary solution is to comment it out:

selectinwindow.py:

def clearCanvasNDraw(dragObj):
    # Draw
    # ...
    drawSelectMarkers(tmp, dragObj)
    cv2.imshow(dragObj.wname, tmp)
    #  cv2.waitKey()                # <-- comment out

script.py:

cv2.imshow(wName, rectI.image)     # draw image once

while True:
    # display the image
    #  cv2.imshow(wName, rectI.image)   <-- move to outside of the loop
    key = cv2.waitKey(1) & 0xFF
    # if returnflag is True or 'q' is hit, break from the loop
    if rectI.returnflag or key == ord('q'):
        break

oldAlNow avatar May 04 '24 03:05 oldAlNow