Remove Background from image and select the region of interest

조회 수: 4 (최근 30일)
I have a image
and I want to remove the background and select Yellow and Red and my output should be
How can I do it ?
thanks

채택된 답변

Image Analyst
Image Analyst 2019년 1월 5일
편집: Image Analyst 2019년 1월 5일
Try the Color Thresholder app on the Apps tab of the tool ribbon.
After color segmentation, you might also need bwareafilt() or bwareaopen() to get rid of all blobs other than the largest one in the mask (binary image).
mask = bwareafilt(mask, 1); % Extract largest blob only.
  댓글 수: 2
Ittiphat Limsakul
Ittiphat Limsakul 2019년 1월 5일
편집: Ittiphat Limsakul 2019년 1월 5일
Thanks .I don't want a app . I want a code . Can recommend a code ?
Image Analyst
Image Analyst 2019년 1월 5일
Run the app, then click the Export button. Tell it to generate the code as a function.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Image Processing Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by