With OpenCV and Python, is there any way to remove the mouse callback set with cv2.setMouseCallback(window_name, function_name)
? Passing None
for the function name gives;
TypeError: on_mouse must be callable
This is a duplicate of How to Remove mouseCallback in OpenCV, but for Python, not C++.
Thanks,
For me, cv2.setMouseCallback(window_name, lambda *args : None)
did the trick and it seems clean enough.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With