The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: vision.ForegroundDetector on Images
Replies: 13   Last Post: Jul 14, 2017 2:46 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Witek Jachimczyk

Posts: 132
Registered: 12/7/04
Re: vision.ForegroundDetector on Images
Posted: Mar 28, 2012 11:33 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hi Gordon,

We'll consider adding an object like this in the future.
In the meantime, you can use the following strategy:

imageNames = dir(fullfile(<your directory>,'*.jpg'));
imageNames = {}';

% you may need to sort the file names at this point in time, see
% for details

foregroundEst = vision.ForegroundEstimator;

for ii = 1:length(imageNames)
img = imread(fullfile(workingDir,'images',imageNames{ii}));

fg = foregroundEst.step(img);

<do whatever else needs to be done>




Gordon <> wrote:
> Thanks a lot! Yes, my data changes with time, it is like a video sequence but it is made up of images.
> I was wondering whether there exists something like vision.VideoFileReader() but for images instead.
> Thanks.

Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.