diff --git a/openpivgui.m b/openpivgui.m index b1e457e..5acd879 100644 --- a/openpivgui.m +++ b/openpivgui.m @@ -403,7 +403,8 @@ function load_Callback(hObject, eventdata, handles) % imshow(prepfun(tmp)); % end -im = openpiv_imread(handles,1); +filename = fullfile(handles.path,handles.files{1}); +im = openpiv_imread(filename); imshow(im); set(handles.prev_image,'Visible','On'); set(handles.next_image,'Visible','On'); @@ -463,10 +464,10 @@ function pushbutton_start_Callback(hObject, eventdata, handles) set(handles.figure1,'pointer','watch') % -% image1 = fullfile(handles.path,handles.files{1}); -% image2 = fullfile(handles.path,handles.files{2}); +image1 = fullfile(handles.path,handles.files{1}); +image2 = fullfile(handles.path,handles.files{2}); -[a,b] = read_pair_of_images_rect(handles,1,1,cropvec,ittWidth,ittHeight,ovlapHor,ovlapVer); +[a,b] = read_pair_of_images_rect(image1,image2,cropvec,ittWidth,ittHeight,ovlapHor,ovlapVer); if isempty(a) || isempty(b) errordlg('Something wrong with your images') end @@ -981,8 +982,10 @@ function openpiv_main_loop(handles, fileind, jump, cropvec,ittWidth,... set(handles.edit_num,'string',sprintf('%d',fileind)); +image1 = fullfile(handles.path,handles.files{fileind}); +image2 = fullfile(handles.path,handles.files{fileind+jump}); -[a,~,a1,b1,origin] = read_pair_of_images_rect(handles,fileind,jump,cropvec,ittWidth,ittHeight,ovlapHor,ovlapVer); +[a,~,a1,b1,origin] = read_pair_of_images_rect(image1,image2,cropvec,ittWidth,ittHeight,ovlapHor,ovlapVer); % a1 = prepfun(a1); % b1 = prepfun(b1);