How can I modify my Java code using the namedWindow() and imshow() functions to open and display two windows simultaneously? Currently, when I run the code, it opens and closes a window repeatedly instead of keeping both windows open at the same time.
I believe my code is correct, and I have tested it with a Python code that has a similar function (in my opinion), and it successfully opens two windows simultaneously without closing them.
something else must be interfering with the GUI. any competing GUI libraries in the mix?
I am not using any other GUI libraries in my code. I downloaded the prebuilt files of OpenCV from SourceForge and I am not aware of which GUI libraries it depends on or how to specifically select its highgui libraries without built from opencv source files.
Is it possible that the issue is caused by the prebuilt OpenCV files relying on incorrect backend GUI modules? If so, where can I find alternative prebuilt files that use different backend GUI modules? Alternatively, do I need to build OpenCV from source files to resolve this problem?
your window names differ in capitalization. you should fix that. with that java code, you should be getting four different windows.
I have corrected this in my question. However, even after making this correction, the issue of the windows repeatedly opening and closing persists.
please don’t slap random tags on your question. I’ve cleaned that up.
Thanks, It’s my first time asking question on this forum. I’ll pay attention next time.
please be aware, that the gui used with the java wrappers is a java ‘mockup’ of the usual highgui functionality.
it is swing - based, and not using any other c++ based dependancies (like qt or gtk)