Curvature estimation in contour extracted from gray image

조회 수: 5 (최근 30일)
Turbulence Analysis
Turbulence Analysis 2021년 6월 24일
댓글: Turbulence Analysis 2021년 6월 25일
Hi,
I have the edges/contours extacted from the gray image, now I intend to estimate the curvature.
For e.g., I have attached my sample contour here..
Could someone help me with this out ??

채택된 답변

KSSV
KSSV 2021년 6월 24일
편집: KSSV 2021년 6월 25일
You may use this file exchange function:
Check the code:
load('Test image.mat') ;
[y,x] = find(I) ;
idx = boundary(x,y) ;
x = x(idx) ; y = y(idx) ;
Vertices = [x y] ;
k=LineCurvature2D(Vertices) ;
N=LineNormals2D(Vertices) ;
figure(1)
scatter(x,y,20,k,'filled')
colorbar
title('curvature')
figure(2)
plot(x,y)
hold on
plot([Vertices(:,1) Vertices(:,1)+10*N(:,1)]',[Vertices(:,2) Vertices(:,2)+10*N(:,2)]');
title('Normals')
  댓글 수: 11
Turbulence Analysis
Turbulence Analysis 2021년 6월 25일
Thanks.. Now,I used, axis equal command, Now It's better.
But, I ddidn't understand why the curvature scatter plot always dipslays in inverted ??
scatter(x,y,50,k,'filled');
axis equal
Turbulence Analysis
Turbulence Analysis 2021년 6월 25일
While executing, N=LineNormals2D(Vertices); it genartes two columns , Is it normal vectors in x, y.. ??

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by