APS Excellence in Physics Education Award
November 2019

Education Prize Logo
Science SPORE Prize
November 2011

NSF Logo
The Open Source Physics Project is supported by NSF DUE-0442581.

RGB Region and Standard Error post and replies

Return to the RGB Region and Standard Error thread
Login to post to this thread

RGB Region and Standard Error
Ellie B
3 Posts

I'm using the RGB Region tracker to measure the average brightness of an object for a project, however I also need to be able to report the standard deviation/standard error of the region - is there any way to extract this information?


Replies to RGB Region and Standard Error

Re: RGB Region and Standard Error -
Douglas Brown Avatar
Douglas Brown
458 Posts

If there's a section of your video where the you know the brightness is steady, how much variation do you see from one frame to another? If you repeat it a second time or use a different camera, how much does it differ from the first?  This kind of info would be a good start.  


> I'm using the RGB Region tracker to measure the average
> brightness of an object for a project, however I also
> need to be able to report the standard deviation/standard
> error of the region - is there any way to extract
> this information?



Re: RGB Region and Standard Error -
Ellie B
3 Posts

Hello, thank you for your reply - I am taking data from every frame of a video, and taking the average intensity over the object for that moment in time to be the output of the RGB region tracker, with its radius set so as to cover most of the object.  I understood this to be the average RGB data from across every pixel covered by the tracker, and wondered if there was also a way to extract the standard deviation/standard error from across the pixels alongside this average value?



Re: RGB Region and Standard Error -
Douglas Brown Avatar
Douglas Brown
458 Posts

OK, now I see what you want. That is not a quantity that is currently measured by RGB regions but it could be. I'll look into it.  For now, however, the only thing I can think to do is to to create numerous very small regions (radius 1, perhaps) that are close together but not overlapping, then compare with each other. This would still not give you individual pixel variations, but it would be something :-)  Hope this helps!  Doug


> Hello, thank you for your reply - I am taking data
> from every frame of a video, and taking the average
> intensity over the object for that moment in time
> to be the output of the RGB region tracker, with its
> radius set so as to cover most of the object.  I understood
> this to be the average RGB data from across every
> pixel covered by the tracker, and wondered if there
> was also a way to extract the standard deviation/standard
> error from across the pixels alongside this average
> value?



Re: RGB Region and Standard Error -
Douglas Brown Avatar
Douglas Brown
458 Posts

Ellie, thanks again for your post. I did look into this and was able to add R, G and B standard deviations to the RGB region data. It is indeed quite interesting to see how this varies in different parts of an image--essentially a measure of color "flatness".  

If you want the sd in the lumens rather than the individual color components you can apply a GrayScale filter to the video (Video|Filters|New|GrayScale). Leave the filter in its default "Video" mode, which is the same as luma.  Then each channel R, G and B will have luma data including sd.

Unfortunately the next release of Tracker, with this new sd data, is still possibly weeks away, though it could be sooner. I must ask you to be patient in the meantime :-(  Doug


> I am taking data
> from every frame of a video, and taking the average
> intensity over the object for that moment in time
> to be the output of the RGB region tracker, with its
> radius set so as to cover most of the object.  I understood
> this to be the average RGB data from across every
> pixel covered by the tracker, and wondered if there
> was also a way to extract the standard deviation/standard
> error from across the pixels alongside this average
> value?



Re: RGB Region and Standard Error -
Ellie B
3 Posts

Hi Doug, sorry for the slow reply - thank you for looking into this.  I've gone ahead and followed your advice on using the radius 1 regions in the meantime, and indeed eagerly await the update!  Best wishes, Ellie



OSP Projects:
Open Source Physics - EJS Modeling
Tracker
Physlet Physics
Physlet Quantum Physics
STP Book