You are on page 1of 13

AIM

To perform image processing convolution using different filters in imageJ software.

SOFTWARE REQUIRED: ImageJ


THEORY:
ImageJ is an open source image processing program designed for scientific multi-dimensional images.
It is highly extensible, with thousands of plugins & macros for performing a wide variety of tasks.
This is a Java based program developed at National Institute of Health. Custom acquisition, analysis
and processing plugins can be developed using ImageJ's built-in editor and a Java compiler. Userwritten plugins make it possible to solve many image processing and analysis problems. Simple
Biomedical image processing, which otherwise required MATLAB codes can be done through the
software within much less time, with the same efficiency.

PROCEDURE:
ImageJ was first opened. In the file OPEN was clicked and the image was selected.
Appropriate processing of the image was done by the following method.
PROGRAM 1: Kirsch edge detector NORTH.
The following matrix was written in the convolution matrix dialog box and ok was clicked.

1 1
1
0 0
0
1 1 1

North gradient filtering

Observation: The gradient magnitude is preserved in south to north direction.


Hence it detects the edge from bottom of the image to top of the image.

PROGRAM 2: Kirsch edge detector SOUTH.


The following matrix was written in the convolution matrix dialog box and ok was clicked.

1 1 1
0
0
0
1
1
1

South gradient filtering

Observation:The

gradient magnitude is preserved in north to south direction.


Hence it detects the edge from top of the image to bottom of the image.

PROGRAM 3: Kirsch edge detector NORTH WEST.


The following matrix was written in the convolution matrix dialog box and ok was clicked.

1 1
0
1 0 1
0 1 1

North west gradient filtering

Observation:The gradient magnitude is preserved in south east to north west


direction. Hence it detects the edge south east to north westof the image.

PROGRAM 4: Kirsch edge detector WEST.


The following matrix was written in the convolution matrix dialog box and ok was clicked.

1 0 1
1 0 1
1 0 1

West filter

Observation:The gradient magnitude is preserved in east to west direction.


Hence it detects the edge east to west of the image.

PROGRAM 5: Kirsch edge detector SOUTH WEST.


The following matrix was written in the convolution matrix dialog box and ok was clicked.

0 1 1
1 0 1
1 1
0

South west filter

Observation:The gradient magnitude is preserved in northeast to southwest


direction. Hence it detects the edge northeast to southwestof the image.

PROGRAM 6: Kirsch edge detector SOUTH EAST.


The following matrix was written in the convolution matrix dialog box and ok was clicked

1 1 0
1 0 1
0
1 1

South east gradient filter

Observation:The gradient magnitude is preserved in northwest to southeast


direction. Hence it detects the edge northwest to southeastof the image.

PROGRAM 7: Kirsch edge detector EAST.


The following matrix was written in the convolution matrix dialog box and ok was clicked

[
East gradient filter

1 0 1
1 0 1
1 0 1

Observation:The gradient magnitude is preserved in west to east direction.


Hence it detects the edge west to eastof the image.

PROGRAM 8: Kirsch edge detector NORTH EAST.


The following matrix was written in the convolution matrix dialog box and ok was clicked

[
North east filter

0
1 1
1 0 1
1 1 0

Observation:The gradient magnitude is preserved in southwest to northeast


direction. Hence it detects the edge southwest to northeastof the image.

PROGRAM 9: Frei-Chen edge detector G1.


The following matrix was written in the convolution matrix dialog box and ok was clicked

][

1
0.3536
0.5
0.3536
2 1
0
0
0 =
0
0
0
2 2
1 2 1 0.3536 0.5 0.3536
1

G1

Observation:The bottom edge of the image is shown. Only sensitive to fine edges.
PROGRAM 10: Frei-Chen edge detector G2.
The following matrix was written in the convolution matrix dialog box and ok was clicked

1 0
2 0
2 2
1 0
1

G2

][

1
0.3536 0 0.3536
=
0.5
0
0.5
2
0.3536 0 0.3536
1

Observation: A blurred image of the original image is shown.


PROGRAM 11: Frei-Chen edge detector G3.
The following matrix was written in the convolution matrix dialog box and ok was clicked

][

0 1 2
0
0.3536
0.5
4
1
0 1 =4 0.3536
0
0.3536
2 2
0.5
0.3536
0
2 1
0
1

G3

Observation: A sharpened image is obtained with more prominent edges.

PROGRAM 12: Frei-Chen edge detector G4.


The following matrix was written in the convolution matrix dialog box and ok was clicked

][

0.5
0.3536 0.3536
2 1 1
1 0
1 =4 0.3536
0
0.3536
2 2
0
0.3536
0.5
0
1 2
1

G4

Observation: A little blurring of the image is observed at the edges.


PROGRAM 13: Frei-Chen edge detector G5.
The following matrix was written in the convolution matrix dialog box and ok was clicked

2
G5

0 1 0
1
1 0 1
2
0 1 0

Observation: Only the sharp edges of the image has been visible. Rest of the image data is
lost.
PROGRAM 14: Frei-Chen edge detector G6.
The following matrix was written in the convolution matrix dialog box and ok was clicked

1 0 1
1
0 0 0
2
1 0 1

G6

Observation: The edges of the image are only visible. Edges are thicker than the result
obtained in G4.

PROGRAM 15: Frei-Chen edge detector G7.


The following matrix was written in the convolution matrix dialog box and ok was clicked

][

1 2 1
0.111 0.222 0.111
1
2 4 2 = 0.222 0.444 0.222
9
1 2 1
0.111 0.222 0.111

G7

PROGRAM 16: Frei-Chen edge detector G8.


The following matrix was written in the convolution matrix dialog box and ok was clicked

][

2 1 2 0.333 0.166 0.333


1
1 4 1 = 0.166 0.666 0.166
6
2 1 2 0.333 0.166 0.333

G8

Observation: The result of the convolution of the image is shown. Some noise is prominent
in the result image.

PROGRAM 17: Frei-Chen edge detector G9.


The following matrix was written in the convolution matrix dialog box and ok was clicked

[ ][

1 1 1 0.333 0.333 0.333


1
1 1 1 = 0.333 0.333 0.333
3
1 1 1 0.333 0.333 0.333
G9

Observation: The edges became thicker.

CONCLUSION:
1. The Kirsch edge detectors displayed a thicker edge as compared to Frei-Chen
detectors.
2. Frei-Chen detector showed fine edges of the image.
3. In Frei-Chen edge detector G8 must not be used for the nosy image.

RESULT:
Frei-chen and kirsch edge detector are studied.

You might also like