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
|