-
Notifications
You must be signed in to change notification settings - Fork 7
/
BatchFaceColorGrad.m
executable file
·28 lines (23 loc) · 1.03 KB
/
BatchFaceColorGrad.m
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
27
28
%% function [FaceColorT, FaceVisibleM] = BatchFaceColorGrad(FM, VM, CamParamSA, ...
% ScreenSizeV, zoomFactor, TestImageA, ImageMaskA, channelModFactor, zNearFarV)
%
% This function will use OpenGL to render a set of triangular faces (defined by FM and VM arrays)
%
function [FaceColorT, FaceVisibleM] = BatchFaceColorGrad(FM, VM, CamParamSA, ...
ScreenSizeV, zoomFactor, TestImageA, ImageMaskA, channelModFactor, zNearFarV)
MexGlutInit;
%% Check the input data type
imageNum = length(TestImageA);
for ii = 1 : imageNum
if (~isa(TestImageA{ii}, 'uint8'))
error('Offscreen:BatchFaceColorGrad:Wrong Input Type', 'Input image should be uint8');
end
if (~isa(ImageMaskA{ii}, 'uint8'))
error('Offscreen:BatchFaceColorGrad:Wrong Input Type', 'Mask image should be uint8');
end
end
if (~isa(FM, 'double'))
FM = double(FM);
end
[FaceColorT, FaceVisibleM] = BatchFaceColorGradImpl(FM, VM, CamParamSA, ...
ScreenSizeV, zoomFactor, TestImageA, ImageMaskA, channelModFactor, zNearFarV);