You should use the SimpleBlobDetector class in OpenCV 2.4. You pretty much create an object of type SimpleBlobDetector
and then call the detect(cv::Mat input, vector<cv::KeyPoint> keypoints, cv::Mat mask)
function with a cv::Mat image as input, an empty vector for keypoints, and another cv::Mat as an optional mask for a specific area of the image to look for keypoints in.
Note that the cv::Mat object has taken over image and matrix storage duty for all of the formerly separate image and matrix classes in the earlier releases of OpenCV.