OpenCV imshow and Windows 10 scaling issue
I was having a problem with OpenCV imshow function showing images larger than they actually were (See image attached, where left side is the original size, and right one is the image in an OpenCV window).
import cv2
img = cv2.imread('image.png')
cv2.namedWindow('a', cv2.WINDOW_AUTOSIZE)
cv2.imshow('a', img)
cv2.waitKey()
After some hours of investigation, I found out that the problem was Windows 10 scaling settings. This value was enabled to 125% by default. Changing this value to 100% in "Windows Settings - Display - Scale and layout" fixed the issue.
Not sure if this expected behaviour or not, but I just would like to share it for others.
Related issue / feature request: imshow upscale displayed image.