Borrar filtros
Borrar filtros

How to remove background from an image?

221 visualizaciones (últimos 30 días)
Opencv
Opencv el 24 de Sept. de 2014
Comentada: DGM el 5 de Mayo de 2023
I want to know how to remove background from an image and edge detection of the rest of the image

Respuesta aceptada

Meshooo
Meshooo el 24 de Sept. de 2014
There are many ways do remove background. If you have a colored image, then you can try this
If you have a gray scale image, then you can try this
Hope it helps you.
Meshoo
  6 comentarios
Vasudev
Vasudev el 16 de Feb. de 2023
Editada: Vasudev el 16 de Feb. de 2023
Will this code run and display for all types of images, or any specific kind of images?
DGM
DGM el 5 de Mayo de 2023
What code?
The general answer is obviously no. You are not going to find any code which will universally discern intent and isolate any arbitrary and undefined foreground region from any arbitrary and undefined background region in any one of countless unspecified "types" of images, many of which MATLAB can't even open.
The more magical properties a solution requires, the more certain it is to not exist.

Iniciar sesión para comentar.

Más respuestas (2)

Deepak Gala
Deepak Gala el 4 de Ag. de 2017
  3 comentarios
Vidhika Sirwani
Vidhika Sirwani el 4 de Mayo de 2020
gives an error..
undefined variable showMaskAsOverlay
Image Analyst
Image Analyst el 4 de Mayo de 2020
Try this:
% Display mask with 50% transparency over the "gray" image.
imshow(gray);
hold on;
h = image(255 * mask);
h.AlphaData = 0.5;

Iniciar sesión para comentar.


shaadinama
shaadinama el 4 de Mayo de 2023
There are several ways to remove the background from an image and perform edge detection on the remaining object. Here are some methods:
Using a photo editing software like Adobe Photoshop or GIMP: You can use the selection tools like Magic Wand, Lasso, or Quick Selection to select the background and delete it. Then, use the Edge Detection filter or tool to highlight the edges of the remaining object.
Using online tools: There are many free online tools like remove.bg, Clipping Magic, or Canva that allow you to remove the background of an image automatically. After removing the background, you can use the image editor in these tools to apply edge detection on the remaining object.

Community Treasure Hunt

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

Start Hunting!

Translated by