필터 지우기
필터 지우기

Buckle counting in image processing

조회 수: 2 (최근 30일)
Jihad Mamou
Jihad Mamou 2020년 12월 9일
답변: asad iqbal 2021년 1월 13일
I am currently working on an image and I wanted to know how I can count the numbers of buckles (lines) on an image. Find attached is the image in question and I wait in anticipation for a positive response.

답변 (2개)

Nitin Kapgate
Nitin Kapgate 2020년 12월 16일
You can refer the following code snippet to count the approximate number of number of buckles using bwlabel function:
% Read image
I = imread("0050.png");
% Binarize image
BW = im2bw(I);
% Label connected components in 2-D binary image
% numOfConnComponents is approximately equal to number of buckles
[labels numOfConnComponents] = bwlabel(~BW);
% Show the labelled connected components
coloredLabelsImage = label2rgb(labels, 'hsv', 'k', 'shuffle');
imshow(coloredLabelsImage);
You can use bwareaopen function to further improve the accuracy of detected number of components by removing smaller buckles from the binary image.

asad iqbal
asad iqbal 2021년 1월 13일
can we count buckles in numbers ? i.e 4 buckles, 5 buckles etc

카테고리

Help CenterFile Exchange에서 Modify Image Colors에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by