Demo GPU
Simple image filtering demo using OpenGL-ES shaders on the Mali-400MP2 GPU.
By Laurent Ittiitti@usc.eduhttp://jevois.orgGPL v3
 Language: C++Supports mappings with USB output: YesSupports mappings with NO USB output: No 
 Video Mapping:   RGB565 320 240 22.0 YUYV 320 240 22.0 JeVois DemoGPU # Native mode
 Video Mapping:   YUYV 320 240 22.0 YUYV 320 240 22.0 JeVois DemoGPU # With CPU-based conversion from RGB565 to YUYV
 Video Mapping:   YUYV 320 240 22.0 YUYV 320 240 22.0 JeVois DemoGPU

Module Documentation

This class first copies the given input image into an OpenGL texture, then applies OpenGL-ES vertex and fragment shaders to achieve some image processing, and finally gets the resulting pixels back into an image.

This code is inspired somewhat from the tutorial and code examples found on this page: http://robotblogging.blogspot.com/2013/10/gpu-accelerated-camera-processing-on.html

But an important distinction is that we render to a framebuffer with an RGB565 renderbuffer attached, which accelerates processing and transfer of the results a lot.

Dewarp algorithm contributed by JeVois user Ali AlSaibie. It is to be used with a modified JeVois camera sensor that has a wide-angle lens. See http://jevois.org/qa/index.php?qa=153 for details.

Using this module

Unfortunately, MacOS computers refuse to detect the JeVois smart camera as soon as it exposes one or more RGB565 video modes. Thus, you cannot use this module with Macs in its native version (but see below), and the module is disabled by default. In addition, RGB565 does not seem to work in older guvcview either, on Ubuntu prior to 17.04! Proceed as follows to enable and use this module on a Linux host:

Edit JEVOIS:/jevois/config/videomappings.cfg and look for the line that mentions DemoGPU. It is commented out, so just remove the leading # sign. The line should then look like this:

RGB565 320 240 22.0 YUYV 320 240 22.0 JeVois DemoGPU

Restart JeVois and run this on your Linux host if older than Ubuntu 17.04:

sudo apt install ffmpeg
ffplay /dev/video0 -pixel_format rgb565 -video_size 320x240

or, with Ubuntu 17.04 and later:

guvcview -f RGBP -x 320x240

This module can also work with YUYV output, which is then compatible with MacOS, JeVois Inventor, etc. But note that the conversion from RGB565 to YUYV consumes some CPU on the JeVois camera.

ParameterTypeDescriptionDefaultValid Values
(DemoGPU) effectEffectGPU image processing effect to applyEffect::TwirlEffect_Values
Detailed docs:DemoGPU
Copyright:Copyright (C) 2016 by Laurent Itti, iLab and the University of Southern California
License:GPL v3
Distribution:Unrestricted
Restrictions:None
Support URL:http://jevois.org/doc
Other URL:http://iLab.usc.edu
Address:University of Southern California, HNB-07A, 3641 Watt Way, Los Angeles, CA 90089-2520, USA