Removing object from image using median filter

1 visualización (últimos 30 días)
Sara Foster
Sara Foster el 8 de Sept. de 2019
Comentada: Peter Bier el 11 de Sept. de 2019
My function needs to remove an object from an image and the input is multiple images in the form of a 1xn 1D cell array containing 3D arrays of uint8 values e.g
{557x495x3} {557x495x3} {557x495x3}
The objective is to use a median filter (I've already created this code) to calculate the median pixels and store in array, so that the person/object is removed from image. The output is one RGB image where the person is removed from the image. I was wondering how to approach this?
  2 comentarios
Matt J
Matt J el 9 de Sept. de 2019
Editada: Matt J el 9 de Sept. de 2019
Here are the example images which somehow got deleted from the original post.
Peter Bier
Peter Bier el 11 de Sept. de 2019
This is a reminder to all 131 students that as mentioned in class you need to write your own code for the project that is due shortly (rather than getting code written by one of the kind folks who answer questions on the mathworks forum). Copying any of the supplied code from below and submitting it as your own will be detected by our plagiarism detection software when we come to mark the project.

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 8 de Sept. de 2019
I'll call your 1xn cell array of images ImageCell. Then I think you want,
Image4D=cat(4,ImageCell{:});
R=median( Image4D(:,:,1,:) , 4);
G=median( Image4D(:,:,2,:) , 4);
B=median( Image4D(:,:,3,:) , 4);
finalImage=cat(3, R,G,B);
  7 comentarios
Matt J
Matt J el 9 de Sept. de 2019
Editada: Matt J el 9 de Sept. de 2019
Well, you should probably describe that task in more detail in a separate post, because it sounds like it will need a lot more explanation. It is certainly a completely different goal from the object removal task that you've pursued here.
Sara Foster
Sara Foster el 9 de Sept. de 2019
Sorry, my bad. I've created a separate post.

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