I'm looking to remove the default zoom behavior while scrolling up and down with the mouse wheel on OpenCV. I set a mouse callback method (defined below) in order to override this behavior without success :
import cv2
def mouse_callback(event, x, y, flags, param):
global index
if event == cv2.EVENT_MOUSEWHEEL :
if flags > 0:
index += 1
elif flags < 0:
index -= 1
index %= length
cv2.namedWindow('window', cv2.WINDOW_NORMAL)
cv2.setMouseCallback('window', mouse_callback)
cv2.imshow('window', path)
Has anyone succeeded in removing that default behavior ?