Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Camera + overlay
I need to set up a simple android app where some simple 2D graphics (say a bunch of lines and circles) will be overlayed on top of a camera viewfinder in real time. I need to be able to analyze the viewfinder image in realtime and overlay my graphics in realtime as well. Please advise what classes to look at. I would prefer not to use QML/Quick if the "pure" Qt suffices. There is no need for any complex GUI or fluid effects with bells and whistles.
Thanks for any thoughts, I am new to mobile applications with Qt.
the last time I used the pure -c++ variant- of QCamera, I had serious trouble to get it to work in mobile(android, was fine on ios) but it has been 4 or 5 releases since than, so it might be fine now. Or you have to use QML to get access to the camera - that was what I used in the end.
@J-Hilk thanks for a hint. Well, I am torn indeed between pure Qt or Quick for my purpose. I am reluctant to learn QML (that I do not know) but if this is what works better/more solid then I can adopt. Can anyone else please share their thoughts what is the best (stable, reliable, supported) way of using camera for my purpose?
Thanks a lot, Dominik
@Domel07 there is no reason, not to mix and match as you see fit.
Most QML applications end up with a c++ backend, for example to analyze a frame/picture
Or you can use for example a QQuickView or QQuickWidgets to simply load a QML-Camera file. You can query that file on c++ side for the camera object and use it as if it were any other c++ object.
The QuickView/widget does not even have to be visible for your purpose.
@J.Hilk thank you, will try to follow along those lines. Thanks!
Pablo J. Rogina last edited by
I need to be able to analyze the viewfinder image in realtime
What tool(s) are you planning to use for that?
@Pablo-J.-Rogina Exactly OpenCV :) But am happy to first get the backbones running, i.e. doing some trivial computations myself and drawing some lines/circles over camera viewfinder in realtime (think tracking a moving object or detecting oval shapes).