


function spec = tkNewFenceCalibObject( spec ) This function adds fields to the given structure that specify fence posts given a set of pts on an image for the posts.


0001 function spec = tkNewFenceCalibObject( spec ) 0002 % function spec = tkNewFenceCalibObject( spec ) 0003 % This function adds fields to the given structure 0004 % that specify fence posts given a set of pts on 0005 % an image for the posts. 0006 0007 if (nargin == 0) || isempty( spec ) 0008 spec = struct; 0009 end 0010 0011 % three fence posts, we'll set such that they 0012 % are aligned at z = 0 plane. then take y = upwards, 0013 % so then x = to right 0014 % | | | 0015 % posts are clicked bottom-top, left right 0016 X = [0 0 10 10 20 20]'; 0017 Y = [0 3.16 0 3.16 0 3.16]'; 0018 Z = [0 0 0 0 0 0]'; 0019 spec.xyz = [X Y Z];