projects
/
platform
/
upstream
/
opencv.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b88ad7f
)
need atleast 4 corresponding points to calculate homography
author
Aitik Gupta
<aitikgupta@gmail.com>
Mon, 28 Sep 2020 19:34:01 +0000
(
01:04
+0530)
committer
Aitik Gupta
<aitikgupta@gmail.com>
Mon, 28 Sep 2020 19:34:01 +0000
(
01:04
+0530)
modules/calib3d/src/fundam.cpp
patch
|
blob
|
history
diff --git
a/modules/calib3d/src/fundam.cpp
b/modules/calib3d/src/fundam.cpp
index ebfd3af992d5cda8fb6374f941e1cf2b578b46bd..3c1b0ce00d18ccd64b9fd7a5eb133f1507722fb4 100644
(file)
--- a/
modules/calib3d/src/fundam.cpp
+++ b/
modules/calib3d/src/fundam.cpp
@@
-374,6
+374,9
@@
cv::Mat cv::findHomography( InputArray _points1, InputArray _points2,
return Mat();
convertPointsFromHomogeneous(p, p);
}
+ // Need at least 4 point correspondences to calculate Homography
+ if( npoints < 4 )
+ CV_Error(Error::StsVecLengthErr , "The input arrays should have at least 4 corresponding point sets to calculate Homography");
p.reshape(2, npoints).convertTo(m, CV_32F);
}