Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Motion estimation vs. background subtraction
Date: Fri, 14 Mar 2008 11:50:18 +0000 (UTC)
Organization: STFC Rutherford Appleton Laboratory
Lines: 56
Message-ID: <frdopq$iqe$1@fred.mathworks.com>
References: <fr8o5t$m76$1@fred.mathworks.com> <fr8rvq$rfs$1@fred.mathworks.com> <frb7ii$fpa$1@fred.mathworks.com> <frba51$nt5$1@fred.mathworks.com> <frbbrd$k4h$1@fred.mathworks.com> <frbdt2$pdp$1@fred.mathworks.com> <frbg65$2s6$1@fred.mathworks.com> <frdnhu$ies$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-05-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1205495418 19278 172.30.248.35 (14 Mar 2008 11:50:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Fri, 14 Mar 2008 11:50:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 968489
Xref: news.mathworks.com comp.soft-sys.matlab:457222



"Torvald Helmer" <torvald.helmer@mathworks.com> wrote in 
message <frdnhu$ies$1@fred.mathworks.com>...
> To Dave Robinson, and others.
> 
> I have some further question for the scholar :)
> 
> The result was actually not as I hoped it would be. The 
> values for the mean background and the std.deviation is 
> decimal numbers. The values of each frame I load and 
> eventually convert to binary is all integer numbers. 
Should 
> these be converted to decimals also? Should maybe each 
> frame processed be normalized as well?
> 
> What I get know is no motion at all, it does not registar 
> any movement. This maybe because the because the I have 
> decimals one place and integers another place, or that 
they 
> are not converted into the same datarange. So, that the 
> comparison of the values in a fram against the standard 
> deviation reveals too low values all over the image, 
which 
> indicates no movement.
> 
> I might be missing one step in my code here. If you want, 
I 
> can upload my m-files to a server, if you want to take a 
> look at the overall process.
> 
> Thanks, Helmer.

Unless there is a very good reason for remaining in UINT 8 
format, I normally switch to doubles as soon as any image 
enters the computer (see my response to your other thread), 
and only convert back when/if I need to display the result.

Puzzled with your comment about normalizing your input 
frames. If you mean should you convert it to Normalized RGB 
then yes ALL calculations should be done in the Normalized 
colour domain. (these need to be doubles anyway to do the 
division in the colour normalization process) If you mean 
rescale your dynamic range somehow, the im2double() - or 
whatever it is called automatically maps your input 0 --> 
255 range into a 0 --> 1 scale, which will mean everything 
is correctly scaled for you.

Alas I don't have the image processing toolbox here, so 
there is very little point in uploading the code - unless 
one of the real guru's come on line.

Hope that helps

Dave Robinson