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

4 次查看(过去 30 天)
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 个评论

请先登录,再进行评论。

采纳的回答

Akira Agata
Akira Agata 2017-10-11
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)

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by