필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
Kian Azami
Kian Azami 2017년 10월 9일
댓글: Kian Azami 2017년 10월 11일
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
Image Analyst
Image Analyst 2017년 10월 9일
Exactly what does separate mean to you?
Kian Azami
Kian Azami 2017년 10월 9일
I mean to separate the zone which I determined by the red line.

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

채택된 답변

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)
  댓글 수: 1
Kian Azami
Kian Azami 2017년 10월 11일
Amazing answer, thank you. Now I understand why you are a STAFF.

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

추가 답변 (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