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/
精彩评论