I am a newbie in Image processing world and I have a problem statement which I need a head start to solve it.
Problem Statement:
I have an i
Considering you have a dictionary of shapes, you could template matching to find which shape is where in your image. Template matching is fairly simple: you compute a "goodness of fit" measure such as correlation, mean squared error, etc. for the shape and the image, with the shape positioned at every point in your image. See for example these lecture notes. If you use correlation (which makes sense in this case), you can use the FFT to speed up computation significantly. Look for example at this OpenCV tutorial.
The above assumes that the templates are at the same scale and orientation as shown in the image. If the sizes can differ, you need to use a multi-scale template matching approach, which I is slightly more involved but not difficult. Simply try to match each shape multiple times, at different scales and orientations. Or rotate and scale your image. I presume that, given your examples, you only need to test 4 orientations and 1 scale, so this is a reasonable approach.
The more flexible approach is to detect the dots (use e.g. template matching for that), flood-fill around the dots to fill the shape (assuming that they are all simple polygons), and extract the boundary of the detected area. That boundary can then be matched to the ones in your dictionary using e.g. Fourier descriptors. This would allow you to detect the shapes at arbitrary scales and orientations.