Changeset 993 for trunk/src/geometry_calib.m
 Timestamp:
 Feb 6, 2017, 11:29:01 AM (7 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/src/geometry_calib.m
r977 r993 856 856 grid_input=CalibData.grid;%retrieve the previously used grid 857 857 end 858 [T,CalibData.grid,CalibData.grid.CheckWhite ]=create_grid(grid_input,'detect_grid');%display the GUI create_grid, read the set of phys coordinates T858 [T,CalibData.grid,CalibData.grid.CheckWhite,CalibData.grid.FilterWindow]=create_grid(grid_input,'detect_grid');%display the GUI create_grid, read the set of phys coordinates T 859 859 set(handles.geometry_calib,'UserData',CalibData)%store the phys grid parameters for later use 860 860 X=[CalibData.grid.x_0 CalibData.grid.x_1 CalibData.grid.x_0 CalibData.grid.x_1]';%corner absissa in the phys coordinates (cm) … … 907 907 Amod=double(Amod);%case of black grid markers: will look for image minima 908 908 end 909 910 %%%%%%filterfor i;proved detection of dots 911 if ~isequal(CalibData.grid.FilterWindow,0) 912 %definition of the cos shape matrix filter 913 FilterBoxSize_x=CalibData.grid.FilterWindow; 914 FilterBoxSize_y=CalibData.grid.FilterWindow; 915 ix=1/2FilterBoxSize_x/2:1/2+FilterBoxSize_x/2;% 916 iy=1/2FilterBoxSize_y/2:1/2+FilterBoxSize_y/2;% 917 %del=np/3; 918 %fct=exp((ix/del).^2); 919 fct2_x=cos(ix/((FilterBoxSize_x1)/2)*pi/2); 920 fct2_y=cos(iy/((FilterBoxSize_y1)/2)*pi/2); 921 %Mfiltre=(ones(5,5)/5^2); 922 Mfiltre=fct2_y'*fct2_x; 923 Mfiltre=Mfiltre/(sum(sum(Mfiltre)));%normalize filter 924 925 if ndims(Amod)==3 926 Amod=filter2(Mfiltre,sum(Amod,3));%filter the input image, after summation on the color component (for color images) 927 else 928 Amod=filter2(Mfiltre,Amod); 929 end 930 end 931 %%%%%%%%%%%%%% 932 909 933 910 934 %% detection of local image extrema in each direction
Note: See TracChangeset
for help on using the changeset viewer.