0001 function [I,pixx,pixy,pixx1,pixy1] = pixFill(I,pixx,pixy,LineStrength,ColSpec)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020 if ~std(pixx)
0021 pixx1 = pixx + LineStrength/2;
0022 pixx = pixx - LineStrength/2;
0023 pixy1 = pixy;
0024 elseif ~std(pixy)
0025 pixy1 = pixy + LineStrength/2;
0026 pixy = pixy - LineStrength/2;
0027 pixx1 = pixx;
0028 else
0029 pixx1 = pixx + LineStrength/2;
0030 pixx = pixx - LineStrength/2;
0031 pixy1 = pixy + LineStrength/2;
0032 pixy = pixy - LineStrength/2;
0033 end
0034 pixx1 = round(pixx1); pixx = round(pixx);
0035 pixy1 = round(pixy1); pixy = round(pixy);
0036 for i5 = 1:numel(pixx)
0037 I(pixy(i5):pixy1(i5),pixx(i5),1) = ColSpec(1);
0038 I(pixy(i5),pixx(i5):pixx1(i5),1) = ColSpec(1);
0039 I(pixy(i5):pixy1(i5),pixx(i5),2) = ColSpec(2);
0040 I(pixy(i5),pixx(i5):pixx1(i5),2) = ColSpec(2);
0041 I(pixy(i5):pixy1(i5),pixx(i5),3) = ColSpec(3);
0042 I(pixy(i5),pixx(i5):pixx1(i5),3) = ColSpec(3);
0043 end