summaryrefslogtreecommitdiff
path: root/macros/integralImage.sci~
blob: cc528a01bc00474a6ef2a9493eed8e1dd6108143 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
unction[dstMat] = integralImage(srcImg, varargin)
	
	[lhs, rhs] = argn(0)
	
	srcMat = mattolist(srcImg)

	select rhs
		case 1 then
			out = opencv_integralImage(srcMat)
		case 3 then
			out = opencv_integralImage(srcMat, varargin(1))
	end
	
	channel = size(out)
	
	for i = 1: channel
		dstMat(:,:,i) = out(i)
	end
	
endfunction