I’m using android openCV and I want to detect triangle, rectangle and circle in an image. So I do it as follow: Canny => findContours => approxPolyDP and get this image:

However, the result of approxPolyDP contains so many vertices so I can’t determine which shape is it. To eliminate the vertices, I want to detect lines in each contours and find their intersections. How can I do that for a single contour?
For circles detection, use HoughCircles.
Then here you are just looking for simplified polygons (triangles and squares). Have you tried tweaking epsilon in approxPolyDP?
Here is an example snippet from the openCV squares.cpp sample code – see how approximation accuracy (epsilon, the third parameter of approxPolyDP), is set relative to the size of the contour.
C++ code, but the openCV interface should be the same, so I’m sure it’s straightforward to adapt to your environment.