Tuesday, December 14, 2010

Summary of ANOVA Test Results for The Effect of Noise on Edge Detection Algorithm


F = 12.38161326
P = 2.5459888 X 10^-6
Factor
    Df = 3
    SS = 73.1152087
    MS = 24.3717362
Error
    Df = 56
    SS = 110.229354
    MS = 1.96838132
    Sxp = 1.40299014

Introduction


Image processing includes a wide range of tactics including edge detection. Among many things, edge detection enables computer to detect shapes and patterns and is used in shape recognition. The human mind is capable of differentiating shapes by drawing inferences about distance, direction, volume, and area consequently allowing humans to be able to “guess” the shape by summarizing the information in which they observe. Computers, on the other hand, have to be programmed to be able to “see” the way a human can. Shape recognition is used for games, biomedical and investigative applications, art and design software, and robotics. It is found on radar systems, surveillance and forensics, and is used to create robots more human-like. (Levine, 1985) Image processing is implemented in machine vision, which is a process by which a computer-driven device optically senses external objects. From the analysis of the sensed data, the device infers information about objects it senses or “sees”. The device is usually a type of camera connected to a computer that digitizes the images and then analyzes them. Machine vision is used for small tasks such as checking size and shape for automobiles, x-rays, photographs, chromosome slides, and cancer smears. ("Machine Vision", 1991)
For this project, an image is imported and processed through a computer. The computer uses image processing, manipulating data in the form of an image, in order for the computer to “read” or interpret the image. An image is usually interpreted as a two-dimensional array of numbers, which resemble the image’s brightness values. Each point, or pixel, has a number according to the color that is shows. A pixel is a number that represents the brightness value of the image at a particular location. (See Appendix) Another important aspect of this project is noise, which is the independent variable. Image noise is the random variation of brightness or color in images creating the image to look fuzzy and grainy. It affects the pattern recognition by making it more difficult for the program to decipher the edges because of the random brightness values. (Sean, 2010) To create noise, a random number is generated from -1 to +1. This generated number is then multiplied by 256, which is the largest color value and represents the blackest black, because the color value should be a double between -256 and +256. This number is then multiplied by the desired percentage change and is added to the original value of the pixel. .  (Smith, 2008) For example: if the original color were 100, the generated number came out 0.5293719173, and you wanted to change the pixel by 25%, 33.8798028 would be added to 100 to change the value.
When the image is finished processing, edge detection is used. Edge detection is the process when a computer detects a change in brightness representing the edges in an image or of a particular shape. The edge detection in the experiment uses derivatives to find the edges. A derivative is the slope at a single point. To find all of these, a simple algorithm is written to scan the image horizontal and vertical finding the slope between every point that lay next to each other. To find the efficiency of the algorithm, the signal to noise ratio is calculated. The signal to noise ratio is the contrast between the signal, which is what is being measured without variation, to the undesired signal known as the noise. More noise in the image results in a lower signal to noise ratio, correspondingly, less noise results in a higher signal to noise ratio. (TopBits.com, 2010)
The purpose of this experiment is to find out how random noise in image pixels affects the efficiency of an edge detection algorithm. The independent variable is the noise level on the image; the dependent variable is the efficiency of the algorithm. The efficiency is calculated by the signal to noise ratio. The hypothesis reads that if the amount of noise increases, the efficiency of the algorithm will decrease because it will not be able to detect the shape due to the high and low derivative becoming closer.

Sunday, December 12, 2010

Raw Data



Shape
Trial
%Noise
SNR
Circle
C
0
Circle
1
25
4.2578125
Circle
2
25
5.923913043478260
Circle
3
25
6.337209302325580
Circle
4
25
9.39655172413793
Circle
5
25
5.797872340425530
AVERAGE


6.34267178207346
Circle
1
50
1.8664383561643800
Circle
2
50
3.40625
Circle
3
50
3.1142857142857100
Circle
4
50
2.3491379310344800
Circle
5
50
2.898936170212770
AVERAGE


2.72700963433947
Circle
1
75
0.9511343804537520
Circle
2
75
0.8346094946401220
Circle
3
75
0.9628975265017670
Circle
4
75
0.8790322580645160
Circle
5
75
0.8934426229508200
AVERAGE


0.904223256522195
Circle
1
100
0.4972627737226280
Circle
2
100
0.5444555444555440
Circle
3
100
0.5126999059266230
Circle
4
100
0.5079217148182670
Circle
5
100
0.5816435432230520
AVERAGE


0.528796696429223


Shape
Trial
%Noise
SNR
Square
C
0
Square
1
25
3.6989247311828000
Square
2
25
2.6259541984732800
Square
3
25
2.9783549783549800
Square
4
25
3.1705069124424000
Square
5
25
3.323671497584540
AVERAGE


3.1594824636076
Square
1
50
2.8666666666666700
Square
2
50
2.991304347826090
Square
3
50
2.8666666666666700
Square
4
50
3.2
Square
5
50
3.602094240837700
AVERAGE


3.10534638439943
Square
1
75
2.8786610878661100
Square
2
75
3.0442477876106200
Square
3
75
2.5864661654135300
Square
4
75
2.8907563025210100
Square
5
75
2.301003344481610
AVERAGE


2.74022693757858
Square
1
100
1.0766823161189400
Square
2
100
1.2531876138433500
Square
3
100
1.1505016722408000
Square
4
100
0.9234899328859060
Square
5
100
0.9424657534246580
AVERAGE


1.06926545770273


Shape
Trial
%Noise
SNR
Triangle
C
0
Triangle
1
25
1.6015831134564600
Triangle
2
25
1.5524296675191800
Triangle
3
25
1.5251256281407000
Triangle
4
25
1.4050925925925900
Triangle
5
25
1.3733031674208100
AVERAGE


1.49150683382595
Triangle
1
50
0.6692392502756340
Triangle
2
50
0.7082847141190200
Triangle
3
50
0.7183431952662720
Triangle
4
50
0.640295358649789
Triangle
5
50
0.7149587750294460
AVERAGE


0.690224258668032
Triangle
1
75
0.4967266775777410
Triangle
2
75
0.4963205233033520
Triangle
3
75
0.6112789526686810
Triangle
4
75
0.5409982174688060
Triangle
5
75
0.48951612903225800
AVERAGE


0.526968100010168
Triangle
1
100
0.40066006600660100
Triangle
2
100
0.41746905089408500
Triangle
3
100
0.4118046132971510
Triangle
4
100
0.40683646112600500
Triangle
5
100
0.39986824769433500
AVERAGE


0.407327687803635