constructing a background from a sequence of images
Show older comments
- VEG_R09C_101127_19-42-50_V_01_10.JPG
- VEG_R09C_101127_19-42-50_V_02_10.JPG
- VEG_R09C_101127_19-42-51_V_03_10.JPG
- VEG_R09C_101127_19-42-52_V_04_10.JPG
- VEG_R09C_101127_19-42-52_V_05_10.JPG
- VEG_R09C_101127_19-42-53_V_06_10.JPG
- VEG_R09C_101127_19-42-53_V_07_10.JPG
- VEG_R09C_101127_19-42-54_V_08_10.JPG
- VEG_R09C_101127_19-42-55_V_09_10.JPG
- VEG_R09C_101127_19-42-55_V_10_10.JPG
I have a sequence containing 10 reconyx camera trap images, where I want to identify the animal present in the image in the foreground. The problem here is that each image contains an animal, and I cannot think of a way to construct a background from these images that does not contain an animal. is there a way to construct "a general background model" from this 10 image sequence, that I can use later to subtract from each image to arrive at a contour of the animal present in the photo. attached is the 10 image sequence.
I've tried the basic vision.ForegroundDetector method (to no avail). Logically, if I can arrive at a "reasonable" common background of the sequence, then subtracting the background would not be a problem going through frame by frame to arrive at each image's foreground.
Thank you in advance for your tips and help.
Accepted Answer
More Answers (1)
Image Analyst
on 30 Nov 2018
0 votes
If you have enough frames, you could try just computing the median image. This should work as long as no animal is parked in one spot for so long that essentially it has become part of the background itself.
4 Comments
Hyung Jun Kim
on 2 Dec 2018
Image Analyst
on 2 Dec 2018
No, but there are whole conferences on imaging groups of animals (herds, insects, pigs, cattle, birds, fish, etc.) You may want to look up the proceedings of them.
Greg Heath
on 4 Dec 2018
Since the median image looks good, I'd be curious about the result of just averaging the images
Greg
Image Analyst
on 4 Dec 2018
If we can assume that there are lots of images with no animals, then the average might be better. However I think the camera only snaps photos when there are animals in view (at least game cameras I've looked at operate this way), so chances are the pixels, for some portion of the image, will be "animal" rather than "background" for some portion of the total number of frames. Some "game" cameras can also shoot videos when animals are in view - it just depends on if you set it up to take still photos or videos.
If the animals alway occupy some part of the image, then they might prevent a good estimate of the background since they are in there, while if they're in that spot for less than half the images, they wouldn't. I think the median would be less susceptible to corruption by an animal being in some frames than the mean.
If using a video, to get the true background you'd count on the animal moving around so that no spot is covered by the animal for more than half the frames.
Categories
Find more on C4ISR in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!