-
-
Notifications
You must be signed in to change notification settings - Fork 56.5k
Open
Labels
bugneeds investigationCollect and attach more details (build flags, stacktraces, input dumps, etc)Collect and attach more details (build flags, stacktraces, input dumps, etc)platform: ios/osx
Description
System Information
OpenCV python version: 4.10.0
Operating System / Platform: MacOS Sonoma 14.2
Python version: 3.10
Detailed description
I have made a simple highgui functionality to keep/restore aspect ratio after changing the size of the Window.
It uses:
- cv2.getWindowImageRect(self.window_name)
- cv2.resizeWindow(self.window_name, width=nw, height=nh)
However even if it never changes and only calls cv2.getWindowImageRect the memory grows like 100MB every few seconds.
I did not experience it on Windows.
Steps to reproduce
Set up the window: cv2.namedWindow(self.window_name, cv2.WINDOW_NORMAL)
In reading image and processing loop:
rect = cv2.getWindowImageRect(self.window_name)
x, y, w, h = rect
nh = int(round(w * self.aspect_ratio_yx))
nw = int(round(nh / self.aspect_ratio_yx))
window.show_image(image)
key = cv2.waitKey(1)
Issue submission checklist
- I report the issue, it's not a question
- I checked the problem with documentation, FAQ, open issues, forum.opencv.org, Stack Overflow, etc and have not found any solution
- I updated to the latest OpenCV version and the issue is still there
- There is reproducer code and related data files (videos, images, onnx, etc)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugneeds investigationCollect and attach more details (build flags, stacktraces, input dumps, etc)Collect and attach more details (build flags, stacktraces, input dumps, etc)platform: ios/osx