Forums > Java

jit.matrix operation

May 28 2009 | 2:47 pm

I am trying to apply a filter to a jit.matrix loaded with an image using java external . As you can see I am creating a Sobel operator.
But I count not see any effect when I display the image

JitterMatrix mat =  new JitterMatrix(1,"float32", 3, 3);
         mat.setcell2d(0, 0, new float[]{1.0f});
        mat.setcell2d(0, 1, new float[]{2.0f});
        mat.setcell2d(0, 2, new float[]{1.0f});

        mat.setcell2d(1, 0, new float[]{0.0f});
        mat.setcell2d(1, 1, new float[]{0.0f});
        mat.setcell2d(1, 2, new float[]{0.0f});

        mat.setcell2d(2, 0, new float[]{-1.0f});
        mat.setcell2d(2, 1, new float[]{-2.0f});
        mat.setcell2d(2, 2, new float[]{-1.0f});


I display the image using

myrender.send("draw_pixels", new Atom[] { Atom.newAtom(textureImage.getName()) });

Am I doing this right?
Is there a different way of doing this?

Viewing 1 post (of 1 total)

Forums > Java