OpenCV Q&A Forum - RSS feedhttp://answers.opencv.org/questions/OpenCV answersenCopyright <a href="http://www.opencv.org">OpenCV foundation</a>, 2012-2018.Wed, 24 Oct 2012 17:47:08 -0500Detecting thick edgeshttp://answers.opencv.org/question/3454/detecting-thick-edges/How can I detect thick edges in an image, without detecting double edges?
How can I get from this
![image description](/upfiles/13511185114718235.png)
as close as possible to this:
![image description](/upfiles/13511185581347072.png)
I realise why Canny, Sobel or Laplace will not work in this case. They will all find two edges, from black to white, and from white to black. If I only want to get one central edge, is there another approach I can use?
HugoRuneWed, 24 Oct 2012 17:47:08 -0500http://answers.opencv.org/question/3454/Weird result while finding anglehttp://answers.opencv.org/question/234/weird-result-while-finding-angle/Hi
I wanted to find the angle of a curve at every pixel. For that, I applied canny edge detection. For test image, i took a filled rectangle. So obviously, canny edge result is just a rectangle.
Then i applied Sobel derivative in x and y direction and to find the angle, i took **arctan(dy/dx)**. ( dx = dx+0.001 to avoid divide by zero)
**For vertical side, i got an angle of 0** which is true since dy=0 in vertical direction and dx is some high value.
**But for horizontal side also, i got zero.** I don't understand why. When i took its corresponding dx,dy values, dx = 0.001... and **dy = 0**. Isn't it wrong to get dy = 0 on the horizontal side of the rectangle?
I checked the dy image, and it clearly shows the top and bottom sides of the rectangle. **But still, why dy = 0 on that side?**
Below is my dx image:
![image description](/upfiles/13419390596711553.png)
My dy image:
![image description](/upfiles/13419390788350963.png)
Abid Rahman KTue, 10 Jul 2012 11:52:57 -0500http://answers.opencv.org/question/234/