Borrar filtros
Borrar filtros

Remove Background from image and select the region of interest

2 visualizaciones (últimos 30 días)
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

Respuesta aceptada

Image Analyst
Image Analyst el 5 de En. de 2019
Editada: Image Analyst el 5 de En. de 2019
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 comentarios
Ittiphat Limsakul
Ittiphat Limsakul el 5 de En. de 2019
Editada: Ittiphat Limsakul el 5 de En. de 2019
Thanks .I don't want a app . I want a code . Can recommend a code ?
Image Analyst
Image Analyst el 5 de En. de 2019
Run the app, then click the Export button. Tell it to generate the code as a function.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by