mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Fixed mingw build.
This commit is contained in:
@@ -112,12 +112,11 @@ int main(int argc, const char ** argv)
|
||||
|
||||
vector<Point2f> mpts_1, mpts_2;
|
||||
matches2points(matches_popcount, kpts_1, kpts_2, mpts_1, mpts_2); //Extract a list of the (x,y) location of the matches
|
||||
vector<uchar> outlier_mask;
|
||||
vector<char> outlier_mask;
|
||||
Mat H = findHomography(mpts_2, mpts_1, RANSAC, 1, outlier_mask);
|
||||
|
||||
Mat outimg;
|
||||
drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1),
|
||||
*(const vector<char>*)(void*)(&outlier_mask));
|
||||
drawMatches(im2, kpts_2, im1, kpts_1, matches_popcount, outimg, Scalar::all(-1), Scalar::all(-1), outlier_mask);
|
||||
imshow("matches - popcount - outliers removed", outimg);
|
||||
|
||||
Mat warped;
|
||||
|
||||
@@ -164,7 +164,7 @@ static void findConstrainedCorrespondences(const Mat& _F,
|
||||
{
|
||||
Point2f p1 = keypoints1[i].pt;
|
||||
double bestDist1 = DBL_MAX, bestDist2 = DBL_MAX;
|
||||
int bestIdx1 = -1, bestIdx2 = -1;
|
||||
int bestIdx1 = -1;//, bestIdx2 = -1;
|
||||
const float* d1 = descriptors1.ptr<float>(i);
|
||||
|
||||
for( int j = 0; j < (int)keypoints2.size(); j++ )
|
||||
@@ -203,14 +203,14 @@ static void findConstrainedCorrespondences(const Mat& _F,
|
||||
if( dist < bestDist1 )
|
||||
{
|
||||
bestDist2 = bestDist1;
|
||||
bestIdx2 = bestIdx1;
|
||||
//bestIdx2 = bestIdx1;
|
||||
bestDist1 = dist;
|
||||
bestIdx1 = (int)j;
|
||||
}
|
||||
else if( dist < bestDist2 )
|
||||
{
|
||||
bestDist2 = dist;
|
||||
bestIdx2 = (int)j;
|
||||
//bestIdx2 = (int)j;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -632,7 +632,7 @@ int main(int argc, char* argv[])
|
||||
Mat img_warped, img_warped_s;
|
||||
Mat dilated_mask, seam_mask, mask, mask_warped;
|
||||
Ptr<Blender> blender;
|
||||
double compose_seam_aspect = 1;
|
||||
//double compose_seam_aspect = 1;
|
||||
double compose_work_aspect = 1;
|
||||
|
||||
for (int img_idx = 0; img_idx < num_images; ++img_idx)
|
||||
@@ -648,7 +648,7 @@ int main(int argc, char* argv[])
|
||||
is_compose_scale_set = true;
|
||||
|
||||
// Compute relative scales
|
||||
compose_seam_aspect = compose_scale / seam_scale;
|
||||
//compose_seam_aspect = compose_scale / seam_scale;
|
||||
compose_work_aspect = compose_scale / work_scale;
|
||||
|
||||
// Update warped image scale
|
||||
|
||||
Reference in New Issue
Block a user