How to choose the boundaries of the gray zone in the image?

1 Ansicht (letzte 30 Tage)
Kian Azami
Kian Azami am 9 Okt. 2017
Kommentiert: Kian Azami am 11 Okt. 2017
I have an image and I would like to write a program in order to separate the gray part of the image which is a footprint of a tire. I think the algorithm should be similar to fingerprint detection, however, I don't have sufficient knowledge to do so. Can anyone suggest me a solution?
  4 Kommentare
Image Analyst
Image Analyst am 9 Okt. 2017
Exactly what does separate mean to you?
Kian Azami
Kian Azami am 9 Okt. 2017
I mean to separate the zone which I determined by the red line.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Akira Agata
Akira Agata am 11 Okt. 2017
By combining imclose, imopen, and bwconvhull functions, you can determine the target area. Here is an example.
% Read the image and binarize
I = imread('Footprint.jpg');
I = rgb2gray(I);
BW = imbinarize(I);
% Remove noise
se = strel('disk',5);
BW = imclose(BW, se);
BW = imopen(BW, se);
% Remove areas connected to image border
BW = imclearborder(BW,4);
% Generate convex hull image
ROI = bwconvhull(BW);
% Show the result
imshowpair(I,ROI)

Weitere Antworten (0)

Kategorien

Mehr zu Image Processing Toolbox finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by