Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Applying Gaussian Blur to Camera Images (http://www.chiefdelphi.com/forums/showthread.php?t=126484)

Irene-4574 14-02-2014 23:48

Applying Gaussian Blur to Camera Images
 
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!

Greg McKaskle 15-02-2014 10:03

Re: Applying Gaussian Blur to Camera Images
 
C:\Program Files (x86)\National Instruments\Vision\Documentation\NIVisionCVI.chm

or the Program Files version is the documentation for the C entry points of the vision processing library that is already installed on target and on potentially on the driver station.

I think you are looking for the Spatial Filters using a Gaussian kernel. There are lots to choose from.

Greg McKaskle

faust1706 15-02-2014 10:53

Re: Applying Gaussian Blur to Camera Images
 
Quote:

Originally Posted by Irene-4574 (Post 1343356)
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. :D If you have any other questions, don't be afraid to ask!


All times are GMT -5. The time now is 12:48.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi