Display images larger than screen resolution: scrollbar window ?
I am dealing with images larger than my screen resolution. When I read them with the flag cv2.WINDOW_AUTOSIZE
I can not see the full image. However, I do not want to use cv2.WINDOW_NORMAL
flag or the resize()
function because I do not want to loose any information of my image.
Is there a way to show a large picture using OpenCV in its full size ? Ideally I wonder if there is a way to display a large image in a OpenCV window that can have a scroll bar in order to be able to scroll down the image and see it fully.
Thank you in advance for any hints
There is no scrollbar based window, so people tend to split their image into regions of interest and loop over those to process them. Since OpenCV only has visualization tools for debugging, no one has put effort into creating decent visualization software. For that you would better use external libraries.
I know there is no such scrollbar in OpenCV windows, I just wonder if there is a possibility to modify its source code and where to have this behavior. My application will be a mess if I want to display images in a given library and process them in an other one.
You would have to dig into the QT supported window functionality. If you built OpenCV with Qt support than scrollbars are possible, then you will have to write a modified window interface for that. And splitting visualisation and processing is no mess, that is just how decent programming is done. Use pure Qt for windowing instead of the OpenCV windows. That solves it all for you!