Hi
I am trying to use Color Matrix Filter for creating a grayscale
image and i am trying to use a convolution matrix for detecting edges
but i dont find any API as such where i can create and set a 3x3
convolution matrix
I am trying to do something like
float[] mx = {
0.5f, 0.5f, 0.5f, 0.0f, 0.0f,
0.5f, 0.5f, 0.5f, 0.0f, 0.0f,
0.5f, 0.5f, 0.5f, 0.0f, 0.0f,
0.0f, 0.0f, 0.0f, 1.0f, 0.0f,
};
ColorMatrix cm = new ColorMatrix(mx);
paint.setColorFilter(new ColorMatrixColorFilter(cm));
I also want to find a place where i can add my convolution matrix like
float cmx={
0.0f,1.0f,0.0f
1.0f,-4.0 f,1.0
0.0f,1.0f,0.0f }
Ideally i want to set something like
paint.setColorFilter(new ConvolutionFilter(cmx));
but i am not able to do so
Pls help me out.Basically i am trying to create the convolution matrix
for edge detection
Raghuram
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en