Today ,I wrote a program for edge detection in Bitmap Image using Sobel Operator.Sobel operator is a descrete operator defined by Sobel.It has the horizontal & vertical derivative which has different values which are basically 3*3 matrix.These derivatives are convolved with image data & Then produces edge detected image.First of all we should copy image data into an array.then this image data convolved with
horizontal & vertical derivatives.Here is the input & output images for the program :-
Here ,We need to discuss some more issues which occurred during programming which are following:-
1)We must take an unsigned char array for storing image data information.
2)Sobel Operator must stored in integer array because they have some negative values.
3)We should use abs function for calculating the gradient magnitude which is available in math.h header file.
Input Color Image |
Output Edge Detected Image |
1)We must take an unsigned char array for storing image data information.
2)Sobel Operator must stored in integer array because they have some negative values.
3)We should use abs function for calculating the gradient magnitude which is available in math.h header file.
No comments:
Post a Comment