psr_21-22 icon indicating copy to clipboard operation
psr_21-22 copied to clipboard

TP2 - Advanced Functionality 3

Open PedroCarvalho98 opened this issue 3 years ago • 1 comments

Good night Professor @miguelriemoliveira ,

Regarding the Advanced Functionality 3 of the TP2, is there any function to see if the key ('s' or 'e') is pressed and when it's realeased, since waitKey make us wait for a input? We've tried keyboard module and pyglet but we failed to implement them.

Thank you.

PedroCarvalho98 avatar Nov 18 '21 19:11 PedroCarvalho98

Hi @PedroCarvalho98 ,

I think opencv only allows you to check if the key is pressed. As such, you can do the following:

The first time the user presses key "s" the rectangle starts to be drawn and the user moves the mouse around, and then the user has to press "s" again to accept the current position of the rectangle.

miguelriemoliveira avatar Nov 19 '21 12:11 miguelriemoliveira