Locating point where slope becomes most steep

조회 수: 29 (최근 30일)
A
A 2012년 6월 19일
댓글: GOPEE Ajit Kumar 2017년 2월 25일
Hello, I am trying to extract data from this graph, generated from the image to the right of it:
As you can tell from the graph, the slope starts to decrease most rapidly at about 1000 pixels.
My code will ask for a restriction zone, so it is not a problem to only investigate between say 800 pixels and 1100 pixels. However, I am not sure how to locate the point where the slope begins to decrease most rapidly.
Thank you for your help!
  댓글 수: 2
Ryan
Ryan 2012년 6월 19일
Do you only have the graph or do you have the vectors that plotted the graph? If you have the vectors that created the graph, just take the derivative and locate the absolute maximum value (to account for decreasing being negative slope).
Image Analyst
Image Analyst 2012년 6월 20일
Do you really need the x location of the steep part? Or can you just threshold the y values to find it? For example, maybe you can get the x like this: x= find(signal > 0.3, 1, 'last') so you find the x location where the signal exceed some threshold, like 0.3.
What if you had a steep part that was in the range y = [0.2 to 0.5] but you had a steeper one somewhere down in the range of y= [0 to 0.2]? Are you sure you'd want the lower amplitude signal just because it's steeper?

댓글을 달려면 로그인하십시오.

답변 (2개)

the cyclist
the cyclist 2012년 6월 19일
As Ryan comments, you "just take the derivative", but that is a gross simplification. Taking the numerical derivative of noisy discrete data is a tricky business.
I would suggest taking a look at the following FEX submission, and carefully reading the description:

Ayodele Oladeji
Ayodele Oladeji 2015년 1월 12일
편집: Ayodele Oladeji 2015년 1월 12일
Perform the following steps
  • Use a low pass filter to smoothen the data points (smooth function could be helpful)
  • Find the gradient of all points on the data and calculate the slope= (( diff(y_data)/diff(x_data))
  • Depending on what you define as "most rapidly", you can apply the function find to your slope data and track index as follows: find(slope >= steep_threshold).
I hope that was helpful
  댓글 수: 1
GOPEE Ajit Kumar
GOPEE Ajit Kumar 2017년 2월 25일
ok but how do you calculate the gradient of all points on the data if I have curve in a binary image and that I do not know the equation of the curve? Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Biomedical Imaging에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by