![]() ![]() Simply define a HighGUI window whose pixel size is twice as large as the screen (that is: define it as the screen resolution measured in “points”). It also suggests a simple work-around that for an OpenCV user to use Retina resolution today. Work-around / potential solution: While I am largely ignorant of the internals of both OpenCV and macOS’s Cocoa API, this suggests that there may be a relative simple way for OpenCV to support Retina resolution on macOS. Significantly, in that situation, it was in fact displaying at Retina resolution!! I think this is a feature of HighGUI that will scale down large windows to fit on the screen ( cv::namedWindow parameter flags of WINDOW_AUTOSIZE?). Everything worked, but I realized everything was half as big as I expected. (It would be really nice to have an API to get the current screen size-but that is a different feature request.) I looked up my laptop’s screen resolution and wrote it as a constant in my (prototype, non-portable) code: 2880 by 1800. I was reminded of this issue when I wrote some code to size a HighGUI window based on screen size and other constraints. I have been using OpenCV in half-screen-resolution mode. (He mentioned that he added Retina support to the list of desirable features in a future new GUI: Implement new-generation UI for OpenCV samples and Demos) Later Vadim Pisarevsky kindly discussed this with me, and suggested I file a feature request here, which I am finally doing, more that a year later. I had looked into this in February 2020, posting this question in the old Forum display OpenCV image at full “Retina” resolution on macOS. (See potential work-around / solution in final paragraph below.)īackground: for reasons that must have made sense to them at the time, when Apple generally doubled the screen resolution their macOS (laptop, desktop) machines, they kept a “backwards compatible” mode where the screen content could be specified either in pixels or subpixels called “ points.” (Generally a pixel is a 2x2 grid of points, although the definition allows other ratios.) Software that is not native to macOS-including OpenCV-generally draws pixels rather than points, so displays at half the hardware resolution of the display. Ideally HighGUI should (at least have an option to) display images at full “Retina” resolution. Summary: by default, OpenCV HighGUI windows display on Apple macOS devices at half the normal screen resolution. Operating System / Platform => macOS Big Sur 11.4. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |