summaryrefslogtreecommitdiff
path: root/macros/copymakeborder.sci
blob: 3f1d567f0e8502ba45301b24fb8738de982bbd01 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
function new_image = copymakeborder(image, top, bottom, left, right, borderType, varargin)
	
	[lhs, rhs] = argn(0)
	
	image_list = mattolist(image)
	
	select rhs
		case 6 then
			out = opencv_copymakeborder(image_list, top, bottom, left, right, borderType)
		
		case 7 then
			out = opencv_copymakeborder(image_list, top, bottom, left, right, borderType, varargin(1))
	end
	
	sz = size(out)
	for i = 1 : sz
		new_image(:, :, i) = out(i)
	end
			
endfunction