Which is more computationally efficient: DoG or Sobel + Magnitude
I would like to do crude edge detection. Which of the following techniques would be faster/more computationally efficient?
Technique 1:
GaussianBlur()
image with kernel5,5
.GaussianBlur()
image with kernel11,11
.Subtract the 2 images
- Benefits of this technique; less noise/eliminates smaller/weaker edges. Anything else?
- Cons of this technique; less accurate
Technique 2:
Sobel()
image to get horizontal edgesSobel()
image to get vertical edgesmagnitude()
to get edge strengths- Benefits of this technique; more accurate
- Cons of this technique; more noise/shows weaker edges
Why don't you try it? It's only a few lines of code. THIS tutorial shows how to time operations.
For best accuracy, create the Mat objects ahead of time, run the operation once, start the timer, run it 1000 times, and stop the timer.