Reputation: 881
My quest is to gather information on edges that a particular image has for the purpose of content based image retrieval.
What I have in mind is :
a. apply Gaussian filter to soften/blurr the image.
b. apply Scharr function for sharpening it.
c. apply canny edge detection
d. somehow extract information on edges that are 0, 45, 90 and 135. (Hough Transform, maybe?)
Does anybody have a suggestion on what I have so far planned and how I can extract the information on the edges?
Thanks!
Upvotes: 2
Views: 1086
Reputation: 1001
Why make it complicated? At first: The canny operator already includes blurring, why do want to preblur the image? Also sharpening is not necessary for edge detection.
You can use the Sobel operator to calculate the direction the detected edges. To do so, you first need to apply the filter in x and y direction and then calculate for each edge pixel the orientation angle θ θ = atan(Gy/Gx)
where Gy is the pixel in the vertical edge map and Gx is the pixel in the horizontal edge map.
Upvotes: 1