We are very excited to announce that PowerVR Series6 GPUs have achieved full conformance with OpenGL® ES 3.1, the latest version of the well-known graphics API developed and maintained by the Khronos Group. Being able to offer PowerVR developers access to the latest graphics and compute feature set is something we firmly believe in and work really hard to achieve for every family of GPUs we release. 

OpenGL ES 3.1 brings a number of improvements over the previous API release, but perhaps the most exciting feature is the presence of compute shaders. The demo presented below offers an overview of how OpenGL ES 3.1 compute shaders can be used for image processing. Take it away, James!

OpenCLOpenGL ES 3.1 was officially launched at GDC 2014 and is supported by PowerVR Rogue GPUs

An overview of the OpenGL ES 3.1 Face Detect demo

At the most basic level, the Face Detect demo is a chained sequence of image processing algorithms. The input image is taken either from a video, live camera feed or static image and the end result is a box drawn around regions that contain faces.

All images used in the algorithm are RGBA8 32-bit and the input image is taken at a typical standard definition resolution (640×480). A four channel RGBA8 32 bit image is used to store up to 4 binary images in each channel.

The compute shader feature inside OpenGL ES 3.1 was used for each of the following steps, apart from Region Analysis which was done on the CPU. In previous versions of OpenGL ES, developers would have implemented the algorithms below using a traditional fragment shader. However, since compute shaders are now available in OpenGL ES 3.1, we have used them for efficiency reasons.

deferred-lightingHubert Nguyen explains in an article on Ubergizmo how OpenGL ES 3.1 compute shaders can be used for more complex lighting

De-noise

When retrieving data from cameras, the images are often noisy. By using a 3×3 median filter in a OpenGL ES 3.1 compute shader, we can reduce the noisy appearance of the image. This step is essential as the proceeding algorithms (the threshold in particular) are very noise-sensitive. For more information see this article on Wikipedia.

Segmentation (Threshold)

Once the image has been de-noised, pixels in the image that represent skin are classified into a binary image. A full bright value represents skin and black is written for pixels that do not represent skin. This pass is done on the PowerVR Rogue GPU using a threshold compute shader. A similar procedure is done for lips; the proximity of skin and lip and regions in the image will be a good indicator of a face when we later perform region analysis.

PowerVR Rogue - OpenGL ES 3.1 - FaceDetect - a3

The image above shows the output from skin and lip segmentation

Downsample

After the segmentation step we are left with a binary image that is white for all skin pixels. However, because the threshold is not a perfect classifier we also have some false positives and false negatives. To remove these misclassified pixels, we can perform a sequence of morphological dilate and erode steps – which work in tandem to remove outliers. These are expensive operations so before we do them we downsample the image.

Morphological Dilate and Erode

These two filters are implemented as OpenGL ES 3.1 compute shaders. They work by taking the max and the min for a group of neighbouring pixels. In the demo, erosion uses 14 neighbours that are sampled in a diamond pattern; dilate uses 16 neighbour samples. Running these filters over the image essentially blobs together dense speckles of white pixels and filters away sparse speckles. For more information see this article on Morphological Image Processing.

Region Analysis

The region analysis pass essentially identifies blobs of skin that are roughly face-shaped. This pass is performed on the CPU for simplicity; an optimal implementation could make use of the PowerVR GPU, but such an implementation was beyond our capability under the given time and development constraints.

PowerVR Rogue - OpenGL ES 3.1 - FaceDetect - a1

After the final pass, we can correctly recognize David Duchovny’s face

Where can I find platforms using PowerVR Rogue?

Several of our customers have already publicly announced 32 and 64-bit apps processors that use PowerVR. Here is a short list of what is available so far:

Our developer online store already offers a number of Android tablets with PowerVR Rogue GPUs which you can purchase right away; we promise to keep updating it with more devices as they become available.

dell-venue-7-android-mag-965-features-1The new Dell Venue 7 (2014) features an Intel® Atom™ processor Z3460 with a PowerVR G6400 GPU and retails for $15999

The FaceDetect demo was first shown at GDC 2014 where we received very positive feedback from a lot of developers, all very eager to try compute shaders too. As a matter of fact, in a recent poll we’ve conducted among PowerVR Insider members, this feature is the most popular among the new functionality offered in OpenGL ES 3.1 so we look forward to see more applications making use of it in the future.

To find out more about PowerVR GPUs, follow us on Twitter (@ImaginationPR, @PowerVRInsider) and keep coming back to our blog.

Editor’s Note

* PowerVR Rogue GPUs are based on published Khronos specifications and have passed the Khronos Conformance Testing Process. Current conformance status can be found at www.khronos.org/conformance.

OpenGL is a registered trademark and the OpenGL ES logo is a trademark of Silicon Graphics Inc. used by permission by Khronos.

Comments

  • Tim Cook

    You forgot to mention the Apple A7 SoC with G6430.

    • LM

      Yes, very true. I don’t understand why they never mention the A7 in this blog. It is not the first time.

      • Thank you Mr. Cook :D.

        The only thing I can say in relation to Apple is
        https://www.imgtec.com/investors/detail.asp?ID=836

        Nothing else, nothing more.

        Regards,
        Alex.

        • LM

          Everybody knows how big investor Apple is. In this sense sounds bit odd not mentioning their chips when you guys describe the capabilities of Series 6. It looks like (maybe I am wrong) more Android focused blog. By the way it’s only a vague impression of mine. 🙂

          • Anyone

            It has nothing to do with Android vs. iOS or anything related. Apple obviously doesn’t wish to be mentioned and if you even check in the Kishonti database the G6430 GPU in Apple’s A7 isn’t even mentioned by its real name but as Apple A7 GPU. So maybe you boys should ask Apple why they’re so anal about it when almost everyone with a tad of insight in this market knows where they are licensing GPU IP from.

          • LM

            So basically this is the reason why here in this blog there is no mention of the A7? IP reasons? This makes the situations even more bizarre since the only Powervr series 6 in the market to date its only in the A7, despite the others mentioned in this article that are not present in the market yet. So be it!! 🙂

          • I beg to differ. You can currently order at least four tablets running Android that have four of the SoCs mentioned above (A80, Z3460/Z3480, MT8135). You can find them at

            http://store.imgtec.com/product-tag/series6/

            The LG CINEMA 3D TV range (LG H13) has been on sale since June last year.

            https://www.imgtec.com/blog/index.php/powervr/lg-cinema-3d-smart-tvs-with-powervr-series6-graphics-start-shipping

            Regards,
            Alex.

          • verdantchile

            Basically, Apple will let Imagination mention their partnership in the legally required financial disclosures and in some of the documentation they share to educate developers, but Apple likes to maintain an uncomplicated marketing message and generally doesn’t want extra branding introduced from their outside IP suppliers.

          • Anyone

            It doesn’t sound like anything else does it but IP reasons. I’m just an observer like everyone else here, but if I at my work had a partner like Apple and they’d shout “jump” I’d only ask “how high”.

            What difference does it make anyway? Imagination as an IP company shouldn’t actually market anything outside the actual technology; that is rather a job of their partners whether those are SoC manufacturers or OEMs.

          • LM

            The difference would be that maybe some people would never know that in the A7 there is a powervr series 6 if that matters. Only that. But thanks God we have Anandtech that give us always the clue 🙂

          • Anyone

            It’s not that much different with any other manufacturer. It’s not like others glue a sticker with “PowerVR insider inside” on the shell of each smartphone or tablet albeit IMG IP GPU IP ends up in hundreds of millions of devices outside Apple i-devices per year.

            I didn’t even know that there’s IMG display IP in one of my TV sets; I was looking up something else and found out just out of pure luck.

            Albeit I love Anand what do I need him for? All you need is to double check OGL_ES extensions in the Kishonti database in the relevant info tabs 🙂

          • LM

            Sorry I am not technical as you are, so I don’t double check any extension as you do. I use common sense and when I read a blog like this I would expect some mention if any.
            I’ve understood there is some sort of private confidential agreement between IMG and Apple, where the latter doesn’t disclose the name of g6430; and it is absolutely fair enough. I wanted only to point out this thing. If it was otherwise Alex already have mentioned in his blogs.

  • Tim Cook

    You forgot to mention the Apple A7 SoC with G6430.

    • LM

      Yes, very true. I don’t understand why they never mention the A7 in this blog. It is not the first time.

      • Thank you Mr. Cook :D.

        The only thing I can say in relation to Apple is
        https://www.imgtec.com/investors/detail.asp?ID=836

        Nothing else, nothing more.

        Regards,
        Alex.

        • LM

          Everybody knows how big investor Apple is. In this sense sounds bit odd not mentioning their chips when you guys describe the capabilities of Series 6. It looks like (maybe I am wrong) more Android focused blog. By the way it’s only a vague impression of mine. 🙂

          • Anyone

            It has nothing to do with Android vs. iOS or anything related. Apple obviously doesn’t wish to be mentioned and if you even check in the Kishonti database the G6430 GPU in Apple’s A7 isn’t even mentioned by its real name but as Apple A7 GPU. So maybe you boys should ask Apple why they’re so anal about it when almost everyone with a tad of insight in this market knows where they are licensing GPU IP from.