필터 지우기
필터 지우기

How to get region information

조회 수: 1 (최근 30일)
Siam
Siam 2017년 10월 8일
댓글: Image Analyst 2017년 10월 9일
I am thinking to find the length but not sure how to do that.
An example image is shown below:
From Original image I have tried to get some results but I am stuck.
I am looking to find the red marked thread height from the following figure. Any help will be appreciated.

답변 (1개)

Image Analyst
Image Analyst 2017년 10월 8일
Run along the columns finding the hairs and subtracting from the skeleton
% Preallocate arrays for heights above and below the core skeleton.
hairHeightsAbove = zeros(1, columns);
hairHeightsBelow = zeros(1, columns);
% Loop over all columns, finding distances above and below for each column.
for col = 1 : columns
% Find row of hair sticking above the core skeleton.
hairTopRow = find(hairs(:, col), 1, 'first');
% Find row of hair sticking below the core skeleton.
hairBottomRow = find(hairs(:, col), 1, 'last');
% Find row of the core skeleton.
skeletonRow = find(coreSkeleton(:, col), 1, 'first');
% Compute distances of hair ends to the core skeleton.
hairHeightsAbove(col) = abs(hairTopRow - skeletonRow);
hairHeightsBelow(col) = abs(hairBottomRow - skeletonRow);
end
  댓글 수: 1
Image Analyst
Image Analyst 2017년 10월 9일
Post the original gray scale, non-annotated image.

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

Community Treasure Hunt

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

Start Hunting!

Translated by