How to Detect Color of a detected blob?

since you already have the location and the size, you can sample the mean from a rectangular crop, centered around the keypoint position:

 Point p = keypoints[i].pt;
 int w = keypoints[i].size;
 Rect r(p.x-w/2, p.y-w/2, w, w);
 Scalar m,d; // mean and stddev
 meanStdDev( img(r), m, d);
1 Like