I'm trying to access the coordinates of keypoints picked up from an image by SimpleBlobDetect. As per here my code is as follows:
vector<KeyPoint> keypoints;
float kpt_x, kpt_y;
for(int i=0; i<=keypoints.size(); i++)
{
kpt_x = keypoints[i].pt.x;
kpt_y = keypoints[i].pt.y;
}
But this throws a segfault on each line within the for loop. Why? Is this the correct way of accessing keypoint coordinates?