Find knee/elbow of a curve
조회 수: 67 (최근 30일)
이전 댓글 표시
Dear all, i splited my image into sub blocks, i counted the aces of each one and then i stored all them into an array,.
Then i made a histogram, on xx' i have all the values of the aces and on yy' i have the number of "how many time every point is appeared"
image 1 histogram
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241456/image.png)
image 2 histogram
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241457/image.png)
Then i did the cumulative function for all the above points. I try to find the knee/elbow point of this cumulative plot.
I used this code but it didn't wokred well ,then i used this code and i have the below results, which i think are quite good. The red curcle is the knee point
image 1 cumulative func
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241458/image.png)
image 2 cumulative func
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241459/image.png)
The result is not good for the first image but works for the second.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241460/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241461/image.png)
Does any one know any other solution to find the knee/elbow of the curve? Any other code to be suggested?
Thank you
댓글 수: 0
답변 (3개)
Image Analyst
2019년 11월 27일
To find a knee/elbow/kink in a curve, I prefer the triangle threshold method. The way this intuitive method works is to draw a hypoteneuse from the far bottom (lowest point) to the top (highest point) of the signal curve, and draw lines perpendicular to that hypoteneuse until they intersect the signal curve.. Where the perpendicular line is longest is the x value to use. I attach the triangle method.
You can also see the FAQ: How can I find "kinks" in a curve?
댓글 수: 0
darova
2019년 10월 7일
What about imdilate()?
clc,clear
I = imread('nett.jpg');
I1 = im2bw(I);
I2 = imdilate(I1,ones(20));
Z = 1.0*cat(3,I1,I2,I1*0);
imshow(Z)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241489/image.jpeg)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241490/image.png)
![nett1.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241493/nett1.png)
![nett11.png](https://www.mathworks.com/matlabcentral/answers/uploaded_files/241494/nett11.png)
Then just use bwlabel or something to get blobs (or regionprops to find centers)
참고 항목
카테고리
Help Center 및 File Exchange에서 Histograms에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!