User avatar
gagle
Posts: 82
Joined: Fri Feb 14, 2014 6:54 pm
Contact: Website

[OpenMAX] jpeg thumbnail

Sun Jun 29, 2014 2:52 pm

  • How can I set the thumbnail quality in OpenMAX? The struct OMX_PARAM_BRCMTHUMBNAILTYPE is the only thing in all the openmax headers with the word "thumb" and it doesn't have any quality field. :(
  • raspistill doesn't use 2 features of this struct:
    - Automatic width and height. If both dimensions are set to 0 the width and height are calculated automatically. If one of these dimensions is 0, then the other dimension is calculated automatically based on the other dimension and maintaining the aspect ratio.

    Tests (2592x1944)

    raspistill :
    --thumb 64:48:35 -> 64x48
    --thumb 0:0:35 -> no thumbnail
    --thumb 0:48:35 -> no thumbnail
    --thumb 64:0:35 -> no thumbnail

    omxcam:
    width 64, height 48 -> 64x48
    width 0, height 0 -> 288x216
    width 0, height 48 -> 64x48
    width 64, height 0 -> 64x48

    - The "bUsePreview" field is not exposed as a parameter. It seems to be false (or true but the preview dimensions exceed the thumbnail max, 1024x1024). If true, the thumbnail is the preview.

User avatar
gagle
Posts: 82
Joined: Fri Feb 14, 2014 6:54 pm
Contact: Website

Re: [OpenMAX] jpeg thumbnail

Sun Jul 06, 2014 10:28 am

up...

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 27444
Joined: Sat Jul 30, 2011 7:41 pm

Re: [OpenMAX] jpeg thumbnail

Sun Jul 06, 2014 7:52 pm

I'll try to remember to check tomorrow.
Principal Software Engineer at Raspberry Pi (Trading) Ltd.
Contrary to popular belief, humorous signatures are allowed.
I've been saying "Mucho" to my Spanish friend a lot more lately. It means a lot to him.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 9929
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: [OpenMAX] jpeg thumbnail

Mon Jul 07, 2014 11:22 am

MMAL sets the OMX parameter with
  • enable -> bEnable
  • width -> nWidth
  • height -> nHeight
  • OMX_FALSE -> bUsePreview
  • quality -> nowhere (we can't set it)
Otherwise the behaviour should be the same between OMX and MMAL.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “Camera board”