• 大小: 6.95M
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2021-04-18
  • 语言: Matlab
  • 标签: DIC  Image  MATLAB  2D  Speckle  

资源简介

Digital Image Correlation (DIC) is an optical, non-contact method to measure full-field displacements and strains. The only requirement is that the test specimen has a random speckle pattern on its surface, either generated by the experimentalist (i.e. random paint pattern) or occurring

资源截图

代码片段和文件信息

%This code shifts the control points specified by gridx and gridy by
%computing the normalized cross-correlation coefficient.

function [validxvalidy]=automate_image_GUI_compatible(filenamelist...
    reductiongridxgridyref_imagesubsetsearch_zoneN_images_correlated...
    N_ptsinitialxinitialyN_threadsloop_type)


%Initialize variables:
validx = zeros(N_ptsN_images_correlated);
validy = zeros(N_ptsN_images_correlated);
validx(:1) = gridx;
validy(:1) = gridy;


% Initialize the JAVA progress bar
try % Initialization
    percent = 1;
    do_debug = 1;
    ppm = ParforProgressStarter2(‘Correlate Images Progress Bar‘ ...
        N_images_correlated percent do_debug);
catch me % make sure “ParforProgressStarter2“ didn‘t get moved to a different directory
    if strcmp(me.message ‘Undefined function or method ‘‘ParforProgressStarter2‘‘ for input arguments of type ‘‘char‘‘.‘)
        error(‘ParforProgressStarter2 not in path.‘);
    else
        % this should NEVER EVER happen.
        msg{1} = ‘Unknown error while initializing “ParforProgressStarter2“:‘;
        msg{2} = me.message;
        print_error_red(msg);
        % backup solution so that we can still continue.
        ppm.increment = nan(1 N_images_correlated);
    end
end


% Choose serial or parallel loop and run through the loop over the images
if strcmp(loop_type‘serial‘) == 1 %Use serial loops
[validx validy] = serial(filenamelistreductiongridxgridy...
    validxvalidyref_imagesubsetsearch_zoneN_images_correlatedN_pts...
    initialxinitialyppm);

elseif strcmp(loop_type‘parallel‘) == 1 %Use parallel loops
[validxvalidy] = parallel(filenamelistreductiongridxgridy...
    validxvalidysubsetsearch_zoneN_images_correlatedN_ptsN_threads...
    initialxinitialyppm);

end

%Close the wait bar
try % use try / catch here since delete(struct) will raise an error.
    delete(ppm);
catch me %#ok
end


end


%% This function uses a serial for loop to run through the images
function [validxvalidy] = serial(filenamelistreductiongridxgridy...
    validxvalidyref_imagesubsetsearch_zoneN_images_correlatedN_pts...
    initialxinitialyppm)
    

for i=1:N_images_correlated %Loop over all the images in the set

    
    %% Read in the reference image
    if ref_image == 1 %Reference image = first image

        base_points = zeros(N_pts2);
        base_points(:1) = gridx;
        base_points(:2) = gridy;

        if reduction ~= 1
            base = imresize(imread(filenamelist(1:))1/reduction);
        else
            base = imread(filenamelist(1:));
        end


    elseif ref_image == 2 %Reference image = preceeding image

        if i == 1 %Self correlation of the first image with itself
            if reduction ~= 1
                base = imresize(imread(filenamelist(1:))1/reduction);
            else
                base = imread(filena

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        1362  2020-11-08 15:17  license - DIC code.txt
     文件        1333  2020-11-08 15:17  license - freeze colors.txt
     文件        1316  2020-11-08 15:17  license - parfor progress bar.txt
     文件        1442  2020-11-08 15:17  license.txt
     文件     3889479  2020-11-08 15:17  Matlab based DIC code documentation - version 1 - 130814 EJ.pdf
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_00.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_01.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_02.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_03.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_04.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_05.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_06.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_07.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_08.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_09.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_10.tiff
     文件      418184  2020-11-08 15:17  example images\oht_cfrp_11.tiff
     文件        6122  2020-11-08 15:17  Matlab DIC files\automate_image_GUI_compatible.m
     文件        1686  2020-11-08 15:17  Matlab DIC files\average_image.m
     文件        3372  2020-11-08 15:17  Matlab DIC files\average_line_GUI_compatible.m
     文件        5919  2020-11-08 15:17  Matlab DIC files\calc_derivatives_GUI_compatible.m
     文件        1556  2020-11-08 15:17  Matlab DIC files\calc_disp.m
     文件        2026  2020-11-08 15:17  Matlab DIC files\calc_disp_reduced.m
     文件        1130  2020-11-08 15:17  Matlab DIC files\calc_strains_GUI_compatible.m
     文件         591  2020-11-08 15:17  Matlab DIC files\calc_strains_loop.m
     文件        7648  2020-11-08 15:17  Matlab DIC files\compute_data_GUI.fig
     文件       16781  2020-11-08 15:17  Matlab DIC files\compute_data_GUI.m
     文件        9617  2020-11-08 15:17  Matlab DIC files\correlate_images_GUI.fig
     文件       30188  2020-11-08 15:17  Matlab DIC files\correlate_images_GUI.m
     文件        9359  2020-11-08 15:17  Matlab DIC files\cpcorr_mod.m
     文件         760  2020-11-08 15:17  Matlab DIC files\data_avg_GUI_compatible.m
............此处省略67个文件信息

评论

共有 条评论