Home > Source > Tests > test2.m

test2

PURPOSE ^

Roy test2

SYNOPSIS ^

This is a script file.

DESCRIPTION ^

 Roy test2

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 % Roy test2
0002 
0003 path(path,'/home/S00/schestr0/');
0004 path(path,'/home/S00/schestr0/NRR_Smith');
0005 
0006 % Save JPEGs under:
0007 % /home/S00/schestr0/public_html/
0008 
0009 % Test: control points in make_1d_images
0010 
0011 figure(1);
0012 hold on;
0013 title('Initial control points');
0014 unwarped_points = (1:50)';
0015 plot(unwarped_points);
0016 hold off;
0017 
0018 % Test: is_invalid
0019 
0020 is_invalid(unwarped_points); % gives flase
0021 unwarped_points(10)=11;
0022 is_invalid(unwarped_points); % gives true
0023 
0024 % Test: setup_grid
0025 
0026 [a,bump_images,image_control_points,d,e]=make_1d_images(1,50,0.1);
0027 
0028 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'overlap_grid', 20);
0029 
0030 figure(2);
0031 hold on;
0032 title('Overlap Grid - grid');
0033 plot(grid);
0034 hold off;
0035 
0036 figure(3);
0037 hold on;
0038 title('Overlap Grid - steps');
0039 plot(steps);
0040 hold off;
0041 
0042 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'grid', 20);
0043 
0044 figure(4);
0045 hold on;
0046 title('Grid placement - grid');
0047 plot(grid);
0048 hold off;
0049 
0050 figure(5);
0051 hold on;
0052 title('Grid placement - steps');
0053 plot(steps);
0054 hold off;
0055 
0056 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'random', 20);
0057 
0058 figure(6);
0059 hold on;
0060 title('Random placement - grid');
0061 plot(grid);
0062 hold off;
0063 
0064 figure(7);
0065 hold on;
0066 title('Random placement - steps');
0067 plot(steps);
0068 hold off;
0069 
0070 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'random_and_scale', 20);
0071 
0072 figure(8);
0073 hold on;
0074 title('Random and Scale placement - grid');
0075 plot(grid);
0076 hold off;
0077 
0078 figure(9);
0079 hold on;
0080 title('Random and Scale placement - steps');
0081 plot(steps);
0082 hold off;
0083 
0084 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'edge', 20);
0085 
0086 figure(10);
0087 hold on;
0088 title('Edge placement - grid');
0089 plot(grid);
0090 hold off;
0091 
0092 figure(11);
0093 hold on;
0094 title('Edge placement - steps');
0095 plot(steps);
0096 hold off;
0097 
0098 [grid, steps] = setup_grid(50, bump_images, image_control_points, 'edge_and_scale', 20);
0099 
0100 figure(12);
0101 hold on;
0102 title('Edge and Scale placement - grid');
0103 plot(grid);
0104 hold off;
0105 
0106 figure(13);
0107 hold on;
0108 title('Edge and Scale placement - steps');
0109 plot(steps);
0110 hold off;
0111 
0112 
0113 % Test: normalise_to_bounds
0114 
0115 figure(14);
0116 hold on;
0117 title('Original bump and normalised bump (0.1 to 0.3)');
0118 plot(bump_images);
0119 normalised_bump = normalise_to_bounds(bump_images, 0.1, 0.3);
0120 plot(normalised_bump,'R');
0121 hold off;

Generated on Thu 13-May-2004 18:00:46 by m2html © 2003