logo       

Re: converting grey-scale img => mask: msg#00675

lib.opencv

Subject: Re: converting grey-scale img => mask

Hello

You could have a look at cvCreateGaussianBGModel(),
cvUpdateBGStatModel() and CvReleaseBGStatModel() in cvaux. There is
no offical documentation yet but it may give you better results than
simple frame subtraction depending on what your needs are.

For frame subtraction, I would first convert your images to greyscale
using cvCvtColor() (so far as I know greyscale is the same as the V in
HSV). Then subtract them and use cvThreshold() to threshold the
difference image. This will give you your mask.

Bye
Dugal

--- In OpenCV@xxxxxxxxxxxxxxx, "chrishutchinsbristol"
<chris.m.hutchins@xxxx> wrote:
>
> Hi,
>
> Apologies if this is a stupid question - I'm new to OpenCv. I am
> trying to detect movement in an image as a pre-cursor to other
> analysis and so far have the following steps:
>
> 1. Subtract prev frame from current frame to give me an image composed
> of pixels that have changed between the two frames.
> 2. Converted this to HSV and extracted the value channel - the
> brightness of this channel gives an indication of the level of
> movement.
> 3. Now I want to convert the val image to a mask (preferably with a
> threshold!) and apply this to my original image.
>
> Any help with step 3 would be appreciated!
>
> Many thanks,
> Chris Hutchins
>






Change settings: http://www.yahoogroups.com/mygroups, select
Get Emails (get all posts)
Daily Digest (one summary email per day)
Read on the web (read posts on the web only)Or Unsubscribe by mailing
OpenCV-unsubscribe@xxxxxxxxxxxxxxx



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise