Changeset 62 for trunk/src/geometry_calib.m
- Timestamp:
- Mar 24, 2010, 12:36:53 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/geometry_calib.m
r61 r62 929 929 data=read_geometry_calib(Coord_cell); 930 930 nbpoints=size(data.Coord,1); %nbre of calibration points 931 if nbpoints <4932 msgbox_uvmat('ERROR','four points must be selected by the mouse to delimitate the detectionarea')931 if nbpoints~=4 932 msgbox_uvmat('ERROR','four points must be selected by the mouse, beginning by the new x axis, to delimitate the phs grid area') 933 933 end 934 934 corners_X=(data.Coord(end-3:end,4)); %pixel absissa of the four corners 935 935 corners_Y=(data.Coord(end-3:end,5)); 936 937 %reorder the last two points if needed 938 angles=angle((corners_X-corners_X(1))+i*(corners_Y-corners_Y(1)); 939 if abs(angles(4)-angles(2))>abs(angles(3)-angles(2)) 940 X_end=corners_X(4); 941 Y_end=corners_Y(4); 942 corners_X(4)=corners_X(3); 943 corners_Y(4)=corners_Y(3); 944 corners_X(3)=X_end; 945 corners_Y(3)=Y_end; 946 end 936 947 937 948 %read the current image
Note: See TracChangeset
for help on using the changeset viewer.