Lab archive: lab-10.zip lab-10-solved.zip
The application will display an image passed through a Gaussian blur filter next to the original image. To obtain the blurred image, use the ScriptIntrinsicBlur
script.
Fill in the TODOs in MainActivity.java
:
ScriptIntrinsicBlur
scriptElement.U8_4(mRS)
as the second argument for the create
methodDocumentation:
The application will display an image in greyscale and the original image. To obtain the grayscale image write a script that converts each pixel into greyscale.
Fill in the TODOs in mono.rs
:
float4
rsUnpackColor8888
dot
functionrsPackColorTo8888
Fill in the TODOs in MainActivity.java
:
Documentation:
The application will display an image and you can change dynamically the saturation of the image using a SeekBar. To obtain the image with a new saturation write a script that changes the saturation of each pixel.
Fill in the TODOs in saturation.rs
:
float4
mix
function
Fill in the TODOs in MainActivity.java
:
mOutAllocations[i]
, mBitmapsOut[i]
mOutAllocations[index]
mOutAllocations[index]
, mBitmapsOut[index]
Documentation:
The application will display an image and you dynamically apply different levels of blur, emboss and hue to the image using a SeekBar. Use intrinsic scripts that apply these filters.
Fill in the TODOs in MainActivity.java
:
mOutAllocations[i]
, mBitmapsOut[i]
ScriptIntrinsicBlur
scriptScriptIntrinsicConvolve5x5
scriptScriptIntrinsicColorMatrix
ScriptIntrinsicBlur
scriptScriptIntrinsicBlur
scriptScriptIntrinsicConvolve5x5
scriptScriptIntrinsicConvolve5x5
scriptScriptIntrinsicConvolve5x5
scriptScriptIntrinsicColorMatrix
scriptScriptIntrinsicColorMatrix
scriptDocumentation: