Questions tagged [android-renderscript]

101 questions
1
vote
0 answers

BCC fails to compile script

Good Afternoon, I've always had a bunch of Renderscript scripts to achieve canny edge detection. This has been working flawlessly up to now. Unfortunately with a new device (Samsung Galaxy S7) all scripts seem to be failing to be compiled by…
1
vote
1 answer

RenderScript does not modify alpha channel? [Android]

I'm working with a simple script in RenderScript. I have to modify the RGBA values on a pixel from a Bitmap. After many attempts I discovered that the Alpha channel doesn't get modified. I did some researches and I found this old question but I…
1
vote
1 answer

Is it possible to access more Elements in RenderScript kernel? [Android]

I want to access more Elements from one Allocation in RenderScript. Let's take the example code from Google: uchar4 __attribute__((kernel)) invert(uchar4 in, uint32_t x, uint32_t y) { uchar4 out = in; out.r = 255 - in.r; out.g = 255 - in.g; …
1
vote
1 answer

Recommended approach to compute over arbitrary sized 3D volume

To frame my question: I'm writing a custom convolution (for a CNN) where an arbitrary sized HxWxD input volume is convolved with a FxFxD filter. D could be 3 or 4 but also much more. I'm new to RenderScript and currently investigating approaches…
frankhond
  • 427
  • 4
  • 15
1
vote
1 answer

Using renderscript with com.android.library - Scripts are not correctly generated

We have an Android app that uses some renderscript code. We are moving it to a library that we have. I copied all classes that call scripts and also copied the scripts to the src/main/rs folder. The project has the following structure: - a…
Lxu
  • 437
  • 1
  • 5
  • 12
1
vote
2 answers

RenderScript crash when creating ScriptC

There is some mysterious problem with creating ScriptC object while using RenderScript. Here's my code: public class RenderScriptActivity { private RenderScript mRS; private ScriptC_kernel mScript = null; private Allocation…
Szał Pał
  • 306
  • 1
  • 7
  • 20
1
vote
3 answers

How do I select a region by color in a Bitmap?

Please suggest an efficient way to select a region by color in a bitmap. Then replace this selected region-color to your desired color. For example, If an image contains four colors say red, green, yellow, orange. Now suppose user clicked on yellow…
1
vote
1 answer

How to set blur image in android for all version?

i am using render script for blur image. But when i start application in lower android version then application gone to unfortunately stop. my code is below. public static class BlurBuilder { private static final float BITMAP_SCALE = 0.4f; …
Ravi Vaghela
  • 3,420
  • 2
  • 23
  • 51
0
votes
0 answers

ImageAnalysis.Analyzer CameraX frame rates drops converting to bitmap

I am using CameraX ImageAnalysis.Analyzer to do face detection. However, the Image object size is too large to use FirebaseVisionImage.fromMediaImage, therefore I tried converting the image to bitmap and recale and rotate based on camera…
0
votes
1 answer

RenderScript - call to clamp() is ambiguous

In my RenderScript file, I have the following: out.b = clamp(out.b, 0, 255); When I build the project, I get the following error: error: call to 'clamp' is ambiguous Why is that happening ?
ebeninki
  • 909
  • 1
  • 12
  • 34
0
votes
0 answers

Android - Convert a Java-Native-Interface (JNI) method into Renderscript

I have the following JNI method which I want to convert to Android's RenderScript because that would make my project a little bit simpler to manage. Here is the JNI method: static void applyRGBCurve(int width, int height, int *pixels, int *rgb) { …
ebeninki
  • 909
  • 1
  • 12
  • 34
0
votes
1 answer

Can't compile RenderScript reduction kernel

:app:compileDebugRenderscript task fails when I try to compile my reduction kernel. I created a new project with addint.rs file in the renderscript folder. My Gradle version is 3.5.3 apply plugin: 'com.android.application' android { …
0
votes
1 answer

Getting llvm-rs-cc process error, What am I doing wrong?

I am getting following ERROR for trying to run renderscript to invert image Process 'command '/home/sandesh/Applications/AndroidStudio/Android/Sdk/build-tools/29.0.2/llvm-rs-cc'' finished with non-zero exit value 1 JAVA: RenderScript rs =…
Naroju
  • 2,637
  • 4
  • 25
  • 44
0
votes
1 answer

Mirror symmetry of camera image using renderscript

I would like to take an input image and produce an output which is symmetrical about the central axis, i.e. reflected from right to left about the central vertical axis. How might this be achieve using renderscript? Example input image: Example…
IntoTheBlue
  • 199
  • 1
  • 3
  • 10
0
votes
0 answers

Renderscript with Android NDK and CMake

I am trying to build a custom kernel with Renderscript in Android native development. But got stuck at the compilation step. I took reference with the https://github.com/rpattabi/renderscript-ndk-cmake. Below is my…
HarryQ
  • 1,281
  • 2
  • 10
  • 25