Ok after some trial and error I appear to have solved this issue now.
I have changed the drawMatches method to swap the "roiImg" and key points with "compare" and key points.
drawMatches(compare, keypoints_scene, roiImg, keypoints_object,
good_NNmatches, img_matches, Scalar::all(-1), Scalar::all(-1),
vector<char>(), DrawMatchesFlags::NOT_DRAW_SINGLE_POINTS );
This stopped the assertion error. But due to swapping the values around when it came to retrieving the key points I also had to make some changes. trainIdx and queryIdx have also been swapped to account for the previous changes made.
obj.push_back( keypoints_object[ good_NNmatches[i].trainIdx ].pt );
scene.push_back( keypoints_scene[ good_NNmatches[i].queryIdx ].pt );