Home > Tutorials > Image Processing – Engraving Effect

Image Processing – Engraving Effect

Engraving is also one of derivation from the edge detection algorithm, which makes use of Convolution Matrix.

You might need to refer to my previous article on Convolution Matrix for more information.

The matrix I’m using is:

[ -2 | 0 | 0 ]

[ 0 | 2 | 0 ]

[ 0 | 0 | 0 ]

The factor is 1 and offset is 95.

You’ll get this:

Original Image

Original Image

Applied Engraving Effect

Applied Engraving Effect

This is the implementation:

	public static Bitmap engrave(Bitmap src) {
		ConvolutionMatrix convMatrix = new ConvolutionMatrix(3);
		convMatrix.Matrix[0][0] = -2;
		convMatrix.Matrix[1][1] = 2;
		convMatrix.Factor = 1;
		convMatrix.Offset = 95;
		return ConvolutionMatrix.computeConvolution3x3(src, convMatrix);

Hope you like it!

Pete Houston

  1. Junior
    June 23, 2011 at 12:50 am

    I gathered almost all of your code in one android app.. its really nice, if you want I can send the source code to you. Niw I am looking at how to get rounded corners… there is a tutorial, but doesnt work for me! Thanks

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: