GUI to automatically measure distance between 2 curves
이전 댓글 표시
Hi, newbie to Matlab - I am doing a project to measure the sedimentation layers of earth (working on cross-cut image of the layers - look like layers of cake). I need to be able to create a GUI to draw two curve lines on the image and then when clicking on any two points (one on each curve) it would automatically calculate the distance between the two. I am not completely sure if this is feasible in Matlab - can anyone point me to the right functions/tools that I should use to do this in a GUI? Thanks!
답변 (1개)
Friedrich
2011년 8월 8일
Hi,
you have two curves f_1, f_2, a user given point (x,y) and you want the distance between the curves at that point? If so do,
norm(f_1(x,y) - f_2(x,y))
댓글 수: 2
Nathan D
2011년 8월 8일
Friedrich
2011년 8월 8일
So the user should click into the image and you like to get the (x,y) coords of his click. After that you like to calculate the distance to some curves. How to capture a click and get the coords of the click can be obtained in the window_motion_test function located in C:\Program Files\MATLAB\R20***\help\techdoc\ref\examples. One you have the coords you can calculate the function values and the distance.
카테고리
도움말 센터 및 File Exchange에서 Geology에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!