Questions tagged [android-renderscript]
101 questions
0
votes
2 answers
Android - Graying out image using Renderscript does not work
I have written the following code to gray out an image. In earlier projects, I made some experiences with JNI and now, I also wanted to try out Renderscript.
So, I write the following code:
// MainActivity.java
public class MainActivity extends…

abdullah celik
- 327
- 2
- 12
0
votes
0 answers
Renderscript causes crash on LG G6
I made an app on a Motorola Moto E 4G (2nd gen), using Renderscript. I needed a wide-angle camera for my project so I just bought a LG G6. However, my app crashes on the LG G6 when I launch it. It crashes when I call a Renderscript kernel.
Also,…

Anton
- 137
- 2
- 14
0
votes
2 answers
Call Renderscrip kernel inside function
I am trying to call a Renderscript kernel inside a function inside the same Renderscript file, but I have no idea how to do it (and the Google documentation doesn't really help).
So I want to call this kernel:
uchar __attribute__((kernel))…

Anton
- 137
- 2
- 14
0
votes
1 answer
RenderScript native library in aar/apk
I am trying to troubleshoot this:
E/RenderScript: Unable to open shared library (/data/user_de/0/com.xxxx/code_cache/com.android.renderscript.cache/librs.yuv2rgbframes.so): (null)
I've set up renderscript in build.gradle as instructed by the…

wz2b
- 1,017
- 7
- 24
0
votes
1 answer
Make a counter for transparent pixels from a Bitmap in Renderscript
My problem is to get the amount of transparent parts/pixels in an image which is changed because of an OnTouchEvent by the user.
So I would like to transform the following java code into renderscript code:
public int transparentPixels(){
int…

Fynn
- 3
- 1
- 4
0
votes
0 answers
Android renderscript problem with copying byte array into allocation
I'm new to Renderscript and my app crashes every time at this line:
inAllocation.copyFromUnchecked(copyOfRange(nv21ByteArray, 0, size-1));
What I want to do is to convert the YUV-image that I get from the camera (nv21ByteArray), to a black and…

Anton
- 137
- 2
- 14
0
votes
1 answer
Update a camera preview using RGB bytes from renderscript using the camera api?
I have been able to manipulate the byte array from my camera preview and change the bytes from yuvtorgb using renderscript. Now, i need to know how to render that rgb bytes back to the camera preview. I believe that it is not possible to update the…

anastacia das
- 31
- 3
0
votes
2 answers
Renderscript code completion
I'm using Android Studio 3.0 to write renderscript code. But I see that it doesn't support code completion for .rs files.
The official Renderscript documentation doesn't mention anything about code completion.
Is there any setting that needs to be…

rsd_unleashed
- 151
- 2
- 12
0
votes
1 answer
The x y parameters definition
I'm trying to understand the mapping kernel in Renderscript.
A sample mapping kernel looks like this
uchar4 RS_KERNEL invert(uchar4 in, uint32_t x, uint32_t y) {
uchar4 out = in;
out.r = 255 - in.r;
out.g = 255 - in.g;
out.b = 255 - in.b;
return…

rsd_unleashed
- 151
- 2
- 12
0
votes
0 answers
Renderscript breaks bitmap
First i loaded a icon to drawable and converted it to Bitmap, and i blur it by using Renderscript.
defautIcon = ImageUtils.drawableToBitmap(notification.getLargeIcon().loadDrawable(this));
largeIcon = RenderScriptBlur.blur(getContext(), defauticon,…

Soptq
- 1
- 2
0
votes
0 answers
Renderscript error?
I am working on application which uses Renderscript Liberary. I am getting below error while build project
Error:Execution failed for task ':app:compileDebugRenderscript'.
> A problem occurred starting process 'command…

Ankita
- 1
- 1
0
votes
1 answer
Management with RenderScrip
I would like to handle the frame from YUV to RGB using the ScriptIntrinsecYUVtoRGB in the method ImageReader.OnImageAvailableListener().
It can be done? Until now I have done so:
I remaining with image white and the preview does not start…

Enda Azi
- 49
- 10
0
votes
1 answer
RenderScript: not matching function rsGetElementAt_uchar4
I've write very short RS, but after gradle sync Android Studio gives me error
Error:(8, 34) error: no matching function for call to
'rsGetElementAt_uchar4'
Script:
#pragma version(1)
#pragma rs java_package_name(xx.xxx.xxxxxxx)
uchar4 road =…

Dmytro Rostopira
- 10,588
- 4
- 64
- 86
0
votes
0 answers
Create HSV histogram with RenderScript
I have to create a HSV Histogram from a ARGB array using RenderScript in Android. This is the first time i am using RenderScript and i am not sure if i made a mistake because the performance is not so good. Creating a HSV histogram from an 1920x1080…

BauerMitFackel
- 372
- 5
- 15
0
votes
1 answer
How do I move this code from java to Renderscript
Can someone provide me some guidelines on how can I port this code to renderscript for better performance.
private void someMethod() {
for (int i = 0; i < src.rows(); i++) {
for (int j = 0; j < src.cols(); j++) {
double hsv[] = src.get(i, j);
…

Greeen Apple
- 441
- 1
- 4
- 12