My own viewfinder for QCamera
-
I need implement in my app the still image capture. But it must not take and save entire image - but only even square from frame center. Therefore I need make visible only square part in viewfinder. Or at least draw yellow square over it. In docs I read next sentence:
For advanced usage (like processing viewfinder frames as they come, to detect objects or patterns), you can also derive from QAbstractVideoSurface and set that as the viewfinder for the QCamera object. In this case you will need to render the viewfinder image yourself.
I do not see quite clear - is this required if I just need draw something over QCameraViewfinder. If yes - then I need more description of how to "render the viewfinder image" by myself. Did anybody investigate this case? Is there any sample application showing how to render viewfinder? In supplied examples I only found simple apps with catching camera - but they do not render viewfinder.
-
I need implement in my app the still image capture. But it must not take and save entire image - but only even square from frame center. Therefore I need make visible only square part in viewfinder. Or at least draw yellow square over it. In docs I read next sentence:
For advanced usage (like processing viewfinder frames as they come, to detect objects or patterns), you can also derive from QAbstractVideoSurface and set that as the viewfinder for the QCamera object. In this case you will need to render the viewfinder image yourself.
I do not see quite clear - is this required if I just need draw something over QCameraViewfinder. If yes - then I need more description of how to "render the viewfinder image" by myself. Did anybody investigate this case? Is there any sample application showing how to render viewfinder? In supplied examples I only found simple apps with catching camera - but they do not render viewfinder.
@Gourmet said in My own viewfinder for QCamera:
I just need draw something over QCameraViewfinder
You could simply put a transparent widget over view finder and draw on it.
-
@Gourmet said in My own viewfinder for QCamera:
I just need draw something over QCameraViewfinder
You could simply put a transparent widget over view finder and draw on it.
@jsulm I thought about this. Did you implement this by yourself or just think too?
Without visible result it QtDesigner it is not so easy to implement. Therefore I have another question. In camera example it has QCameraViewfinder widget on the UI form. But there is no such Designer plugin. It is not available in Designer widgets palette. How did they do this? Manually edited UI file? Or they... have this plugin but do not provide it with Qt?
-
@jsulm I thought about this. Did you implement this by yourself or just think too?
Without visible result it QtDesigner it is not so easy to implement. Therefore I have another question. In camera example it has QCameraViewfinder widget on the UI form. But there is no such Designer plugin. It is not available in Designer widgets palette. How did they do this? Manually edited UI file? Or they... have this plugin but do not provide it with Qt?