summaryrefslogtreecommitdiff
path: root/macros/corner.sci
blob: b86a75e4572f7fbaefacd060a8e009126e08d49a (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
// This function detects corner in image I and returns it in the matrix C

function[C] = corner(I, varargin)

	[lhs, rhs] = argn(0)
	
	if rhs == 2 then
		error(msprintf("No of input cannot be 2"))
	end
	
	srcMat = mattolist(I)
	select rhs 
		case 1 then
			out = opencv_corner(srcMat)
			
		case 3 then 
			out = opencv_corner(srcMat, varargin(1), varargin(2))
	end
	
	channels = size(out)
	
	for i = 1:channels
		C(:,:,i) = out(i)
	end
	
endfunction