Thread Subject: background subtraction

Subject: background subtraction

From: Boothaya

Date: 12 Oct, 2008 14:44:43

Message: 1 of 4

hi all
i am new to matlab and i need to segment people from a video file.
please help me the matlab version i use is R2007b.
thanks in advance.

Subject: background subtraction

From: Filipe

Date: 12 Oct, 2008 17:03:02

Message: 2 of 4

Hi!

In a very simple way, in order to achieve what you've refered you need to have a reference image, i.e. the bakground with the persons. Then if you have another image with the same background plus the persons you want to segment, if you subtract the two images the result will be one black image with only the persons on it.

A = imread(.../reference_image.jpg);
B = imread(.../test_image.jpg);
result = imsubtract(B,A);

I hope this have helped you.

Good luck!


Boothaya <sadheerav@gmail.com> wrote in message <4e515326-89e9-4116-8e76-a6230e9ee814@1g2000prd.googlegroups.com>...
> hi all
> i am new to matlab and i need to segment people from a video file.
> please help me the matlab version i use is R2007b.
> thanks in advance.

Subject: background subtraction

From: Boothaya

Date: 13 Oct, 2008 03:14:54

Message: 3 of 4

On Oct 12, 10:03=A0pm, "Filipe " <filipe.ti...@remove.this.sapo.pt>
wrote:
> Hi!
>
> In a very simple way, in order to achieve what you've refered you need to=
 have a reference image, i.e. the bakground with the persons. Then if you h=
ave another image with the same background plus the persons you want to seg=
ment, if you subtract the two images the result will be one black image wit=
h only the persons on it.
>
> A =3D imread(.../reference_image.jpg);
> B =3D imread(.../test_image.jpg);
> result =3D imsubtract(B,A);
>
> I hope this have helped you.
>
> Good luck!
>
> Boothaya <sadhee...@gmail.com> wrote in message <4e515326-89e9-4116-8e76-=
a6230e9ee...@1g2000prd.googlegroups.com>...
> > hi all
> > i am new to matlab and i need to segment people from a video file.
> > please help me the matlab version i use is R2007b.
> > thanks in advance.


Thanks a lot Filipe.
Your method totally works.if u can guide me with how to mark the
people with a square, separated region etc. i mean when the video file
is being played the region has to be marked.i hope you understand my
problem. Please help me.
thanks a million. My task is to build a video survelliance application
and therefore i have to look if people are looking at the
camera.therefore the first step is segmenting people, and then i have
to target their eyes.
thanks again.
cheers

Subject: background subtraction

From: Filipe

Date: 13 Oct, 2008 21:38:01

Message: 4 of 4

Hello!

I'm glad this have helped you.

Just some questions.
What is the resolution of the surveillance cammera you're using? Will you be able to detect the persons' eyes with that resolution?

I think you could do a rough people detection (by image subtraction) as you've said and then detect their faces and in their faces detect their eyes...

In order to detect the faces you can use Haarclassifiers...

OpenCV implements this with great detail and it really works.

Perhaps you should try to read something about this subject and try to get a good background from where you can start more easily...

Good luck!

Boothaya <sadheerav@gmail.com> wrote in message <ec09ebbc-57e3-4dbe-9ffc-a5a30893b7e6@25g2000prz.googlegroups.com>...
> On Oct 12, 10:03=A0pm, "Filipe " <filipe.ti...@remove.this.sapo.pt>
> wrote:
> > Hi!
> >
> > In a very simple way, in order to achieve what you've refered you need to=
> have a reference image, i.e. the bakground with the persons. Then if you h=
> ave another image with the same background plus the persons you want to seg=
> ment, if you subtract the two images the result will be one black image wit=
> h only the persons on it.
> >
> > A =3D imread(.../reference_image.jpg);
> > B =3D imread(.../test_image.jpg);
> > result =3D imsubtract(B,A);
> >
> > I hope this have helped you.
> >
> > Good luck!
> >
> > Boothaya <sadhee...@gmail.com> wrote in message <4e515326-89e9-4116-8e76-=
> a6230e9ee...@1g2000prd.googlegroups.com>...
> > > hi all
> > > i am new to matlab and i need to segment people from a video file.
> > > please help me the matlab version i use is R2007b.
> > > thanks in advance.
>
>
> Thanks a lot Filipe.
> Your method totally works.if u can guide me with how to mark the
> people with a square, separated region etc. i mean when the video file
> is being played the region has to be marked.i hope you understand my
> problem. Please help me.
> thanks a million. My task is to build a video survelliance application
> and therefore i have to look if people are looking at the
> camera.therefore the first step is segmenting people, and then i have
> to target their eyes.
> thanks again.
> cheers

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
homework Matt Fig 12 Oct, 2008 11:52:47
rssFeed for this Thread

Public Submission Policy

NOTICE: Any content you submit to MATLAB Central, including personal information, is not subject to the protections which may be afforded information collected under other sections of The MathWorks, Inc. Web site. You are entirely responsible for all content that you upload, post, e-mail, transmit or otherwise make available via MATLAB Central. The MathWorks does not control the content posted by visitors to MATLAB Central and, does not guarantee the accuracy, integrity, or quality of such content. Under no circumstances will The MathWorks be liable in any way for any content not authored by The MathWorks, or any loss or damage of any kind incurred as a result of the use of any content posted, e-mailed, transmitted or otherwise made available via MATLAB Central. Read the complete Disclaimer prior to use.

Contact us at files@mathworks.com