Basically, the idea is to draw the detect circle filled. Therefore, you have a mask. After, just copy your original image into the destination.
// center and radius are the results of HoughCircle
// mask is a CV_8UC1 image with 0
cv::Mat mask = cv::Mat::zeros( img.rows, img.cols, CV_8UC1 );
circle( mask, center, radius, Scalar(255,255,255), -1, 8, 0 ); //-1 means filled
img.copyTo( dst, mask ); // copy values of img to dst if mask is > 0.
You will find the doc here:
circle and
CopyTo
You could also apply a ROI before copying image to reduce their size:
cv::Mat roi( img, cv::Rect( center.x-radius, center.y-radius, radius*2, radius*2 ) );
I personally havent used hough circles, so I dont exactly know how they work/look like internally. But the general idea for your task is like here I guess: http://stackoverflow.com/questions/10632195/define-image-roi-with-opencv-in-c Although you will need to convert it to c++ style. The important thing is to create a Mask that represents your circle and use this mask with bitwise_and(img, img, dst_img, mask)