I would like to implement an algorithm which will find the bounding rectangles of contours (already determined by another algorithm). The only thing I have is a binarized image (as shown below). The basic idea would be to :
take something like this - a preprocessed binarized image
and produce something like this
Check out connected component labeling: http://en.wikipedia.org/wiki/Connected-component_labeling . You can either find connected components of white pixels or black pixels in this case (White is computationally easier since you have fewer white points in the image).