# Revision history [back]

### check ransac outlier before perspectiveTransform ?

Hello guys,

I would like to draw in the image outlier found by ransac with the classic method:

H = findHomography( obj, scene, CV_RANSAC );


I saw in a snippet one can do something like:

Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
for( size_t i1 = 0; i1 < points1.size(); i1++ ) {
if( norm(points2[i1] - points1t.at<Point2f>((int)i1,0)) <= maxInlierDist ) // inlier
}


But I don't understand why we need to call perspectiveTransform to find out which are the outlier if the outlier themself are calculted with the precedent istruction (findHomography) ?

### check ransac outlier before perspectiveTransform ?

Hello guys,

I would like to draw in the image outlier found by ransac with the classic method:

H = findHomography( obj, scene, CV_RANSAC );


I saw in a snippet one can do something like:

Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
for( size_t i1 = 0; i1 < points1.size(); i1++ ) {
if( norm(points2[i1] - points1t.at<Point2f>((int)i1,0)) <= maxInlierDist ) // inlier
}


But I don't understand why we need to call perspectiveTransform perspectiveTransform to find out which are the outlier if the outlier themself are calculted with the precedent istruction (findHomography) ?

### check ransac outlier before perspectiveTransform ?

Hello guys,

I would like to draw in the image outlier outliers found by ransac with the classic method:

H = findHomography( obj, scene, CV_RANSAC );


I saw in a snippet one can do something like:

Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
for( size_t i1 = 0; i1 < points1.size(); i1++ ) {
if( norm(points2[i1] - points1t.at<Point2f>((int)i1,0)) <= maxInlierDist ) // inlier
}


But I don't understand why we need to call perspectiveTransform to find out which are the outlier if the outlier themself are calculted with the precedent istruction (findHomography) ? 4 retagged sturkmen 6772 ●3 ●48 ●79 https://github.com/stu...

### check ransac outlier before perspectiveTransform ?

Hello guys,

I would like to draw outliers found by ransac with the classic method:

H = findHomography( obj, scene, CV_RANSAC );


I saw in a snippet one can do something like:

Mat points1t; perspectiveTransform(Mat(points1), points1t, H12);
for( size_t i1 = 0; i1 < points1.size(); i1++ ) {
if( norm(points2[i1] - points1t.at<Point2f>((int)i1,0)) <= maxInlierDist ) // inlier

But I don't understand why we need to call perspectiveTransform to find out which are the outlier if the outlier themself are calculted with the precedent istruction (findHomography) ?