Search
Find your data in the assignment '00data: Your data' in the submission system; the image daliborka_01.jpg and the set of seven 2D points U2.
daliborka_01.jpg
U2
Make Matlab script hw01.m to do the following.
hw01.m
subfig.m
img = imread( 'daliborka_01.jpg' ); % load the image subfig(2,2,1); % create a new figure image( img ); % display the image, keep axes visible axis image % display it with square pixels
[x,y] = ginput(7)
u
u(:,1)
round
01_daliborka_points.png
imwrite(img, '01_daliborka_points.png');
A
u2
A = estimate_A( u2, u ); % u2 and u are 2xn matrices
nchoosek(1:n, 3 )
Ai
U
n = size(u,2); % number of columns
% assume we have points in ''u'' and points ''u2'' transferred by ''A'' in ''ux'' e = 100 * ( ux - u ); % magnified error displacements ... hold on % to plot over the image ... plot( u(1,4), u(2,4), 'o', 'linewidth', 2, 'color', 'magenta' ) % the 4-th point plot( [ u(1,4) u(1,4)+e(1,4) ], [ u(2,4) u(2,4)+e(2,4) ], 'r-', 'linewidth', 2 ); % the 4-th error ... hold off
01_daliborka_errs.pdf
fig2pdf.m
fig2pdf( gcf, '01_daliborka_errs.pdf' )
01_points.mat
save( '01_points.mat', 'u', 'A' )
Upload an archive containing the following files:
estimate_A.m
Note: All files must be in the same directory. Do not use any subdirectories.