blob: b2d48d076a2db60bf19c8a5ecb7b7505f507f3e6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
function [isepi, varargout ] = isEpipoleInImage(fundamental_matrix, imagesize)
// Find whether image contains epipole.
//
// Calling Sequence
// isepi = isEpipoleInImage(F, imagesize)
// [isepi, epipole] = isEpipoleInImage(F, imagesize)
//
// Parameters
// F : A 3 * 3 fundamental matrix computed from stereo images. It should be double or single
// imagesize : The size of the image
// isepi : Logical value true / false denoting whether the image contains epipole
// epipole : Location of the epipole. It is 1 * 2 vector.
//
// Description
// The function determines whether the image with fundamental matrix F contains the epipole or not. It also gives the position of the epipole.
//
// Examples
// F = estimateFundamentalMatrix(matchedPoints1, matchedPoints2)
// imageSize = [200 300]
// isepi = isEpipoleInImage(F, imagesize)
// [isepi, epipole] = isEpipoleInImage(F, imagesize)
//
// Authors
// Suraj Prakash
[ lhs, rhs ] = argn(0)
if lhs > 2 then
error(msprintf("Too many output arguments"));
end
/// If there is more than one output parameter
[rows cols] = size(fundamental_matrix)
if rows ~= 3 | cols ~=3 then
error(msprintf("Invalid size of fundamental matrix\n"));
end
[rows1 col2] = size(imagesize)
if rows1 ~=1 | cols ~= 2 then
error(msprintf("Invalid image size matrix\n"));
end
if lhs == 2 then
[isepi, temp ] = opencv_isEpipoleInImage(fundamental_matrix, imagesize);
varargout(1) = temp;
/// if there is only one output parameter
else
isepi = opencv_isEpipoleInImage(fundamental_matrix, imagesize);
end
endfunction
|