View Single Post
  #3   Spotlight this post!  
Unread 15-02-2014, 10:53
faust1706's Avatar
faust1706 faust1706 is offline
Registered User
FRC #1706 (Ratchet Rockers)
Team Role: College Student
 
Join Date: Apr 2012
Rookie Year: 2011
Location: St Louis
Posts: 498
faust1706 is infamous around these partsfaust1706 is infamous around these parts
Re: Applying Gaussian Blur to Camera Images

Quote:
Originally Posted by Irene-4574 View Post
Hello.

Is there any way to apply a Gaussian Blur to an RGBImage? Is there a library or a function that can do this?

Here's a sample of our image processing code for reference.

ColorImage *image;
image = camera->GetImage();
image->Write("/original.bmp");
//Here's where we'd like to add the blur
BinaryImage *thresholdImage = image->ThresholdHSV(threshold);
thresholdImage->Write("/threshold.bmp");
BinaryImage *filteredImage = thresholdImage->ParticleFilter(criteria, 1);
filteredImage->Write("Filtered.bmp");

Thank you for any help you can give us!
There are plenty of libraries that can do a gaussian blur, but most of them are huge and require a lot of space on your device.

If you want to get down to what a blur is fundamentally, it is a NxN (typically 3x3) matrix that goes through your image and changes the pixel values according to some factor. A common blur is to simply average the pixel values within the NxN matrix. But, this is a color image, therefore it is 3 channels deep. So, you're going to have to apply a blur to the red, blue, and green channel (or h, s, and v depending on what you are doing).

Here is how opencv does a gaussian blur: http://docs.opencv.org/doc/tutorials...al_filter.html

A gaussian blur is a little different than the averaging technique. It gives more value to the pixels in the center: http://homepages.inf.ed.ac.uk/rbf/HIPR2/gsmooth.htm

I don't know your means of doing computer vision, so this is all the help I can give with the information I have. If you have any other questions, don't be afraid to ask!
__________________
"You're a gentleman," they used to say to him. "You shouldn't have gone murdering people with a hatchet; that's no occupation for a gentleman."
Reply With Quote