I want to join the vertical and horizontal edges together to get all edges in an image in order to use it for the Harris Corner detection.
I'm using Sobel filters to get vertical and horizontal edges:
I = imread('CleanFingerprint.jpg'); // read the image
I = im2double(I); // convert it to double
G = rgb2gray(I); // convert it to gray
vert = [-1 -2 -1;
0 0 0;
1 2 1]* 0.25; // vertical filter
hor = [-1 0 1;
-2 0 2;
-1 0 1]* 0.25; // horizontal filter
OutputV = conv2(G, vert); // applying the filter to the image
OutputH = conv2(G, hor);
It's working great. Then whenI try to join them together, and I use this formula:
// sqrt((OutputV^2) + (OutputH^2))
Output = OutputV ^2;
Output1 = OutputH ^2;
Output2 = Output + Output1;
Output3 = sqrt(Output2);
I get a very strange image. Any Suggestions