Filter löschen
Filter löschen

How to get region information

1 Ansicht (letzte 30 Tage)
Siam
Siam am 8 Okt. 2017
Kommentiert: Image Analyst am 9 Okt. 2017
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.

Antworten (1)

Image Analyst
Image Analyst am 8 Okt. 2017
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 Kommentar
Image Analyst
Image Analyst am 9 Okt. 2017
Post the original gray scale, non-annotated image.

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by