francklab / dic-simulator Goto Github PK
View Code? Open in Web Editor NEWDigital Image Correlation Simulator
Digital Image Correlation Simulator
Good Afternoon!
I'm working on an engineering capstone project to implement a low-cost DIC system on a Raspberry Pi in order to visualize strain fields for a fixed beam under deflection. While reviewing the efforts of previous semesters on this project, we realized that the speckle pattern may be significantly contributing to measurement error. In looking to assess the quality of the speckle pattern, I came across your MATLAB scripts and paper for your DIC Simulator, seems to be a powerful solution to this concern. With that, we are very appreciative for your work on this program.
Working with your algorithm, I have unfortunately been getting the following error:
Subscript indices must either be real positive integers or logicals.
Error in DIC_simulator>decorr2a (line 906)
cc=c(dv-1:dv+1,du-1:du+1);
Error in DIC_simulator>dvc_full_2d (line 856)
[du dv dc]=decorr2a(dm0,dm1);
Error in DIC_simulator>run2dic (line 827)
[ud,vd]=dvc_full_2d(ia,ib,x,y,ua,va,w0,inc);
Error in DIC_simulator>gobutton_Callback (line 317)
[ut vt] = run2dic(handles.dicw,handles.dicd,handles.pic,handles.tpic);
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in DIC_simulator (line 47)
gui_mainfcn(gui_State, varargin{:});
Error in matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DIC_simulator('gobutton_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback.
What is interesting is that the algorithm stops at different times depending upon the choice of subset size, spacing, and x-translation. It appears that in the decorr2a function, elements of variables dv and du can sometimes be 1, causing cc=c(dv-1:dv+1,du-1:du+1);
to index out of bounds.
I added the following lines before the "cc" variable definition above, which fixes the error and the code runs to completion, but I'm not sure whether or how this affects the results of the algorithm.
[minimumval, indexofmin]=min(dv);
if minimumval == 1
dv(indexofmin)=dv(indexofmin)+1;
end
[minimumval, indexofmin]=min(du);
if minimumval == 1
du(indexofmin)=du(indexofmin)+1;
end
I'm wondering if this is a bug or if I haven't chosen appropriate parameters. I've attached an example image I've used with subset size = 60, step length = 20, applied strain = 0.02, and x-displacement = 20.
Thank you in advance!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.