source: trunk/src/read_geometry_calib.m @ 71

Last change on this file since 71 was 71, checked in by sommeria, 11 years ago

civ3D updated: introduction of image size
imadoc2struct: reding of image size from the xml file
set_object, view_field and related functions: improvement of projection object editing
mouse: possibility of adjusting the calibrations points with the mouse

File size: 1.3 KB
Line 
1%'read_geometry_calib': read data on the GUI geometry_calib
2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
3function data=read_geometry_calib(Coord_cell)
4nb_defining_points=length(Coord_cell);
5iline=0;
6data.Coord=[];%default
7for i=1:nb_defining_points
8    coord_str=Coord_cell{i};%character string of line number i
9    k=findstr('|',coord_str);%find separators '|'
10    if length(k)>=4 % test for separators '|'
11        data1=str2num(coord_str(1:k(1)-5));
12        data2=str2num(coord_str(k(1)+5:k(2)-5));
13        data3=str2num(coord_str(k(2)+5:k(3)-5));
14        data4=str2num(coord_str(k(3)+5:k(4)-5));
15        data5=str2num(coord_str(k(4)+5:end));
16        if ~isempty(data1)||~isempty(data2)||~isempty(data3)||~isempty(data4)||~isempty(data5)
17            iline=iline+1;
18            if ~isempty(data1)
19                data.Coord(iline,1)=data1;
20            end   
21            if ~isempty(data2)
22                data.Coord(iline,2)=data2;
23            end
24            if ~isempty(data3)
25                data.Coord(iline,3)=data3;
26            end
27            if ~isempty(data4)
28                data.Coord(iline,4)=data4;
29            end
30            if isempty(data5)
31                data.Coord(iline,5)=0;
32            else
33                data.Coord(iline,5)=data5;
34            end
35        end
36    end
37end
38data.Style='points';
Note: See TracBrowser for help on using the repository browser.