Android : Real Time Image Processing using RenderScriptIntrinsics

Published: 31 January 2017
on channel: Matthias Buschmann
326
0

"RenderScript provides a platform-independent computation engine that operates at the native level. Use it to accelerate your apps that require extensive computational horsepower." (From: developer.android.com).

When a RenderScript script is executed it makes use of all ressources the device comes with, especially using all CPU and GPU cores in parallel. Renderscript is great when your tasks can be parallelized. Image processing is a typical application.

This app uses two RenderScriptIntrinsics: ScriptIntrinsicYuvToRgb and ScriptIntrinsicBlur, respectively.

ScriprIntrinsicYuvToRgb converts the camera preview data from YUV-format to the common RGB color space.

Then ScriptIntrinsicBlur applies a gaussian blur effect to the image with an adjustable blur radius from 0 to 25 (pixels).

Gaussian blur is a computational expensive operation. So the computation time increases with increasing blur radius.

Camera preview conversion and blur are executed in the device´s highest preview resolution. Full HD : 1920 x 1080 pixels.

Blurring an image with maximum blur radius (25 pixels) takes about 350 ms.

App created with Basic4Android (B4A)

Device : Nexus 7 (2013), API 18: "JellyBean", not rooted

Here is a tutorial how to start real time (live camera) image processing on Android using B4A (Basic4Android). It also includes
basic information how to use the RenderScript framework (parallel data processing on multi-core CPUs).

https://www.b4x.com/android/forum/thr...


On this page of the site you can watch the video online Android : Real Time Image Processing using RenderScriptIntrinsics with a duration of hours minute second in good quality, which was uploaded by the user Matthias Buschmann 31 January 2017, share the link with friends and acquaintances, this video has already been watched 326 times on youtube and it was liked by 0 viewers. Enjoy your viewing!