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

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