Depending on your problem, a good approach to this problem might be to use the Hough Transform and its entire derived algorithm.
It consists in converting the image space to another space, where the coordinate represents the parameters of the objects (the angle and the starting point for the line, the center coordinates and the radius for the circle)
The algorithm converts every point in your array of points into points in another space. Then you need to search in a new space if some points prevail. From these points you will get the parameters of your object.
Of course, you need to do this once to recognize the lines (so that you will know how many lines are in your bitmap and where they are), and it will recognize the circles (this is not exactly the same algorithm)
You can take a look at this lecture (for the Hough Circle Transform transform), but you can easily find the algorithm for the string
EDIT: you can also look at these answers
Shape recognition algorithm
Geometric detection of an object in an image
source share