开发者

BufferedImage Android Port

I am in the process of porting some java code to Android. The code is doing some image recognition and uses BufferedImage I have managed to move most of the functionality over to Bitmap but I am struggling with the code below, any advice on how to port this over

public void verti开发者_StackOverflow社区calEdgeDetector(BufferedImage source) {
    BufferedImage destination = duplicateBufferedImage(source);

    float data1[] = {
        -1,0,1,
        -2,0,2,
        -1,0,1,
    };

    float data2[] = {
        1,0,-1,
        2,0,-2,
        1,0,-1,
    };

    new ConvolveOp(new Kernel(3, 3, data1), ConvolveOp.EDGE_NO_OP, null).filter(destination, source);
 }


try out http://xjaphx.wordpress.com/2011/06/22/image-processing-convolution-matrix/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜