Foreground Object Detection from Reconyx Camera Trap Images
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Hyung Jun Kim
el 18 de Nov. de 2018
Comentada: Image Analyst
el 20 de Nov. de 2018
I have a series of images (upwards of 100) from a Reconyx motion triggered camera, observing a compost pile, with images of animals present in the scene. They are not in constant seqeunce (i.e not like you would expect if you took a video fram by frame). What would be the best method to obtain the contours or the edges of the animal(s) present in the images while removing the background(noting that all of the images more or less share the same background). Attached are some images with just the background, and some with animals present in the foreground.
0 comentarios
Respuesta aceptada
Image Analyst
el 18 de Nov. de 2018
I'd subtract the background from the test image, then threshold and do some size filtering, then mask.
diffImage = abs(double(grayImage) - double(backgroundImage));
animalMask = diffImage > 5; % Whatever works
animalMask = imfill(animalMask, 'holes');
animalMask = bwareafilt(animalMask, [100, inf]); % Take only the larger blobs.
maskedImage = grayImage; % Initialize.
maskedImage(~mask) = 0; % Or whatever gray level you want, such as mean(grayImage(~mask));
Adapt as needed. Let me know if you still need help.
2 comentarios
Image Analyst
el 20 de Nov. de 2018
Well your haystack is a lot different so it's finding a lot of hay. You're going to have to put in a lot of work to make it robust for hay disturbance. But this is what I got for you now. See attached files.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!