How to remove background from an image?

Hello,
I'm doing project on object recognition, and in one of my module, i need to extract the feature but for that removal of background is necessary.. so how can i do this?? please help me!
Thanks!

 Respuesta aceptada

Walter Roberson
Walter Roberson el 3 de En. de 2013

0 votos

In every one of the images in that .zip file, the background has already been removed.
Removal of background is what you do when you have a picture of a real object, or at least a model of that object whose picture has been taken. For example if you had a picture of an apple sitting on a plate, you would need to remove the plate (and the table and everything else that was not the object of interest.)

15 comentarios

Nikhil
Nikhil el 3 de En. de 2013
sir here all the images contains only one object!! i just need to remove that black background, so i would like to know, how can i do this??
Walter Roberson
Walter Roberson el 3 de En. de 2013
What would you like to replace the black background with?
Nikhil
Nikhil el 3 de En. de 2013
black background with nothing!! i just want to remove that.
Wait... I think I may finally have it:
C = num2cell(YourImage);
C(~YourImage) = {};
This will give you a cell array in which there are empty cells ("nothing") where the background was, and cells containing [1] where the foreground was.
Nikhil
Nikhil el 3 de En. de 2013
sir it gave me an error 2nd line.
The error is " In an assignment A(:) = B, the number of elements in A and B must be the same."
C = num2cell(YourImage);
C(~YourImage) = {{}};
Nikhil
Nikhil el 3 de En. de 2013
yes sir it worked but sir how can i make it visible??
Oh, if you want to make it visible, you use the technique I told you to use before:
imagesc(YourImage, 'AlphaData', YourImage)
colormap(gray)
set(gca, 'color', 'none')
Depending on what you have done before in that session you might need to add
set(gcf, 'renderer', 'opengl')
Nikhil
Nikhil el 3 de En. de 2013
It worked!!
Thanks a ton sir, you helped me through out! Thanks once again!
Subha
Subha el 14 de Feb. de 2013
Sir with this code i implemented to my histopathological image.... now i need to calculate statistical and textural features... how can i process it again.. i have segmented cell as in color cell segmentation in matlab.. now with this code removed the black color... but hw can i proceed with further processing. give ur suggestion sir.. i've tried cell2mat ,, but its not supporting...
Image Analyst
Image Analyst el 14 de Feb. de 2013
Please start your own question. Upload your image , then tell us where it is. You also would need to explain, in that new question, what exactly "further processing" means because that is way too vague to answer.
muthu selvam
muthu selvam el 10 de Mzo. de 2015
Sir i doing Pattern recognition Letters Project.. I see the lot math works web page . But i have don't collect How to Remove background from image? I need the coding for remove background from the image..... Advance Thanks...
Sneha Rauniyar
Sneha Rauniyar el 5 de Nov. de 2017
sir i am doing dust particle monitoring project for this i have to remove all background expect dust particle from the image... What should i do? Could you suggest me some matlab codes?
Walter Roberson
Walter Roberson el 9 de Nov. de 2017
Sneha Rauniyar I recommend you start a new Question, and post a couple of images. You will need to clarify how you know whether a particular dust particle is a foreground dust particle to be kept, or a background dust particle to be removed.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Particle & Nuclear Physics en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 3 de En. de 2013

Comentada:

el 9 de Nov. de 2017

Community Treasure Hunt

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

Start Hunting!

Translated by