[Interest] camera APIs -- intended usage

Tyler Daniel tyler at rosette-research.com
Wed Nov 23 13:51:09 CET 2016


Hi, thanks very much for the response!

I understand that you generally want the viewfinder to related to the screen size and I suppose this is why there’s a separate viewfinder api.  I’ve also written native iOS camera apps before and have some familiarity with AVFoundation.

Unfortunately my questions stand:

1) how do I get viewfinder frames (live preview frames) at resolution X and still images at resolution Y, where Y is the maximum resolution and X is lower.  

2) why does the setViewfinderSettings() and setEncodingSettings() example below behave the way it does?  is this a bug, or intended behavior?

Tyler



> On 2016/11/23, at 3:29, Jason H <jhihn at gmx.com> wrote:
> 
> The viewfinder corresponds to the screen size, the full-capture corresponds to the CCD, or what you have the CCD configured to capture. The AVFoundation API on iOS has support for capturing frames and resizing them to requested sizes for various consumers. You're probably seeing something related to that. It's probably giving you the highest resolution requested.
>  
> When I capture the "preview" image in QML, it is sized accordingly. 
>  
> Sent: Monday, November 21, 2016 at 8:29 PM
> From: "Tyler Daniel" <tyler at rosette-research.com>
> To: interest at qt-project.org
> Subject: [Interest] camera APIs -- intended usage
> Hi all, I recently posted this in the forums, where it was suggested that I ask my questions here.  Sorry if this is a duplicate for someone.
>  
> I'm building an iOS camera app and need the viewfinder/preview frames in c++-land. I also need full-resolution still images when a capture button is pressed.
> 
> I can subclass QAbstractSurface and use QCamera::setViewfinder() to get frames. The problem is that the frames I get for the preview are the same resolution as the still images. I'm testing on an iPhone 5, so I either get 3264 or 1920, let's say 3k or 2k.
> 
> I'm using QCamera and QCameraImageCapture in c++ code.
> 
> If I use QCameraImageCapture::setEncodingSettings with 3k and QCamera::setViewfinderSettings with 2k, I get 3k preview frames and 3k still images.
> 
> I would have thought that the viewfinder api affects the viewfinder resolution and the camera image capture affects a separate still image capture resolution. But this is not the behavior I'm seeing.
> 
> Each of these classes are documented in the doxygen sense, but intended usage and how they work together is not.  The closest I can find is the detailed description of QCameraImageCapture, which provides a nice code snippet, but… resolution problems.
> 
> Pretty much all smartphones and digital cameras show a lower-resolution preview and capture stills at a higher resolution.
> 
> My question is how to achieve this with iOS? What should work? How do I get 2k preview frames in c++ and 3k still captures?
> 
> I’ve looked at the example apps.  They work on iOS in the sense that they don't crash, but they exhibit the same behavior with previews and stills at the same resolution. 
> 
> I’m currently working with 5.7 and 5.8 beta, but honestly I’ve had problems with the camera apis for years now.  On Android I hacked something that worked with QVideoProbe, but only for Android.  On iOS I gave up and went native.  Never found a solution that worked for more than one platform.
> 
>  
> Any help would be most appreciated!
>  
> Tyler
>  
> _______________________________________________ Interest mailing list Interest at qt-project.org http://lists.qt-project.org/mailman/listinfo/interest <http://lists.qt-project.org/mailman/listinfo/interest>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20161123/3308e6ee/attachment.html>


More information about the Interest mailing list