Changeset 413 for trunk/src/civ.m
- Timestamp:
- May 8, 2012, 2:27:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/civ.m
r412 r413 3937 3937 3938 3938 %------------------------------------------------------------------------ 3939 % --- Executes on button press in TestCiv1: display image correlation function 3939 % --- Executes on button press in TestCiv1: prepare the image correlation function 3940 % activated by mouse motion 3940 3941 function TestCiv1_Callback(hObject, eventdata, handles) 3941 3942 %------------------------------------------------------------------------ 3942 set(handles.TestCiv1,'BackgroundColor',[1 1 0])3943 3943 drawnow 3944 3944 if get(handles.TestCiv1,'Value') 3945 ref_i=str2double(get(handles.ref_i,'String')); 3945 set(handles.TestCiv1,'BackgroundColor',[0.7 0.7 0.7])% paint TestCiv1 button to grey to confirm civ launch 3946 ref_i=str2double(get(handles.ref_i,'String'));% read reference i index 3946 3947 if strcmp(get(handles.ref_j,'Visible'),'on') 3947 ref_j=str2double(get(handles.ref_j,'String')); 3948 ref_j=str2double(get(handles.ref_j,'String'));% read reference j index if relevant 3948 3949 else 3949 ref_j=1;%default 3950 end 3951 [filecell,i1,i2 1,j1,j2,i1_civ2,i2_civ2,j1_civ2,j2_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=...3952 set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0]); 3950 ref_j=1;%default j index 3951 end 3952 [filecell,i1,i2,j1,j2,i1_civ2,i2_civ2,j1_civ2,j2_civ2,nom_type_nc,file_ref_fix1,file_ref_fix2]=... 3953 set_civ_filenames(handles,ref_i,ref_j,[1 0 0 0 0 0]);% get the corresponding file name and indices 3953 3954 Data.ListVarName={'ny','nx','A'}; 3954 3955 Data.VarDimName= {'ny','nx',{'ny','nx'}}; 3955 Data.A=imread(filecell.ima1.civ1{1}); 3956 Data.A=imread(filecell.ima1.civ1{1}); % read the first image 3956 3957 if ndims(Data.A)==3 %case of color image 3957 3958 Data.VarDimName= {'ny','nx',{'ny','nx','rgb'}}; … … 3959 3960 Data.ny=[size(Data.A,1) 1]; 3960 3961 Data.nx=[1 size(Data.A,2)]; 3962 Data.CoordUnit='pixel';% used to set equal scaling for x and y in image dispaly 3961 3963 par_civ1=read_GUI(handles.Civ1); 3962 3964 par_civ1.ImageWidth=size(Data.A,2); 3963 3965 par_civ1.ImageHeight=size(Data.A,1); 3964 3966 par_civ1.Mask='all';% will provide only the grid set for PIV, no image correlation 3965 par_civ1.i1= 1;%i1_civ1;3966 par_civ1.i2= 2;%i2_civ1;3967 par_civ1.i1=i1; 3968 par_civ1.i2=i2; 3967 3969 Param.Civ1=par_civ1; 3968 3970 Grid=civ_matlab(Param);% get the grid of x, y positions set for PIV … … 3986 3988 set(handles.TestCiv1,'BackgroundColor',[1 0 0]) 3987 3989 else 3990 set(handles.TestCiv1,'BackgroundColor',[1 0 0])% paint button to red 3988 3991 corrfig=findobj(allchild(0),'tag','corrfig');% look for a current figure for image correlation display 3989 3992 if ~isempty(corrfig)
Note: See TracChangeset
for help on using the changeset viewer.