% cb_points are a matrix of chessboard points coordinates
fucntion ok = projectAndDraw(img,cb_points,K,R,T,Distortion,d_c) if nargin==5 Distortion = 0; img_p = projectPoints(cb_points,K,R,T); else img_p = projectPoints(cb_points,K,R,T,Distortion, d_c); end image = imread(img); imshow(image) hold on if Distortion ==0 % Draw projected points in read
plot(img_p(1,:),img_p(2,:),'r.'); else % Draw projected points in blue
plot(img_p(1,:),img_p(2,:),'b.'); end hold off ok = 1 this is how I call it in the main function. ok = projectAndDraw('00000.jpg',X_1,KK,Rc_1,Tc_1); I don't know what is the error? Thanks for help!
MATLAB: Attempt to execute SCRIPT projectAndDraw as a function: Error
error script funcion
Best Answer